Skip to content

Commit

Permalink
Repoint trainer pokemon data to C files
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseurae committed Oct 19, 2024
1 parent bcd7d0a commit 08e173e
Show file tree
Hide file tree
Showing 22 changed files with 12,872 additions and 249 deletions.
173 changes: 0 additions & 173 deletions charmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,179 +155,6 @@ SUPER_RE = A0
TALL_PLUS = FC 0C FB
'$' = FF

@ Hiragana
'あ' = 01
'い' = 02
'う' = 03
'え' = 04
'お' = 05
'か' = 06
'き' = 07
'く' = 08
'け' = 09
'こ' = 0A
'さ' = 0B
'し' = 0C
'す' = 0D
'せ' = 0E
'そ' = 0F
'た' = 10
'ち' = 11
'つ' = 12
'て' = 13
'と' = 14
'な' = 15
'に' = 16
'ぬ' = 17
'ね' = 18
'の' = 19
'は' = 1A
'ひ' = 1B
'ふ' = 1C
'へ' = 1D
'ほ' = 1E
'ま' = 1F
'み' = 20
'む' = 21
'め' = 22
'も' = 23
'や' = 24
'ゆ' = 25
'よ' = 26
'ら' = 27
'り' = 28
'る' = 29
'れ' = 2A
'ろ' = 2B
'わ' = 2C
'を' = 2D
'ん' = 2E
'ぁ' = 2F
'ぃ' = 30
'ぅ' = 31
'ぇ' = 32
'ぉ' = 33
'ゃ' = 34
'ゅ' = 35
'ょ' = 36
'が' = 37
'ぎ' = 38
'ぐ' = 39
'げ' = 3A
'ご' = 3B
'ざ' = 3C
'じ' = 3D
'ず' = 3E
'ぜ' = 3F
'ぞ' = 40
'だ' = 41
'ぢ' = 42
'づ' = 43
'で' = 44
'ど' = 45
'ば' = 46
'び' = 47
'ぶ' = 48
'べ' = 49
'ぼ' = 4A
'ぱ' = 4B
'ぴ' = 4C
'ぷ' = 4D
'ぺ' = 4E
'ぽ' = 4F
'っ' = 50

@ Katakana
'ア' = 51
'イ' = 52
'ウ' = 53
'エ' = 54
'オ' = 55
'カ' = 56
'キ' = 57
'ク' = 58
'ケ' = 59
'コ' = 5A
'サ' = 5B
'シ' = 5C
'ス' = 5D
'セ' = 5E
'ソ' = 5F
'タ' = 60
'チ' = 61
'ツ' = 62
'テ' = 63
'ト' = 64
'ナ' = 65
'ニ' = 66
'ヌ' = 67
'ネ' = 68
'ノ' = 69
'ハ' = 6A
'ヒ' = 6B
'フ' = 6C
'ヘ' = 6D
'ホ' = 6E
'マ' = 6F
'ミ' = 70
'ム' = 71
'メ' = 72
'モ' = 73
'ヤ' = 74
'ユ' = 75
'ヨ' = 76
'ラ' = 77
'リ' = 78
'ル' = 79
'レ' = 7A
'ロ' = 7B
'ワ' = 7C
'ヲ' = 7D
'ン' = 7E
'ァ' = 7F
'ィ' = 80
'ゥ' = 81
'ェ' = 82
'ォ' = 83
'ャ' = 84
'ュ' = 85
'ョ' = 86
'ガ' = 87
'ギ' = 88
'グ' = 89
'ゲ' = 8A
'ゴ' = 8B
'ザ' = 8C
'ジ' = 8D
'ズ' = 8E
'ゼ' = 8F
'ゾ' = 90
'ダ' = 91
'ヂ' = 92
'ヅ' = 93
'デ' = 94
'ド' = 95
'バ' = 96
'ビ' = 97
'ブ' = 98
'ベ' = 99
'ボ' = 9A
'パ' = 9B
'ピ' = 9C
'プ' = 9D
'ペ' = 9E
'ポ' = 9F
'ッ' = A0

@ Japanese punctuation
' ' = 00
'!' = AB
'?' = AC
'。' = AD
'ー' = AE
'·' = AF
'‥' = B0

STRING = FD

@ string placeholders
Expand Down
3 changes: 3 additions & 0 deletions config.asm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
; Adds an item which allows you to see your Pokemon's base stats, IVs and EVs.
.definelabel STATS_VIEWER, 1

; Trainer battle balances.
.definelabel TRAINER_CHANGES, 1

; Bugfixes
; --------

Expand Down
60 changes: 60 additions & 0 deletions include/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,65 @@ struct PACKED ChooseMoveStruct
u8 monType2;
};

struct PACKED TrainerMonNoItemDefaultMoves
{
u16 iv;
u16 level; // Is actually a u8, but the high byte is always 0
u16 species;
u16 filler1;
};

// IV + LEVEL + SPECIES + MOVES
struct PACKED TrainerMonNoItemCustomMoves
{
u16 iv;
u16 level;
u16 species;
u16 moves[4];
u16 filler1;
};

// IV + LEVEL + SPECIES + ITEMS
struct PACKED TrainerMonItemDefaultMoves
{
u16 iv;
u16 level;
u16 species;
u16 heldItem;
};

// IV + LEVEL + SPECIES + ITEMS + MOVES
struct PACKED TrainerMonItemCustomMoves
{
u16 iv;
u16 level;
u16 species;
u16 heldItem;
u16 moves[4];
};

union TrainerMonPtr
{
const struct TrainerMonNoItemDefaultMoves *NoItemDefaultMoves;
const struct TrainerMonNoItemCustomMoves *NoItemCustomMoves;
const struct TrainerMonItemDefaultMoves *ItemDefaultMoves;
const struct TrainerMonItemCustomMoves *ItemCustomMoves;
};

struct PACKED Trainer
{
/*0x00*/ u8 partyFlags;
/*0x01*/ u8 trainerClass;
/*0x02*/ u8 encounterMusic_gender;
/*0x03*/ u8 trainerPic;
/*0x04*/ u8 trainerName[12];
/*0x10*/ u16 items[4];
/*0x18*/ bool8 doubleBattle;
/*0x1C*/ u32 aiFlags;
/*0x20*/ u8 partySize;
/*0x24*/ union TrainerMonPtr party;
};

extern u16 gBattleTypeFlags;
extern struct BattlePokemon gBattleMons[4];
extern u16 gCurrentMove;
Expand Down Expand Up @@ -253,6 +312,7 @@ extern s32 gTakenDmg[4];
extern u8 gTakenDmgByBattler[4];
extern u8 BattleScript_SubstituteFade[];
extern u8 gBattleBufferA[][0x200];
extern const struct Trainer gTrainers[];

extern const u8 gBattleMoveSplit[NUM_MOVES];

Expand Down
Loading

0 comments on commit 08e173e

Please sign in to comment.