From 377710a0cb9cd85f2d1d221c1de30f671b4286cd Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 6 Feb 2018 21:20:07 -0600 Subject: decompile debug code in cable_club.c --- include/field_specials.h | 1 + include/link.h | 7 ++++++- include/overworld.h | 10 ++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/field_specials.h b/include/field_specials.h index 52325879c..a8e8d3da7 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -26,5 +26,6 @@ void SetShoalItemFlag(u16); u8 GetLeadMonIndex(void); void ResetFanClub(void); u8 sub_810FB10(u8 a0); +void sub_810FEFC(void); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/link.h b/include/link.h index 6a7212645..d8c6690ea 100644 --- a/include/link.h +++ b/include/link.h @@ -131,10 +131,11 @@ extern const struct BlockRequest sBlockRequestLookupTable[5]; extern struct Link gLink; extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS]; +// TODO: Why is gBlockSendBuffer a u8 array, while gBlockRecvBuffer is a u16 array? extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE]; +extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2]; extern u16 gLinkType; extern u32 gLinkStatus; -extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2]; extern u16 gSendCmd[CMD_LENGTH]; extern u8 gShouldAdvanceLinkState; #if GERMAN @@ -145,6 +146,8 @@ extern struct LinkPlayer gLinkPlayers[]; extern u16 word_3002910[]; extern bool8 gReceivedRemoteLinkPlayers; extern bool8 gLinkOpen; +extern bool8 gLinkPlayerPending[MAX_LINK_PLAYERS]; +void (*gLinkCallback)(void); void Task_DestroySelf(u8); void sub_8007270(u8); @@ -198,5 +201,7 @@ void LinkTestScreen(void); void debug_sub_8008218(u16 *buffer, void *arg1, u16 (*arg2)[], u32 arg3); void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0); u32 sub_8007E40(void); +void PrintHex(u32, u8, u8, u8); +void InitLinkTestBG_Unused(u8, u8, u8, u8); #endif // GUARD_LINK_H diff --git a/include/overworld.h b/include/overworld.h index 50089593f..734f751d4 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -24,6 +24,8 @@ struct UCoords32 extern const struct UCoords32 gUnknown_0821664C[]; extern void (*gFieldCallback)(void); +extern u8 gFieldLinkPlayerCount; +extern u8 gUnknown_03004860; // sub_8052F5C void Overworld_ResetStateAfterFly(void); @@ -91,7 +93,7 @@ void sub_8053D14(u16); // GetLocationMusic // GetCurrLocationDefaultMusic // GetWarpDestinationMusic -// Overworld_ResetMapMusic +void Overworld_ResetMapMusic(void); void Overworld_PlaySpecialMapMusic(void); void Overworld_SetSavedMusic(u16); void Overworld_ClearSavedMusic(void); @@ -185,11 +187,11 @@ u16 sub_8055438(u32); // sub_80554B8 // sub_80554BC // sub_80554E4 -// sub_80554F8 +s32 sub_80554F8(void); // unref_sub_8055568 -// sub_8055574 +void sub_8055574(void); u16 sub_8055588(void); -// sub_805559C +void sub_805559C(void); void sub_80555B0(int linkPlayerId, int a2, struct UnkStruct_8054FF8 *a3); bool32 sub_8055618(struct UnkStruct_8054FF8 *); bool32 sub_8055630(struct UnkStruct_8054FF8 *); -- cgit v1.2.3 From 4ddd59b4cae97d152b08c49516641fb176095882 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 6 Feb 2018 21:35:53 -0600 Subject: fix build --- include/overworld.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/overworld.h b/include/overworld.h index 734f751d4..dc393cc63 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -189,9 +189,9 @@ u16 sub_8055438(u32); // sub_80554E4 s32 sub_80554F8(void); // unref_sub_8055568 -void sub_8055574(void); +u16 sub_8055574(void); u16 sub_8055588(void); -void sub_805559C(void); +u16 sub_805559C(void); void sub_80555B0(int linkPlayerId, int a2, struct UnkStruct_8054FF8 *a3); bool32 sub_8055618(struct UnkStruct_8054FF8 *); bool32 sub_8055630(struct UnkStruct_8054FF8 *); -- cgit v1.2.3 From 843c7016bbfe4c3a0d93a74b17ec43da98f49b2d Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 6 Feb 2018 22:41:43 -0600 Subject: decompile debug code in reset_rtc_screen.c --- include/rtc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/rtc.h b/include/rtc.h index fdc5ad709..e117cf753 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -44,5 +44,6 @@ void RtcInitLocalTimeOffset(s32 hour, s32 minute); void RtcCalcLocalTimeOffset(s32 days, s32 hours, s32 minutes, s32 seconds); void CalcTimeDifference(struct Time *result, struct Time *t1, struct Time *t2); u32 RtcGetMinuteCount(void); +void debug_sub_8009894(u8 *); #endif // GUARD_RTC_UTIL_H -- cgit v1.2.3 From b4e5099c7623f2fd19f6670da0d20ccd6f202e6b Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Wed, 14 Feb 2018 23:19:37 -0600 Subject: decompile debug_sub_801174C --- include/pokeblock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/pokeblock.h b/include/pokeblock.h index cda598f6c..af39cbfd3 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -42,6 +42,7 @@ s16 PokeblockGetGain(u8, const struct Pokeblock *); u8 sub_810CB68(u8, u8*); void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest); void CB2_PreparePokeblockFeedScene(void); +bool8 sub_810CA34(struct Pokeblock *); #include "main.h" -- cgit v1.2.3 From aaa67d9f274611bc0a1eb1a28409e36756417c24 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Thu, 15 Feb 2018 01:19:14 -0600 Subject: decompile debug_sub_8011EA0 and debug_sub_8012294 --- include/pokeblock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/pokeblock.h b/include/pokeblock.h index af39cbfd3..a606a32ad 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -42,7 +42,7 @@ s16 PokeblockGetGain(u8, const struct Pokeblock *); u8 sub_810CB68(u8, u8*); void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest); void CB2_PreparePokeblockFeedScene(void); -bool8 sub_810CA34(struct Pokeblock *); +bool8 sub_810CA34(const struct Pokeblock *); #include "main.h" -- cgit v1.2.3 From e58c4ac922c10a2e7c06e1c3d27a95cf51361cb5 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Thu, 15 Feb 2018 01:36:03 -0600 Subject: ItemId_GetItem -> ItemId_GetName --- include/item.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'include') diff --git a/include/item.h b/include/item.h index bafa8a3fd..57aebf88e 100644 --- a/include/item.h +++ b/include/item.h @@ -1,27 +1,8 @@ #ifndef GUARD_ITEM_H #define GUARD_ITEM_H - typedef void (*ItemUseFunc)(u8); -struct Item -{ - u8 name[14]; - u16 itemId; - u16 price; - u8 holdEffect; - u8 holdEffectParam; - const u8 *description; - u8 importance; - u8 unk19; - u8 pocket; - u8 type; - ItemUseFunc fieldUseFunc; - u8 battleUsage; - ItemUseFunc battleUseFunc; - u8 secondaryId; -}; - struct BagPocket { struct ItemSlot *itemSlots; @@ -43,7 +24,7 @@ bool8 CheckPCHasItem(u16 itemId, u16 count); bool8 AddPCItem(u16 itemId, u16 count); void RemovePCItem(u8 index, u16 count); void SwapRegisteredBike(void); -const struct Item *ItemId_GetItem(u16 itemId); +const u8 *ItemId_GetName(u16 itemId); u16 ItemId_GetId(u16 itemId); u16 ItemId_GetPrice(u16 itemId); u8 ItemId_GetHoldEffect(u16 itemId); -- cgit v1.2.3 From abd9ab75e831d66dc30d27091251d1ad37334bdf Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Thu, 15 Feb 2018 22:24:05 -0600 Subject: decompile region_map.c and cable_car.c debug functions --- include/ewram.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/ewram.h b/include/ewram.h index cafb418fb..f1d9baa78 100644 --- a/include/ewram.h +++ b/include/ewram.h @@ -13,7 +13,6 @@ extern u8 gSharedMem[]; #define ewram0_2 (*(struct Struct2000000 *)(gSharedMem + 0x0)) #define namingScreenData (*(struct NamingScreenData *)(gSharedMem + 0x0)) #define ewramBerryPic (gSharedMem + 0x0) -#define ewram0_3 (*(struct UnknownStruct3 *)(gSharedMem + 0x0)) #define ewram0_4 (*(struct Unk2000000 *)(gSharedMem + 0x0)) #define ewram0_5 (*(struct UnkStruct *)(gSharedMem + 0x0)) #define eMatsudaDebugVar (gSharedMem[0x0]) -- cgit v1.2.3 From 18837b385535975044c14ed9a735833dc7d02126 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Fri, 16 Feb 2018 00:57:15 -0600 Subject: decompile some debug code in slot_machine.c --- include/slot_machine.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/slot_machine.h b/include/slot_machine.h index 7759ca1b2..b31798657 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -1,7 +1,8 @@ #ifndef GUARD_SLOT_MACHINE_H #define GUARD_SLOT_MACHINE_H -enum { +enum +{ SLOT_MACHINE_TAG_7_RED, SLOT_MACHINE_TAG_7_BLUE, SLOT_MACHINE_TAG_AZURILL, @@ -11,7 +12,8 @@ enum { SLOT_MACHINE_TAG_REPLAY }; -enum { +enum +{ SLOT_MACHINE_MATCHED_1CHERRY, SLOT_MACHINE_MATCHED_2CHERRY, SLOT_MACHINE_MATCHED_REPLAY, @@ -24,7 +26,8 @@ enum { SLOT_MACHINE_MATCHED_NONE }; -struct SlotMachineEwramStruct { +struct SlotMachineEwramStruct +{ /*0x00*/ u8 state; /*0x01*/ u8 unk01; /*0x02*/ u8 pikaPower; @@ -70,6 +73,10 @@ struct SlotMachineEwramStruct { /*0x5e*/ u16 winOut; /*0x60*/ u16 backupMapMusic; /*0x64*/ MainCallback prevMainCb; +#if DEBUG + u8 unk68[4]; + u8 unk6C[0]; +#endif }; void PlaySlotMachine(u8 arg0, MainCallback cb); -- cgit v1.2.3 From edc214732e28e264a3d54afc01a44c2307604703 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Fri, 16 Feb 2018 18:41:05 -0600 Subject: finish decompiling debug code in slot_machine.c --- include/slot_machine.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/slot_machine.h b/include/slot_machine.h index b31798657..85a3047e2 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -74,8 +74,17 @@ struct SlotMachineEwramStruct /*0x60*/ u16 backupMapMusic; /*0x64*/ MainCallback prevMainCb; #if DEBUG - u8 unk68[4]; - u8 unk6C[0]; + u32 unk68; + u32 unk6C; + u32 unk70; + u32 unk74; + u32 unk78; + u32 unk7C; + u32 unk80; + u32 unk84; + u32 unk88; + u32 unk8C; + s32 unk90; #endif }; -- cgit v1.2.3 From 0c189f3efb02f9d8e485c55b36c1ed86883ea1fe Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Fri, 16 Feb 2018 18:51:32 -0600 Subject: reorganize slot machine data --- include/slot_machine.h | 87 -------------------------------------------------- 1 file changed, 87 deletions(-) (limited to 'include') diff --git a/include/slot_machine.h b/include/slot_machine.h index 85a3047e2..456f2bed6 100644 --- a/include/slot_machine.h +++ b/include/slot_machine.h @@ -1,93 +1,6 @@ #ifndef GUARD_SLOT_MACHINE_H #define GUARD_SLOT_MACHINE_H -enum -{ - SLOT_MACHINE_TAG_7_RED, - SLOT_MACHINE_TAG_7_BLUE, - SLOT_MACHINE_TAG_AZURILL, - SLOT_MACHINE_TAG_LOTAD, - SLOT_MACHINE_TAG_CHERRY, - SLOT_MACHINE_TAG_POWER, - SLOT_MACHINE_TAG_REPLAY -}; - -enum -{ - SLOT_MACHINE_MATCHED_1CHERRY, - SLOT_MACHINE_MATCHED_2CHERRY, - SLOT_MACHINE_MATCHED_REPLAY, - SLOT_MACHINE_MATCHED_LOTAD, - SLOT_MACHINE_MATCHED_AZURILL, - SLOT_MACHINE_MATCHED_POWER, - SLOT_MACHINE_MATCHED_777_MIXED, - SLOT_MACHINE_MATCHED_777_RED, - SLOT_MACHINE_MATCHED_777_BLUE, - SLOT_MACHINE_MATCHED_NONE -}; - -struct SlotMachineEwramStruct -{ - /*0x00*/ u8 state; - /*0x01*/ u8 unk01; - /*0x02*/ u8 pikaPower; - /*0x03*/ u8 unk03; - /*0x04*/ u8 unk04; - /*0x05*/ u8 unk05; - /*0x06*/ u8 unk06; - /*0x07*/ u8 unk07; - /*0x08*/ u16 matchedSymbols; - /*0x0A*/ u8 unk0A; - /*0x0B*/ u8 unk0B; - /*0x0C*/ s16 coins; - /*0x0E*/ s16 payout; - /*0x10*/ s16 unk10; - /*0x12*/ s16 bet; - /*0x14*/ s16 unk14; - /*0x16*/ s16 unk16; - /*0x18*/ s16 unk18; - /*0x1A*/ s16 unk1A; - /*0x1C*/ s16 unk1C[3]; - /*0x22*/ u16 unk22[3]; - /*0x28*/ s16 reelPositions[3]; - /*0x2E*/ s16 unk2E[3]; - /*0x34*/ s16 unk34[3]; - /*0x3A*/ u8 reelTasks[3]; - /*0x3D*/ u8 unk3D; - /*0x3E*/ u8 unk3E; - /*0x3F*/ u8 unk3F; - /*0x40*/ u8 unk40; - /*0x41*/ u8 unk41; - /*0x42*/ u8 unk42; - /*0x43*/ u8 unk43; - /*0x44*/ u8 unk44[5]; - /*0x49*/ u8 unk49[2]; - /*0x49*/ u8 unk4B[3]; - /*0x4E*/ u8 unk4E[2]; - /*0x50*/ u8 unk50[2]; - /*0x52*/ u8 unk52[2]; - /*0x54*/ u8 unk54[4]; - /*0x58*/ u16 win0h; - /*0x5a*/ u16 win0v; - /*0x5c*/ u16 winIn; - /*0x5e*/ u16 winOut; - /*0x60*/ u16 backupMapMusic; - /*0x64*/ MainCallback prevMainCb; -#if DEBUG - u32 unk68; - u32 unk6C; - u32 unk70; - u32 unk74; - u32 unk78; - u32 unk7C; - u32 unk80; - u32 unk84; - u32 unk88; - u32 unk8C; - s32 unk90; -#endif -}; - void PlaySlotMachine(u8 arg0, MainCallback cb); void sub_8104DA4(void); u8 sub_8105BB4(u8 templateIdx, u8 cbAndCoordsIdx, s16 a2); -- cgit v1.2.3 From 051af13fe7f92644f2bacc9c225dd7ff52b6cc56 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Fri, 16 Feb 2018 22:51:19 -0600 Subject: decompile more debug code --- include/new_game.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/new_game.h b/include/new_game.h index 5be7f6265..c90606b5a 100644 --- a/include/new_game.h +++ b/include/new_game.h @@ -1,6 +1,8 @@ #ifndef GUARD_NEW_GAME_H #define GUARD_NEW_GAME_H +extern u8 gUnknown_020297ED; + void write_word_to_mem(u32 var, u8 *dataPtr); void copy_word_to_mem(u8 *copyTo, u8 *copyFrom); void InitPlayerTrainerId(void); -- cgit v1.2.3 From b9f8d43825463363a67be0ce9fcd00b23d264e05 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Sat, 17 Feb 2018 15:32:57 -0600 Subject: decompile more debug code --- include/battle_tower.h | 1 + include/global.berry.h | 2 +- include/global.h | 25 +++++++++++++++++++++---- include/shop.h | 2 +- include/start_menu.h | 2 ++ 5 files changed, 26 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/battle_tower.h b/include/battle_tower.h index a3e1ff28c..fe9d4ae6e 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -98,5 +98,6 @@ void SetEReaderTrainerName(u8*); u8 GetEReaderTrainerPicIndex(void); u8 GetEReaderTrainerClassNameIndex(void); void ValidateEReaderTrainer(void); +void SetEReaderTrainerChecksum(struct BattleTowerEReaderTrainer *ereaderTrainer); #endif // GUARD_BATTLE_TOWER_H diff --git a/include/global.berry.h b/include/global.berry.h index 21a0dd500..8f185c8f9 100644 --- a/include/global.berry.h +++ b/include/global.berry.h @@ -3,7 +3,7 @@ struct Berry { - /*0x00*/ const u8 name[7]; + /*0x00*/ u8 name[7]; /*0x07*/ u8 firmness; /*0x08*/ u16 size; /*0x0A*/ u8 maxYield; diff --git a/include/global.h b/include/global.h index 6dd772795..4b23fded7 100644 --- a/include/global.h +++ b/include/global.h @@ -734,9 +734,10 @@ struct Pokedex struct BattleTowerTrainer { - u8 trainerClass; - u8 name[8]; - u8 teamFlags; + /*0x00*/ u8 trainerClass; + /*0x01*/ u8 name[8]; + /*0x09*/ u8 teamFlags; + /*0x0C*/ struct { u16 easyChat[6]; } greeting; @@ -756,6 +757,7 @@ struct BattleTowerRecord // record mixing /*0xA0*/u32 checksum; }; +#if 0 struct BattleTowerEReaderTrainer { /*0x00*/u8 unk0; @@ -775,6 +777,21 @@ struct BattleTowerEReaderTrainer /*0x34*/struct UnknownPokemonStruct party[3]; /*0xB8*/u32 checksum; }; +#endif + +struct BattleTowerEReaderTrainer +{ + /*0x00*/ u8 unk0; + /*0x01*/ u8 trainerClass; + /*0x02*/ u16 winStreak; + /*0x04*/ u8 name[8]; + /*0x0C*/ u8 trainerId[4]; + /*0x10*/ u16 greeting[6]; + /*0x1C*/ u16 farewellPlayerLost[6]; + /*0x28*/ u16 farewellPlayerWon[6]; + /*0x34*/ struct UnknownPokemonStruct party[3]; + /*0xB8*/ u32 checksum; +}; struct BattleTowerData { @@ -831,7 +848,7 @@ struct MapPosition { s16 x; s16 y; - u8 height; + s8 height; }; struct UnkStruct_8054FF8 diff --git a/include/shop.h b/include/shop.h index 80602e26c..347d46d3c 100644 --- a/include/shop.h +++ b/include/shop.h @@ -28,7 +28,7 @@ enum struct MartInfo { /* 0x0 */ void (* callback) (void); - /* 0x4 */ u16 *itemList; + /* 0x4 */ const u16 *itemList; /* 0x8 */ u8 itemCount; // how many unique items are there for sale? /* 0x9 */ u8 cursor; // this shows the on-screen true index of the cursor and not the current item selected. /* 0xA */ u8 numChoices; // how many options does the mart have? can be either 2 or 1 (BUY/SELL vs BUY) diff --git a/include/start_menu.h b/include/start_menu.h index d3f77dc99..5e513b9dc 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -1,6 +1,8 @@ #ifndef GUARD_STARTER_CHOOSE_H #define GUARD_STARTER_CHOOSE_H +extern u8 (*gMenuCallback)(void); + //Public functions void CreateStartMenuTask(void (*func)(u8)); void sub_80712B4(u8 taskId); -- cgit v1.2.3 From 17a5968adbc1dfb6586641729b39eeb3873481df Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Sat, 17 Feb 2018 17:30:31 -0600 Subject: decompile more debug code --- include/global.h | 26 +------------------------- include/link.h | 1 + 2 files changed, 2 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 4b23fded7..dcd20981e 100644 --- a/include/global.h +++ b/include/global.h @@ -740,7 +740,7 @@ struct BattleTowerTrainer /*0x0C*/ struct { u16 easyChat[6]; - } greeting; + } greeting[6]; }; struct BattleTowerRecord // record mixing @@ -757,28 +757,6 @@ struct BattleTowerRecord // record mixing /*0xA0*/u32 checksum; }; -#if 0 -struct BattleTowerEReaderTrainer -{ - /*0x00*/u8 unk0; - /*0x01*/u8 trainerClass; - /*0x02*/u16 winStreak; - /*0x04*/u8 name[8]; - /*0x0C*/u8 trainerId[4]; - /*0x10*/struct { - u16 easyChat[6]; - } greeting; - /*0x1C*/struct { - u16 easyChat[6]; - } farewellPlayerLost; - /*0x28*/struct { - u16 easyChat[6]; - } farewellPlayerWon; - /*0x34*/struct UnknownPokemonStruct party[3]; - /*0xB8*/u32 checksum; -}; -#endif - struct BattleTowerEReaderTrainer { /*0x00*/ u8 unk0; @@ -867,8 +845,6 @@ struct HallOfFame u8 filler[0x1F00]; }; -extern struct HallOfFame gHallOfFame; extern struct SaveBlock2 gSaveBlock2; -extern u8 ewram[]; #endif // GUARD_GLOBAL_H diff --git a/include/link.h b/include/link.h index d8c6690ea..f9f2b6d0e 100644 --- a/include/link.h +++ b/include/link.h @@ -148,6 +148,7 @@ extern bool8 gReceivedRemoteLinkPlayers; extern bool8 gLinkOpen; extern bool8 gLinkPlayerPending[MAX_LINK_PLAYERS]; void (*gLinkCallback)(void); +extern u8 gUnknown_Debug_30030E0; void Task_DestroySelf(u8); void sub_8007270(u8); -- cgit v1.2.3 From 99befda409870bedc2120f3af0b84f3d6d55806b Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Sat, 17 Feb 2018 17:54:53 -0600 Subject: remove unnecessary struct in battle tower data --- include/global.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index dcd20981e..ec82d5d1d 100644 --- a/include/global.h +++ b/include/global.h @@ -737,24 +737,20 @@ struct BattleTowerTrainer /*0x00*/ u8 trainerClass; /*0x01*/ u8 name[8]; /*0x09*/ u8 teamFlags; - /*0x0C*/ - struct { - u16 easyChat[6]; - } greeting[6]; + u8 filler0A[2]; + /*0x0C*/ u16 greeting[6]; }; struct BattleTowerRecord // record mixing { - /*0x00*/u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 - /*0x01*/u8 trainerClass; - /*0x02*/u16 winStreak; - /*0x04*/u8 name[8]; - /*0x0C*/u8 trainerId[4]; - /*0x10*/struct { - u16 easyChat[6]; - } greeting; - /*0x1C*/struct UnknownPokemonStruct party[3]; - /*0xA0*/u32 checksum; + /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 + /*0x01*/ u8 trainerClass; + /*0x02*/ u16 winStreak; + /*0x04*/ u8 name[8]; + /*0x0C*/ u8 trainerId[4]; + /*0x10*/ u16 greeting[6]; + /*0x1C*/ struct UnknownPokemonStruct party[3]; + /*0xA0*/ u32 checksum; }; struct BattleTowerEReaderTrainer -- cgit v1.2.3 From 605c4b66f0d53198413a3ebe69171eefa193f3b0 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Sun, 18 Feb 2018 16:14:49 -0600 Subject: decompile more debug code --- include/link.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/link.h b/include/link.h index f9f2b6d0e..01f086fe8 100644 --- a/include/link.h +++ b/include/link.h @@ -199,7 +199,7 @@ void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); void LinkTestScreen(void); -void debug_sub_8008218(u16 *buffer, void *arg1, u16 (*arg2)[], u32 arg3); +void debug_sub_8008218(u16 *buffer, void *arg1, u16 *arg2, u32 arg3); void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0); u32 sub_8007E40(void); void PrintHex(u32, u8, u8, u8); -- cgit v1.2.3 From 5388d28bf33b38bb8dbb825564491feaa89c1787 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Sun, 18 Feb 2018 17:37:29 -0600 Subject: decompile more debug code --- include/link.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/link.h b/include/link.h index 01f086fe8..ca6c368ff 100644 --- a/include/link.h +++ b/include/link.h @@ -199,7 +199,7 @@ void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); void LinkTestScreen(void); -void debug_sub_8008218(u16 *buffer, void *arg1, u16 *arg2, u32 arg3); +void debug_sub_8008218(u16 *buffer, u32 arg1, u16 *arg2, u32 arg3); void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0); u32 sub_8007E40(void); void PrintHex(u32, u8, u8, u8); -- cgit v1.2.3