diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-05-04 00:37:07 +0000 |
---|---|---|
committer | YamaArashi <YamaArashi@users.noreply.github.com> | 2017-05-03 17:37:07 -0700 |
commit | 7f03ba4951c5045274dab3f2a3de8e8d498b8df3 (patch) | |
tree | eea2b7a29e0eccff7057d6f4cb5eef42f5cd124c /src/item_use.c | |
parent | f2eb51932811b66b083ab0c6a7663d846f274888 (diff) |
decompile a little more of player_pc.c and dump half of battle_anim data incbins (#254)
* matching sub_813A280 and sub_813A4B4
* move data to item_use.c
* slightly less ugly NewGameInitPCItems
* more less ugly NewGameInitPCItems - Game Freak doesn't know how to use structs
* decompile HandleQuantityRolling and sub_813A6FC
* partially label and comment battle_anim.c
* decompile sub_813A794 and sub_813A83C
* minor comments on battle_anim.c
* decompile up to GF shenanigans #14390
* up to GF shenanigans #38571
* dump half of battle_anim_80CA710.s incbins
* dump most incbins from battle_anim_812C144.s
* obj_rot_scal fixes
* subsprite
* i cant even identify byte arrays
Diffstat (limited to 'src/item_use.c')
-rw-r--r-- | src/item_use.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/src/item_use.c b/src/item_use.c index 5c485bb11..923957c6b 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -112,36 +112,29 @@ void ItemUseOutOfBattle_TMHM(u8); void ItemUseOutOfBattle_EvolutionStone(u8); void ItemUseOutOfBattle_CannotUse(u8); -static const u8 Unknown_83D619C[] = _( - "この チケットで ふねに のりほうだい\n" - "はやく のってみたいな" -); +const u8 gSSTidalBetaString[] = _("この チケットで ふねに のりほうだい\nはやく のってみたいな"); +const u8 gSSTidalBetaString2[] = _("この チケットで ふねに のりほうだい\nはやく のってみたいな"); -static const u8 Unknown_83D61BC[] = _( - "この チケットで ふねに のりほうだい\n" - "はやく のってみたいな" -); - -static const u8 *const gUnknown_083D61DC[] = +const struct TextStruct gUnknown_083D61DC[2] = { - Unknown_83D619C, - Unknown_83D61BC, + gSSTidalBetaString, + gSSTidalBetaString2, }; -static void (* const gExitToOverworldFuncList[])(void) = +const struct FuncStruct gExitToOverworldFuncList[3] = { - sub_808B020, - c2_exit_to_overworld_2_switch, - sub_810B96C, + sub_808B020, + c2_exit_to_overworld_2_switch, + sub_810B96C, }; -static const u8 gItemFinderDirections[] = { DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST }; +const u8 gItemFinderDirections[] = { DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST }; -static void (* const gUnknown_083D61F4[])(u8) = +const struct FuncStruct gUnknown_083D61F4[2] = { - sub_80C9FC0, - CleanUpItemMenuMessage, -}; + sub_80C9FC0, + CleanUpItemMenuMessage, +}; void ExecuteSwitchToOverworldFromItemUse(u8 taskId) { @@ -152,8 +145,8 @@ void ExecuteSwitchToOverworldFromItemUse(u8 taskId) else taskData = ItemId_GetType(gScriptItemId) - 1; - gTasks[taskId].data[8] = (u32)gExitToOverworldFuncList[taskData] >> 16; - gTasks[taskId].data[9] = (u32)gExitToOverworldFuncList[taskData]; + gTasks[taskId].data[8] = (u32)(gExitToOverworldFuncList[taskData].func) >> 16; + gTasks[taskId].data[9] = (u32)(gExitToOverworldFuncList[taskData].func); gTasks[taskId].func = HandleItemMenuPaletteFade; } @@ -835,11 +828,11 @@ void ItemUseOutOfBattle_SSTicket(u8 taskId) if(gTasks[taskId].data[2] == 0) { MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14); - DisplayItemMessageOnField(taskId, gUnknown_083D61DC[ItemId_GetSecondaryId(gScriptItemId)], sub_80C9BB8, 1); + DisplayItemMessageOnField(taskId, (u8 *)gUnknown_083D61DC[ItemId_GetSecondaryId(gScriptItemId)].text, sub_80C9BB8, 1); } else { - DisplayItemMessageOnField(taskId, gUnknown_083D61DC[ItemId_GetSecondaryId(gScriptItemId)], sub_80C9BD8, 0); + DisplayItemMessageOnField(taskId, (u8 *)gUnknown_083D61DC[ItemId_GetSecondaryId(gScriptItemId)].text, sub_80C9BD8, 0); } } |