summaryrefslogtreecommitdiff
path: root/src/pokedex.c
diff options
context:
space:
mode:
authorMarijn van der Werf <marijn.vanderwerf@gmail.com>2016-12-01 03:51:24 +0100
committerYamaArashi <YamaArashi@users.noreply.github.com>2016-11-30 18:51:24 -0800
commit4258e60771aa9fdabd678930eca534423bd371b8 (patch)
treeecca2ee7641abc0562f39b6c7dd907af2184e102 /src/pokedex.c
parent831f8cd4fd94613d6b52d87df1b4903bedfaa717 (diff)
Declare more non-static functions in header files (#111)
* Declare more non-static functions in header files * Use `(void)` for functions without arguments. * Move global-included data to seperate headers * Don't import types or global in header * Fix fieldmap imports * Revert in-code changes * Add missing newlines
Diffstat (limited to 'src/pokedex.c')
-rw-r--r--src/pokedex.c133
1 files changed, 13 insertions, 120 deletions
diff --git a/src/pokedex.c b/src/pokedex.c
index 8dfc4212c..c7f3b5f5c 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -1,65 +1,16 @@
#include "global.h"
+#include "pokedex.h"
+#include "gba/m4a_internal.h"
+#include "string_util.h"
+#include "m4a.h"
+#include "decompress.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
#include "rng.h"
#include "songs.h"
#include "sound.h"
-#include "sprite.h"
#include "task.h"
-#include "text.h"
-
-struct PokedexListItem
-{
- u16 dexNum;
- u16 seen:1;
- u16 owned:1;
-};
-
-struct PokedexView
-{
- struct PokedexListItem unk0[386];
- u16 unk608;
- u8 unk60A_1:1;
- u8 unk60A_2:1;
- u8 unk60B;
- u16 unk60C;
- u16 selectedPokemon;
- u16 unk610;
- u16 dexMode; //National or Hoenn
- u16 unk614;
- u16 dexOrder;
- u16 unk618;
- u16 unk61A;
- u16 unk61C;
- u16 unk61E[4];
- u16 unk626; //sprite id of selected Pokemon
- u16 unk628;
- u16 unk62A;
- u8 unk62C;
- u8 unk62D;
- u8 unk62E;
- u8 unk62F;
- s16 unk630;
- s16 unk632;
- u16 unk634;
- u16 unk636;
- u16 unk638;
- u16 unk63A[4];
- u8 filler642[8];
- u8 unk64A;
- u8 unk64B;
- u8 unk64C_1:1;
- u8 selectedScreen;
- u8 unk64E;
- u8 unk64F;
- u8 menuIsOpen; //menuIsOpen
- u8 unk651;
- u16 menuCursorPos; //Menu cursor position
- s16 menuY; //Menu Y position (inverted because we use REG_BG0VOFS for this)
- u8 unk656[8];
- u8 unk65E[8];
-};
// I'm #define-ing these just for now so I can keep using the old unkXXX member names
#define unk60E selectedPokemon
@@ -157,11 +108,9 @@ extern void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBi
extern bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
extern void remove_some_task(void);
extern bool32 IsNationalPokedex(void);
-extern u16 GetNationalPokedexCount(u8);
extern u8 sub_8091E3C(void);
extern void sub_80690C8(void);
extern void sub_805469C(void);
-extern void LoadCompressedObjectPic(void *);
extern u16 HoennToNationalOrder(u16);
extern u16 NationalToHoennOrder(u16);
extern u16 gPokedexOrder_Alphabetical[];
@@ -169,73 +118,17 @@ extern u16 gPokedexOrder_Weight[];
extern u16 gPokedexOrder_Height[];
extern u8 gSpeciesNames[][11];
-void ClearPokedexView(struct PokedexView *);
-void Task_PokedexShowMainScreen(u8 taskId);
-void sub_808C0B8(void);
-void MainCB(void);
-bool8 sub_808D344(u8);
-void Task_PokedexMainScreen(u8 taskId);
-void sub_808E6BC(void);
-void sub_808EDB8(struct Sprite *);
-void sub_808CA64(u8 taskId);
-void Task_PokedexMainScreenMenu(u8 taskId);
-void sub_808CB8C(u8 taskId);
-u16 sub_808E48C(u16, u16);
-void sub_808C898(u8 taskId);
-void Task_ClosePokedex(u8 taskId);
-void sub_8091060(u16);
-void sub_808CAE4(u8 taskId);
-void sub_808D198(u8 taskId);
-bool8 sub_808E208(u8, u8, u8);
-u8 sub_808E82C(void);
-void sub_808E0CC(u16, u16);
-u8 sub_808F210(struct PokedexListItem *, u8);
-u8 sub_808F284(struct PokedexListItem *, u8);
-bool8 sub_808F250(u8);
-bool8 sub_808E71C(void);
-void sub_808CCC4(u8 taskId);
-u16 GetHoennPokedexCount(u8);
-void SortPokedex(u8, u8);
-void Task_PokedexResultsScreen(u8 taskId);
-void sub_808D118(u8 taskId);
-void Task_PokedexResultsScreenMenu(u8 taskId);
-void Task_PokedexResultsScreenReturnToMainScreen(u8 taskId);
-void sub_808CEF8(u8 taskId);
-void Task_PokedexResultsScreenExitPokedex(u8 taskId);
-void sub_808D640(void);
-void sub_808E978(u8);
-bool8 sub_8090D90(u16, u8);
-void sub_808E090(u8, u8, u16);
-void sub_808DEB0(u16, u8, u8, u16);
-void sub_808DF88(u16, u8, u8, u16);
-u8 sub_808DFE4(u16, u8, u8);
-u16 sub_808E888(u16);
-u32 sub_808E8C8(u16, u16, u16);
-void sub_808EE28(struct Sprite *sprite);
-u16 sub_8091818(u8, u16, u16, u16);
-u16 sub_80918EC(u16 a, s16 b, s16 c, u16 d); //Not sure of return type
-void Task_InitPageScreenMultistep(u8 taskId);
-void Task_PageScreenProcessInput(u8 taskId);
-void Task_InitCryScreenMultistep(u8 taskId);
-void Task_InitAreaScreenMultistep(u8 taskId);
-void Task_ClosePageScreen(u8 taskId);
-void sub_808F888(u8 taskId);
-void Task_InitSizeScreenMultistep(u8 taskId);
-void Task_AreaScreenProcessInput(u8 taskId);
-void sub_808FA00(u8 taskId);
-void Task_CryScreenProcessInput(u8 taskId);
-void sub_808FFBC(u8 taskId);
-void Task_SizeScreenProcessInput(u8 taskId);
-void sub_8090040(u8);
-void sub_8090498(u8 taskId);
-void sub_80904FC(u16);
-void sub_8090540(u16);
-void sub_8090750(u8);
-void sub_8090A3C(u8);
-void sub_8091738(u16, u16, u16);
u16 NationalPokedexNumToSpecies(u16);
+
+// asm/pokedex_area_screen
+void ShowPokedexAreaScreen(u16 species, u8 *string);
+
+// asm/pokedex_cry_screen
u8 sub_8119E3C(struct CryRelatedStruct *, u8);
+void sub_8119F88(u8 a);
+void sub_811A050(u16 species);
u8 ShowPokedexCryScreen(struct CryRelatedStruct *, u8);
+void DestroyCryMeterNeedleSprite();
void sub_808C02C(void)
{