summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/.clang-format24
-rw-r--r--include/battle.h39
-rw-r--r--include/battle_811DA74.h6
-rw-r--r--include/battle_anim_81258BC.h2
-rw-r--r--include/battle_anim_8137220.h2
-rw-r--r--include/battle_message.h4
-rw-r--r--include/battle_party_menu.h19
-rw-r--r--include/choose_party.h7
-rw-r--r--include/data2.h19
-rw-r--r--include/de_rom_8040FE0.h6
-rw-r--r--include/decompress.h14
-rw-r--r--include/easy_chat.h4
-rw-r--r--include/field_effect.h6
-rw-r--r--include/fonts/font0_widths.h41
-rw-r--r--include/fonts/font1_widths.h37
-rw-r--r--include/fonts/font3_widths.h41
-rw-r--r--include/fonts/font4_widths.h37
-rw-r--r--include/fonts/type1_map.h250
-rw-r--r--include/fonts/type3_map.h131
-rw-r--r--include/global.h263
-rw-r--r--include/graphics.h26
-rw-r--r--include/intro_credits_graphics.h14
-rw-r--r--include/link.h11
-rw-r--r--include/menu.h4
-rw-r--r--include/party_menu.h38
-rw-r--r--include/pokeball.h6
-rw-r--r--include/pokemon.h259
-rw-r--r--include/pokemon_summary_screen.h2
-rw-r--r--include/rom3.h44
-rw-r--r--include/rom_8077ABC.h22
-rw-r--r--include/songs.h40
-rw-r--r--include/sprite.h21
-rw-r--r--include/trig.h2
33 files changed, 547 insertions, 894 deletions
diff --git a/include/.clang-format b/include/.clang-format
new file mode 100644
index 000000000..995d5d96d
--- /dev/null
+++ b/include/.clang-format
@@ -0,0 +1,24 @@
+BasedOnStyle: LLVM
+AllowShortFunctionsOnASingleLine: None
+BreakBeforeBraces: Allman
+ColumnLimit: 100
+UseTab: Never
+IndentWidth: 4
+TabWidth: 4
+AlignAfterOpenBracket: DontAlign
+Cpp11BracedListStyle: false
+BreakStringLiterals: false
+IndentCaseLabels: false
+BinPackArguments: false
+BinPackParameters: false
+IncludeCategories:
+ - Regex: '^"gba/types\.h"$'
+ Priority: -4
+ - Regex: '^"global\.h"$'
+ Priority: -3
+ - Regex: '^"gba/gba\.h"$'
+ Priority: -2
+ - Regex: '^"gba/'
+ Priority: -1
+ - Regex: '.\*'
+ Priority: 1
diff --git a/include/battle.h b/include/battle.h
index 255813ca3..d93860094 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -185,7 +185,6 @@ struct Struct2017810
u8 unk1_0:1;
u8 unk2;
u8 unk3;
- //u8 filler2[2];
u8 unk4;
u8 unk5;
u8 unk6;
@@ -198,13 +197,21 @@ struct Struct2017810
struct Struct2017840
{
u16 unk0;
- u8 filler2[7];
+ u8 filler2[6];
+ u8 unk8;
u8 unk9_0:1;
};
+struct Struct20238C8
+{
+ u8 unk0_0:7;
+ u8 unk0_7:1;
+};
+
extern struct UnkBattleStruct1 unk_2016A00;
-extern struct UnkBattleStruct4 gUnknown_02024CA8[];
+extern struct UnkBattleStruct4 gDisableStructs[];
extern struct AI_ThinkingStruct gAIThinkingSpace;
+extern struct Struct20238C8 gUnknown_020238C8;
// TODO: move ewram to global.h
extern u8 ewram[];
@@ -263,30 +270,30 @@ void sub_8011834(void);
void bc_801362C(void);
void sub_8011970(void);
void sub_80119B4(void);
-void sub_8011B00(void);
-void sub_8011E8C(void);
+void BattleBeginFirstTurn(void);
+void BattleTurnPassed(void);
// asm/battle_2.o
void sub_8012324(void);
void sub_8012FBC(u8, u8);
u8 b_first_side(u8, u8, u8);
-void sub_801365C(u8);
-void sub_801377C(void);
+void TurnValuesCleanUp(u8);
+void SpecialStatusesClear(void);
void sub_80138F0(void);
-void dp01_battle_side_mark_buffer_for_execution();
+void MarkBufferBankForExecution();
void sub_80155A4();
-void b_cancel_multi_turn_move_maybe(u8);
-void b_std_message();
+void CancelMultiTurnMoves(u8);
+void PrepareStringBattle();
void sub_80156DC();
void sub_80157C4(u8 index);
// asm/battle_3.o
u8 sub_8015A98(u8, u8, u8);
-u8 sub_8015DFC();
-u8 sub_8016558();
+u8 UpdateTurnCounters();
+u8 TurnBasedEffects();
u8 sub_80170DC();
u8 sub_80173A4();
-u8 sub_8018324(u8, u8, u8, u8, u16);
+u8 AbilityBattleEffects(u8, u8, u8, u8, u16);
u8 sub_801A02C();
// asm/battle_4.o
@@ -295,7 +302,7 @@ void move_effectiveness_something(u16, u8, u8);
// asm/battle_5.o
void nullsub_91(void);
-void sub_802BF74(void);
+void SetBankFuncToPlayerBufferRunCommand(void);
void sub_802C098();
void c3_0802FDF4(u8);
void sub_802E3E4(u8, int);
@@ -312,9 +319,9 @@ void sub_8031F88(u8);
void sub_80324F8(struct Pokemon *, u8);
void sub_8032638();
void sub_8032AA8(u8, u8);
-void sub_8032AE0(void);
+void SetBankFuncToOpponentBufferRunCommand(void);
// asm/battle_9.o
-void sub_8037510(void);
+void SetBankFuncToLinkOpponentBufferRunCommand(void);
#endif // GUARD_BATTLE_H
diff --git a/include/battle_811DA74.h b/include/battle_811DA74.h
index 8b7e2f090..750c3fe2b 100644
--- a/include/battle_811DA74.h
+++ b/include/battle_811DA74.h
@@ -1,10 +1,10 @@
#ifndef GUARD_BATTLE_811DA74_H
#define GUARD_BATTLE_811DA74_H
-void sub_811DA78(void);
-void sub_811DA94(void);
+void SetBankFuncToLinkPartnerBufferRunCommand(void);
+void LinkPartnerBufferRunCommand(void);
void sub_811E0A0(void);
-void dp01_tbl3_exec_completed(void);
+void LinkPartnerBufferExecCompleted(void);
u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *b);
void sub_811EC68(u8);
diff --git a/include/battle_anim_81258BC.h b/include/battle_anim_81258BC.h
index 6bbf5dde2..45ef4b8cc 100644
--- a/include/battle_anim_81258BC.h
+++ b/include/battle_anim_81258BC.h
@@ -1,7 +1,7 @@
#ifndef GUARD_BATTLE_ANIM_81258BC_H
#define GUARD_BATTLE_ANIM_81258BC_H
-void sub_812B468(void);
+void SetBankFuncToSafariBufferRunCommand(void);
void bx_battle_menu_t6_2(void);
#endif // GUARD_BATTLE_ANIM_81258BC_H
diff --git a/include/battle_anim_8137220.h b/include/battle_anim_8137220.h
index c9708ac62..73bf0d883 100644
--- a/include/battle_anim_8137220.h
+++ b/include/battle_anim_8137220.h
@@ -1,6 +1,6 @@
#ifndef GUARD_BATTLE_ANIM_8137220_H
#define GUARD_BATTLE_ANIM_8137220_H
-void sub_8137224(void);
+void SetBankFuncToWallyBufferRunCommand(void);
#endif // GUARD_BATTLE_ANIM_8137220_H
diff --git a/include/battle_message.h b/include/battle_message.h
index 04a7770a3..da57333a5 100644
--- a/include/battle_message.h
+++ b/include/battle_message.h
@@ -1,7 +1,7 @@
#ifndef GUARD_BATTLE_MESSAGE_H
#define GUARD_BATTLE_MESSAGE_H
-void get_battle_strings_(u8 *);
-void sub_8120FFC(const u8 *, u8 *);
+void StrCpyDecodeToDisplayedStringBattle(const u8 *);
+void StrCpyDecodeBattle(const u8 *, u8 *);
#endif // GUARD_BATTLE_MESSAGE_H
diff --git a/include/battle_party_menu.h b/include/battle_party_menu.h
index 5112c7b3c..71bd2cf51 100644
--- a/include/battle_party_menu.h
+++ b/include/battle_party_menu.h
@@ -1,26 +1,9 @@
#ifndef GUARD_BATTLE_PARTY_MENU_H
#define GUARD_BATTLE_PARTY_MENU_H
-#include "task.h"
-
-// TODO: Unify all of the 0x0201B000 structs
-struct Struct201B000
-{
- u8 filler0[0x259];
- u8 unk259;
- u8 filler25A[6];
- u8 unk260;
- u8 filler261[1];
- u8 unk262;
- s16 unk264;
- s16 unk266;
-};
-
extern u8 unk_2000000[];
+#define EWRAM_1609D unk_2000000[0x1609D]
void SetUpBattlePokemonMenu(u8);
-#define EWRAM_1609D unk_2000000[0x1609D]
-#define EWRAM_1B000 (*(struct Struct201B000 *)(unk_2000000 + 0x1B000))
-
#endif
diff --git a/include/choose_party.h b/include/choose_party.h
index 1e575a355..e31aa3c02 100644
--- a/include/choose_party.h
+++ b/include/choose_party.h
@@ -3,6 +3,11 @@
void sub_8121E10(void);
void sub_8121E34(void);
-void sub_8123138(u8);
+bool8 sub_8121E78(void);
+void sub_81222B0(u8 taskId);
+bool8 sub_8122854(void);
+void sub_8122A48(u8 taskId);
+void sub_8122E0C(u8 taskId);
+void sub_8123138(u8 taskId);
#endif // GUARD_CHOOSE_PARTY_H
diff --git a/include/data2.h b/include/data2.h
index 759efe3d3..f292472ef 100644
--- a/include/data2.h
+++ b/include/data2.h
@@ -3,7 +3,8 @@
#include "sprite.h"
-struct UnknownStructD2 {
+struct UnknownStructD2
+{
u32 unk0;
u32 unk4;
u32 unk8;
@@ -21,15 +22,15 @@ extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E7C18;
extern const union AnimCmd *const gSpriteAnimTable_81E7C64[];
extern struct MonCoords gMonFrontPicCoords[];
extern struct MonCoords gMonBackPicCoords[];
-extern struct SpriteSheet gMonFrontPicTable[];
-extern struct SpriteSheet gMonBackPicTable[];
-extern const struct SpritePalette gMonPaletteTable[];
-extern const struct SpritePalette gMonShinyPaletteTable[];
+extern struct CompressedSpriteSheet gMonFrontPicTable[];
+extern struct CompressedSpriteSheet gMonBackPicTable[];
+extern const struct CompressedSpritePalette gMonPaletteTable[];
+extern const struct CompressedSpritePalette gMonShinyPaletteTable[];
extern const union AnimCmd *const *const gUnknown_081EC2A4[];
extern const union AnimCmd *const *const gUnknown_081ECACC[];
extern struct MonCoords gTrainerBackPicCoords[];
-extern struct SpriteSheet gTrainerBackPicTable[];
-extern const struct SpritePalette gTrainerBackPicPaletteTable[];
+extern struct CompressedSpriteSheet gTrainerBackPicTable[];
+extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
extern u8 gEnemyMonElevation[];
extern const u8 gTrainerClassNames[][13];
extern const struct Trainer gTrainers[];
@@ -37,8 +38,8 @@ extern u8 gSpeciesNames[][11];
extern u8 gMoveNames[][13];
extern const struct UnknownStructD2 gUnknown_081F9674;
extern const u8 gUnknown_081F96C8[];
-extern struct SpriteSheet gUnknown_081FAEA4;
-extern struct SpritePalette gUnknown_081FAEAC;
+extern struct CompressedSpriteSheet gUnknown_081FAEA4;
+extern struct CompressedSpritePalette gUnknown_081FAEAC;
extern const struct SpriteTemplate gSpriteTemplate_81FAF0C;
extern void *const gUnknown_081FAF4C[];
extern struct BattleMove gBattleMoves[];
diff --git a/include/de_rom_8040FE0.h b/include/de_rom_8040FE0.h
new file mode 100644
index 000000000..1ec4ba28c
--- /dev/null
+++ b/include/de_rom_8040FE0.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_DE_ROM_8040FE0
+#define GUARD_DE_ROM_8040FE0
+
+u8 *de_sub_8041024(s32 arg0, u32 arg1);
+
+#endif // GUARD_DE_ROM_8040FE0
diff --git a/include/decompress.h b/include/decompress.h
index 28570afdd..07d69301f 100644
--- a/include/decompress.h
+++ b/include/decompress.h
@@ -5,13 +5,13 @@
void sub_800D238(const void *src, void *dest);
void LZDecompressVram(const void *src, void *dest);
-void LoadCompressedObjectPic(const struct SpriteSheet *a);
-void LoadCompressedObjectPicOverrideBuffer(const struct SpriteSheet *a, void *buffer);
-void LoadCompressedObjectPalette(const struct SpritePalette *a);
-void LoadCompressedObjectPaletteOverrideBuffer(const struct SpritePalette *a, void *buffer);
-void DecompressPicFromTable_2(const struct SpriteSheet *a, u8 b, u8 c, void *d, void *e, s32 f);
-void HandleLoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g);
-void LoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 h);
+void LoadCompressedObjectPic(const struct CompressedSpriteSheet *a);
+void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *a, void *buffer);
+void LoadCompressedObjectPalette(const struct CompressedSpritePalette *a);
+void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer);
+void DecompressPicFromTable_2(const struct CompressedSpriteSheet *a, u8 b, u8 c, void *d, void *e, s32 f);
+void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g);
+void LoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 h);
void Unused_LZDecompressWramIndirect(const void **src, void *dest);
#endif // GUARD_DECOMPRESS_H
diff --git a/include/easy_chat.h b/include/easy_chat.h
index 6b04f524b..03e9bb737 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -41,4 +41,8 @@ void sub_80EB890(u8);
u8 sub_80EB8C0(void);
u16 sub_80EB8EC(void);
+#if GERMAN
+u32 de_sub_80EB748(u32, u32);
+#endif
+
#endif // GUARD_EASYCHAT_H
diff --git a/include/field_effect.h b/include/field_effect.h
index 74b5fa34d..cd84652b1 100644
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -72,15 +72,13 @@ enum FieldEffectScriptIdx
FLDEFF_USE_TELEPORT
};
-extern const struct SpritePalette gTrainerFrontPicPaletteTable[2];
+extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[2];
extern const struct SpritePalette gUnknown_0839F114;
-extern const struct SpriteSheet gTrainerFrontPicTable[2];
+extern const struct CompressedSpriteSheet gTrainerFrontPicTable[2];
extern const struct SpriteTemplate gSpriteTemplate_839F128;
extern const struct OamData gOamData_839F0F4;
extern struct SpriteTemplate gUnknown_02024E8C;
-extern const struct SpritePalette *sub_80409C8(u16, u32, u32);
-
extern u8 gLastFieldPokeMenuOpened;
u32 FieldEffectStart(u8 id);
diff --git a/include/fonts/font0_widths.h b/include/fonts/font0_widths.h
deleted file mode 100644
index 77fcff3ee..000000000
--- a/include/fonts/font0_widths.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#if REVISION >= 1
-static const u8 sFont0Widths[] =
-{
- 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
- 8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, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
- 7, 7, 7, 7, 7, 7, 7, 8, 6, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
- 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
- 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
- 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
-};
-#endif
diff --git a/include/fonts/font1_widths.h b/include/fonts/font1_widths.h
deleted file mode 100644
index 454bbfaca..000000000
--- a/include/fonts/font1_widths.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#if REVISION >= 1
-static const u8 sFont1Widths[] =
-{
- 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
- 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
- 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
- 8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
- 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5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 6, 6, 6, 6, 6, 6, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
- 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
- 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
- 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
- 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
- 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
-};
-#endif
diff --git a/include/fonts/font4_widths.h b/include/fonts/font4_widths.h
deleted file mode 100644
index 63adf4921..000000000
--- a/include/fonts/font4_widths.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#if REVISION >= 1
-static const u8 sFont4Widths[] =
-{
- 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
- 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
- 5, 5, 5, 5, 5, 5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, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
- 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
- 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
-};
-#endif
diff --git a/include/fonts/type1_map.h b/include/fonts/type1_map.h
deleted file mode 100644
index 45e42f62c..000000000
--- a/include/fonts/type1_map.h
+++ /dev/null
@@ -1,250 +0,0 @@
-static const u8 sFontType1Map[] =
-{
- 0xD4, 0xD4,
- 0xD4, 0x31,
- 0xD4, 0x32,
- 0xD4, 0x33,
- 0xD4, 0x34,
- 0xD4, 0x35,
- 0xD4, 0x36,
- 0xD4, 0x37,
- 0xD4, 0x38,
- 0xD4, 0x39,
- 0xD4, 0x3A,
- 0xD4, 0x3B,
- 0xD4, 0x3C,
- 0xD4, 0x3D,
- 0xD4, 0x3E,
- 0xD4, 0x3F,
- 0xD4, 0x40,
- 0xD4, 0x41,
- 0xD4, 0x42,
- 0xD4, 0x43,
- 0xD4, 0x44,
- 0xD4, 0x45,
- 0xD4, 0x46,
- 0xD4, 0x47,
- 0xD4, 0x48,
- 0xD4, 0x49,
- 0xD4, 0x4A,
- 0xD4, 0x4B,
- 0xD4, 0x4C,
- 0xD4, 0x4D,
- 0xD4, 0x4E,
- 0xD4, 0x4F,
- 0xD4, 0x50,
- 0xD4, 0x51,
- 0xD4, 0x52,
- 0xD4, 0x53,
- 0xD4, 0x54,
- 0xD4, 0x55,
- 0xD4, 0x56,
- 0xD4, 0x57,
- 0xD4, 0x58,
- 0xD4, 0x59,
- 0xD4, 0x5A,
- 0xD4, 0x5B,
- 0xD4, 0x5C,
- 0xD4, 0x5D,
- 0xD4, 0x5E,
- 0xD4, 0x31,
- 0xD4, 0x32,
- 0xD4, 0x33,
- 0xD4, 0x34,
- 0xD4, 0x35,
- 0xD4, 0x60,
- 0xD4, 0x61,
- 0xD4, 0x62,
- 0x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xD4, 0x98,
- 0xD4, 0x99,
- 0xD4, 0x9A,
- 0xD4, 0x9B,
- 0xD4, 0x9C,
- 0xD4, 0x9D,
- 0xD4, 0x9E,
- 0xD4, 0x9F,
- 0xD4, 0xA0,
- 0xD4, 0xA1,
- 0xD4, 0xA2,
- 0xD4, 0xA3,
- 0xD4, 0xA4,
- 0xD4, 0xA5,
- 0xD4, 0xA6,
- 0xD4, 0xA7,
- 0xD4, 0xA8,
- 0xD4, 0xA9,
- 0xD4, 0xAA,
- 0xD4, 0xAB,
- 0xD4, 0xAC,
- 0xD4, 0xAD,
- 0xD4, 0xAE,
- 0xD4, 0xAF,
- 0xD4, 0xB0,
- 0xD4, 0xB1,
- 0xD4, 0xB2,
- 0xD4, 0xB3,
- 0xD4, 0x6D,
- 0xD4, 0xD5,
- 0xD4, 0xD6,
- 0xD4, 0xD7,
- 0xD4, 0xD8,
- 0xD4, 0xD9,
- 0xD4, 0xDA,
- 0xD4, 0xDB,
-};
diff --git a/include/fonts/type3_map.h b/include/fonts/type3_map.h
deleted file mode 100644
index 48219423b..000000000
--- a/include/fonts/type3_map.h
+++ /dev/null
@@ -1,131 +0,0 @@
-static const u8 sFontType3Map[] =
-{
- 0x00, 0x10,
- 0x01, 0x10,
- 0x02, 0x10,
- 0x03, 0x10,
- 0x04, 0x11,
- 0x05, 0x11,
- 0x06, 0x11,
- 0x07, 0x11,
- 0x08, 0x12,
- 0x09, 0x12,
- 0x0A, 0x12,
- 0x0B, 0x12,
- 0x0C, 0x13,
- 0x0D, 0x13,
- 0x0E, 0x13,
- 0x0F, 0x13,
- 0x00, 0x14,
- 0x01, 0x14,
- 0x02, 0x14,
- 0x03, 0x14,
- 0x04, 0x15,
- 0x05, 0x15,
- 0x06, 0x15,
- 0x07, 0x15,
- 0x08, 0x16,
- 0x09, 0x16,
- 0x0A, 0x16,
- 0x0B, 0x16,
- 0x0C, 0x17,
- 0x0D, 0x17,
- 0x0E, 0x17,
- 0x0F, 0x17,
- 0x00, 0x18,
- 0x01, 0x18,
- 0x02, 0x18,
- 0x03, 0x18,
- 0x04, 0x19,
- 0x05, 0x19,
- 0x06, 0x19,
- 0x07, 0x19,
- 0x08, 0x1A,
- 0x09, 0x1A,
- 0x0A, 0x1A,
- 0x0B, 0x1A,
- 0x0C, 0x1B,
- 0x0D, 0x1B,
- 0x0E, 0x1B,
- 0x0F, 0x1B,
- 0x00, 0x1C,
- 0x01, 0x1C,
- 0x02, 0x1C,
- 0x03, 0x1C,
- 0x04, 0x1D,
- 0x05, 0x1D,
- 0x06, 0x1D,
- 0x07, 0x1D,
- 0x08, 0x1E,
- 0x09, 0x1E,
- 0x0A, 0x1E,
- 0x0B, 0x1E,
- 0x0C, 0x1F,
- 0x0D, 0x1F,
- 0x0E, 0x1F,
- 0x0F, 0x1F,
- 0x20, 0x24,
- 0x20, 0x24,
- 0x21, 0x24,
- 0x21, 0x24,
- 0x20, 0x24,
- 0x20, 0x24,
- 0x21, 0x24,
- 0x21, 0x24,
- 0x22, 0x25,
- 0x22, 0x25,
- 0x23, 0x25,
- 0x23, 0x25,
- 0x22, 0x25,
- 0x22, 0x25,
- 0x23, 0x25,
- 0x23, 0x25,
- 0x20, 0x24,
- 0x20, 0x24,
- 0x21, 0x24,
- 0x21, 0x24,
- 0x20, 0x24,
- 0x20, 0x24,
- 0x21, 0x24,
- 0x21, 0x24,
- 0x22, 0x25,
- 0x22, 0x25,
- 0x23, 0x25,
- 0x23, 0x25,
- 0x22, 0x25,
- 0x22, 0x25,
- 0x23, 0x25,
- 0x23, 0x25,
- 0x20, 0x26,
- 0x20, 0x26,
- 0x21, 0x26,
- 0x21, 0x26,
- 0x20, 0x26,
- 0x20, 0x26,
- 0x21, 0x26,
- 0x21, 0x26,
- 0x22, 0x27,
- 0x22, 0x27,
- 0x23, 0x27,
- 0x23, 0x27,
- 0x22, 0x27,
- 0x22, 0x27,
- 0x23, 0x27,
- 0x23, 0x27,
- 0x20, 0x26,
- 0x20, 0x26,
- 0x21, 0x26,
- 0x21, 0x26,
- 0x20, 0x26,
- 0x20, 0x26,
- 0x21, 0x26,
- 0x21, 0x26,
- 0x22, 0x27,
- 0x22, 0x27,
- 0x23, 0x27,
- 0x23, 0x27,
- 0x22, 0x27,
- 0x22, 0x27,
- 0x23, 0x27,
- 0x23, 0x27,
-};
diff --git a/include/global.h b/include/global.h
index 9da4bd57c..e90fcdd0f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -14,9 +14,9 @@
#define INCBIN_S8 {0}
#define INCBIN_S16 {0}
#define INCBIN_S32 {0}
-void * memcpy (void *, const void *, size_t);
-void * memset (void *, int, size_t);
-int strcmp (const char *, const char *);
+void * memcpy (void *, const void *, size_t);
+void * memset (void *, int, size_t);
+int strcmp (const char *, const char *);
#endif
// Prevent cross-jump optimization.
@@ -50,7 +50,8 @@ enum
VERSION_EMERALD = 3,
};
-enum LanguageId {
+enum LanguageId
+{
LANGUAGE_JAPANESE = 1,
LANGUAGE_ENGLISH = 2,
LANGUAGE_GERMAN = 5,
@@ -219,22 +220,24 @@ struct EasyChatPair
u16 words[2];
}; /*size = 0x8*/
-struct TVShowCommon {
+struct TVShowCommon
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
- /*0x02*/ u8 pad02[20];
- /*0x16*/ u16 var16[3];
- /*0x1C*/ u8 srcTrainerId3Lo;
- /*0x1D*/ u8 srcTrainerId3Hi;
- /*0x1E*/ u8 srcTrainerId2Lo;
- /*0x1F*/ u8 srcTrainerId2Hi;
- /*0x20*/ u8 srcTrainerIdLo;
- /*0x21*/ u8 srcTrainerIdHi;
- /*0x22*/ u8 trainerIdLo;
- /*0x23*/ u8 trainerIdHi;
-};
-
-struct TVShowFanClubLetter {
+ /*0x02*/ u8 pad02[20];
+ /*0x16*/ u16 var16[3];
+ /*0x1C*/ u8 srcTrainerId3Lo;
+ /*0x1D*/ u8 srcTrainerId3Hi;
+ /*0x1E*/ u8 srcTrainerId2Lo;
+ /*0x1F*/ u8 srcTrainerId2Hi;
+ /*0x20*/ u8 srcTrainerIdLo;
+ /*0x21*/ u8 srcTrainerIdHi;
+ /*0x22*/ u8 trainerIdLo;
+ /*0x23*/ u8 trainerIdHi;
+};
+
+struct TVShowFanClubLetter
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 species;
@@ -243,7 +246,8 @@ struct TVShowFanClubLetter {
/*0x18*/ u8 language;
};
-struct TVShowRecentHappenings {
+struct TVShowRecentHappenings
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 var02;
@@ -253,7 +257,8 @@ struct TVShowRecentHappenings {
/*0x19*/ u8 pad19[10];
};
-struct TVShowFanclubOpinions {
+struct TVShowFanclubOpinions
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 var02;
@@ -268,14 +273,16 @@ struct TVShowFanclubOpinions {
/*0x1C*/ u16 var1C[4];
};
-struct TVShowUnknownType04 {
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u8 pad02[4];
- /*0x06*/ u16 var06;
+struct TVShowUnknownType04
+{
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 pad02[4];
+ /*0x06*/ u16 var06;
};
-struct TVShowNameRaterShow {
+struct TVShowNameRaterShow
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u16 species;
@@ -288,38 +295,41 @@ struct TVShowNameRaterShow {
/*0x1F*/ u8 pokemonNameLanguage;
};
-struct TVShowBravoTrainerPokemonProfiles {
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u16 species;
- /*0x04*/ u16 var04[2];
- /*0x08*/ u8 pokemonNickname[11];
- /*0x13*/ u8 contestCategory:3;
- /*0x13*/ u8 contestRank:2;
- /*0x13*/ u8 contestResult:2;
- /*0x13*/ u8 var13_7:1;
- /*0x14*/ u16 var14;
- /*0x16*/ u8 playerName[8];
- /*0x1E*/ u8 language;
- /*0x1F*/ u8 var1f;
-};
-
-struct TVShowBravoTrainerBattleTowerSpotlight {
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u8 trainerName[8];
- /*0x0A*/ u16 species;
- /*0x0C*/ u8 pokemonName[8];
- /*0x14*/ u16 defeatedSpecies;
- /*0x16*/ u16 var16;
- /*0x18*/ u16 var18[1];
- /*0x1A*/ u8 btLevel;
- /*0x1B*/ u8 var1b;
- /*0x1C*/ u8 var1c;
- /*0x1D*/ u8 language;
-};
-
-struct TVShowPokemonToday {
+struct TVShowBravoTrainerPokemonProfiles
+{
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u16 species;
+ /*0x04*/ u16 var04[2];
+ /*0x08*/ u8 pokemonNickname[11];
+ /*0x13*/ u8 contestCategory:3;
+ /*0x13*/ u8 contestRank:2;
+ /*0x13*/ u8 contestResult:2;
+ /*0x13*/ u8 var13_7:1;
+ /*0x14*/ u16 var14;
+ /*0x16*/ u8 playerName[8];
+ /*0x1E*/ u8 language;
+ /*0x1F*/ u8 var1f;
+};
+
+struct TVShowBravoTrainerBattleTowerSpotlight
+{
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 trainerName[8];
+ /*0x0A*/ u16 species;
+ /*0x0C*/ u8 pokemonName[8];
+ /*0x14*/ u16 defeatedSpecies;
+ /*0x16*/ u16 var16;
+ /*0x18*/ u16 var18[1];
+ /*0x1A*/ u8 btLevel;
+ /*0x1B*/ u8 var1b;
+ /*0x1C*/ u8 var1c;
+ /*0x1D*/ u8 language;
+};
+
+struct TVShowPokemonToday
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u8 language;
@@ -331,19 +341,21 @@ struct TVShowPokemonToday {
/*0x13*/ u8 playerName[8];
};
-struct TVShowSmartShopper {
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u8 priceReduced;
- /*0x03*/ u8 language;
- /*0x04*/ u8 pad04[2];
- /*0x06*/ u16 itemIds[3];
- /*0x0C*/ u16 itemAmounts[3];
- /*0x12*/ u8 shopLocation;
- /*0x13*/ u8 playerName[8];
+struct TVShowSmartShopper
+{
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 priceReduced;
+ /*0x03*/ u8 language;
+ /*0x04*/ u8 pad04[2];
+ /*0x06*/ u16 itemIds[3];
+ /*0x0C*/ u16 itemAmounts[3];
+ /*0x12*/ u8 shopLocation;
+ /*0x13*/ u8 playerName[8];
};
-struct TVShowPokemonTodayFailed {
+struct TVShowPokemonTodayFailed
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u8 language;
@@ -356,31 +368,34 @@ struct TVShowPokemonTodayFailed {
/*0x13*/ u8 playerName[8];
};
-struct TVShowPokemonAngler {
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u8 var02;
- /*0x03*/ u8 var03;
- /*0x04*/ u16 var04;
- /*0x06*/ u8 language;
- u8 pad07[12];
- /*0x13*/ u8 playerName[8];
+struct TVShowPokemonAngler
+{
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u8 var02;
+ /*0x03*/ u8 var03;
+ /*0x04*/ u16 var04;
+ /*0x06*/ u8 language;
+ u8 pad07[12];
+ /*0x13*/ u8 playerName[8];
};
-struct TVShowWorldOfMasters {
- /*0x00*/ u8 var00;
- /*0x01*/ u8 var01;
- /*0x02*/ u16 var02;
- /*0x04*/ u16 var04;
- /*0x06*/ u16 var06;
- /*0x08*/ u16 var08;
- /*0x0a*/ u8 var0a;
- /*0x0b*/ u8 language;
- u8 pad0c[7];
- /*0x13*/ u8 playerName[8];
+struct TVShowWorldOfMasters
+{
+ /*0x00*/ u8 var00;
+ /*0x01*/ u8 var01;
+ /*0x02*/ u16 var02;
+ /*0x04*/ u16 var04;
+ /*0x06*/ u16 var06;
+ /*0x08*/ u16 var08;
+ /*0x0a*/ u8 var0a;
+ /*0x0b*/ u8 language;
+ u8 pad0c[7];
+ /*0x13*/ u8 playerName[8];
};
-struct TVShowMassOutbreak {
+struct TVShowMassOutbreak
+{
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u8 var02;
@@ -396,23 +411,24 @@ struct TVShowMassOutbreak {
/*0x15*/ u8 var15;
/*0x16*/ u16 var16;
/*0x18*/ u8 language;
- u8 pad19[11];
+ u8 pad19[11];
};
-typedef union TVShow {
+typedef union TVShow
+{
struct TVShowCommon common;
struct TVShowFanClubLetter fanclubLetter;
struct TVShowRecentHappenings recentHappenings;
struct TVShowFanclubOpinions fanclubOpinions;
- struct TVShowUnknownType04 unkShow04;
+ struct TVShowUnknownType04 unkShow04;
struct TVShowNameRaterShow nameRaterShow;
- struct TVShowBravoTrainerPokemonProfiles bravoTrainer;
- struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower;
+ struct TVShowBravoTrainerPokemonProfiles bravoTrainer;
+ struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower;
struct TVShowPokemonToday pokemonToday;
- struct TVShowSmartShopper smartshopperShow;
+ struct TVShowSmartShopper smartshopperShow;
struct TVShowPokemonTodayFailed pokemonTodayFailed;
- struct TVShowPokemonAngler pokemonAngler;
- struct TVShowWorldOfMasters worldOfMasters;
+ struct TVShowPokemonAngler pokemonAngler;
+ struct TVShowWorldOfMasters worldOfMasters;
struct TVShowMassOutbreak massOutbreak;
} TVShow;
@@ -427,16 +443,15 @@ struct MailStruct
struct UnkMauvilleOldManStruct
{
- u8 unk_2D94;
- u8 unk_2D95;
+ u8 unk_2D94;
+ u8 unk_2D95;
/*0x2D96*/ u16 mauvilleOldMan_ecArray[6];
/*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6];
/*0x2DAE*/ u8 playerName[8];
/*0x2DB6*/ u8 filler_2DB6[0x3];
/*0x2DB9*/ u8 playerTrainerId[4];
- u8 unk_2DBD;
- /* size = 0x2C */
-};
+ u8 unk_2DBD;
+}; /*size = 0x2C*/
struct UnkMauvilleOldManStruct2
{
@@ -446,10 +461,10 @@ struct UnkMauvilleOldManStruct2
u16 mauvilleOldMan_ecArray[10];
u8 mauvilleOldMan_ecArray2[12];
u8 fillerF[0x2];
- /* size = 0x2C */
-};
+}; /*size = 0x2C*/
-typedef union OldMan {
+typedef union OldMan
+{
struct UnkMauvilleOldManStruct oldMan1;
struct UnkMauvilleOldManStruct2 oldMan2;
} OldMan;
@@ -462,24 +477,27 @@ struct Unk_SB_Access_Struct1
struct Unk_SB_Access_Struct2
{
- struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20
- /*0x2F84*/ u8 filler[0x18];
+ /*0x0000*/ struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20
+ /*0x2F84*/ u8 filler[0x18];
};
/*0x2E04*/
-typedef union SB_Struct {
+typedef union SB_Struct
+{
struct Unk_SB_Access_Struct1 unkSB1;
struct Unk_SB_Access_Struct2 unkSB2;
} SB_Struct;
// size is 0x198
-struct UnknownSaveStruct2ABC {
+struct UnknownSaveStruct2ABC
+{
u8 val0;
u8 val1;
u16 val2;
};
-struct GabbyAndTyData {
+struct GabbyAndTyData
+{
/*2b10*/ u16 mon1;
/*2b12*/ u16 mon2;
/*2b14*/ u16 lastMove;
@@ -500,11 +518,13 @@ struct GabbyAndTyData {
/*2b1b*/ u8 valB_5:3;
};
-struct RecordMixing_UnknownStructSub {
+struct RecordMixing_UnknownStructSub
+{
u8 data[0x38];
};
-struct RecordMixing_UnknownStruct {
+struct RecordMixing_UnknownStruct
+{
struct RecordMixing_UnknownStructSub data[2];
u32 unk70;
u16 unk74[0x2];
@@ -625,10 +645,11 @@ struct Pokedex
struct SaveBlock2_Sub
{
- /*0x0000, 0x00A4*/ u8 filler_000[0x3D8];
+ /*0x0000, 0x00A8*/ u8 filler_000[0x3D8];
/*0x03D8, 0x0480*/ u16 var_480;
/*0x03DA, 0x0482*/ u16 var_482;
- /*0x03DC, 0x0484*/ u8 filler_3DC[0xD1];
+ /*0x03DC, 0x0484*/ u8 filler_3DC[0xD0];
+ /*0x04AC, 0x0554*/ u8 var_4AC;
/*0x04AD, 0x0555*/ u8 var_4AD;
/*0x04AE, 0x0556*/ u8 var_4AE;
/*0x04AF, 0x0557*/ u8 var_4AF;
@@ -654,13 +675,13 @@ struct SaveBlock2 /* 0x02024EA4 */
/*0x10*/ u8 playTimeMinutes;
/*0x11*/ u8 playTimeSeconds;
/*0x12*/ u8 playTimeVBlanks;
- /*OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]*/ /*0x13*/ u8 optionsButtonMode;
- /*OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]*/ /*0x14*/ u16 optionsTextSpeed:3;
+ /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]
+ /*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]
u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes
- /*OPTIONS_SOUND_[MONO/STEREO]*/ u16 optionsSound:1;
- /*OPTIONS_BATTLE_STYLE_[SHIFT/SET]*/ u16 optionsBattleStyle:1;
- u16 optionsBattleSceneOff:1; // whether battle animations are disabled
- u16 regionMapZoom:1; // whether the map is zoomed in
+ u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO]
+ u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
+ u16 optionsBattleSceneOff:1; // whether battle animations are disabled
+ u16 regionMapZoom:1; // whether the map is zoomed in
/*0x18*/ struct Pokedex pokedex;
/*0x90*/ u8 filler_90[0x8];
/*0x98*/ struct Time localTimeOffset;
diff --git a/include/graphics.h b/include/graphics.h
index 096a1982c..c3fe20996 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -2,6 +2,32 @@
#define GUARD_GRAPHICS_H
// data/graphics.s
+extern const u8 gInterfaceGfx_PokeBall[];
+extern const u8 gInterfacePal_PokeBall[];
+extern const u8 gInterfaceGfx_GreatBall[];
+extern const u8 gInterfacePal_GreatBall[];
+extern const u8 gInterfaceGfx_SafariBall[];
+extern const u8 gInterfacePal_SafariBall[];
+extern const u8 gInterfaceGfx_UltraBall[];
+extern const u8 gInterfacePal_UltraBall[];
+extern const u8 gInterfaceGfx_MasterBall[];
+extern const u8 gInterfacePal_MasterBall[];
+extern const u8 gInterfaceGfx_NetBall[];
+extern const u8 gInterfacePal_NetBall[];
+extern const u8 gInterfaceGfx_DiveBall[];
+extern const u8 gInterfacePal_DiveBall[];
+extern const u8 gInterfaceGfx_NestBall[];
+extern const u8 gInterfacePal_NestBall[];
+extern const u8 gInterfaceGfx_RepeatBall[];
+extern const u8 gInterfacePal_RepeatBall[];
+extern const u8 gInterfaceGfx_TimerBall[];
+extern const u8 gInterfacePal_TimerBall[];
+extern const u8 gInterfaceGfx_LuxuryBall[];
+extern const u8 gInterfacePal_LuxuryBall[];
+extern const u8 gInterfaceGfx_PremierBall[];
+extern const u8 gInterfacePal_PremierBall[];
+extern const u8 gUnknown_08D030D0[];
+
extern const u8 gMonFootprint_QuestionMark[];
// data/graphics/pokemon/graphics.inc
diff --git a/include/intro_credits_graphics.h b/include/intro_credits_graphics.h
index 85485a2c4..5abb2381b 100644
--- a/include/intro_credits_graphics.h
+++ b/include/intro_credits_graphics.h
@@ -1,14 +1,14 @@
#ifndef GUARD_INTRO_CREDITS_GRAPHICS_H
#define GUARD_INTRO_CREDITS_GRAPHICS_H
-extern const struct SpriteSheet gIntro2BrendanSpriteSheet;
-extern const struct SpriteSheet gIntro2MaySpriteSheet;
-extern const struct SpriteSheet gIntro2BicycleSpriteSheet;
-extern const struct SpriteSheet gIntro2LatiosSpriteSheet;
-extern const struct SpriteSheet gIntro2LatiasSpriteSheet;
+extern const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet;
+extern const struct CompressedSpriteSheet gIntro2MaySpriteSheet;
+extern const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet;
+extern const struct CompressedSpriteSheet gIntro2LatiosSpriteSheet;
+extern const struct CompressedSpriteSheet gIntro2LatiasSpriteSheet;
extern const struct SpritePalette gIntro2SpritePalettes[];
-extern const struct SpriteSheet gUnknown_08416E24;
-extern const struct SpriteSheet gUnknown_08416E34;
+extern const struct CompressedSpriteSheet gUnknown_08416E24;
+extern const struct CompressedSpriteSheet gUnknown_08416E34;
void load_intro_part2_graphics(/*TODO: arg types*/);
void sub_8148C78(/*TODO: arg types*/);
diff --git a/include/link.h b/include/link.h
index eb6f642bc..f80f2bc58 100644
--- a/include/link.h
+++ b/include/link.h
@@ -122,6 +122,13 @@ struct Link
struct RecvQueue recvQueue;
};
+struct BlockRequest {
+ void * address;
+ u32 size;
+};
+
+extern const struct BlockRequest sBlockRequestLookupTable[5];
+
extern struct Link gLink;
extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS];
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE];
@@ -130,6 +137,10 @@ extern u32 gLinkStatus;
extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2];
extern u16 gSendCmd[CMD_LENGTH];
extern u8 gShouldAdvanceLinkState;
+#if GERMAN
+extern u8 deUnkValue1;
+extern u8 deUnkValue2;
+#endif
extern struct LinkPlayer gLinkPlayers[];
extern u16 word_3002910[];
extern bool8 gReceivedRemoteLinkPlayers;
diff --git a/include/menu.h b/include/menu.h
index a6784a553..9eeebce60 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -91,4 +91,8 @@ void sub_8072DCC(u8);
void sub_8072DDC(u8);
void HandleDestroyMenuCursors(void);
+#if GERMAN
+u8 *de_sub_8073174(u8 *name, const u8 *format);
+#endif
+
#endif // GUARD_MENU_H
diff --git a/include/party_menu.h b/include/party_menu.h
index 917d6a58c..58292081f 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -16,6 +16,44 @@ struct PartyPopupMenu
const u8 *unk4;
};
+// TODO: Unify these two structs
+
+#define DATA_COUNT (6)
+struct Unk201B000
+{
+ //u8 filler0[0x260];
+ struct Pokemon unk0[6];
+ u8 filler258[1];
+ u8 unk259;
+ u8 filler25A[6];
+ u8 unk260;
+ u8 unk261;
+ u8 unk262;
+ u8 unk263;
+ s16 unk264[DATA_COUNT * 2]; // This may be a union
+ u8 filler27C[2];
+ s16 unk27E;
+ s16 unk280;
+ s16 unk282;
+};
+
+struct Struct201B000
+{
+ u8 filler0[0x259];
+ u8 unk259;
+ u8 filler25A[6];
+ u8 unk260;
+ u8 filler261[1];
+ u8 unk262;
+ s16 unk264;
+ s16 unk266;
+};
+
+extern u8 ewram[];
+#define ewram1B000 (*(struct Unk201B000 *)(ewram + 0x1B000))
+#define ewram1B000_alt (*(struct Struct201B000 *)(ewram + 0x1B000))
+#define EWRAM_1B000 ewram1B000_alt
+
void sub_806AEDC(void);
void sub_806AF4C();
void OpenPartyMenu(u8, u8);
diff --git a/include/pokeball.h b/include/pokeball.h
index b6fbbcf77..19f813415 100644
--- a/include/pokeball.h
+++ b/include/pokeball.h
@@ -1,7 +1,11 @@
#ifndef GUARD_POKEBALL_H
#define GUARD_POKEBALL_H
-void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u16 s4);
+extern const struct SpriteTemplate gBallSpriteTemplates[];
+
+void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u32 s4);
void sub_804777C(u8);
+void sub_80478DC(u8);
+void sub_804794C(u8);
#endif // GUARD_POKEBALL_H
diff --git a/include/pokemon.h b/include/pokemon.h
index 273e7d26e..be8e4e56d 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -182,41 +182,41 @@ struct PokemonSubstruct2
struct PokemonSubstruct3
{
- /* 0x00 */ u8 pokerus;
- /* 0x01 */ u8 metLocation;
-
- /* 0x02 */ u16 metLevel:7;
- /* 0x02 */ u16 metGame:4;
- /* 0x03 */ u16 pokeball:4;
- /* 0x03 */ u16 otGender:1;
-
- /* 0x04 */ u32 hpIV:5;
- /* 0x04 */ u32 attackIV:5;
- /* 0x05 */ u32 defenseIV:5;
- /* 0x05 */ u32 speedIV:5;
- /* 0x05 */ u32 spAttackIV:5;
- /* 0x06 */ u32 spDefenseIV:5;
- /* 0x07 */ u32 isEgg:1;
- /* 0x07 */ u32 altAbility:1;
-
- /* 0x08 */ u32 coolRibbon:3;
- /* 0x08 */ u32 beautyRibbon:3;
- /* 0x08 */ u32 cuteRibbon:3;
- /* 0x09 */ u32 smartRibbon:3;
- /* 0x09 */ u32 toughRibbon:3;
- /* 0x09 */ u32 championRibbon:1;
- /* 0x0A */ u32 winningRibbon:1;
- /* 0x0A */ u32 victoryRibbon:1;
- /* 0x0A */ u32 artistRibbon:1;
- /* 0x0A */ u32 effortRibbon:1;
- /* 0x0A */ u32 giftRibbon1:1;
- /* 0x0A */ u32 giftRibbon2:1;
- /* 0x0A */ u32 giftRibbon3:1;
- /* 0x0A */ u32 giftRibbon4:1;
- /* 0x0B */ u32 giftRibbon5:1;
- /* 0x0B */ u32 giftRibbon6:1;
- /* 0x0B */ u32 giftRibbon7:1;
- /* 0x0B */ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald
+ /*0x00*/ u8 pokerus;
+ /*0x01*/ u8 metLocation;
+
+ /*0x02*/ u16 metLevel:7;
+ /*0x02*/ u16 metGame:4;
+ /*0x03*/ u16 pokeball:4;
+ /*0x03*/ u16 otGender:1;
+
+ /*0x04*/ u32 hpIV:5;
+ /*0x04*/ u32 attackIV:5;
+ /*0x05*/ u32 defenseIV:5;
+ /*0x05*/ u32 speedIV:5;
+ /*0x05*/ u32 spAttackIV:5;
+ /*0x06*/ u32 spDefenseIV:5;
+ /*0x07*/ u32 isEgg:1;
+ /*0x07*/ u32 altAbility:1;
+
+ /*0x08*/ u32 coolRibbon:3;
+ /*0x08*/ u32 beautyRibbon:3;
+ /*0x08*/ u32 cuteRibbon:3;
+ /*0x09*/ u32 smartRibbon:3;
+ /*0x09*/ u32 toughRibbon:3;
+ /*0x09*/ u32 championRibbon:1;
+ /*0x0A*/ u32 winningRibbon:1;
+ /*0x0A*/ u32 victoryRibbon:1;
+ /*0x0A*/ u32 artistRibbon:1;
+ /*0x0A*/ u32 effortRibbon:1;
+ /*0x0A*/ u32 giftRibbon1:1;
+ /*0x0A*/ u32 giftRibbon2:1;
+ /*0x0A*/ u32 giftRibbon3:1;
+ /*0x0A*/ u32 giftRibbon4:1;
+ /*0x0B*/ u32 giftRibbon5:1;
+ /*0x0B*/ u32 giftRibbon6:1;
+ /*0x0B*/ u32 giftRibbon7:1;
+ /*0x0B*/ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald
};
union PokemonSubstruct
@@ -230,39 +230,39 @@ union PokemonSubstruct
struct BoxPokemon
{
- u32 personality;
- u32 otId;
- u8 nickname[POKEMON_NAME_LENGTH];
- u8 language;
- u8 isBadEgg:1;
- u8 hasSpecies:1;
- u8 isEgg:1;
- u8 unused:5;
- u8 otName[OT_NAME_LENGTH];
- u8 markings;
- u16 checksum;
- u16 unknown;
+ /*0x00*/ u32 personality;
+ /*0x04*/ u32 otId;
+ /*0x08*/ u8 nickname[POKEMON_NAME_LENGTH];
+ /*0x12*/ u8 language;
+ /*0x13*/ u8 isBadEgg:1;
+ u8 hasSpecies:1;
+ u8 isEgg:1;
+ u8 unused:5;
+ /*0x14*/ u8 otName[OT_NAME_LENGTH];
+ /*0x1B*/ u8 markings;
+ /*0x1C*/ u16 checksum;
+ /*0x1E*/ u16 unknown;
union
{
u32 raw[12];
union PokemonSubstruct substructs[4];
} secure;
-};
+}; /*size = 0x50*/
struct Pokemon
{
- struct BoxPokemon box;
- u32 status;
- u8 level;
- u8 mail;
- u16 hp;
- u16 maxHP;
- u16 attack;
- u16 defense;
- u16 speed;
- u16 spAttack;
- u16 spDefense;
+ /*0x00*/ struct BoxPokemon box;
+ /*0x50*/ u32 status;
+ /*0x54*/ u8 level;
+ /*0x55*/ u8 mail;
+ /*0x56*/ u16 hp;
+ /*0x58*/ u16 maxHP;
+ /*0x5A*/ u16 attack;
+ /*0x5C*/ u16 defense;
+ /*0x5E*/ u16 speed;
+ /*0x60*/ u16 spAttack;
+ /*0x62*/ u16 spDefense;
};
struct UnknownPokemonStruct
@@ -294,73 +294,73 @@ struct UnknownPokemonStruct
struct BattlePokemon
{
- /* 0x00 */ u16 species;
- /* 0x02 */ u16 attack;
- /* 0x04 */ u16 defense;
- /* 0x06 */ u16 speed;
- /* 0x08 */ u16 spAttack;
- /* 0x0A */ u16 spDefense;
- /* 0x0C */ u16 moves[4];
- /* 0x14 */ u32 hpIV:5;
- /* 0x14 */ u32 attackIV:5;
- /* 0x15 */ u32 defenseIV:5;
- /* 0x15 */ u32 speedIV:5;
- /* 0x16 */ u32 spAttackIV:5;
- /* 0x17 */ u32 spDefenseIV:5;
- /* 0x17 */ u32 isEgg:1;
- /* 0x17 */ u32 altAbility:1;
- /* 0x18 */ s8 statStages[8];
- /* 0x20 */ u8 ability;
- /* 0x21 */ u8 type1;
- /* 0x22 */ u8 type2;
- /* 0x23 */ u8 unknown;
- /* 0x24 */ u8 pp[4];
- /* 0x28 */ u16 hp;
- /* 0x2A */ u8 level;
- /* 0x2B */ u8 friendship;
- /* 0x2C */ u16 maxHP;
- /* 0x2E */ u16 item;
- /* 0x30 */ u8 nickname[POKEMON_NAME_LENGTH + 1];
- /* 0x3B */ u8 ppBonuses;
- /* 0x3C */ u8 otName[8];
- /* 0x44 */ u32 experience;
- /* 0x48 */ u32 personality;
- /* 0x4C */ u32 status1;
- /* 0x50 */ u32 status2;
- /* 0x54 */ u32 otId;
+ /*0x00*/ u16 species;
+ /*0x02*/ u16 attack;
+ /*0x04*/ u16 defense;
+ /*0x06*/ u16 speed;
+ /*0x08*/ u16 spAttack;
+ /*0x0A*/ u16 spDefense;
+ /*0x0C*/ u16 moves[4];
+ /*0x14*/ u32 hpIV:5;
+ /*0x14*/ u32 attackIV:5;
+ /*0x15*/ u32 defenseIV:5;
+ /*0x15*/ u32 speedIV:5;
+ /*0x16*/ u32 spAttackIV:5;
+ /*0x17*/ u32 spDefenseIV:5;
+ /*0x17*/ u32 isEgg:1;
+ /*0x17*/ u32 altAbility:1;
+ /*0x18*/ s8 statStages[8];
+ /*0x20*/ u8 ability;
+ /*0x21*/ u8 type1;
+ /*0x22*/ u8 type2;
+ /*0x23*/ u8 unknown;
+ /*0x24*/ u8 pp[4];
+ /*0x28*/ u16 hp;
+ /*0x2A*/ u8 level;
+ /*0x2B*/ u8 friendship;
+ /*0x2C*/ u16 maxHP;
+ /*0x2E*/ u16 item;
+ /*0x30*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
+ /*0x3B*/ u8 ppBonuses;
+ /*0x3C*/ u8 otName[8];
+ /*0x44*/ u32 experience;
+ /*0x48*/ u32 personality;
+ /*0x4C*/ u32 status1;
+ /*0x50*/ u32 status2;
+ /*0x54*/ u32 otId;
};
struct BaseStats
{
- /* 0x00 */ u8 baseHP;
- /* 0x01 */ u8 baseAttack;
- /* 0x02 */ u8 baseDefense;
- /* 0x03 */ u8 baseSpeed;
- /* 0x04 */ u8 baseSpAttack;
- /* 0x05 */ u8 baseSpDefense;
- /* 0x06 */ u8 type1;
- /* 0x07 */ u8 type2;
- /* 0x08 */ u8 catchRate;
- /* 0x09 */ u8 expYield;
- /* 0x0A */ u16 evYield_HP:2;
- /* 0x0A */ u16 evYield_Attack:2;
- /* 0x0A */ u16 evYield_Defense:2;
- /* 0x0A */ u16 evYield_Speed:2;
- /* 0x0B */ u16 evYield_SpAttack:2;
- /* 0x0B */ u16 evYield_SpDefense:2;
- /* 0x0C */ u16 item1;
- /* 0x0E */ u16 item2;
- /* 0x10 */ u8 genderRatio;
- /* 0x11 */ u8 eggCycles;
- /* 0x12 */ u8 friendship;
- /* 0x13 */ u8 growthRate;
- /* 0x14 */ u8 eggGroup1;
- /* 0x15 */ u8 eggGroup2;
- /* 0x16 */ u8 ability1;
- /* 0x17 */ u8 ability2;
- /* 0x18 */ u8 safariZoneFleeRate;
- /* 0x19 */ u8 bodyColor:7;
- u8 unk19_7:1;
+ /*0x00*/ u8 baseHP;
+ /*0x01*/ u8 baseAttack;
+ /*0x02*/ u8 baseDefense;
+ /*0x03*/ u8 baseSpeed;
+ /*0x04*/ u8 baseSpAttack;
+ /*0x05*/ u8 baseSpDefense;
+ /*0x06*/ u8 type1;
+ /*0x07*/ u8 type2;
+ /*0x08*/ u8 catchRate;
+ /*0x09*/ u8 expYield;
+ /*0x0A*/ u16 evYield_HP:2;
+ /*0x0A*/ u16 evYield_Attack:2;
+ /*0x0A*/ u16 evYield_Defense:2;
+ /*0x0A*/ u16 evYield_Speed:2;
+ /*0x0B*/ u16 evYield_SpAttack:2;
+ /*0x0B*/ u16 evYield_SpDefense:2;
+ /*0x0C*/ u16 item1;
+ /*0x0E*/ u16 item2;
+ /*0x10*/ u8 genderRatio;
+ /*0x11*/ u8 eggCycles;
+ /*0x12*/ u8 friendship;
+ /*0x13*/ u8 growthRate;
+ /*0x14*/ u8 eggGroup1;
+ /*0x15*/ u8 eggGroup2;
+ /*0x16*/ u8 ability1;
+ /*0x17*/ u8 ability2;
+ /*0x18*/ u8 safariZoneFleeRate;
+ /*0x19*/ u8 bodyColor:7;
+ u8 unk19_7:1;
};
struct BattleMove
@@ -378,10 +378,10 @@ struct BattleMove
struct PokemonStorage
{
- /* 0x00 */ u8 currentBox;
- /* 0x01 */ struct BoxPokemon boxes[14][30];
- u8 boxNames[14][9];
- u8 unkArray[14];
+ /*0x00*/ u8 currentBox;
+ /*0x01*/ struct BoxPokemon boxes[14][30];
+ u8 boxNames[14][9];
+ u8 unkArray[14];
};
struct Evolution
@@ -440,7 +440,7 @@ u16 sub_803B7C8(struct Pokemon *mon, u8 a2);
void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move);
void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move);
-u8 sub_803C348(u8 a1);
+u8 CountAliveMons(u8 a1);
u8 sub_803C434(u8 a1);
u8 GetMonGender(struct Pokemon *mon);
u8 GetBoxMonGender(struct BoxPokemon *boxMon);
@@ -503,8 +503,9 @@ u8 sub_8040574(struct Pokemon *party);
void ClearBattleMonForms(void);
void sub_80408BC();
void current_map_music_set__default_for_battle(u16);
-const u16 *species_and_otid_get_pal(u16, u32, u32);
-const struct SpritePalette *sub_80409C8(u16, u32, u32);
+const u8 *pokemon_get_pal(struct Pokemon *mon);
+const u8 *species_and_otid_get_pal(u16, u32, u32);
+const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32);
bool8 IsOtherTrainer(u32, u8 *);
void sub_8040B8C(void);
void SetWildMonHeldItem(void);
diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h
index 3f7ed8fad..71259c887 100644
--- a/include/pokemon_summary_screen.h
+++ b/include/pokemon_summary_screen.h
@@ -3,7 +3,7 @@
extern const u8 *const gNatureNames[];
-void ShowPokemonSummaryScreen(struct Pokemon *, u8, u8, void (*)(u8), int);
+void ShowPokemonSummaryScreen(struct Pokemon *, u8, u8, void (*)(void), int);
void sub_809D9F0(struct Pokemon *party, u8, u8, void *, u32);
void sub_809D9F0(struct Pokemon *, u8, u8, void *, u32);
u8 sub_809FA30(void);
diff --git a/include/rom3.h b/include/rom3.h
index a66162443..a45ec7dc4 100644
--- a/include/rom3.h
+++ b/include/rom3.h
@@ -12,14 +12,54 @@ void dp01_prepare_buffer_wireless_probably(u8 a, u16, u8 *c);
void sub_800C1A8(u8);
void sub_800C35C(void);
void sub_800C47C(u8);
-void dp01_build_cmdbuf_x00_a_b_0(u8 a, u8 b, u8 c);
+void EmitGetAttributes(u8 a, u8 b, u8 c);
+void dp01_build_cmdbuf_x01_a_b_0(u8 a, u8 b, u8 c);
+void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, u8 *e);
void dp01_build_cmdbuf_x04_4_4_4(u8 a);
void sub_800C704(u8, u8, u8);
+void dp01_build_cmdbuf_x06_a(u8 a, u8 b);
void dp01_build_cmdbuf_x07_7_7_7(u8 a);
+void dp01_build_cmdbuf_x08_8_8_8(u8 a);
+void dp01_build_cmdbuf_x09_9_9_9(u8 a);
+void EmitFaintAnimation(u8 a);
+void dp01_build_cmdbuf_x0B_B_B_B(u8 a);
+void dp01_build_cmdbuf_x0C_C_C_C(u8 a);
+void dp01_build_cmdbuf_x0D_a(u8 a, u8 b);
+void EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, u8 *g);
+void EmitPrintString(u8 a, u16 b);
void dp01_build_cmdbuf_x12_a_bb(u8 a, u8 b, u16 c);
+void sub_800CBA4(u8 a, u8 b, u8 c, u8 *d);
+void sub_800CBE0(u8 a, u8 *b);
+void dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f(u8 a, u8 b, u8 c, u8 d, u8 *e);
+void dp01_build_cmdbuf_x17_17_17_17(u8 a);
+void EmitHealthBarUpdate(u8 a, s16 b);
+void EmitExpBarUpdate(u8 a, u8 b, s16 c);
+void EmitStatusIconUpdate(u8 a, u32 b, u32 c);
+void EmitStatusAnimation(u8 a, u8 b, u32 c);
+void EmitStatusXor(u8 a, u8 b);
void dp01_build_cmdbuf_x1D_1D_numargs_varargs(u8, u16, u8 *);
-void dp01_build_cmdbuf_x2E_a(u8 a, u8 b);
+void dp01_build_cmdbuf_x21_a_bb(u8 a, u8 b, u16 c);
+void dp01_build_cmdbuf_x22_a_three_bytes(u8 a, u8 b, u8 *c);
+void dp01_build_cmdbuf_x23_aa_0(u8 a, u16 b);
+void dp01_build_cmdbuf_x24_aa_0(u8 a, u16 b);
+void dp01_build_cmdbuf_x25_25_25_25(u8 a);
+void dp01_build_cmdbuf_x26_a(u8 a, u8 b);
+void dp01_build_cmdbuf_x27_27_27_27(u8 a);
+void dp01_build_cmdbuf_x28_28_28_28(u8 a);
+void EmitHitAnimation(u8 a);
+void dp01_build_cmdbuf_x2A_2A_2A_2A(u8 a);
+void EmitEffectivenessSound(u8 a, u16 b);
+void sub_800D074(u8 a, u16 b);
+void EmitFaintingCry(u8 a);
+void EmitBattleIntroSlide(u8 a, u8 b);
void dp01_build_cmdbuf_x2F_2F_2F_2F(u8 a);
void dp01_build_cmdbuf_x30_TODO(u8 a, u8 *b, u8 c);
+void dp01_build_cmdbuf_x31_31_31_31(u8 a);
+void dp01_build_cmdbuf_x32_32_32_32(u8 a);
+void EmitSpriteInvisibility(u8 a, u8 b);
+void EmitBattleAnimation(u8 a, u8 b, u16 c);
+void EmitLinkStandbyMsg(u8 a, u8 b);
+void EmitResetActionMoveSelection(u8 a, u8 b);
+void dp01_build_cmdbuf_x37_a(u8 a, u8 b);
#endif // GUARD_ROM3_H
diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h
index 26c89d4cc..11e94e1f5 100644
--- a/include/rom_8077ABC.h
+++ b/include/rom_8077ABC.h
@@ -12,16 +12,16 @@ void sub_8078314(struct Sprite *sprite);
void sub_8078364(struct Sprite *sprite);
void sub_8078458(struct Sprite *sprite);
void sub_80784A8(struct Sprite *sprite);
-u8 battle_side_get_owner(u8);
-u8 battle_side_get_owner(u8);
-u8 battle_side_get_owner(u8 side);
-u8 battle_side_get_owner(u8 slot);
-u8 battle_side_get_owner(u8);
-u8 battle_get_per_side_status(u8);
-u8 battle_get_per_side_status(u8 slot);
-u8 battle_get_side_with_given_state(u8);
-u8 battle_get_side_with_given_state(u8);
-u8 battle_get_side_with_given_state(u8 state);
+u8 GetBankSide(u8);
+u8 GetBankSide(u8);
+u8 GetBankSide(u8 side);
+u8 GetBankSide(u8 slot);
+u8 GetBankSide(u8);
+u8 GetBankIdentity(u8);
+u8 GetBankIdentity(u8 slot);
+u8 GetBankByPlayerAI(u8);
+u8 GetBankByPlayerAI(u8);
+u8 GetBankByPlayerAI(u8 state);
u8 sub_8078874(u8);
bool8 sub_8078874(u8);
bool8 IsDoubleBattle();
@@ -50,7 +50,7 @@ void sub_8079BF4(s16 *bottom, s16 *top, void *ptr);
void *sub_8079BFC(s16 bottom, s16 top);
void sub_8079E24();
u8 sub_8079E90(u8 slot);
-u8 battle_get_per_side_status_permutated(u8 slot);
+u8 GetBankIdentity_permutated(u8 slot);
void sub_807A784(u8 taskId);
void sub_807A850(struct Task *task, u8 taskId);
void sub_807A8D4(struct Sprite *sprite);
diff --git a/include/songs.h b/include/songs.h
index 72d28a355..a813cc785 100644
--- a/include/songs.h
+++ b/include/songs.h
@@ -59,12 +59,12 @@ enum
SE_MOTER,
SE_CARD,
SE_SAVE,
- SE_KON,
- SE_KON2,
- SE_KON3,
- SE_KON4,
- SE_SUIKOMU,
- SE_NAGERU,
+ /*0x38*/ SE_KON,
+ /*0x39*/ SE_KON2,
+ /*0x3A*/ SE_KON3,
+ /*0x3B*/ SE_KON4,
+ /*0x3C*/ SE_SUIKOMU,
+ /*0x3D*/ SE_NAGERU,
SE_TOY_C,
SE_TOY_D,
SE_TOY_E,
@@ -121,16 +121,16 @@ enum
/*0x73*/ SE_TB_KON,
/*0x74*/ SE_TB_KARA,
/*0x75*/ SE_BIDORO,
- SE_W085,
- SE_W085B,
- SE_W231,
- SE_W171,
- SE_W233,
- SE_W233B,
- SE_W145,
- SE_W145B,
- SE_W145C,
- SE_W240,
+ /*0x76*/ SE_W085,
+ /*0x77*/ SE_W085B,
+ /*0x78*/ SE_W231,
+ /*0x79*/ SE_W171,
+ /*0x7A*/ SE_W233,
+ /*0x7B*/ SE_W233B,
+ /*0x7C*/ SE_W145,
+ /*0x7D*/ SE_W145B,
+ /*0x7E*/ SE_W145C,
+ /*0x7F*/ SE_W240,
SE_W015,
SE_W081,
SE_W081B,
@@ -270,10 +270,10 @@ enum
BGM_NAMINORI,
BGM_DAN01,
/*0x16F*/ BGM_FANFA1,
- BGM_ME_ASA,
- BGM_ME_BACHI,
- BGM_FANFA4,
- BGM_FANFA5,
+ /*0x170*/ BGM_ME_ASA,
+ /*0x171*/ BGM_ME_BACHI,
+ /*0x172*/ BGM_FANFA4,
+ /*0x173*/ BGM_FANFA5,
BGM_ME_WAZA,
BGM_BIJYUTU,
BGM_DOORO_X4,
diff --git a/include/sprite.h b/include/sprite.h
index aa86f9d31..a65e71bd9 100644
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -5,11 +5,18 @@
struct SpriteSheet
{
- const u8 *data;
+ const u8 *data; // Raw uncompressed pixel data
u16 size;
u16 tag;
};
+struct CompressedSpriteSheet
+{
+ const u8 *data; // LZ77 compressed pixel data
+ u16 size; // Uncompressed size of pixel data
+ u16 tag;
+};
+
struct SpriteFrameImage
{
u8 *data;
@@ -20,7 +27,13 @@ struct SpriteFrameImage
struct SpritePalette
{
- const u16 *data;
+ const u16 *data; // Raw uncompressed palette data
+ u16 tag;
+};
+
+struct CompressedSpritePalette
+{
+ const u8 *data; // LZ77 compressed palette data
u16 tag;
};
@@ -101,6 +114,10 @@ union AffineAnimCmd
#define AFFINEANIMCMD_FRAME(_xScale, _yScale, _rotation, _duration) \
{.frame = {.xScale = _xScale, .yScale = _yScale, .rotation = _rotation, .duration = _duration}}
+#define AFFINEANIMCMD_LOOP(_count) \
+ {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}}
+#define AFFINEANIMCMD_JUMP(_target) \
+ {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}
#define AFFINEANIMCMD_END \
{.type = AFFINEANIMCMDTYPE_END}
#define AFFINEANIMCMD_LOOP(_count) \
diff --git a/include/trig.h b/include/trig.h
index 03d8c453e..a2f98a3e6 100644
--- a/include/trig.h
+++ b/include/trig.h
@@ -1,7 +1,7 @@
#ifndef GUARD_TRIG_H
#define GUARD_TRIG_H
-extern s16 gSineTable[];
+extern const s16 gSineTable[];
s16 Sin(s16 index, s16 amplitude);
s16 Cos(s16 index, s16 amplitude);