From 7cf9693551ebf79212878c08245e13337d43ad52 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Oct 2017 14:26:25 -0400 Subject: [PATCH] Decompile special pointers --- data/event_scripts.s | 3 +- data/specials.inc | 529 +++++++++++++++++++++++++++++++++++++++++++ src/egg_hatch.c | 2 +- src/safari_zone.c | 2 +- 4 files changed, 532 insertions(+), 4 deletions(-) create mode 100644 data/specials.inc diff --git a/data/event_scripts.s b/data/event_scripts.s index 0f6ea494e..ad1216b91 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -12,8 +12,7 @@ gScriptCmdTableEnd:: @ 81DBA08 gSpecialVars:: @ 81DBA0C .incbin "baserom.gba", 0x1dba0c, 0x58 -gSpecials:: @ 81DBA64 - .incbin "baserom.gba", 0x1dba64, 0x83c + .include "data/specials.inc" gStdScripts:: @ 81DC2A0 .incbin "baserom.gba", 0x1dc2a0, 0x2c diff --git a/data/specials.inc b/data/specials.inc new file mode 100644 index 000000000..d34d6b6f4 --- /dev/null +++ b/data/specials.inc @@ -0,0 +1,529 @@ +gSpecials:: @ 81DBA64 + .4byte sp000_heal_pokemon + .4byte sub_809D2BC + .4byte sub_80AF948 + .4byte sub_80AF9F8 + .4byte sub_80B36EC + .4byte sub_80B371C + .4byte sub_80E8E18 + .4byte sub_80E8BC8 + .4byte sub_80E9068 + .4byte sub_80E9A90 + .4byte sub_80E9AC0 + .4byte sub_80E9744 + .4byte sub_80E9BDC + .4byte sub_80E9C2C + .4byte sub_80E9C74 + .4byte sub_80E9C88 + .4byte sub_80EA2E4 + .4byte sub_80EA354 + .4byte sub_80E933C + .4byte sub_8127E18 + .4byte sub_81297AC + .4byte sub_80E8C98 + .4byte sub_80E95D4 + .4byte sub_8129708 + .4byte sub_80E91F8 + .4byte sub_80EA30C + .4byte sub_80FA57C + .4byte sub_80E6BE8 + .4byte sub_80B2DA4 + .4byte sub_80B2E4C + .4byte sub_80B2E74 + .4byte sub_80B2EA8 + .4byte sub_80097E8 + .4byte sub_80B3968 + .4byte sub_80B3924 + .4byte nullsub_37 + .4byte sub_80B3254 + .4byte sub_80B2FD8 + .4byte sub_8138240 + .4byte SpawnLinkPartnerFieldObject + .4byte copy_player_party_to_sav1 + .4byte copy_player_party_from_sav1 + .4byte sub_80F9438 + .4byte sp02A_crash_sound + .4byte FieldObjectInteractionGetBerryTreeData + .4byte FieldObjectInteractionGetBerryName + .4byte FieldObjectInteractionGetBerryCountString + .4byte Bag_ChooseBerry + .4byte FieldObjectInteractionPlantBerryTree + .4byte FieldObjectInteractionPickBerryTree + .4byte FieldObjectInteractionRemoveBerryTree + .4byte FieldObjectInteractionWaterBerryTree + .4byte PlayerHasBerries + .4byte IsEnigmaBerryValid + .4byte sub_80B170C + .4byte sub_80B1A14 + .4byte special_trainer_unable_to_battle + .4byte check_trainer_flag + .4byte sub_80B45AC + .4byte SetUpTrainerEncounterMusic + .4byte sub_80B226C + .4byte sub_80B22A0 + .4byte sub_80B19EC + .4byte sub_80C7578 + .4byte sub_80F92F8 + .4byte TurnOffTVScreen + .4byte DoTVShow + .4byte DoPokeNews + .4byte special_0x44 + .4byte special_0x45 + .4byte InterviewBefore + .4byte InterviewAfter + .4byte sub_80EF8F8 + .4byte SetContestCategoryStringVarForInterview + .4byte special_0x4a + .4byte TV_IsScriptShowKindAlreadyInQueue + .4byte CheckForBigMovieOrEmergencyNewsOnTV + .4byte GetMomOrDadStringForTVMessage + .4byte ResetTVShowState + .4byte sub_80F831C + .4byte sub_80F84B0 + .4byte sub_80F8814 + .4byte sub_80F834C + .4byte sub_80F8390 + .4byte sub_80F8850 + .4byte sub_80F82B4 + .4byte sub_80F87D8 + .4byte sub_80F7F30 + .4byte sub_80F8970 + .4byte sub_80F8AFC + .4byte sub_80F82FC + .4byte sub_80F7F7C + .4byte sub_80F7FFC + .4byte sub_80F8D24 + .4byte sub_80F8C7C + .4byte sub_80B3000 + .4byte sub_809FF80 + .4byte sub_80FAFF8 + .4byte easy_chat_input_maybe + .4byte sub_811EECC + .4byte sub_81201DC + .4byte sub_81201F4 + .4byte sub_8120210 + .4byte sub_8120358 + .4byte sub_8120374 + .4byte sub_812038C + .4byte sub_8120340 + .4byte sub_8120B5C + .4byte sub_81203FC + .4byte sub_81203C4 + .4byte sub_81213B0 + .4byte sub_812139C + .4byte sub_8121388 + .4byte sub_81213D8 + .4byte sub_8121450 + .4byte sub_8121424 + .4byte sub_8133EC0 + .4byte sub_8133CD8 + .4byte sub_8133CF4 + .4byte sub_8133D2C + .4byte sub_8133D8C + .4byte sub_8133E38 + .4byte GetSeedotSizeRecordInfo + .4byte CompareSeedotSize + .4byte GetLotadSizeRecordInfo + .4byte CompareLotadSize + .4byte TV_PutNameRaterShowOnTheAirIfNicnkameChanged + .4byte TV_CopyNicknameToStringVar1AndEnsureTerminated + .4byte TV_CheckMonOTIDEqualsPlayerID + .4byte sub_8122998 + .4byte sub_81229C8 + .4byte sub_811EF6C + .4byte sub_8122A30 + .4byte sub_80D6EDC + .4byte CalculatePlayerPartyCount + .4byte sub_80C7008 + .4byte sub_80C70AC + .4byte sub_80F88E8 + .4byte sub_80F88DC + .4byte sub_80F8864 + .4byte sub_80F8940 + .4byte ShowContestWinner + .4byte sub_8138540 + .4byte sub_81384F0 + .4byte sub_8138AC0 + .4byte DrawWholeMapView + .4byte sub_8138AD0 + .4byte sub_8138750 + .4byte sub_81388E4 + .4byte sub_8138AA4 + .4byte sub_8138AF0 + .4byte sub_8138B10 + .4byte sub_8138B48 + .4byte sub_8138BC8 + .4byte sub_8138B8C + .4byte sub_814FC9C + .4byte sub_8085784 + .4byte Special_StartWallClock + .4byte Special_ViewWallClock + .4byte sub_80B1138 + .4byte sub_80B086C + .4byte ChangePokemonNickname + .4byte sub_81B94B0 + .4byte sub_8136EF4 + .4byte sub_807FA80 + .4byte sub_8142BC8 + .4byte sub_813BD60 + .4byte sub_813BCA8 + .4byte sub_813BDB4 + .4byte sub_813BA30 + .4byte sub_813BCE8 + .4byte sub_813BF60 + .4byte sub_813BA60 + .4byte sub_813BF7C + .4byte rock_smash_wild_pokemon_encounter + .4byte GabbyAndTyGetBattleNum + .4byte GabbyAndTyAfterInterview + .4byte GabbyAndTyBeforeInterview + .4byte DoTVShowInSearchOfTrainers + .4byte IsTVShowInSearchOfTrainersAiring + .4byte GabbyAndTyGetLastQuote + .4byte GabbyAndTyGetLastBattleTrivia + .4byte GabbyAndTySetScriptVarsToFieldObjectLocalIds + .4byte sub_8138B80 + .4byte sp0B5_daycare + .4byte sp0B6_daycare + .4byte sub_8070728 + .4byte sp0B8_daycare + .4byte sp0B9_daycare_relationship_comment + .4byte sub_8070C58 + .4byte daycare_send_selected_pokemon + .4byte sub_8071330 + .4byte sub_80712C0 + .4byte sub_806FF30 + .4byte sub_806FED8 + .4byte sub_806FDC4 + .4byte ScriptHatchMon + .4byte EggHatch + .4byte sub_8071614 + .4byte sub_813C4BC + .4byte IsEnoughForCostInVar0x8005 + .4byte SubtractMoneyFromVar0x8005 + .4byte sub_80F972C + .4byte sp0C8_whiteout_maybe + .4byte sub_80FBE90 + .4byte sub_80FBED0 + .4byte sub_8137F90 + .4byte sub_8137FB0 + .4byte EnterSafariMode + .4byte ExitSafariMode + .4byte GetPokeblockFeederInFront + .4byte sub_8135908 + .4byte sub_813793C + .4byte sub_8137988 + .4byte sub_8137A0C + .4byte sub_8137A4C + .4byte sub_8137C10 + .4byte sp0D9_ComputerRelated + .4byte sub_8138E20 + .4byte sub_8139994 + .4byte sub_8138EC0 + .4byte sub_8138FAC + .4byte sub_81B951C + .4byte sub_81B968C + .4byte sub_81B9770 + .4byte sub_81B9718 + .4byte sub_81B96D0 + .4byte sub_8160638 + .4byte sub_8137EFC + .4byte sub_8137D0C + .4byte sp0E3_walkrun_bitfield_interpretation + .4byte sub_8137E6C + .4byte sub_8137F44 + .4byte sub_8138C04 + .4byte sub_81A1780 + .4byte sub_8161F74 + .4byte sub_818E9AC + .4byte sub_8195960 + .4byte sub_8165360 + .4byte sub_8163AC4 + .4byte sub_81A5238 + .4byte sub_81A5E74 + .4byte sub_81A703C + .4byte sub_81A8E7C + .4byte StopMapMusic + .4byte sub_81B99B4 + .4byte sub_81B9B80 + .4byte sub_81B9D08 + .4byte sub_80F9490 + .4byte sub_81652B4 + .4byte sub_8139228 + .4byte sub_80F94E8 + .4byte sub_816AE58 + .4byte sub_816AE98 + .4byte sub_8138C94 + .4byte sub_807E73C + .4byte sub_807EA10 + .4byte sub_807F0E4 + .4byte sub_807E9D4 + .4byte sub_8138BDC + .4byte RetrieveLotteryNumber + .4byte PickLotteryCornerTicket + .4byte ShowBerryBlenderRecordWindow + .4byte sub_8138FEC + .4byte sub_8138FD4 + .4byte sp109_CreatePCMenu + .4byte sub_8137C28 + .4byte sub_8137CB4 + .4byte sub_8139004 + .4byte sub_8139030 + .4byte sub_813905C + .4byte sub_8139088 + .4byte sub_81390B4 + .4byte sub_80FB7A4 + .4byte DoSoftReset + .4byte sub_8137734 + .4byte sub_8139A78 + .4byte nullsub_55 + .4byte SpawnScriptFieldObject + .4byte RemoveScriptFieldObject + .4byte sub_81391D0 + .4byte sub_8139200 + .4byte CheckRelicanthWailord + .4byte ShouldDoBrailleStrengthEffectOld + .4byte sub_80B0534 + .4byte sub_80B058C + .4byte sub_81379F8 + .4byte sub_8139238 + .4byte sub_8139248 + .4byte player_get_direction_lower_nybble + .4byte sub_81392AC + .4byte sub_81392D4 + .4byte sub_81392F8 + .4byte sub_8139320 + .4byte sub_8139348 + .4byte sub_8139370 + .4byte sub_81393C8 + .4byte sub_8098574 + .4byte sub_809859C + .4byte InitRoamer + .4byte sub_81393FC + .4byte sub_81390E0 + .4byte sub_80AFC60 + .4byte sub_813946C + .4byte sub_81394D8 + .4byte sub_80E980C + .4byte sub_8139530 + .4byte DoSealedChamberShakingEffect1 + .4byte sub_8139B60 + .4byte sub_80FAC78 + .4byte sub_8139540 + .4byte sub_809E1C8 + .4byte sub_8139560 + .4byte sub_80B0A18 + .4byte sub_80B0934 + .4byte sub_80B0A74 + .4byte sub_80B16D8 + .4byte DoSealedChamberShakingEffect2 + .4byte sub_8139634 + .4byte sub_80AC81C + .4byte sp13E_warp_to_last_warp + .4byte sp13F_fall_to_last_warp + .4byte sub_80F8D28 + .4byte sub_80F8EB8 + .4byte sub_8162794 + .4byte sub_80B08EC + .4byte sub_8139648 + .4byte sub_8139668 + .4byte sub_80F8FA0 + .4byte sub_81396E0 + .4byte sub_81B98DC + .4byte nullsub_54 + .4byte sub_80E9B70 + .4byte copy_bags_and_unk_data_from_save_blocks + .4byte sub_80B05B4 + .4byte sub_8139754 + .4byte sub_813970C + .4byte sub_80C08E4 + .4byte sub_8139770 + .4byte sub_81397C4 + .4byte sub_81653CC + .4byte sub_80F9370 + .4byte sub_80F8FE8 + .4byte sub_81AFDD0 + .4byte sub_80EDCE8 + .4byte sub_80EE2CC + .4byte sub_80EE72C + .4byte sub_80EE7C0 + .4byte nullsub_55 + .4byte PutFanClubSpecialOnTheAir + .4byte sub_80EED10 + .4byte sub_80EED34 + .4byte sub_80EB1AC + .4byte sub_80EBE7C + .4byte sub_80EB300 + .4byte sub_80EB438 + .4byte sub_80EB368 + .4byte sub_80EB3D0 + .4byte sub_80EB290 + .4byte sub_80EB2C8 + .4byte sub_80EB56C + .4byte sub_80EB9E0 + .4byte sub_80EBB28 + .4byte sub_80EB498 + .4byte sub_818D9C0 + .4byte sub_818DAEC + .4byte sub_818DBE8 + .4byte sub_818DC2C + .4byte sub_818DC60 + .4byte sub_818DCC8 + .4byte sub_818DD14 + .4byte sub_818DD54 + .4byte sub_818DD78 + .4byte sub_818DE44 + .4byte sub_818DE5C + .4byte sub_818DEA0 + .4byte sub_818DEDC + .4byte sub_818E038 + .4byte sub_818E06C + .4byte sub_818E2D8 + .4byte sub_811A858 + .4byte sub_818E2FC + .4byte sub_818E308 + .4byte sub_818E358 + .4byte sub_818E37C + .4byte sub_818E298 + .4byte sub_818E39C + .4byte sub_818E3BC + .4byte sub_818E3E0 + .4byte sub_818E430 + .4byte sub_818E47C + .4byte sub_818E490 + .4byte sub_813986C + .4byte sub_818E4A4 + .4byte sub_818E510 + .4byte sub_818E538 + .4byte sub_818E274 + .4byte sub_818E3EC + .4byte sub_818E8E0 + .4byte sub_818E8B4 + .4byte sub_818E914 + .4byte sub_818E92C + .4byte sub_818E940 + .4byte sub_818E960 + .4byte sub_818E990 + .4byte PutLilycoveContestLadyShowOnTheAir + .4byte sub_813B880 + .4byte sub_81A085C + .4byte CheckIfMultipleTrainersWantBattle + .4byte AddMapNamePopUpWindowTask + .4byte AddMapNamePopUpWindowTask + .4byte sub_81BE994 + .4byte sub_81BE79C + .4byte sub_81BE7F4 + .4byte sub_81398C0 + .4byte sub_80093CC + .4byte BerryBlenderLinkBecomeLeader + .4byte BerryBlenderLinkJoinGroup + .4byte UnionRoomSpecial + .4byte sub_801A42C + .4byte sub_8016934 + .4byte sp182_move_string + .4byte sub_801DC20 + .4byte sub_81B8958 + .4byte sub_8018090 + .4byte sub_813990C + .4byte sub_801B27C + .4byte HasAtLeastOneBerry + .4byte sub_802C920 + .4byte sub_802E3C4 + .4byte sub_8027A5C + .4byte sub_8027AAC + .4byte sub_8139980 + .4byte sub_81399F4 + .4byte sub_8139D98 + .4byte sub_80F905C + .4byte sub_800B518 + .4byte sub_80F90DC + .4byte sub_80F910C + .4byte sub_80F9160 + .4byte sub_81A4AA0 + .4byte sub_81A4AE8 + .4byte sub_8139F20 + .4byte sub_80F9134 + .4byte sub_80F9154 + .4byte sub_80B3028 + .4byte sub_813A128 + .4byte sub_813A630 + .4byte sub_813A080 + .4byte sub_81C6A94 + .4byte sub_81C4F24 + .4byte sub_81B95E0 + .4byte sub_81B9620 + .4byte sub_813A76C + .4byte sub_813A7B8 + .4byte sub_813A958 + .4byte sub_813A8FC + .4byte sub_813A988 + .4byte sub_813A9D0 + .4byte sub_813A9A4 + .4byte sub_813AA04 + .4byte sub_813AA18 + .4byte sub_813AA44 + .4byte sub_80248B0 + .4byte sub_8024918 + .4byte sub_80246D4 + .4byte sub_802477C + .4byte sub_802488C + .4byte sub_813A820 + .4byte sub_813A854 + .4byte sub_813B7D8 + .4byte sub_81C72A4 + .4byte sp106_CreateStartMenu + .4byte sub_80C2E40 + .4byte sub_813AC7C + .4byte sub_813ADB8 + .4byte sub_813ADD4 + .4byte sub_81B892C + .4byte sub_813AEB4 + .4byte sub_813AF48 + .4byte sub_813AFC8 + .4byte sub_813B1D0 + .4byte DoScriptedWildBattle + .4byte sub_81BEB54 + .4byte sub_81BEB68 + .4byte sub_81BEB7C + .4byte ChangeBoxPokemonNickname + .4byte get_unknown_box_id + .4byte sub_813B21C + .4byte sub_81D1C20 + .4byte sub_8175280 + .4byte sub_813B2E4 + .4byte sub_813B374 + .4byte sub_813B490 + .4byte sub_80A08CC + .4byte sub_813B484 + .4byte sub_81AFDA0 + .4byte sub_813B4E0 + .4byte ShouldDoBrailleRegicePuzzle + .4byte EnableNationalPokedex + .4byte sub_80E2548 + .4byte sub_80E2878 + .4byte TurnOnTVScreen + .4byte sub_81D4A90 + .4byte sub_813B514 + .4byte sub_813B568 + .4byte sub_813B534 + .4byte sp194_trainer_tower + .4byte sub_813B7D8 + .4byte sub_813B80C + .4byte sub_81D4BEC + .4byte sub_80224D0 + .4byte sub_81D99BC + .4byte walda_maybe + .4byte sub_81D9AC4 + .4byte sub_8139ED0 + .4byte sub_813B968 + .4byte sub_80F8B94 + .4byte sub_813C904 + .4byte sub_80B4808 + .4byte sub_813B9A0 + .4byte sub_81B9918 + .4byte sub_80722E0 + .4byte sub_80B45D0 + .4byte sub_813C5A0 + .4byte sub_8139C10 + .4byte sub_80B3BC4 + diff --git a/src/egg_hatch.c b/src/egg_hatch.c index a1f187b85..589e8901d 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -462,7 +462,7 @@ static void VBlankCB_EggHatch(void) TransferPlttBuffer(); } -static void EggHatch(void) +void EggHatch(void) { ScriptContext2_Enable(); CreateTask(Task_EggHatch, 10); diff --git a/src/safari_zone.c b/src/safari_zone.c index a1ec38920..77c6bbd61 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -139,7 +139,7 @@ static void ClearAllPokeblockFeeders(void) memset(sPokeblockFeeders, 0, sizeof(sPokeblockFeeders)); } -static void GetPokeblockFeederInFront(void) +void GetPokeblockFeederInFront(void) { s16 x, y; u16 i;