summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgolem galvanize <golemgalvanize@github.com>2018-12-17 02:40:30 -0500
committergolem galvanize <golemgalvanize@github.com>2018-12-17 02:40:30 -0500
commit076d07f6fe24691d6d9d8872c049b18e2e16fa57 (patch)
treefe67ff21237b8e988484e2a53eecaa50f01844ab /include
parent71a7a8a0759373a8dafcccee82fa2d37cb285b85 (diff)
parentd1e6e705ccf05f93933ae4494b1d388550d81d26 (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_party_menu
Diffstat (limited to 'include')
-rw-r--r--include/battle.h3
-rw-r--r--include/battle_anim.h14
-rw-r--r--include/battle_interface.h2
-rw-r--r--include/battle_tower.h2
-rw-r--r--include/contest.h1
-rw-r--r--include/contest_painting.h13
-rwxr-xr-xinclude/contest_painting_effects.h28
-rw-r--r--include/event_scripts.h16
-rw-r--r--include/global.h14
-rw-r--r--include/graphics.h6
-rw-r--r--include/item_menu.h19
-rw-r--r--include/pokedex.h11
-rw-r--r--include/pokemon.h8
-rw-r--r--include/strings.h1
14 files changed, 105 insertions, 33 deletions
diff --git a/include/battle.h b/include/battle.h
index 9e67e8ec5..c06bdaad5 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -599,8 +599,7 @@ struct BattleAnimationInfo
u8 field_9_x80:1;
u8 field_A;
u8 field_B;
- u8 field_C;
- u8 field_D;
+ s16 field_C;
u8 field_E;
u8 field_F;
};
diff --git a/include/battle_anim.h b/include/battle_anim.h
index 541c165e7..e0c1b2b08 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -131,6 +131,13 @@ void sub_80A805C(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a
u8 sub_80A80C8(struct Task *task);
void sub_80A8EE4(struct Sprite *);
void sub_80A67F4(struct Sprite *);
+void sub_80A6D48(u32 bgId, const void *src);
+void sub_80A7160(struct Sprite *sprite);
+bool8 sub_80A70E8(struct Sprite *sprite);
+void sub_80A70C0(struct Sprite *sprite);
+void TranslateMonBGUntil(struct Sprite *sprite);
+void TranslateSpriteOverDuration(struct Sprite *sprite);
+void sub_80A77C8(struct Sprite *sprite);
enum
{
@@ -168,8 +175,8 @@ void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId);
// battle_anim_8170478.s
u8 ItemIdToBallId(u16 itemId);
-u8 LaunchBallStarsTask(u8 x, u8 y, u8 kindOfStars, u8 arg3, u8 ballId);
-u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 arg2, u8 ballId);
+u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId);
+u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId);
// battle_anim_utility_funcs.s
void sub_8116EB4(u8);
@@ -223,4 +230,7 @@ extern const struct OamData gUnknown_0852493C;
extern const struct OamData gUnknown_08524A5C;
extern const struct OamData gUnknown_08524A74;
+extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
+extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
+
#endif // GUARD_BATTLE_ANIM_H
diff --git a/include/battle_interface.h b/include/battle_interface.h
index 66a7f9828..3145939d0 100644
--- a/include/battle_interface.h
+++ b/include/battle_interface.h
@@ -1,6 +1,8 @@
#ifndef GUARD_BATTLE_INTERFACE_H
#define GUARD_BATTLE_INTERFACE_H
+#include "battle_controllers.h"
+
enum
{
HP_CURRENT,
diff --git a/include/battle_tower.h b/include/battle_tower.h
index e361b9742..bd8e80fc1 100644
--- a/include/battle_tower.h
+++ b/include/battle_tower.h
@@ -9,7 +9,7 @@ struct RSBattleTowerRecord
/*0x04*/ u8 name[PLAYER_NAME_LENGTH + 1];
/*0x0C*/ u8 trainerId[4];
/*0x10*/ u16 greeting[6];
- /*0x1C*/ struct UnknownPokemonStruct party[3];
+ /*0x1C*/ struct BattleTowerPokemon party[3];
/*0xA0*/ u32 checksum;
};
diff --git a/include/contest.h b/include/contest.h
index 368176bba..0faa14c6e 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -231,6 +231,7 @@ extern u8 gContestPlayerMonIndex;
extern s16 gUnknown_02039F08[4];
extern s16 gContestMonConditions[4];
extern u8 gIsLinkContest;
+extern struct ContestWinner gUnknown_02039F3C;
struct Shared18000
{
diff --git a/include/contest_painting.h b/include/contest_painting.h
index 67a845d62..c633c50cc 100644
--- a/include/contest_painting.h
+++ b/include/contest_painting.h
@@ -1,7 +1,16 @@
#ifndef GUARD_CONTESTPAINTING_H
#define GUARD_CONTESTPAINTING_H
-void sub_812FDA8(u32);
-void sub_812FDEC(void);
+enum
+{
+ CONTESTRESULT_COOL = 9,
+ CONTESTRESULT_BEAUTY = 13,
+ CONTESTRESULT_CUTE = 2,
+ CONTESTRESULT_SMART = 36,
+ CONTESTRESULT_TOUGH = 6,
+};
+
+void sub_812FDA8(int);
+void CB2_ContestPainting(void);
#endif
diff --git a/include/contest_painting_effects.h b/include/contest_painting_effects.h
new file mode 100755
index 000000000..3b6964666
--- /dev/null
+++ b/include/contest_painting_effects.h
@@ -0,0 +1,28 @@
+#ifndef GUARD_CONTEST_PAINTING_EFFECTS_H
+#define GUARD_CONTEST_PAINTING_EFFECTS_H
+
+struct Unk030061A0
+{
+ u8 var_0;
+ u8 pad1[3];
+ u16 (*var_4)[][32];
+ u16 *var_8;
+ u8 pad0C[4];
+ u32 var_10;
+ u16 var_14;
+ u16 var_16;
+ u8 var_18;
+ u8 var_19;
+ u8 var_1A;
+ u8 var_1B;
+ u8 var_1C;
+ u8 var_1D;
+ u8 var_1E;
+ u8 var_1F;
+};
+
+void sub_8124F2C(struct Unk030061A0 *);
+void sub_81261A4(struct Unk030061A0 *);
+void sub_8126058(struct Unk030061A0 *);
+
+#endif
diff --git a/include/event_scripts.h b/include/event_scripts.h
index 7f69ef3ae..2661494d3 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -405,14 +405,14 @@ extern const u8 gText_SoDesirable[];
extern const u8 gText_SoExciting[];
extern const u8 gText_SoAmusing[];
extern const u8 gText_SoMagical[];
-extern const u8 gUnknown_08294313[];
-extern const u8 gUnknown_08294359[];
-extern const u8 gUnknown_08294398[];
-extern const u8 gUnknown_082943DA[];
-extern const u8 gUnknown_0829441C[];
-extern const u8 gUnknown_08294460[];
-extern const u8 gUnknown_082944A0[];
-extern const u8 gUnknown_082944D5[];
+extern const u8 gMauvilleManText_ISoWantToGoOnAVacation[];
+extern const u8 gMauvilleManText_IBoughtCrayonsWith120Colors[];
+extern const u8 gMauvilleManText_WouldntItBeNiceIfWeCouldFloat[];
+extern const u8 gMauvilleManText_WhenYouWriteOnASandyBeach[];
+extern const u8 gMauvilleManText_WhatsTheBottomOfTheSeaLike[];
+extern const u8 gMauvilleManText_WhenYouSeeTheSettingSunDoesIt[];
+extern const u8 gMauvilleManText_LyingBackInTheGreenGrass[];
+extern const u8 gMauvilleManText_SecretBasesAreSoWonderful[];
extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E930[];
diff --git a/include/global.h b/include/global.h
index 33a31bf4d..e3792ac56 100644
--- a/include/global.h
+++ b/include/global.h
@@ -61,6 +61,12 @@
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
+// Extracts the upper 16 bits of a 32-bit number
+#define HIHALF(n) (((n) & 0xFFFF0000) >> 16)
+
+// Extracts the lower 16 bits of a 32-bit number
+#define LOHALF(n) ((n) & 0xFFFF)
+
// There are many quirks in the source code which have overarching behavioral differences from
// a number of other files. For example, diploma.c seems to declare rodata before each use while
// other files declare out of order and must be at the beginning. There are also a number of
@@ -230,7 +236,7 @@ struct Time
struct Pokedex
{
/*0x00*/ u8 order;
- /*0x01*/ u8 unknown1;
+ /*0x01*/ u8 mode;
/*0x02*/ u8 nationalMagic; // must equal 0xDA in order to have National mode
/*0x03*/ u8 unknown2;
/*0x04*/ u32 unownPersonality; // set when you first see Unown
@@ -301,7 +307,7 @@ struct Apprentice
u32 checksum;
};
-struct UnknownPokemonStruct
+struct BattleTowerPokemon
{
u16 species;
u16 heldItem;
@@ -338,7 +344,7 @@ struct EmeraldBattleTowerRecord
/*0x10*/ u16 greeting[6];
/*0x1C*/ u16 speechWon[6];
/*0x28*/ u16 speechLost[6];
- /*0x34*/ struct UnknownPokemonStruct party[4];
+ /*0x34*/ struct BattleTowerPokemon party[4];
/*0xE4*/ u8 language;
/*0xE8*/ u32 checksum;
};
@@ -353,7 +359,7 @@ struct BattleTowerEReaderTrainer
/*0x10*/ u16 greeting[6];
/*0x1C*/ u16 farewellPlayerLost[6];
/*0x28*/ u16 farewellPlayerWon[6];
- /*0x34*/ struct UnknownPokemonStruct party[3];
+ /*0x34*/ struct BattleTowerPokemon party[3];
/*0xB8*/ u32 checksum;
};
diff --git a/include/graphics.h b/include/graphics.h
index 99f896b6b..55020cacd 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -4238,6 +4238,7 @@ extern const u32 gBattleAnimSpriteSheet_132[];
extern const u32 gBattleAnimSpriteSheet_133[];
extern const u32 gBattleAnimSpriteSheet_134[];
extern const u32 gBattleAnimSpriteSheet_135[];
+extern const u32 gBattleAnimSpriteSheet_Particles[];
extern const u32 gBattleAnimSpriteSheet_136[];
extern const u32 gBattleAnimSpriteSheet_137[];
extern const u32 gBattleAnimSpriteSheet_138[];
@@ -4753,4 +4754,9 @@ extern const u32 gCableCarDoor_Gfx[];
extern const u32 gCableCarCord_Gfx[];
extern const u16 gCableCar_Pal[];
+// Battle Anim
+extern const u32 gUnknown_08C2DDA4[];
+extern const u32 gUnknown_08C2EA50[];
+extern const u32 gUnknown_08C2EA9C[];
+
#endif //GUARD_GRAPHICS_H
diff --git a/include/item_menu.h b/include/item_menu.h
index 3fe5f2c03..a904208d9 100644
--- a/include/item_menu.h
+++ b/include/item_menu.h
@@ -32,10 +32,10 @@ extern struct BagStruct gUnknown_0203CE58;
struct UnkBagStruct
{
- void (*unk0)(void);
- u8 unk4[0x800];
- u8 unk804[12];
- u8 unk810[7];
+ void (*mainCallback2)(void);
+ u8 tilemapBuffer[0x800];
+ u8 spriteId[12];
+ u8 windowPointers[7];
u8 unk817;
u8 unk818;
u8 unk819;
@@ -43,7 +43,7 @@ struct UnkBagStruct
u8 unk81B:4;
u8 unk81B_1:2;
u8 unk81B_3:1;
- u8 unk81B_2:1;
+ u8 hideCloseBagText:1;
u8 filler3[2];
u8 unk81E;
u8 unk81F;
@@ -52,11 +52,11 @@ struct UnkBagStruct
u8 unk825;
u8 filler[2];
u8 unk828;
- u8 unk829[POCKETS_COUNT];
- u8 unk82E[6];
+ u8 numItemStacks[POCKETS_COUNT];
+ u8 numShownItems[6];
s16 unk834;
u8 filler4[0xE];
- u8 unk844[32][32];
+ u8 pocketNameBuffer[32][32];
u8 filler2[4];
};
@@ -71,9 +71,10 @@ void sub_81AAC14(void);
void sub_81AAC50(void);
void sub_81AAC70(void);
void sub_81AAC28(void);
+void SetInitialScrollAndCursorPositions(u8 pocketId);
void bag_menu_mail_related(void);
void CB2_BagMenuFromStartMenu(void);
-u8 sub_81ABB2C(u8 pocketId);
+u8 GetItemListPosition(u8 pocketId);
bool8 UseRegisteredKeyItemOnField(void);
void CB2_GoToSellMenu(void);
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
diff --git a/include/pokedex.h b/include/pokedex.h
index 3f90e9508..b6d323fd3 100644
--- a/include/pokedex.h
+++ b/include/pokedex.h
@@ -4,6 +4,15 @@
extern u8 gUnknown_030060B0;
extern void (*gUnknown_030060B4)(void);
+#define HOENN_DEX_COUNT 202
+#define NATIONAL_DEX_COUNT 386
+
+enum
+{
+ DEX_MODE_HOENN,
+ DEX_MODE_NATIONAL
+};
+
enum
{
FLAG_GET_SEEN,
@@ -31,6 +40,6 @@ u16 GetNationalPokedexCount(u8);
u16 GetHoennPokedexCount(u8);
u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality);
s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId);
-u16 sub_80C0E9C(u16, s16, s16, u16);
+u16 CreateMonSpriteFromNationalDexNumber(u16, s16, s16, u16);
#endif // GUARD_POKEDEX_H
diff --git a/include/pokemon.h b/include/pokemon.h
index 5d7f7f2ae..94dae089f 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -460,11 +460,11 @@ void CreateMaleMon(struct Pokemon *mon, u16 species, u8 level);
void CreateMonWithIVsPersonality(struct Pokemon *mon, u16 species, u8 level, u32 ivs, u32 personality);
void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u32 otId);
void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 evSpread);
-void sub_806819C(struct Pokemon *mon, struct UnknownPokemonStruct *src);
-void sub_8068338(struct Pokemon *mon, struct UnknownPokemonStruct *src, bool8 lvl50);
+void sub_806819C(struct Pokemon *mon, struct BattleTowerPokemon *src);
+void sub_8068338(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50);
void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId);
void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
-void sub_80686FC(struct Pokemon *mon, struct UnknownPokemonStruct *dest);
+void sub_80686FC(struct Pokemon *mon, struct BattleTowerPokemon *dest);
void CreateObedientMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId);
bool8 sub_80688F8(u8 caseId, u8 battlerId);
void SetDeoxysStats(void);
@@ -566,7 +566,7 @@ u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves);
u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves);
u8 GetNumberOfRelearnableMoves(struct Pokemon *mon);
u16 SpeciesToPokedexNum(u16 species);
-bool32 sub_806E3F8(u16 species);
+bool32 IsSpeciesInHoennDex(u16 species);
void ClearBattleMonForms(void);
u16 GetBattleBGM(void);
void PlayBattleBGM(void);
diff --git a/include/strings.h b/include/strings.h
index 37a721471..5af8b63ff 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -1289,6 +1289,7 @@ extern const u8 gText_SpaceAndSpace[];
extern const u8 gText_CommaSpace[];
extern const u8 gText_NewLine[];
extern const u8 gText_ScrollTextUp[];
+extern const u8 gText_Space[];
extern const u8 gText_Space2[];
extern const u8 gText_Are[];
extern const u8 gText_Are2[];