diff --git a/data/event_scripts.s b/data/event_scripts.s index 67351d184..5c3c408aa 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -442,28 +442,28 @@ gStdScripts_End:: @ 81DC2CC EventScript_SecretBasePC:: @ 823B4BB lockall playse SE_PC_LOGIN - message Text_276805 + message Text_SecretBaseBootUpPC dofieldeffect FLDEFF_PCTURN_ON waitstate waitmessage waitbuttonpress playse SE_SELECT - goto EventScript_23B4D3 + goto EventScript_SecretBasePCShowMainMenu end -EventScript_23B4D3:: @ 823B4D3 - message Text_27681A +EventScript_SecretBasePCShowMainMenu:: @ 823B4D3 + message Text_SecretBasePCStartMenu waitmessage - goto_if_set FLAG_DECORATION_16, EventScript_23B4EF + goto_if_set FLAG_DECORATION_16, EventScript_SecretBasePCMainMenuChoice goto EventScript_23B531 end -gUnknown_0823B4E8:: @ 823B4E8 +gUnknown_0823B4E8:: @ 823B4E8 ;EventScript_SecretBasePCCancel? lockall - goto EventScript_23B4D3 + goto EventScript_SecretBasePCShowMainMenu end -EventScript_23B4EF:: @ 823B4EF +EventScript_SecretBasePCMainMenuChoice:: @ 823B4EF multichoice 0, 0, 6, 0 switch VAR_RESULT case 0, EventScript_23B581 @@ -485,7 +485,7 @@ EventScript_23B531:: @ 823B531 EventScript_23B568:: @ 823B568 msgbox Text_2766AA, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq EventScript_23B4D3 + goto_if_eq EventScript_SecretBasePCShowMainMenu closemessage special sub_80E9AC0 releaseall @@ -501,7 +501,7 @@ EventScript_23B585:: @ 823B585 EventScript_RecordMixingSecretBasePC:: @ 823B589 lockall - message Text_276805 + message Text_SecretBaseBootUpPC playse SE_PC_LOGIN dofieldeffect FLDEFF_PCTURN_ON waitstate @@ -512,7 +512,7 @@ EventScript_RecordMixingSecretBasePC:: @ 823B589 end EventScript_23B5A1:: @ 823B5A1 - message Text_27681A + message Text_SecretBasePCStartMenu waitmessage multichoice 0, 0, 7, 0 switch VAR_RESULT @@ -533,7 +533,7 @@ EventScript_23B5F0:: @ 823B5F0 compare VAR_RESULT, 1 goto_if_eq EventScript_23B62F compare VAR_RESULT, 2 - goto_if_eq EventScript_23B652 + goto_if_eq EventScript_CantRegisterTooManyBases special sub_80E980C msgbox Text_276707, MSGBOX_YESNO compare VAR_RESULT, 0 @@ -554,8 +554,8 @@ EventScript_23B62F:: @ 823B62F releaseall end -EventScript_23B652:: @ 823B652 - msgbox Text_27676F, MSGBOX_SIGN +EventScript_CantRegisterTooManyBases:: @ 823B652 + msgbox Text_TooManyBasesDeleteSome, MSGBOX_SIGN special DoSecretBasePCTurnOffEffect closemessage releaseall @@ -1099,7 +1099,7 @@ EverGrandeCity_HallOfFame_EventScript_2717C1:: @ 82717C1 compare VAR_FOSSIL_MANIAC_STATE, 0 call_if_eq EverGrandeCity_HallOfFame_EventScript_271839 clearflag FLAG_HIDE_LILCOVE_MOTEL_GAME_DESIGNERS - call EverGrandeCity_HallOfFame_EventScript_2718CC + call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour setflag FLAG_HIDE_SLATEPORT_CITY_STERNS_SHIPYARD_MR_BRINEY clearflag FLAG_HIDE_SS_TIDAL_CORRIDOR_MR_BRINEY clearflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_INVISIBLE_NINJA_BOY @@ -1147,7 +1147,7 @@ EverGrandeCity_HallOfFame_EventScript_271851:: @ 8271851 return EventScript_WhiteOut:: @ 8271857 - call EverGrandeCity_HallOfFame_EventScript_2718CC + call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour goto EventScript_ResetMrBriney end @@ -1192,7 +1192,7 @@ EventScript_MoveMrBrineyToRoute108:: @ 82718B3 clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT end -EverGrandeCity_HallOfFame_EventScript_2718CC:: @ 82718CC +EverGrandeCity_HallOfFame_EventScript_ResetEliteFour:: @ 82718CC clearflag FLAG_DEFEATED_ELITE_4_SYDNEY clearflag FLAG_DEFEATED_ELITE_4_PHOEBE clearflag FLAG_DEFEATED_ELITE_4_GLACIA @@ -1337,13 +1337,13 @@ OldaleTown_PokemonCenter_1F_EventScript_271A19:: @ 8271A19 OldaleTown_PokemonCenter_1F_EventScript_271A43:: @ 8271A43 specialvar VAR_RESULT, IsPokerusInParty compare VAR_RESULT, 1 - goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_271A5F + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_Explain_Pokerus compare VAR_RESULT, 0 goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_2719B1 end -OldaleTown_PokemonCenter_1F_EventScript_271A5F:: @ 8271A5F - message gUnknown_08272F07 +OldaleTown_PokemonCenter_1F_EventScript_Explain_Pokerus:: @ 8271A5F + message gText_PokerusExplanation setflag FLAG_POKERUS_EXPLAINED return @@ -1437,7 +1437,7 @@ EventScript_271B85:: @ 8271B85 EventScript_271B95:: @ 8271B95 message gUnknown_08272A78 waitfanfare - msgbox gUnknown_08272A9A, MSGBOX_DEFAULT + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT setvar VAR_RESULT, 1 return @@ -1491,13 +1491,13 @@ Std_FindItem:: @ 8271BFD checkitemtype VAR_0x8000 call EventScript_271B08 compare VAR_0x8007, 1 - call_if_eq EventScript_271C3A + call_if_eq EventScript_PickItemUp compare VAR_0x8007, 0 call_if_eq EventScript_271CA1 release return -EventScript_271C3A:: @ 8271C3A +EventScript_PickItemUp:: @ 8271C3A removeobject VAR_LAST_TALKED giveitem VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, sub_81398C0 @@ -1513,20 +1513,20 @@ EventScript_271C3A:: @ 8271C3A special CallBattlePyramidFunction compare VAR_RESULT, 1 goto_if_eq EventScript_271C86 - msgbox gUnknown_08272A9A, MSGBOX_DEFAULT + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT return EventScript_271C86:: @ 8271C86 - msgbox gUnknown_08272AEA, MSGBOX_DEFAULT + msgbox gText_PlayerPutItemInBag, MSGBOX_DEFAULT return EventScript_271C8F:: @ 8271C8F bufferitemnameplural 0, VAR_0x8004, VAR_0x8005 - message gUnknown_082731A9 + message gText_PlayerFoundOneItemTwoLines return EventScript_271C9B:: @ 8271C9B - message gUnknown_08272ABF + message gText_PlayerFoundOneItem return EventScript_271CA1:: @ 8271CA1 @@ -1561,12 +1561,12 @@ EventScript_271CE8:: @ 8271CE8 EventScript_271D0E:: @ 8271D0E bufferitemnameplural 0, VAR_0x8004, 1 - message gUnknown_082731A9 + message gText_PlayerFoundOneItemTwoLines goto EventScript_271D2A end EventScript_271D1F:: @ 8271D1F - message gUnknown_08272ABF + message gText_PlayerFoundOneItem goto EventScript_271D2A end @@ -1575,14 +1575,14 @@ EventScript_271D2A:: @ 8271D2A waitfanfare bufferitemnameplural 1, VAR_0x8004, 1 copyvar VAR_0x8004, VAR_0x8008 - msgbox gUnknown_08272A9A, MSGBOX_DEFAULT + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT special sub_80EDCE8 special SetFlagInVar releaseall end EventScript_271D47:: @ 8271D47 - msgbox gUnknown_08272ABF, MSGBOX_DEFAULT + msgbox gText_PlayerFoundOneItem, MSGBOX_DEFAULT msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT setvar VAR_RESULT, 0 releaseall @@ -1591,7 +1591,7 @@ EventScript_271D47:: @ 8271D47 EventScript_271D5E:: @ 8271D5E lock faceplayer - msgbox Text_27260D, MSGBOX_YESNO + msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq EventScript_271D83 compare VAR_RESULT, 0 @@ -1605,7 +1605,7 @@ EventScript_271D83:: @ 8271D83 faceplayer EventScript_271D89:: @ 8271D89 - message Text_272640 + message Text_WouldNotLikeToMixRecords waitmessage waitbuttonpress release @@ -1616,7 +1616,7 @@ EventScript_PC:: @ 8271D92 setvar VAR_0x8004, 0 special DoPCTurnOnEffect playse SE_PC_ON - msgbox Text_27265A, MSGBOX_DEFAULT + msgbox Text_BootUpPC, MSGBOX_DEFAULT goto EventScript_271DAC end @@ -1639,7 +1639,7 @@ EventScript_271DBC:: @ 8271DBC EventScript_271DF9:: @ 8271DF9 playse SE_PC_LOGIN - msgbox gUnknown_082726C2, MSGBOX_DEFAULT + msgbox gText_AccessedPlayersPC, MSGBOX_DEFAULT special PlayerPC waitstate goto EventScript_271DAC @@ -1649,18 +1649,18 @@ EventScript_271E0E:: @ 8271E0E playse SE_PC_LOGIN call_if_unset FLAG_SYS_PC_LANETTE, EventScript_271E35 call_if_set FLAG_SYS_PC_LANETTE, EventScript_271E3E - msgbox gUnknown_082726A3, MSGBOX_DEFAULT + msgbox gText_StorageSystemOpened, MSGBOX_DEFAULT special ShowPokemonStorageSystemPC waitstate goto EventScript_271DAC end EventScript_271E35:: @ 8271E35 - msgbox gUnknown_0827268C, MSGBOX_DEFAULT + msgbox gText_AccessedSomeonesPC, MSGBOX_DEFAULT return EventScript_271E3E:: @ 8271E3E - msgbox gUnknown_082726D4, MSGBOX_DEFAULT + msgbox gText_AccessedLanettesPC, MSGBOX_DEFAULT return EventScript_271E47:: @ 8271E47 @@ -1717,20 +1717,20 @@ Route109_EventScript_271E95:: @ 8271E95 EventScript_UseSurf:: @ 8271EA0 checkpartymove MOVE_SURF compare VAR_RESULT, 6 - goto_if_eq EventScript_271ED6 + goto_if_eq EventScript_CantSurf bufferpartymonnick 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT lockall - msgbox gUnknown_08272FD6, MSGBOX_YESNO + msgbox gText_WantToUseSurf, MSGBOX_YESNO compare VAR_RESULT, 0 - goto_if_eq EventScript_271ED5 - msgbox gUnknown_0827300D, MSGBOX_DEFAULT + goto_if_eq EventScript_CancelSurf + msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_SURF -EventScript_271ED5:: @ 8271ED5 +EventScript_CancelSurf:: @ 8271ED5 releaseall -EventScript_271ED6:: @ 8271ED6 +EventScript_CantSurf:: @ 8271ED6 end Common_EventScript_SetupRivalGender:: @ 8271ED7 @@ -2464,56 +2464,56 @@ Movement_2725CB:: @ 82725CB step_end EventScript_PictureBookShelf:: @ 82725CE - msgbox Text_2A81E5, MSGBOX_SIGN + msgbox Text_PictureBookShelf, MSGBOX_SIGN end EventScript_BookShelf:: @ 82725D7 - msgbox Text_2A820D, MSGBOX_SIGN + msgbox Text_BookShelf, MSGBOX_SIGN end -EventScript_PokemonCenterBookshelf:: @ 82725E0 - msgbox Text_2A8232, MSGBOX_SIGN +EventScript_PokemonCenterBookShelf:: @ 82725E0 + msgbox Text_PokemonCenterBookShelf, MSGBOX_SIGN end EventScript_Vase:: @ 82725E9 - msgbox Text_2A8276, MSGBOX_SIGN + msgbox Text_Vase, MSGBOX_SIGN end -EventScript_TrashCan:: @ 82725F2 - msgbox Text_2A82B3, MSGBOX_SIGN +EventScript_EmptyTrashCan:: @ 82725F2 + msgbox Text_EmptyTrashCan, MSGBOX_SIGN end EventScript_ShopShelf:: @ 82725FB - msgbox Text_2A82BF, MSGBOX_SIGN + msgbox Text_ShopShelf, MSGBOX_SIGN end EventScript_Blueprint:: @ 8272604 - msgbox Text_2A82F7, MSGBOX_SIGN + msgbox Text_Blueprint, MSGBOX_SIGN end -Text_27260D: @ 827260D +Text_WouldYouLikeToMixRecords: @ 827260D .string "Would you like to mix records with\n" .string "other TRAINERS?$" -Text_272640: @ 8272640 +Text_WouldNotLikeToMixRecords: @ 8272640 .string "We hope to see you again!$" -Text_27265A: @ 827265A +Text_BootUpPC: @ 827265A .string "{PLAYER} booted up the PC.$" gText_WhichPCShouldBeAccessed:: @ 827266F .string "Which PC should be accessed?$" -gUnknown_0827268C:: @ 827268C +gText_AccessedSomeonesPC:: @ 827268C .string "Accessed SOMEONE'S PC.$" -gUnknown_082726A3:: @ 82726A3 +gText_StorageSystemOpened:: @ 82726A3 .string "POKéMON Storage System opened.$" -gUnknown_082726C2:: @ 82726C2 +gText_AccessedPlayersPC:: @ 82726C2 .string "Accessed {PLAYER}'s PC.$" -gUnknown_082726D4:: @ 82726D4 +gText_AccessedLanettesPC:: @ 82726D4 .string "Accessed LANETTE's PC.$" gUnknown_082726EB:: @ 82726EB @@ -2561,16 +2561,16 @@ gUnknown_08272A78:: @ 8272A78 gUnknown_08272A89:: @ 8272A89 .string "The BAG is full…$" -gUnknown_08272A9A:: @ 8272A9A +gText_PutItemInPocket:: @ 8272A9A .string "{PLAYER} put away the {STR_VAR_2}\nin the {STR_VAR_3} POCKET.$" -gUnknown_08272ABF:: @ 8272ABF +gText_PlayerFoundOneItem:: @ 8272ABF .string "{PLAYER} found one {STR_VAR_2}!$" gText_TooBadBagIsFull:: @ 8272AD0 .string "Too bad!\nThe BAG is full…$" -gUnknown_08272AEA:: @ 8272AEA +gText_PlayerPutItemInBag:: @ 8272AEA .string "{PLAYER} put away the {STR_VAR_2}\nin the BAG.$" gUnknown_08272B09:: @ 8272B09 @@ -2597,13 +2597,13 @@ gUnknown_08272C1D:: @ 8272C1D gUnknown_08272C5F:: @ 8272C5F .string "The sandstorm is vicious.\nIt's impossible to keep going.$" -gUnknown_08272C98:: @ 8272C98 +gText_SelectWithoutRegisteredItem:: @ 8272C98 .string "An item in the BAG can be\nregistered to SELECT for easy use.$" gUnknown_08272CD5:: @ 8272CD5 .string "There's an e-mail from POKéMON TRAINER\nSCHOOL.\p… … … … … …\pA POKéMON may learn up to four moves.\pA TRAINER's expertise is tested on the\nmove sets chosen for POKéMON.\p… … … … … …$" -gUnknown_08272D87:: @ 8272D87 +gText_PlayerHouseBootPC:: @ 8272D87 .string "{PLAYER} booted up the PC.$" gUnknown_08272D9C:: @ 8272D9C @@ -2615,13 +2615,13 @@ gUnknown_08272DB3:: @ 8272DB3 gUnknown_08272DE3:: @ 8272DE3 .string "{PLAYER} is out of usable\nPOKéMON!\p{PLAYER} whited out!$" -gUnknown_08272E0F:: @ 8272E0F +gText_RegisteredTrainerinPokeNav:: @ 8272E0F .string "Registered {STR_VAR_1} {STR_VAR_2}\nin the POKéNAV.$" gUnknown_08272E30:: @ 8272E30 .string "Do you know the TM SECRET POWER?\pOur group, we love the TM SECRET\nPOWER.\pOne of our members will give it to you.\nCome back and show me if you get it.\pWe'll accept you as a member and sell\nyou good stuff in secrecy.$" -gUnknown_08272F07:: @ 8272F07 +gText_PokerusExplanation:: @ 8272F07 .string "Your POKéMON may be infected with\nPOKéRUS.\pLittle is known about the POKéRUS\nexcept that they are microscopic life-\lforms that attach to POKéMON.\pWhile infected, POKéMON are said to\ngrow exceptionally well.$" .include "data/text/surf.inc" @@ -2650,13 +2650,13 @@ gUnknown_08273161:: @ 8273161 gUnknown_08273178:: @ 8273178 .string "Thank you for accessing the\nMYSTERY GIFT System.$" -gUnknown_082731A9:: @ 82731A9 +gText_PlayerFoundOneItemTwoLines:: @ 82731A9 .string "{PLAYER} found one {STR_VAR_1}\n{STR_VAR_2}!$" -gUnknown_082731BD:: @ 82731BD +gText_Sudowoodo_Attacked:: @ 82731BD .string "The weird tree doesn't like the\nWAILMER PAIL!\pThe weird tree attacked!$" -gUnknown_08273204:: @ 8273204 +gText_LegendaryFlewAway:: @ 8273204 .string "The {STR_VAR_1} flew away!$" gText_PkmnTransferredSomeonesPC:: @ 8273216 @@ -2674,7 +2674,7 @@ gText_PkmnBoxLanettesPCFull:: @ 82732D9 gUnknown_0827331C:: @ 827331C .string "There's no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan't accept any more!$" -gUnknown_08273374:: @ 8273374 +gText_NicknameThisPokemon:: @ 8273374 .string "Do you want to give a nickname to\nthis {STR_VAR_1}?$" gUnknown_0827339F:: @ 827339F @@ -2707,8 +2707,8 @@ gText_UnusualWeatherEnded_Rain:: @ 8273656 gText_UnusualWeatherEnded_Sun:: @ 8273684 .string "The intense sunshine appears to\nhave subsided…$" -EventScript_2736B3:: @ 82736B3 - msgbox gUnknown_08272C98, MSGBOX_SIGN +EventScript_SelectWithoutRegisteredItem:: @ 82736B3 + msgbox gText_SelectWithoutRegisteredItem, MSGBOX_SIGN end EventScript_Poison:: @ 82736BC @@ -2862,7 +2862,7 @@ TerraCave_End_EventScript_273776:: @ 8273776 removeobject VAR_LAST_TALKED fadescreenswapbuffers 0 bufferspeciesname 0, VAR_0x8004 - msgbox gUnknown_08273204, MSGBOX_DEFAULT + msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT release end @@ -3433,7 +3433,7 @@ Std_RegisteredInMatchCall:: @ 82742C9 closemessage delay 30 playfanfare MUS_ME_TORE_EYE - msgbox gUnknown_08272E0F, MSGBOX_DEFAULT + msgbox gText_RegisteredTrainerinPokeNav, MSGBOX_DEFAULT waitfanfare closemessage delay 30 @@ -4207,31 +4207,31 @@ MauvilleCity_GameCorner_EventScript_2A5B0D:: @ 82A5B0D .include "data/text/berries.inc" .include "data/text/shoal_cave.inc" -Text_2A81E5: @ 82A81E5 +Text_PictureBookShelf: @ 82A81E5 .string "There's a set of POKéMON picture books.$" -Text_2A820D: @ 82A820D +Text_BookShelf: @ 82A820D .string "It's filled with all sorts of books.$" -Text_2A8232: @ 82A8232 +Text_PokemonCenterBookShelf: @ 82A8232 .string "POKéMON magazines!\n" .string "POKéMON PAL…\p" .string "POKéMON HANDBOOK…\n" .string "ADORABLE POKéMON…$" -Text_2A8276: @ 82A8276 +Text_Vase: @ 82A8276 .string "This vase looks expensive…\n" .string "Peered inside…\p" .string "But, it was empty.$" -Text_2A82B3: @ 82A82B3 +Text_EmptyTrashCan: @ 82A82B3 .string "It's empty.$" -Text_2A82BF: @ 82A82BF +Text_ShopShelf: @ 82A82BF .string "The shelves brim with all sorts of\n" .string "POKéMON merchandise.$" -Text_2A82F7: @ 82A82F7 +Text_Blueprint: @ 82A82F7 .string "A blueprint of some sort?\n" .string "It's too complicated!$" diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index 291d6abec..4aef859d8 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -16,26 +16,26 @@ gFieldEffectScriptPointers:: @ 82DB9D4 .4byte gFieldEffectScript_SurfBlob .4byte gFieldEffectScript_UseSurf .4byte gFieldEffectScript_GroundImpactDust - .4byte gFieldEffectScript_Unknown11 + .4byte gFieldEffectScript_UseSecretPowerCave .4byte gFieldEffectScript_BikeHopTallGrass .4byte gFieldEffectScript_SandFootprints .4byte gFieldEffectScript_BikeHopBigSplash .4byte gFieldEffectScript_Splash .4byte gFieldEffectScript_BikeHopSmallSplash .4byte gFieldEffectScript_LongGrass - .4byte gFieldEffectScript_Unknown18 + .4byte gFieldEffectScript_JumpLongGrass .4byte gFieldEffectScript_Unknown19 .4byte gFieldEffectScript_Unknown20 .4byte gFieldEffectScript_Unknown21 .4byte gFieldEffectScript_Unknown22 .4byte gFieldEffectScript_BerryTreeGrowthSparkle .4byte gFieldEffectScript_DeepSandFootprints - .4byte gFieldEffectScript_Unknown25 - .4byte gFieldEffectScript_Unknown26 - .4byte gFieldEffectScript_Unknown27 + .4byte gFieldEffectScript_PokeCenterHeal + .4byte gFieldEffectScript_UseSecretPowerTree + .4byte gFieldEffectScript_UseSecretPowerShrub .4byte gFieldEffectScript_TreeDisguise .4byte gFieldEffectScript_MountainDisguise - .4byte gFieldEffectScript_Unknown30 + .4byte gFieldEffectScript_NPCUseFly .4byte gFieldEffectScript_UseFly .4byte gFieldEffectScript_FlyIn .4byte gFieldEffectScript_QuestionMarkIcon @@ -43,35 +43,35 @@ gFieldEffectScriptPointers:: @ 82DB9D4 .4byte gFieldEffectScript_BikeTireTracks .4byte gFieldEffectScript_SandDisguisePlaceholder .4byte gFieldEffectScript_UseRockSmash - .4byte gFieldEffectScript_Unknown38 - .4byte gFieldEffectScript_Unknown39 - .4byte gFieldEffectScript_Unknown40 + .4byte gFieldEffectScript_UseDig + .4byte gFieldEffectScript_SandPile + .4byte gFieldEffectScript_UseStrength .4byte gFieldEffectScript_ShortGrass .4byte gFieldEffectScript_HotSpringsWater - .4byte gFieldEffectScript_Unknown43 - .4byte gFieldEffectScript_Unknown44 - .4byte gFieldEffectScript_Unknown45 + .4byte gFieldEffectScript_UseWaterfall + .4byte gFieldEffectScript_UseDive + .4byte gFieldEffectScript_Pokeball .4byte gFieldEffectScript_HeartIcon .4byte gFieldEffectScript_Unknown47 .4byte gFieldEffectScript_Unknown48 .4byte gFieldEffectScript_JumpOutOfAsh - .4byte gFieldEffectScript_Unknown50 - .4byte gFieldEffectScript_Unknown51 - .4byte gFieldEffectScript_Unknown52 + .4byte gFieldEffectScript_LavaridgeGymWarp + .4byte gFieldEffectScript_SweetScent + .4byte gFieldEffectScript_SandPillar .4byte gFieldEffectScript_Bubbles - .4byte gFieldEffectScript_Unknown54 - .4byte gFieldEffectScript_Unknown55 - .4byte gFieldEffectScript_Unknown56 - .4byte gFieldEffectScript_Unknown57 - .4byte gFieldEffectScript_Unknown58 + .4byte gFieldEffectScript_Sparkle + .4byte gFieldEffectScript_ShowSecretPowerCave + .4byte gFieldEffectScript_ShowSecretPowerTree + .4byte gFieldEffectScript_ShowSecretPowerShrub + .4byte gFieldEffectScript_ShowCutGrass .4byte gFieldEffectScript_FieldMoveShowMonInit .4byte gFieldEffectScript_UsePuzzleEffect - .4byte gFieldEffectScript_Unknown61 - .4byte gFieldEffectScript_Unknown62 - .4byte gFieldEffectScript_Unknown63 + .4byte gFieldEffectScript_SecretBaseBootPC + .4byte gFieldEffectScript_HallOfFameRecord + .4byte gFieldEffectScript_UseTeleport .4byte gFieldEffectScript_Rayquaza .4byte gFieldEffectScript_Unknown65 - .4byte gFieldEffectScript_Unknown66 + .4byte gFieldEffectScript_MoveDeoxysRock gFieldEffectScript_ExclamationMarkIcon1:: @ 82DBAE0 field_eff_callnative FldEff_ExclamationMarkIcon @@ -117,7 +117,7 @@ gFieldEffectScript_GroundImpactDust:: @ 82DBB28 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Dust field_eff_end -gFieldEffectScript_Unknown11:: @ 82DBB32 +gFieldEffectScript_UseSecretPowerCave:: @ 82DBB32 field_eff_callnative FldEff_UseSecretPowerCave field_eff_end @@ -145,7 +145,7 @@ gFieldEffectScript_LongGrass:: @ 82DBB6A field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_LongGrass field_eff_end -gFieldEffectScript_Unknown18:: @ 82DBB74 +gFieldEffectScript_JumpLongGrass:: @ 82DBB74 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_JumpLongGrass field_eff_end @@ -173,16 +173,16 @@ gFieldEffectScript_DeepSandFootprints:: @ 82DBBAC field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_DeepSandFootprints field_eff_end -gFieldEffectScript_Unknown25:: @ 82DBBB6 +gFieldEffectScript_PokeCenterHeal:: @ 82DBBB6 field_eff_loadfadedpal gFieldEffectObjectPaletteInfo4 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_PokecenterHeal field_eff_end -gFieldEffectScript_Unknown26:: @ 82DBBC5 +gFieldEffectScript_UseSecretPowerTree:: @ 82DBBC5 field_eff_callnative FldEff_UseSecretPowerTree field_eff_end -gFieldEffectScript_Unknown27:: @ 82DBBCB +gFieldEffectScript_UseSecretPowerShrub:: @ 82DBBCB field_eff_callnative FldEff_UseSecretPowerShrub field_eff_end @@ -194,7 +194,7 @@ gFieldEffectScript_MountainDisguise:: @ 82DBBD7 field_eff_callnative ShowMountainDisguiseFieldEffect field_eff_end -gFieldEffectScript_Unknown30:: @ 82DBBDD +gFieldEffectScript_NPCUseFly:: @ 82DBBDD field_eff_callnative FldEff_NPCFlyOut field_eff_end @@ -226,15 +226,15 @@ gFieldEffectScript_UseRockSmash:: @ 82DBC0F field_eff_callnative FldEff_UseRockSmash field_eff_end -gFieldEffectScript_Unknown40:: @ 82DBC15 +gFieldEffectScript_UseStrength:: @ 82DBC15 field_eff_callnative sub_8145E2C field_eff_end -gFieldEffectScript_Unknown38:: @ 82DBC1B +gFieldEffectScript_UseDig:: @ 82DBC1B field_eff_callnative FldEff_UseDig field_eff_end -gFieldEffectScript_Unknown39:: @ 82DBC21 +gFieldEffectScript_SandPile:: @ 82DBC21 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_SandPile field_eff_end @@ -246,15 +246,15 @@ gFieldEffectScript_HotSpringsWater:: @ 82DBC35 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo1, FldEff_HotSpringsWater field_eff_end -gFieldEffectScript_Unknown43:: @ 82DBC3F +gFieldEffectScript_UseWaterfall:: @ 82DBC3F field_eff_callnative FldEff_UseWaterfall field_eff_end -gFieldEffectScript_Unknown44:: @ 82DBC45 +gFieldEffectScript_UseDive:: @ 82DBC45 field_eff_callnative FldEff_UseDive field_eff_end -gFieldEffectScript_Unknown45:: @ 82DBC4B +gFieldEffectScript_Pokeball:: @ 82DBC4B field_eff_loadpal gFieldEffectObjectPaletteInfo10 field_eff_callnative FldEff_Pokeball field_eff_end @@ -275,15 +275,15 @@ gFieldEffectScript_JumpOutOfAsh:: @ 82DBC6C field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_PopOutOfAsh field_eff_end -gFieldEffectScript_Unknown50:: @ 82DBC76 +gFieldEffectScript_LavaridgeGymWarp:: @ 82DBC76 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo2, FldEff_LavaridgeGymWarp field_eff_end -gFieldEffectScript_Unknown51:: @ 82DBC80 +gFieldEffectScript_SweetScent:: @ 82DBC80 field_eff_callnative FldEff_SweetScent field_eff_end -gFieldEffectScript_Unknown52:: @ 82DBC86 +gFieldEffectScript_SandPillar:: @ 82DBC86 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo9, FldEff_SandPillar field_eff_end @@ -291,23 +291,23 @@ gFieldEffectScript_Bubbles:: @ 82DBC90 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo0, FldEff_Bubbles field_eff_end -gFieldEffectScript_Unknown54:: @ 82DBC9A +gFieldEffectScript_Sparkle:: @ 82DBC9A field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo3, FldEff_Sparkle field_eff_end -gFieldEffectScript_Unknown55:: @ 82DBCA4 +gFieldEffectScript_ShowSecretPowerCave:: @ 82DBCA4 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo7, FldEff_SecretPowerCave field_eff_end -gFieldEffectScript_Unknown56:: @ 82DBCAE +gFieldEffectScript_ShowSecretPowerTree:: @ 82DBCAE field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo8, FldEff_SecretPowerTree field_eff_end -gFieldEffectScript_Unknown57:: @ 82DBCB8 +gFieldEffectScript_ShowSecretPowerShrub:: @ 82DBCB8 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo8, FldEff_SecretPowerShrub field_eff_end -gFieldEffectScript_Unknown58:: @ 82DBCC2 +gFieldEffectScript_ShowCutGrass:: @ 82DBCC2 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo6, FldEff_CutGrass field_eff_end @@ -319,16 +319,16 @@ gFieldEffectScript_UsePuzzleEffect:: @ 82DBCD2 field_eff_callnative FldEff_UsePuzzleEffect field_eff_end -gFieldEffectScript_Unknown61:: @ 82DBCD8 +gFieldEffectScript_SecretBaseBootPC:: @ 82DBCD8 field_eff_callnative FldEff_SecretBasePCTurnOn field_eff_end -gFieldEffectScript_Unknown62:: @ 82DBCDE +gFieldEffectScript_HallOfFameRecord:: @ 82DBCDE field_eff_loadfadedpal gFieldEffectObjectPaletteInfo4 field_eff_loadfadedpal_callnative gFieldEffectObjectPaletteInfo5, FldEff_HallOfFameRecord field_eff_end -gFieldEffectScript_Unknown63:: @ 82DBCED +gFieldEffectScript_UseTeleport:: @ 82DBCED field_eff_callnative FldEff_UseTeleport field_eff_end @@ -340,6 +340,6 @@ gFieldEffectScript_Unknown65:: @ 82DBCF9 field_eff_callnative sub_80B9ADC field_eff_end -gFieldEffectScript_Unknown66:: @ 82DBCFF +gFieldEffectScript_MoveDeoxysRock:: @ 82DBCFF field_eff_callnative Fldeff_MoveDeoxysRock field_eff_end diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index 5c1af6700..b502da8ec 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -121,7 +121,7 @@ BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC playse 269 applymovement 14, BattleFrontier_OutsideEast_Movement_242D69 waitmovement 0 - msgbox gUnknown_082731BD, MSGBOX_DEFAULT + msgbox gText_Sudowoodo_Attacked, MSGBOX_DEFAULT closemessage waitse playmoncry SPECIES_SUDOWOODO, 2 diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index f1c974dd9..4e292a1f9 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -151,7 +151,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F giveitem VAR_TEMP_0, 1 bufferitemname 1, VAR_TEMP_0 bufferstdstring 2, 14 - msgbox gUnknown_08272A9A, MSGBOX_DEFAULT + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 compare VAR_RESULT, 0 goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_220436 @@ -163,7 +163,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F giveitem VAR_TEMP_0, 1 bufferitemname 1, VAR_TEMP_0 bufferstdstring 2, 14 - msgbox gUnknown_08272A9A, MSGBOX_DEFAULT + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 compare VAR_RESULT, 0 goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_220436 @@ -175,7 +175,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F giveitem VAR_TEMP_0, 1 bufferitemname 1, VAR_TEMP_0 bufferstdstring 2, 14 - msgbox gUnknown_08272A9A, MSGBOX_DEFAULT + msgbox gText_PutItemInPocket, MSGBOX_DEFAULT goto LilycoveCity_DepartmentStoreRooftop_EventScript_220436 end diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index b553cf65b..a49c51499 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -257,7 +257,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8626:: @ 81F8626 setvar VAR_0x8004, 1 special DoPCTurnOnEffect playse SE_PC_ON - msgbox gUnknown_08272D87, MSGBOX_DEFAULT + msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT special BedroomPC waitstate releaseall diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index 49a9523e0..76bf7d6a8 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -315,7 +315,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F9576:: @ 81F9576 setvar VAR_0x8004, 2 special DoPCTurnOnEffect playse SE_PC_ON - msgbox gUnknown_08272D87, MSGBOX_DEFAULT + msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT special BedroomPC waitstate releaseall diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index c02381982..a3ad4dff7 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -347,7 +347,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA06C:: @ 81FA06C LittlerootTown_ProfessorBirchsLab_EventScript_1FA0A1:: @ 81FA0A1 call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 4 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD call LittlerootTown_ProfessorBirchsLab_EventScript_27378B @@ -358,7 +358,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0A1:: @ 81FA0A1 LittlerootTown_ProfessorBirchsLab_EventScript_1FA0CC:: @ 81FA0CC call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 4 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0F2 call LittlerootTown_ProfessorBirchsLab_EventScript_273797 @@ -392,7 +392,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA10D:: @ 81FA10D LittlerootTown_ProfessorBirchsLab_EventScript_1FA142:: @ 81FA142 call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 5 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E call LittlerootTown_ProfessorBirchsLab_EventScript_27378B @@ -403,7 +403,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA142:: @ 81FA142 LittlerootTown_ProfessorBirchsLab_EventScript_1FA16D:: @ 81FA16D call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 5 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA193 call LittlerootTown_ProfessorBirchsLab_EventScript_273797 @@ -437,7 +437,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA1AE:: @ 81FA1AE LittlerootTown_ProfessorBirchsLab_EventScript_1FA1E3:: @ 81FA1E3 call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 6 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA23F call LittlerootTown_ProfessorBirchsLab_EventScript_27378B @@ -448,7 +448,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA1E3:: @ 81FA1E3 LittlerootTown_ProfessorBirchsLab_EventScript_1FA20E:: @ 81FA20E call LittlerootTown_ProfessorBirchsLab_EventScript_1FA24F removeobject 6 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA234 call LittlerootTown_ProfessorBirchsLab_EventScript_273797 diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 15b94133d..b3a704443 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -95,7 +95,7 @@ MossdeepCity_StevensHouse_EventScript_222865:: @ 8222865 MossdeepCity_StevensHouse_EventScript_222895:: @ 8222895 call MossdeepCity_StevensHouse_EventScript_2228EB - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq MossdeepCity_StevensHouse_EventScript_222901 call MossdeepCity_StevensHouse_EventScript_27378B @@ -105,7 +105,7 @@ MossdeepCity_StevensHouse_EventScript_222895:: @ 8222895 MossdeepCity_StevensHouse_EventScript_2228BD:: @ 82228BD call MossdeepCity_StevensHouse_EventScript_2228EB - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq MossdeepCity_StevensHouse_EventScript_2228E0 call MossdeepCity_StevensHouse_EventScript_273797 diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index 7902cb95d..3ce8cfd5e 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -45,7 +45,7 @@ Route110_TrickHouseEnd_EventScript_26AD17:: @ 826AD17 faceplayer msgbox Route110_TrickHouseEnd_Text_26B08D, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 - switch VAR_0x4044 + switch VAR_TRICK_HOUSE_LEVEL case 0, Route110_TrickHouseEnd_EventScript_26AD84 case 1, Route110_TrickHouseEnd_EventScript_26ADC0 case 2, Route110_TrickHouseEnd_EventScript_26ADFC @@ -196,7 +196,7 @@ Route110_TrickHouseEnd_EventScript_26AFCF:: @ 826AFCF applymovement 1, Route110_TrickHouseEnd_Movement_269E3F waitmovement 0 removeobject 1 - addvar VAR_0x4044, 1 + addvar VAR_TRICK_HOUSE_LEVEL, 1 return Route110_TrickHouseEnd_EventScript_26AFEF:: @ 826AFEF diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index a83d50dc3..e1439d8d4 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -27,7 +27,7 @@ Route110_TrickHouseEntrance_MapScript1_269A60: @ 8269A60 Route110_TrickHouseEntrance_EventScript_269AD7:: @ 8269AD7 setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1 - compare VAR_0x4044, 8 + compare VAR_TRICK_HOUSE_LEVEL, 8 goto_if_eq Route110_TrickHouseEntrance_EventScript_269AED setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 2 end @@ -44,21 +44,21 @@ Route110_TrickHouseEntrance_EventScript_269AF3:: @ 8269AF3 Route110_TrickHouseEntrance_EventScript_269B03:: @ 8269B03 setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 0 - compare VAR_0x4044, 1 + compare VAR_TRICK_HOUSE_LEVEL, 1 call_if_eq Route110_TrickHouseEntrance_EventScript_269B61 - compare VAR_0x4044, 2 + compare VAR_TRICK_HOUSE_LEVEL, 2 call_if_eq Route110_TrickHouseEntrance_EventScript_269B6B - compare VAR_0x4044, 3 + compare VAR_TRICK_HOUSE_LEVEL, 3 call_if_eq Route110_TrickHouseEntrance_EventScript_269B75 - compare VAR_0x4044, 4 + compare VAR_TRICK_HOUSE_LEVEL, 4 call_if_eq Route110_TrickHouseEntrance_EventScript_269B7F - compare VAR_0x4044, 5 + compare VAR_TRICK_HOUSE_LEVEL, 5 call_if_eq Route110_TrickHouseEntrance_EventScript_269B89 - compare VAR_0x4044, 6 + compare VAR_TRICK_HOUSE_LEVEL, 6 call_if_eq Route110_TrickHouseEntrance_EventScript_269B93 - compare VAR_0x4044, 7 + compare VAR_TRICK_HOUSE_LEVEL, 7 call_if_eq Route110_TrickHouseEntrance_EventScript_269B9D - compare VAR_0x4044, 8 + compare VAR_TRICK_HOUSE_LEVEL, 8 call_if_eq Route110_TrickHouseEntrance_EventScript_269BA7 return @@ -139,7 +139,7 @@ Route110_TrickHouseEntrance_EventScript_269C15:: @ 8269C15 Route110_TrickHouseEntrance_EventScript_269C26:: @ 8269C26 addobject 1 hideobjectat 1, MAP_ROUTE110_TRICK_HOUSE_ENTRANCE - switch VAR_0x4044 + switch VAR_TRICK_HOUSE_LEVEL case 0, Route110_TrickHouseEntrance_EventScript_269C8C case 1, Route110_TrickHouseEntrance_EventScript_269C94 case 2, Route110_TrickHouseEntrance_EventScript_269C9C @@ -205,7 +205,7 @@ Route110_TrickHouseEntrance_MapScript2_269CEE: @ 8269CEE Route110_TrickHouseEntrance_EventScript_269CF8:: @ 8269CF8 lockall delay 20 - compare VAR_0x4044, 0 + compare VAR_TRICK_HOUSE_LEVEL, 0 call_if_eq Route110_TrickHouseEntrance_EventScript_269E48 msgbox Route110_TrickHouseEntrance_Text_26A78C, MSGBOX_DEFAULT closemessage @@ -240,21 +240,21 @@ Route110_TrickHouseEntrance_EventScript_269D6E:: @ 8269D6E waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x4044, 0 + compare VAR_TRICK_HOUSE_LEVEL, 0 call_if_eq Route110_TrickHouseEntrance_EventScript_269DEE - compare VAR_0x4044, 1 + compare VAR_TRICK_HOUSE_LEVEL, 1 call_if_eq Route110_TrickHouseEntrance_EventScript_269DF7 - compare VAR_0x4044, 2 + compare VAR_TRICK_HOUSE_LEVEL, 2 call_if_eq Route110_TrickHouseEntrance_EventScript_269E00 - compare VAR_0x4044, 3 + compare VAR_TRICK_HOUSE_LEVEL, 3 call_if_eq Route110_TrickHouseEntrance_EventScript_269E09 - compare VAR_0x4044, 4 + compare VAR_TRICK_HOUSE_LEVEL, 4 call_if_eq Route110_TrickHouseEntrance_EventScript_269E12 - compare VAR_0x4044, 5 + compare VAR_TRICK_HOUSE_LEVEL, 5 call_if_eq Route110_TrickHouseEntrance_EventScript_269E1B - compare VAR_0x4044, 6 + compare VAR_TRICK_HOUSE_LEVEL, 6 call_if_eq Route110_TrickHouseEntrance_EventScript_269E24 - compare VAR_0x4044, 7 + compare VAR_TRICK_HOUSE_LEVEL, 7 call_if_eq Route110_TrickHouseEntrance_EventScript_269E2D closemessage setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1 @@ -343,19 +343,19 @@ Route110_TrickHouseEntrance_EventScript_269E8F:: @ 8269E8F applymovement 1, Common_Movement_FacePlayer waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_26AA82, MSGBOX_DEFAULT - compare VAR_0x4044, 1 + compare VAR_TRICK_HOUSE_LEVEL, 1 goto_if_eq Route110_TrickHouseEntrance_EventScript_269EEF - compare VAR_0x4044, 2 + compare VAR_TRICK_HOUSE_LEVEL, 2 goto_if_eq Route110_TrickHouseEntrance_EventScript_269F1B - compare VAR_0x4044, 3 + compare VAR_TRICK_HOUSE_LEVEL, 3 goto_if_eq Route110_TrickHouseEntrance_EventScript_269F47 - compare VAR_0x4044, 4 + compare VAR_TRICK_HOUSE_LEVEL, 4 goto_if_eq Route110_TrickHouseEntrance_EventScript_269F73 - compare VAR_0x4044, 5 + compare VAR_TRICK_HOUSE_LEVEL, 5 goto_if_eq Route110_TrickHouseEntrance_EventScript_269F9F - compare VAR_0x4044, 6 + compare VAR_TRICK_HOUSE_LEVEL, 6 goto_if_eq Route110_TrickHouseEntrance_EventScript_269FCB - compare VAR_0x4044, 7 + compare VAR_TRICK_HOUSE_LEVEL, 7 goto_if_eq Route110_TrickHouseEntrance_EventScript_269FF7 end @@ -510,7 +510,7 @@ Route110_TrickHouseEntrance_EventScript_26A126:: @ 826A126 waitmovement 0 applymovement EVENT_OBJ_ID_PLAYER, Route110_TrickHouseEntrance_Movement_26A1A7 waitmovement 0 - switch VAR_0x4044 + switch VAR_TRICK_HOUSE_LEVEL case 0, Route110_TrickHouseEntrance_EventScript_26A1A9 case 1, Route110_TrickHouseEntrance_EventScript_26A1B4 case 2, Route110_TrickHouseEntrance_EventScript_26A1BF @@ -579,7 +579,7 @@ Route110_TrickHouseEntrance_EventScript_26A201:: @ 826A201 end Route110_TrickHouseEntrance_EventScript_26A20B:: @ 826A20B - compare VAR_0x4044, 8 + compare VAR_TRICK_HOUSE_LEVEL, 8 goto_if_eq Route110_TrickHouseEntrance_EventScript_26A220 msgbox Route110_TrickHouseEntrance_Text_26A878, MSGBOX_DEFAULT releaseall @@ -592,7 +592,7 @@ Route110_TrickHouseEntrance_EventScript_26A220:: @ 826A220 Route110_TrickHouseEntrance_EventScript_26A22A:: @ 826A22A lockall - switch VAR_0x4044 + switch VAR_TRICK_HOUSE_LEVEL case 0, Route110_TrickHouseEntrance_EventScript_26A289 case 1, Route110_TrickHouseEntrance_EventScript_26A2B2 case 2, Route110_TrickHouseEntrance_EventScript_26A2DB @@ -727,11 +727,11 @@ Route110_TrickHouseEntrance_EventScript_26A3F8:: @ 826A3F8 lockall msgbox Route110_TrickHouseEntrance_Text_26A474, MSGBOX_DEFAULT releaseall - compare VAR_0x4044, 0 + compare VAR_TRICK_HOUSE_LEVEL, 0 call_if_eq Route110_TrickHouseEntrance_EventScript_26A429 - compare VAR_0x4044, 1 + compare VAR_TRICK_HOUSE_LEVEL, 1 call_if_eq Route110_TrickHouseEntrance_EventScript_26A439 - compare VAR_0x4044, 2 + compare VAR_TRICK_HOUSE_LEVEL, 2 call_if_eq Route110_TrickHouseEntrance_EventScript_26A449 setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1 end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index fa2664d68..e41960fde 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -94,7 +94,7 @@ Route119_WeatherInstitute_2F_EventScript_27004D:: @ 827004D Route119_WeatherInstitute_2F_EventScript_270085:: @ 8270085 call Route119_WeatherInstitute_2F_EventScript_2700DB - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700EA call Route119_WeatherInstitute_2F_EventScript_27378B @@ -104,7 +104,7 @@ Route119_WeatherInstitute_2F_EventScript_270085:: @ 8270085 Route119_WeatherInstitute_2F_EventScript_2700AD:: @ 82700AD call Route119_WeatherInstitute_2F_EventScript_2700DB - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700D0 call Route119_WeatherInstitute_2F_EventScript_273797 diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 5c6138c6c..fab587fb7 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -167,7 +167,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A3E:: @ 8211A3E RustboroCity_DevonCorp_2F_EventScript_211A6E:: @ 8211A6E call RustboroCity_DevonCorp_2F_EventScript_211AC4 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211AD7 call RustboroCity_DevonCorp_2F_EventScript_27378B @@ -177,7 +177,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A6E:: @ 8211A6E RustboroCity_DevonCorp_2F_EventScript_211A96:: @ 8211A96 call RustboroCity_DevonCorp_2F_EventScript_211AC4 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211AB9 call RustboroCity_DevonCorp_2F_EventScript_273797 @@ -216,7 +216,7 @@ RustboroCity_DevonCorp_2F_EventScript_211AE1:: @ 8211AE1 RustboroCity_DevonCorp_2F_EventScript_211B11:: @ 8211B11 call RustboroCity_DevonCorp_2F_EventScript_211B67 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B7A call RustboroCity_DevonCorp_2F_EventScript_27378B @@ -226,7 +226,7 @@ RustboroCity_DevonCorp_2F_EventScript_211B11:: @ 8211B11 RustboroCity_DevonCorp_2F_EventScript_211B39:: @ 8211B39 call RustboroCity_DevonCorp_2F_EventScript_211B67 - msgbox gUnknown_08273374, MSGBOX_YESNO + msgbox gText_NicknameThisPokemon, MSGBOX_YESNO compare VAR_RESULT, 0 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B5C call RustboroCity_DevonCorp_2F_EventScript_273797 diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index d08b0b554..dccdac1b4 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -87,7 +87,7 @@ SkyPillar_Top_EventScript_239785:: @ 8239785 removeobject VAR_LAST_TALKED fadescreenswapbuffers 0 bufferspeciesname 0, VAR_0x8004 - msgbox gUnknown_08273204, MSGBOX_DEFAULT + msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT releaseall end diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index 6302a33a8..347513636 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -1052,7 +1052,7 @@ Text_276731: @ 8276731 .string "This data is already registered.\n" .string "Would you like to delete it?$" -Text_27676F: @ 827676F +Text_TooManyBasesDeleteSome: @ 827676F .string "Up to 10 locations can be registered.\p" .string "Delete a location if you want to\n" .string "register another location.$" @@ -1063,10 +1063,10 @@ Text_2767D1: @ 82767D1 Text_2767E9: @ 82767E9 .string "Data has been unregistered.$" -Text_276805: @ 8276805 +Text_SecretBaseBootUpPC: @ 8276805 .string "{PLAYER} booted up the PC.$" -Text_27681A: @ 827681A +Text_SecretBasePCStartMenu: @ 827681A .string "What would you like to do?$" Text_276835: @ 8276835 diff --git a/data/text/surf.inc b/data/text/surf.inc index 2751dae7b..31c197222 100644 --- a/data/text/surf.inc +++ b/data/text/surf.inc @@ -1,5 +1,5 @@ -gUnknown_08272FD6:: @ 8272FD6 +gText_WantToUseSurf:: @ 8272FD6 .string "The water is dyed a deep blue…\nWould you like to SURF?$" -gUnknown_0827300D:: @ 827300D +gText_PlayerUsedSurf:: @ 827300D .string "{STR_VAR_1} used SURF!$" diff --git a/include/constants/field_effects.h b/include/constants/field_effects.h index 282f9ce75..00ca60457 100644 --- a/include/constants/field_effects.h +++ b/include/constants/field_effects.h @@ -1,7 +1,7 @@ #ifndef GUARD_FIELD_EFFECT_CONSTANTS_H #define GUARD_FIELD_EFFECT_CONSTANTS_H -#define FLDEFF_EXCLAMATION_MARK_ICON 0 +#define FLDEFF_EXCLAMATION_MARK_ICON 0 #define FLDEFF_USE_CUT_ON_GRASS 1 #define FLDEFF_USE_CUT_ON_TREE 2 #define FLDEFF_SHADOW 3 @@ -61,11 +61,11 @@ #define FLDEFF_SECRET_POWER_SHRUB 57 #define FLDEFF_CUT_GRASS 58 #define FLDEFF_FIELD_MOVE_SHOW_MON_INIT 59 -#define FLDEFF_USE_TOMB_PUZZLE_EFFECT 60 +#define FLDEFF_USE_TOMB_PUZZLE_EFFECT 60 #define FLDEFF_PCTURN_ON 61 #define FLDEFF_HALL_OF_FAME_RECORD 62 #define FLDEFF_USE_TELEPORT 63 -#define FLDEFF_64 64 +#define FLDEFF_RAYQUAZA 64 #define FLDEFF_65 65 #define FLDEFF_MOVE_DEOXYS_ROCK 66 diff --git a/include/constants/vars.h b/include/constants/vars.h index 67a9e6cbd..81ae99e1e 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -84,7 +84,7 @@ #define VAR_FANCLUB_UNKNOWN_1 0x4041 #define VAR_FANCLUB_UNKNOWN_2 0x4042 #define VAR_DEPT_STORE_FLOOR 0x4043 -#define VAR_0x4044 0x4044 +#define VAR_TRICK_HOUSE_LEVEL 0x4044 #define VAR_POKELOT_PRIZE_ITEM 0x4045 #define VAR_NATIONAL_DEX 0x4046 #define VAR_SEEDOT_SIZE_RECORD 0x4047 diff --git a/include/event_scripts.h b/include/event_scripts.h index e3ec8afb4..bf7084326 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -544,9 +544,9 @@ extern const u8 EventScript_RegionMap[]; extern const u8 EventScript_RunningShoesManual[]; extern const u8 EventScript_PictureBookShelf[]; extern const u8 EventScript_BookShelf[]; -extern const u8 EventScript_PokemonCenterBookshelf[]; +extern const u8 EventScript_PokemonCenterBookShelf[]; extern const u8 EventScript_Vase[]; -extern const u8 EventScript_TrashCan[]; +extern const u8 EventScript_EmptyTrashCan[]; extern const u8 EventScript_ShopShelf[]; extern const u8 EventScript_Blueprint[]; extern const u8 EventScript_WirelessBoxResults[]; diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 2ad3bb8c8..51f54759d 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -17,8 +17,8 @@ struct UnknownStruct_81D1ED4 /*0x014*/ struct UnknownSubStruct_81D1ED4 unk14[4][5]; /*0x064*/ struct UnknownSubStruct_81D1ED4 unk64[10][5]; /*0x12C*/ struct UnknownSubStruct_81D1ED4 unk12C[5]; - /*0x13C*/ struct UnknownSubStruct_81D1ED4 unk13C[0x42]; - /*0x248*/ struct UnknownSubStruct_81D1ED4 unk248[0x42]; + /*0x140*/ u16 unk140[66][2]; + /*0x248*/ u16 unk248[66][2]; /*0x350*/ u16 unk350; /*0x352*/ u16 unk352; /*0x354*/ u8 unk354; @@ -40,8 +40,8 @@ void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1, u8 arg2); -void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); -void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); +void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); +void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void MoveRelearnerPrintText(u8 *str); bool16 MoveRelearnerRunTextPrinters(void); void MoveRelearnerCreateYesNoMenu(void); @@ -49,4 +49,4 @@ u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); void InitMoveRelearnerWindows(bool8 useContextWindow); void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); -#endif // GUARD_MENU_SPECIALIZED_H \ No newline at end of file +#endif // GUARD_MENU_SPECIALIZED_H diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 6735df3a0..5b685173e 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -390,11 +390,11 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me if (MetatileBehavior_IsBookShelf(metatileBehavior) == TRUE) return EventScript_BookShelf; if (MetatileBehavior_IsPokeCenterBookShelf(metatileBehavior) == TRUE) - return EventScript_PokemonCenterBookshelf; + return EventScript_PokemonCenterBookShelf; if (MetatileBehavior_IsVase(metatileBehavior) == TRUE) return EventScript_Vase; if (MetatileBehavior_IsTrashCan(metatileBehavior) == TRUE) - return EventScript_TrashCan; + return EventScript_EmptyTrashCan; if (MetatileBehavior_IsShopShelf(metatileBehavior) == TRUE) return EventScript_ShopShelf; if (MetatileBehavior_IsBlueprint(metatileBehavior) == TRUE) diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 651b2baca..3f75fbb84 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -1508,7 +1508,7 @@ void sub_8155F80(struct Sprite *sprite) } } SetGpuReg(REG_OFFSET_BG0VOFS, 0); - FieldEffectStop(sprite, FLDEFF_64); + FieldEffectStop(sprite, FLDEFF_RAYQUAZA); break; } diff --git a/src/item_menu.c b/src/item_menu.c index 81bc120a8..8edf6f279 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -447,7 +447,7 @@ static EWRAM_DATA struct TempWallyStruct *gUnknown_0203CE80 = 0; extern u8 *const gPocketNamesStringsTable[]; extern u8* gReturnToXStringsTable[]; -extern const u8 EventScript_2736B3[]; +extern const u8 EventScript_SelectWithoutRegisteredItem[]; extern const u16 gUnknown_0860F074[]; void ResetBagScrollPositions(void) @@ -1900,7 +1900,7 @@ bool8 UseRegisteredKeyItemOnField(void) else gSaveBlock1Ptr->registeredItem = ITEM_NONE; } - ScriptContext1_SetupScript(EventScript_2736B3); + ScriptContext1_SetupScript(EventScript_SelectWithoutRegisteredItem); return TRUE; } diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 8371c7a70..3dadc7f80 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -73,10 +73,8 @@ static const struct ScanlineEffectParams sUnknown_08625404 = .dmaDest = (void*)REG_ADDR_WIN0H, .dmaControl = SCANLINE_EFFECT_DMACNT_32BIT, .initState = 1, - .unused9 = 0 }; - static const u8 sUnknown_08625410[] = { 4, @@ -201,38 +199,26 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate = bool8 sub_81D1C44(u8 count) { - u32 i; - struct ListMenuItem **v1; - v1 = &sUnknown_0203CF4C; - *v1 = Alloc(count * sizeof(struct ListMenuItem) + sizeof(struct ListMenuItem)); - + u8 i; + + sUnknown_0203CF4C = Alloc(count * sizeof(*sUnknown_0203CF4C) + sizeof(*sUnknown_0203CF4C)); if (sUnknown_0203CF4C == NULL) return FALSE; - - for (i = 0; i < ARRAY_COUNT(sUnknown_0203CF48); i = (u8)(i + 1)) - { - sUnknown_0203CF48[i] |= 0xFF; - } + + for (i = 0; i < ARRAY_COUNT(sUnknown_0203CF48); i++) + sUnknown_0203CF48[i] = 0xFF; return TRUE; } u8 sub_81D1C84(u8 a0) { - struct WindowTemplate template; - - u8 windowId = sUnknown_0203CF48[a0]; - if (windowId == 0xFF) + if (sUnknown_0203CF48[a0] == 0xFF) { if (a0 == 2) { - u32 v1; - u32 v2; - s32 v3; - - template = sUnknown_086253E8[2]; - v3 = GetMaxWidthInMenuTable(&gMailboxMailOptions[0], 4); - template.width = v3; + struct WindowTemplate template = sUnknown_086253E8[2]; + template.width = GetMaxWidthInMenuTable(&gMailboxMailOptions[0], 4); sUnknown_0203CF48[2] = AddWindow(&template); } else @@ -264,7 +250,7 @@ static void sub_81D1D44(u8 windowId, s32 itemId, u8 y) if (itemId == LIST_CANCEL) return; - + StringCopy(buffer, gSaveBlock1Ptr->mail[6 + itemId].playerName); sub_81DB52C(buffer); length = StringLength(buffer); @@ -324,8 +310,8 @@ void sub_81D1EC0(void) void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0) { - u8 j; - u8 i; + u8 i, j; + for (j = 0; j < 5; j++) { for (i = 0; i < 10; i++) @@ -348,130 +334,33 @@ void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0) a0->unk352 = 0; } -NAKED -void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]) +void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2) { - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x8\n\ - mov r8, r0\n\ - str r1, [sp]\n\ - mov r9, r2\n\ - movs r7, 0\n\ -_081D1F98:\n\ - lsls r4, r7, 2\n\ - ldr r1, [sp]\n\ - adds r0, r4, r1\n\ - ldrh r1, [r0]\n\ - lsls r5, r1, 8\n\ - mov r2, r9\n\ - adds r0, r4, r2\n\ - ldrh r0, [r0]\n\ - subs r0, r1\n\ - lsls r0, 8\n\ - movs r1, 0xA\n\ - bl __divsi3\n\ - adds r6, r0, 0\n\ - movs r3, 0\n\ - adds r7, 0x1\n\ - mov r10, r7\n\ - mov r12, r4\n\ -_081D1FBC:\n\ - lsls r0, r3, 2\n\ - adds r0, r3\n\ - lsls r0, 2\n\ - add r0, r12\n\ - add r0, r8\n\ - asrs r2, r5, 8\n\ - asrs r1, r5, 7\n\ - movs r7, 0x1\n\ - ands r1, r7\n\ - adds r2, r1\n\ - adds r0, 0x64\n\ - strh r2, [r0]\n\ - adds r5, r6\n\ - adds r0, r3, 0x1\n\ - lsls r0, 16\n\ - lsrs r3, r0, 16\n\ - cmp r3, 0x8\n\ - bls _081D1FBC\n\ - lsls r0, r3, 2\n\ - adds r0, r3\n\ - lsls r0, 2\n\ - adds r0, r4, r0\n\ - add r0, r8\n\ - mov r1, r9\n\ - adds r2, r4, r1\n\ - ldrh r1, [r2]\n\ - adds r0, 0x64\n\ - strh r1, [r0]\n\ - ldr r7, [sp]\n\ - adds r0, r4, r7\n\ - ldrh r1, [r0, 0x2]\n\ - lsls r5, r1, 8\n\ - ldrh r0, [r2, 0x2]\n\ - subs r0, r1\n\ - lsls r0, 8\n\ - movs r1, 0xA\n\ - bl __divsi3\n\ - adds r6, r0, 0\n\ - movs r3, 0\n\ - str r4, [sp, 0x4]\n\ - movs r0, 0x1\n\ - mov r12, r0\n\ -_081D2012:\n\ - lsls r0, r3, 2\n\ - adds r0, r3\n\ - lsls r0, 2\n\ - ldr r1, [sp, 0x4]\n\ - adds r0, r1, r0\n\ - add r0, r8\n\ - asrs r2, r5, 8\n\ - asrs r1, r5, 7\n\ - mov r7, r12\n\ - ands r1, r7\n\ - adds r2, r1\n\ - adds r0, 0x66\n\ - strh r2, [r0]\n\ - adds r5, r6\n\ - adds r0, r3, 0x1\n\ - lsls r0, 16\n\ - lsrs r3, r0, 16\n\ - cmp r3, 0x8\n\ - bls _081D2012\n\ - lsls r0, r3, 2\n\ - adds r0, r3\n\ - lsls r0, 2\n\ - adds r0, r4, r0\n\ - add r0, r8\n\ - mov r2, r9\n\ - adds r1, r4, r2\n\ - ldrh r1, [r1, 0x2]\n\ - adds r0, 0x66\n\ - strh r1, [r0]\n\ - mov r7, r10\n\ - lsls r0, r7, 16\n\ - lsrs r7, r0, 16\n\ - cmp r7, 0x4\n\ - bls _081D1F98\n\ - ldr r1, =0x00000352\n\ - add r1, r8\n\ - movs r0, 0\n\ - strh r0, [r1]\n\ - add sp, 0x8\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); + u16 i, j; + s32 r5, r6; + + for (i = 0; i < 5; i++) + { + r5 = arg1[i].unk0 << 8; + r6 = ((arg2[i].unk0 - arg1[i].unk0) << 8) / 10; + for (j = 0; j < 9; j++) + { + arg0->unk64[j][i].unk0 = (r5 >> 8) + ((r5 >> 7) & 1); + r5 += r6; + } + arg0->unk64[j][i].unk0 = arg2[i].unk0; + + r5 = arg1[i].unk2 << 8; + r6 = ((arg2[i].unk2 - arg1[i].unk2) << 8) / 10; + for (j = 0; j < 9; j++) + { + arg0->unk64[j][i].unk2 = (r5 >> 8) + ((r5 >> 7) & 1); + r5 += r6; + } + arg0->unk64[j][i].unk2 = arg2[i].unk2; + } + + arg0->unk352 = 0; } bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0) @@ -479,13 +368,12 @@ bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0) if (a0->unk352 < 10) { sub_81D2230(a0); - return ++a0->unk352 != 10; + return (++a0->unk352 != 10); } else { return FALSE; } - } void sub_81D20AC(struct UnknownStruct_81D1ED4 *a0) @@ -496,6 +384,7 @@ void sub_81D20AC(struct UnknownStruct_81D1ED4 *a0) bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0) { struct ScanlineEffectParams params; + switch (arg0->unk355) { case 0: @@ -512,170 +401,32 @@ bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0) } } -NAKED void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0) { - // Three of the additions are in the wrong order. -#ifdef NONMATCHING u16 i; - u32 v3; - u32 v4; - u16 *scanBuffer1; - u16 *scanBuffer2; - u32 scanBufferWidth; - u32 mask; - u16 *unkBuff1; - u16 *unkBuff2; - u16 *unkBuff3; - u16 *unkBuff4; if (arg0->unk354 == 0) return; - + sub_81D24A4(arg0); sub_81D2634(arg0); - i = 0; - scanBuffer1 = gScanlineEffectRegBuffers[0]; - scanBufferWidth = ARRAY_COUNT(gScanlineEffectRegBuffers[0]); - scanBuffer2 = scanBuffer1 + scanBufferWidth; - - // This function accesses the arrays "manually", where every other entry - // is just handled differently, rather than a pairwise struct. - unkBuff1 = (u16*)&arg0->unk13C[0].unk0; - mask = 0xFFFF; - unkBuff2 = (u16*)&arg0->unk13C[0].unk2; - unkBuff3 = (u16*)&arg0->unk248[0].unk0; - unkBuff4 = (u16*)&arg0->unk248[0].unk2; - - for (; i < 0x42; i++) + for (i = 0; i < 66; i++) { - u32 offset1; - register u32 offset2 asm("r2"); - u32 offset3; - - offset1 = (i + 0x37) * 2; - offset2 = i + 0x37; - scanBuffer2[offset1] = (scanBuffer1[offset1] = (unkBuff1[i * 2] << 8) | unkBuff2[i * 2]) & mask; - - offset3 = offset2 * 2 + 1; - scanBuffer2[offset3] = (scanBuffer1[offset3] = (unkBuff3[i * 2] << 8) | unkBuff4[i * 2]) & mask; + gScanlineEffectRegBuffers[1][(i + 55) * 2] = gScanlineEffectRegBuffers[0][(i + 55) * 2] = (arg0->unk140[i][0] << 8) | (arg0->unk140[i][1]); + gScanlineEffectRegBuffers[1][(i + 55) * 2 + 1] = gScanlineEffectRegBuffers[0][(i + 55) * 2 + 1] = (arg0->unk248[i][0] << 8) | (arg0->unk248[i][1]); } arg0->unk354 = 0; -#else - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x10\n\ - adds r6, r0, 0\n\ - movs r1, 0xD5\n\ - lsls r1, 2\n\ - adds r0, r6, r1\n\ - ldrb r0, [r0]\n\ - cmp r0, 0\n\ - beq _081D21BE\n\ - adds r0, r6, 0\n\ - bl sub_81D24A4\n\ - adds r0, r6, 0\n\ - bl sub_81D2634\n\ - movs r7, 0\n\ - ldr r5, =gScanlineEffectRegBuffers\n\ - mov r12, r5\n\ - movs r0, 0xF0\n\ - lsls r0, 3\n\ - add r0, r12\n\ - mov r9, r0\n\ - movs r1, 0xA0\n\ - lsls r1, 1\n\ - adds r1, r6, r1\n\ - str r1, [sp]\n\ - ldr r5, =0x0000ffff\n\ - mov r8, r5\n\ - movs r0, 0xA1\n\ - lsls r0, 1\n\ - adds r0, r6, r0\n\ - str r0, [sp, 0x4]\n\ - movs r1, 0x92\n\ - lsls r1, 2\n\ - adds r1, r6, r1\n\ - str r1, [sp, 0x8]\n\ - ldr r5, =0x0000024a\n\ - adds r5, r6\n\ - mov r10, r5\n\ -_081D215E:\n\ - adds r2, r7, 0\n\ - adds r2, 0x37\n\ - lsls r3, r2, 2\n\ - mov r0, r9\n\ - adds r0, r3, r0\n\ - str r0, [sp, 0xC]\n\ - add r3, r12\n\ - lsls r4, r7, 2\n\ - ldr r1, [sp]\n\ - adds r0, r1, r4\n\ - ldrh r0, [r0]\n\ - lsls r0, 8\n\ - ldr r5, [sp, 0x4]\n\ - adds r1, r5, r4\n\ - ldrh r1, [r1]\n\ - orrs r0, r1\n\ - strh r0, [r3]\n\ - mov r1, r8\n\ - ands r0, r1\n\ - ldr r5, [sp, 0xC]\n\ - strh r0, [r5]\n\ - lsls r2, 1\n\ - adds r2, 0x1\n\ - lsls r2, 1\n\ - mov r0, r9\n\ - adds r3, r2, r0\n\ - add r2, r12\n\ - ldr r1, [sp, 0x8]\n\ - adds r0, r1, r4\n\ - ldrh r0, [r0]\n\ - lsls r0, 8\n\ - add r4, r10\n\ - ldrh r1, [r4]\n\ - orrs r0, r1\n\ - strh r0, [r2]\n\ - mov r5, r8\n\ - ands r0, r5\n\ - strh r0, [r3]\n\ - adds r0, r7, 0x1\n\ - lsls r0, 16\n\ - lsrs r7, r0, 16\n\ - cmp r7, 0x41\n\ - bls _081D215E\n\ - movs r0, 0xD5\n\ - lsls r0, 2\n\ - adds r1, r6, r0\n\ - movs r0, 0\n\ - strb r0, [r1]\n\ -_081D21BE:\n\ - add sp, 0x10\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); -#endif } void sub_81D21DC(u8 bg) { - u8 flags; + u32 flags; if (bg > 3) bg = 0; - + // Unset the WINOUT flag for the bg. flags = (WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ) & ~(1 << bg); @@ -691,883 +442,458 @@ void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0) { u16 i; for (i = 0; i < 5; i++) - { arg0->unk12C[i] = arg0->unk64[arg0->unk352][i]; - } + arg0->unk354 = 1; } -NAKED -static void sub_81D2278(void *a0, void *a1, u16 *a2, u16 *a3, u8 a38, u32 a3C) +/* TODO +static void sub_81D2278(struct UnknownStruct_81D1ED4 *arg0, u16 arg1[66][2], struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 arg5[66][2]) { -#ifdef NONMATCHING - // a0 => sp0 - // a1 => r6 - // a2 => r5 - // a3 => sp4 - // a38 => r9 - // a3C => r7 - u32 v1; // r10 - u32 v2; // sp8 - u32 v3; // spC - u32 v4; - u32 v5; - u16 v6; // r8 - u32 v7; - u32 v8; // sp10 + s32 var_2C = 0; + u16 r8; + s32 r10, r4, r2, r0, r1, var_30; - v3 = 0; - - // v4 => r4 - // v5 => r0 - // v7 => r1 - if (a2[1] < a3[1]) + if (arg2->unk2 < arg3->unk2) { - v1 = a2[1]; - v5 = a3[1]; - v7 = a2[0]; - v4 = v7 << 10; - v2 = a3[0]; + r2 = arg2->unk2; + r10 = arg2->unk2; + r0 = arg3->unk2; + r1 = arg2->unk0; + r4 = r1 << 10; + var_30 = arg3->unk0; } else { - v5 = a2[1]; - v1 = a3[1]; - v7 = a3[0]; - v4 = v7 << 10; - v2 = a2[0]; + r0 = arg2->unk0; + r10 = arg3->unk2; + r1 = arg3->unk0; + r4 = r1 << 10; + var_30 = arg2->unk0; + r2 = arg3->unk2; } + r8 = r0 - r2; + if (r8 != 0) + var_2C = ((var_30 - r1) << 10) / r8; - v6 = v5 - v1; - if (v6 != 0) + r8++; + if (arg5 == NULL) { - v3 = (v2 - v7) / v6; - } - v6++; - if (a3C == 0) - { - v8 = } -#else - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x18\n\ - str r0, [sp]\n\ - adds r6, r1, 0\n\ - adds r5, r2, 0\n\ - str r3, [sp, 0x4]\n\ - ldr r0, [sp, 0x38]\n\ - ldr r7, [sp, 0x3C]\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r9, r0\n\ - movs r0, 0\n\ - str r0, [sp, 0xC]\n\ - ldrh r0, [r5, 0x2]\n\ - ldrh r1, [r3, 0x2]\n\ - cmp r0, r1\n\ - bcs _081D22B2\n\ - adds r2, r0, 0\n\ - mov r10, r2\n\ - ldrh r0, [r3, 0x2]\n\ - ldrh r1, [r5]\n\ - lsls r4, r1, 10\n\ - ldrh r3, [r3]\n\ - str r3, [sp, 0x8]\n\ - b _081D22C6\n\ -_081D22B2:\n\ - ldrh r0, [r5, 0x2]\n\ - ldr r1, [sp, 0x4]\n\ - ldrh r1, [r1, 0x2]\n\ - mov r10, r1\n\ - ldr r2, [sp, 0x4]\n\ - ldrh r1, [r2]\n\ - lsls r4, r1, 10\n\ - ldrh r3, [r5]\n\ - str r3, [sp, 0x8]\n\ - mov r2, r10\n\ -_081D22C6:\n\ - subs r0, r2\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - mov r8, r0\n\ - cmp r0, 0\n\ - beq _081D22DE\n\ - subs r0, r3, r1\n\ - lsls r0, 10\n\ - mov r1, r8\n\ - bl __divsi3\n\ - str r0, [sp, 0xC]\n\ -_081D22DE:\n\ - mov r0, r8\n\ - adds r0, 0x1\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - mov r8, r0\n\ - cmp r7, 0\n\ - bne _081D2328\n\ - mov r0, r10\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r6, r0\n\ - movs r5, 0\n\ - mov r3, r9\n\ - lsls r3, 1\n\ - mov r12, r3\n\ - ldr r0, [sp, 0x8]\n\ - add r0, r9\n\ - str r0, [sp, 0x10]\n\ - cmp r7, r8\n\ - bcs _081D23B6\n\ - movs r7, 0x1\n\ -_081D2308:\n\ - adds r2, r3, r6\n\ - asrs r1, r4, 10\n\ - asrs r0, r4, 9\n\ - ands r0, r7\n\ - adds r1, r0\n\ - add r1, r9\n\ - strh r1, [r2]\n\ - ldr r1, [sp, 0xC]\n\ - adds r4, r1\n\ - adds r6, 0x4\n\ - adds r0, r5, 0x1\n\ - lsls r0, 16\n\ - lsrs r5, r0, 16\n\ - cmp r5, r8\n\ - bcc _081D2308\n\ - b _081D23B6\n\ -_081D2328:\n\ - ldr r2, [sp, 0xC]\n\ - cmp r2, 0\n\ - ble _081D23C0\n\ - mov r0, r10\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r7, r0\n\ - movs r5, 0\n\ - mov r3, r9\n\ - lsls r3, 1\n\ - mov r12, r3\n\ - ldr r0, [sp, 0x8]\n\ - add r0, r9\n\ - str r0, [sp, 0x10]\n\ - cmp r5, r8\n\ - bcs _081D237A\n\ - ldr r0, =0x00026bff\n\ - cmp r4, r0\n\ - bgt _081D237A\n\ - mov r1, r12\n\ - str r1, [sp, 0x14]\n\ -_081D2352:\n\ - ldr r3, [sp, 0x14]\n\ - adds r2, r3, r7\n\ - asrs r1, r4, 10\n\ - asrs r0, r4, 9\n\ - movs r3, 0x1\n\ - ands r0, r3\n\ - adds r1, r0\n\ - add r1, r9\n\ - strh r1, [r2]\n\ - ldr r0, [sp, 0xC]\n\ - adds r4, r0\n\ - adds r7, 0x4\n\ - adds r0, r5, 0x1\n\ - lsls r0, 16\n\ - lsrs r5, r0, 16\n\ - cmp r5, r8\n\ - bcs _081D237A\n\ - ldr r1, =0x00026bff\n\ - cmp r4, r1\n\ - ble _081D2352\n\ -_081D237A:\n\ - mov r2, r10\n\ - adds r1, r2, r5\n\ - ldr r3, [sp]\n\ - movs r2, 0xD4\n\ - lsls r2, 2\n\ - adds r0, r3, r2\n\ - strh r1, [r0]\n\ - ldrh r0, [r0]\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r6, r0\n\ - cmp r5, r8\n\ - bcs _081D23B6\n\ - mov r3, r12\n\ - movs r7, 0x1\n\ -_081D2398:\n\ - adds r2, r3, r6\n\ - asrs r1, r4, 10\n\ - asrs r0, r4, 9\n\ - ands r0, r7\n\ - adds r1, r0\n\ - add r1, r9\n\ - strh r1, [r2]\n\ - ldr r0, [sp, 0xC]\n\ - adds r4, r0\n\ - adds r6, 0x4\n\ - adds r0, r5, 0x1\n\ - lsls r0, 16\n\ - lsrs r5, r0, 16\n\ - cmp r5, r8\n\ - bcc _081D2398\n\ -_081D23B6:\n\ - subs r0, r6, 0x4\n\ - b _081D248C\n\ - .pool\n\ -_081D23C0:\n\ - ldr r1, [sp, 0xC]\n\ - cmp r1, 0\n\ - bge _081D2464\n\ - mov r0, r10\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r6, r0\n\ - movs r5, 0\n\ - mov r2, r9\n\ - lsls r2, 1\n\ - mov r12, r2\n\ - ldr r3, [sp, 0x8]\n\ - add r3, r9\n\ - str r3, [sp, 0x10]\n\ - cmp r5, r8\n\ - bcs _081D241E\n\ - adds r3, r2, r6\n\ - asrs r1, r4, 10\n\ - asrs r0, r4, 9\n\ - movs r2, 0x1\n\ - ands r0, r2\n\ - adds r1, r0\n\ - add r1, r9\n\ - strh r1, [r3]\n\ - b _081D2414\n\ -_081D23F2:\n\ - ldr r0, [sp, 0xC]\n\ - adds r4, r0\n\ - adds r6, 0x4\n\ - adds r0, r5, 0x1\n\ - lsls r0, 16\n\ - lsrs r5, r0, 16\n\ - cmp r5, r8\n\ - bcs _081D241E\n\ - mov r1, r12\n\ - adds r3, r1, r6\n\ - asrs r2, r4, 10\n\ - asrs r0, r4, 9\n\ - movs r1, 0x1\n\ - ands r0, r1\n\ - adds r2, r0\n\ - add r2, r9\n\ - strh r2, [r3]\n\ -_081D2414:\n\ - ldr r0, =0x00026bff\n\ - cmp r4, r0\n\ - bgt _081D23F2\n\ - movs r0, 0x9B\n\ - strh r0, [r3]\n\ -_081D241E:\n\ - mov r2, r10\n\ - adds r1, r2, r5\n\ - ldr r3, [sp]\n\ - movs r2, 0xD4\n\ - lsls r2, 2\n\ - adds r0, r3, r2\n\ - strh r1, [r0]\n\ - ldrh r0, [r0]\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r7, r0\n\ - cmp r5, r8\n\ - bcs _081D245A\n\ - mov r3, r12\n\ - movs r6, 0x1\n\ -_081D243C:\n\ - adds r2, r3, r7\n\ - asrs r1, r4, 10\n\ - asrs r0, r4, 9\n\ - ands r0, r6\n\ - adds r1, r0\n\ - add r1, r9\n\ - strh r1, [r2]\n\ - ldr r0, [sp, 0xC]\n\ - adds r4, r0\n\ - adds r7, 0x4\n\ - adds r0, r5, 0x1\n\ - lsls r0, 16\n\ - lsrs r5, r0, 16\n\ - cmp r5, r8\n\ - bcc _081D243C\n\ -_081D245A:\n\ - subs r0, r7, 0x4\n\ - b _081D248C\n\ - .pool\n\ -_081D2464:\n\ - ldr r1, [sp]\n\ - movs r2, 0xD4\n\ - lsls r2, 2\n\ - adds r0, r1, r2\n\ - mov r3, r10\n\ - strh r3, [r0]\n\ - mov r0, r10\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r6, r0\n\ - adds r7, r0\n\ - ldrh r0, [r5]\n\ - adds r0, 0x1\n\ - strh r0, [r6, 0x2]\n\ - ldr r1, [sp, 0x4]\n\ - ldrh r0, [r1]\n\ - strh r0, [r7]\n\ - movs r0, 0x9B\n\ - strh r0, [r7, 0x2]\n\ - b _081D2494\n\ -_081D248C:\n\ - add r0, r12\n\ - mov r2, sp\n\ - ldrh r2, [r2, 0x10]\n\ - strh r2, [r0]\n\ -_081D2494:\n\ - add sp, 0x18\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .syntax divided"); -#endif +} +*/ +NAKED +static void sub_81D2278(struct UnknownStruct_81D1ED4 *arg0, u16 arg1[66][2], struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 arg5[66][2]) +{ + asm_unified("\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x18\n\ + str r0, [sp]\n\ + adds r6, r1, 0\n\ + adds r5, r2, 0\n\ + str r3, [sp, 0x4]\n\ + ldr r0, [sp, 0x38]\n\ + ldr r7, [sp, 0x3C]\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ + movs r0, 0\n\ + str r0, [sp, 0xC]\n\ + ldrh r0, [r5, 0x2]\n\ + ldrh r1, [r3, 0x2]\n\ + cmp r0, r1\n\ + bcs _081D22B2\n\ + adds r2, r0, 0\n\ + mov r10, r2\n\ + ldrh r0, [r3, 0x2]\n\ + ldrh r1, [r5]\n\ + lsls r4, r1, 10\n\ + ldrh r3, [r3]\n\ + str r3, [sp, 0x8]\n\ + b _081D22C6\n\ + _081D22B2:\n\ + ldrh r0, [r5, 0x2]\n\ + ldr r1, [sp, 0x4]\n\ + ldrh r1, [r1, 0x2]\n\ + mov r10, r1\n\ + ldr r2, [sp, 0x4]\n\ + ldrh r1, [r2]\n\ + lsls r4, r1, 10\n\ + ldrh r3, [r5]\n\ + str r3, [sp, 0x8]\n\ + mov r2, r10\n\ + _081D22C6:\n\ + subs r0, r2\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + mov r8, r0\n\ + cmp r0, 0\n\ + beq _081D22DE\n\ + subs r0, r3, r1\n\ + lsls r0, 10\n\ + mov r1, r8\n\ + bl __divsi3\n\ + str r0, [sp, 0xC]\n\ + _081D22DE:\n\ + mov r0, r8\n\ + adds r0, 0x1\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + mov r8, r0\n\ + cmp r7, 0\n\ + bne _081D2328\n\ + mov r0, r10\n\ + subs r0, 0x38\n\ + lsls r0, 2\n\ + adds r6, r0\n\ + movs r5, 0\n\ + mov r3, r9\n\ + lsls r3, 1\n\ + mov r12, r3\n\ + ldr r0, [sp, 0x8]\n\ + add r0, r9\n\ + str r0, [sp, 0x10]\n\ + cmp r7, r8\n\ + bcs _081D23B6\n\ + movs r7, 0x1\n\ + _081D2308:\n\ + adds r2, r3, r6\n\ + asrs r1, r4, 10\n\ + asrs r0, r4, 9\n\ + ands r0, r7\n\ + adds r1, r0\n\ + add r1, r9\n\ + strh r1, [r2]\n\ + ldr r1, [sp, 0xC]\n\ + adds r4, r1\n\ + adds r6, 0x4\n\ + adds r0, r5, 0x1\n\ + lsls r0, 16\n\ + lsrs r5, r0, 16\n\ + cmp r5, r8\n\ + bcc _081D2308\n\ + b _081D23B6\n\ + _081D2328:\n\ + ldr r2, [sp, 0xC]\n\ + cmp r2, 0\n\ + ble _081D23C0\n\ + mov r0, r10\n\ + subs r0, 0x38\n\ + lsls r0, 2\n\ + adds r7, r0\n\ + movs r5, 0\n\ + mov r3, r9\n\ + lsls r3, 1\n\ + mov r12, r3\n\ + ldr r0, [sp, 0x8]\n\ + add r0, r9\n\ + str r0, [sp, 0x10]\n\ + cmp r5, r8\n\ + bcs _081D237A\n\ + ldr r0, =0x00026bff\n\ + cmp r4, r0\n\ + bgt _081D237A\n\ + mov r1, r12\n\ + str r1, [sp, 0x14]\n\ + _081D2352:\n\ + ldr r3, [sp, 0x14]\n\ + adds r2, r3, r7\n\ + asrs r1, r4, 10\n\ + asrs r0, r4, 9\n\ + movs r3, 0x1\n\ + ands r0, r3\n\ + adds r1, r0\n\ + add r1, r9\n\ + strh r1, [r2]\n\ + ldr r0, [sp, 0xC]\n\ + adds r4, r0\n\ + adds r7, 0x4\n\ + adds r0, r5, 0x1\n\ + lsls r0, 16\n\ + lsrs r5, r0, 16\n\ + cmp r5, r8\n\ + bcs _081D237A\n\ + ldr r1, =0x00026bff\n\ + cmp r4, r1\n\ + ble _081D2352\n\ + _081D237A:\n\ + mov r2, r10\n\ + adds r1, r2, r5\n\ + ldr r3, [sp]\n\ + movs r2, 0xD4\n\ + lsls r2, 2\n\ + adds r0, r3, r2\n\ + strh r1, [r0]\n\ + ldrh r0, [r0]\n\ + subs r0, 0x38\n\ + lsls r0, 2\n\ + adds r6, r0\n\ + cmp r5, r8\n\ + bcs _081D23B6\n\ + mov r3, r12\n\ + movs r7, 0x1\n\ + _081D2398:\n\ + adds r2, r3, r6\n\ + asrs r1, r4, 10\n\ + asrs r0, r4, 9\n\ + ands r0, r7\n\ + adds r1, r0\n\ + add r1, r9\n\ + strh r1, [r2]\n\ + ldr r0, [sp, 0xC]\n\ + adds r4, r0\n\ + adds r6, 0x4\n\ + adds r0, r5, 0x1\n\ + lsls r0, 16\n\ + lsrs r5, r0, 16\n\ + cmp r5, r8\n\ + bcc _081D2398\n\ + _081D23B6:\n\ + subs r0, r6, 0x4\n\ + b _081D248C\n\ + .pool\n\ + _081D23C0:\n\ + ldr r1, [sp, 0xC]\n\ + cmp r1, 0\n\ + bge _081D2464\n\ + mov r0, r10\n\ + subs r0, 0x38\n\ + lsls r0, 2\n\ + adds r6, r0\n\ + movs r5, 0\n\ + mov r2, r9\n\ + lsls r2, 1\n\ + mov r12, r2\n\ + ldr r3, [sp, 0x8]\n\ + add r3, r9\n\ + str r3, [sp, 0x10]\n\ + cmp r5, r8\n\ + bcs _081D241E\n\ + adds r3, r2, r6\n\ + asrs r1, r4, 10\n\ + asrs r0, r4, 9\n\ + movs r2, 0x1\n\ + ands r0, r2\n\ + adds r1, r0\n\ + add r1, r9\n\ + strh r1, [r3]\n\ + b _081D2414\n\ + _081D23F2:\n\ + ldr r0, [sp, 0xC]\n\ + adds r4, r0\n\ + adds r6, 0x4\n\ + adds r0, r5, 0x1\n\ + lsls r0, 16\n\ + lsrs r5, r0, 16\n\ + cmp r5, r8\n\ + bcs _081D241E\n\ + mov r1, r12\n\ + adds r3, r1, r6\n\ + asrs r2, r4, 10\n\ + asrs r0, r4, 9\n\ + movs r1, 0x1\n\ + ands r0, r1\n\ + adds r2, r0\n\ + add r2, r9\n\ + strh r2, [r3]\n\ + _081D2414:\n\ + ldr r0, =0x00026bff\n\ + cmp r4, r0\n\ + bgt _081D23F2\n\ + movs r0, 0x9B\n\ + strh r0, [r3]\n\ + _081D241E:\n\ + mov r2, r10\n\ + adds r1, r2, r5\n\ + ldr r3, [sp]\n\ + movs r2, 0xD4\n\ + lsls r2, 2\n\ + adds r0, r3, r2\n\ + strh r1, [r0]\n\ + ldrh r0, [r0]\n\ + subs r0, 0x38\n\ + lsls r0, 2\n\ + adds r7, r0\n\ + cmp r5, r8\n\ + bcs _081D245A\n\ + mov r3, r12\n\ + movs r6, 0x1\n\ + _081D243C:\n\ + adds r2, r3, r7\n\ + asrs r1, r4, 10\n\ + asrs r0, r4, 9\n\ + ands r0, r6\n\ + adds r1, r0\n\ + add r1, r9\n\ + strh r1, [r2]\n\ + ldr r0, [sp, 0xC]\n\ + adds r4, r0\n\ + adds r7, 0x4\n\ + adds r0, r5, 0x1\n\ + lsls r0, 16\n\ + lsrs r5, r0, 16\n\ + cmp r5, r8\n\ + bcc _081D243C\n\ + _081D245A:\n\ + subs r0, r7, 0x4\n\ + b _081D248C\n\ + .pool\n\ + _081D2464:\n\ + ldr r1, [sp]\n\ + movs r2, 0xD4\n\ + lsls r2, 2\n\ + adds r0, r1, r2\n\ + mov r3, r10\n\ + strh r3, [r0]\n\ + mov r0, r10\n\ + subs r0, 0x38\n\ + lsls r0, 2\n\ + adds r6, r0\n\ + adds r7, r0\n\ + ldrh r0, [r5]\n\ + adds r0, 0x1\n\ + strh r0, [r6, 0x2]\n\ + ldr r1, [sp, 0x4]\n\ + ldrh r0, [r1]\n\ + strh r0, [r7]\n\ + movs r0, 0x9B\n\ + strh r0, [r7, 0x2]\n\ + b _081D2494\n\ + _081D248C:\n\ + add r0, r12\n\ + mov r2, sp\n\ + ldrh r2, [r2, 0x10]\n\ + strh r2, [r0]\n\ + _081D2494:\n\ + add sp, 0x18\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ + "); } -NAKED -static void sub_81D24A4(struct UnknownStruct_81D1ED4 *a0) +static void sub_81D24A4(struct UnknownStruct_81D1ED4 *arg0) { - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - sub sp, 0x8\n\ - adds r4, r0, 0\n\ - movs r0, 0x97\n\ - lsls r0, 1\n\ - adds r2, r4, r0\n\ - movs r3, 0x99\n\ - lsls r3, 1\n\ - adds r1, r4, r3\n\ - ldrh r0, [r2]\n\ - ldrh r3, [r1]\n\ - cmp r0, r3\n\ - bcs _081D24E0\n\ - adds r7, r0, 0\n\ - movs r0, 0xA0\n\ - lsls r0, 1\n\ - adds r1, r4, r0\n\ - movs r3, 0x96\n\ - lsls r3, 1\n\ - adds r2, r4, r3\n\ - subs r0, 0x10\n\ - adds r3, r4, r0\n\ - movs r0, 0x1\n\ - str r0, [sp]\n\ - movs r0, 0\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - bl sub_81D2278\n\ - b _081D2500\n\ -_081D24E0:\n\ - ldrh r7, [r1]\n\ - movs r2, 0xA0\n\ - lsls r2, 1\n\ - adds r1, r4, r2\n\ - movs r3, 0x98\n\ - lsls r3, 1\n\ - adds r2, r4, r3\n\ - movs r0, 0x96\n\ - lsls r0, 1\n\ - adds r3, r4, r0\n\ - movs r0, 0\n\ - str r0, [sp]\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - bl sub_81D2278\n\ -_081D2500:\n\ - movs r1, 0xA0\n\ - lsls r1, 1\n\ - adds r5, r4, r1\n\ - movs r3, 0x98\n\ - lsls r3, 1\n\ - adds r2, r4, r3\n\ - movs r0, 0x9A\n\ - lsls r0, 1\n\ - adds r6, r4, r0\n\ - movs r0, 0x1\n\ - str r0, [sp]\n\ - movs r0, 0\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - adds r1, r5, 0\n\ - adds r3, r6, 0\n\ - bl sub_81D2278\n\ - movs r2, 0\n\ - movs r1, 0x9B\n\ - lsls r1, 1\n\ - adds r0, r4, r1\n\ - movs r3, 0x9D\n\ - lsls r3, 1\n\ - adds r1, r4, r3\n\ - ldrh r0, [r0]\n\ - ldrh r1, [r1]\n\ - cmp r0, r1\n\ - bhi _081D253C\n\ - movs r2, 0x1\n\ -_081D253C:\n\ - movs r0, 0x9C\n\ - lsls r0, 1\n\ - adds r3, r4, r0\n\ - str r2, [sp]\n\ - movs r1, 0x92\n\ - lsls r1, 2\n\ - adds r0, r4, r1\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - adds r1, r5, 0\n\ - adds r2, r6, 0\n\ - bl sub_81D2278\n\ - movs r2, 0x38\n\ - cmp r2, r7\n\ - bcs _081D257E\n\ - adds r6, r5, 0\n\ - movs r3, 0\n\ - movs r0, 0xA1\n\ - lsls r0, 1\n\ - adds r5, r4, r0\n\ -_081D2566:\n\ - adds r0, r2, 0\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r1, r6, r0\n\ - strh r3, [r1]\n\ - adds r0, r5, r0\n\ - strh r3, [r0]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 16\n\ - lsrs r2, r0, 16\n\ - cmp r2, r7\n\ - bcc _081D2566\n\ -_081D257E:\n\ - movs r1, 0x97\n\ - lsls r1, 1\n\ - adds r0, r4, r1\n\ - ldrh r2, [r0]\n\ - movs r3, 0xD4\n\ - lsls r3, 2\n\ - adds r0, r4, r3\n\ - ldrh r1, [r0]\n\ - cmp r2, r1\n\ - bhi _081D25B2\n\ - movs r1, 0xA0\n\ - lsls r1, 1\n\ - adds r3, r4, r1\n\ - movs r5, 0x9B\n\ - adds r1, r0, 0\n\ -_081D259C:\n\ - adds r0, r2, 0\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r0, r3, r0\n\ - strh r5, [r0]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 16\n\ - lsrs r2, r0, 16\n\ - ldrh r0, [r1]\n\ - cmp r2, r0\n\ - bls _081D259C\n\ -_081D25B2:\n\ - movs r2, 0x9B\n\ - lsls r2, 1\n\ - adds r1, r4, r2\n\ - movs r3, 0xD4\n\ - lsls r3, 2\n\ - adds r0, r4, r3\n\ - ldrh r0, [r0]\n\ - ldrh r1, [r1]\n\ - cmp r0, r1\n\ - bcs _081D25C8\n\ - adds r0, r1, 0\n\ -_081D25C8:\n\ - adds r0, 0x1\n\ - lsls r0, 16\n\ - lsrs r2, r0, 16\n\ - cmp r2, 0x79\n\ - bhi _081D25F8\n\ - movs r0, 0xA0\n\ - lsls r0, 1\n\ - adds r6, r4, r0\n\ - movs r3, 0\n\ - movs r1, 0xA1\n\ - lsls r1, 1\n\ - adds r5, r4, r1\n\ -_081D25E0:\n\ - adds r0, r2, 0\n\ - subs r0, 0x38\n\ - lsls r0, 2\n\ - adds r1, r6, r0\n\ - strh r3, [r1]\n\ - adds r0, r5, r0\n\ - strh r3, [r0]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 16\n\ - lsrs r2, r0, 16\n\ - cmp r2, 0x79\n\ - bls _081D25E0\n\ -_081D25F8:\n\ - movs r2, 0x38\n\ - movs r3, 0xA0\n\ - lsls r3, 1\n\ - adds r5, r4, r3\n\ - movs r0, 0xA1\n\ - lsls r0, 1\n\ - adds r4, r0\n\ - movs r6, 0x9B\n\ -_081D2608:\n\ - adds r0, r2, 0\n\ - subs r0, 0x38\n\ - lsls r1, r0, 2\n\ - adds r3, r5, r1\n\ - ldrh r0, [r3]\n\ - cmp r0, 0\n\ - bne _081D2620\n\ - adds r0, r4, r1\n\ - ldrh r0, [r0]\n\ - cmp r0, 0\n\ - beq _081D2620\n\ - strh r6, [r3]\n\ -_081D2620:\n\ - adds r0, r2, 0x1\n\ - lsls r0, 16\n\ - lsrs r2, r0, 16\n\ - cmp r2, 0x79\n\ - bls _081D2608\n\ - add sp, 0x8\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .syntax divided"); -} + u16 i, r6, varMax; -NAKED -static void sub_81D2634(struct UnknownStruct_81D1ED4 *a0) -{ - asm(".syntax unified\n\ - push {r4-r6,lr}\n\ - sub sp, 0x8\n\ - adds r4, r0, 0\n\ - movs r0, 0x97\n\ - lsls r0, 1\n\ - adds r2, r4, r0\n\ - movs r3, 0x9F\n\ - lsls r3, 1\n\ - adds r1, r4, r3\n\ - ldrh r0, [r2]\n\ - ldrh r5, [r1]\n\ - cmp r0, r5\n\ - bcs _081D266E\n\ - adds r6, r0, 0\n\ - movs r0, 0x92\n\ - lsls r0, 2\n\ - adds r1, r4, r0\n\ - subs r3, 0x12\n\ - adds r2, r4, r3\n\ - movs r5, 0x9E\n\ - lsls r5, 1\n\ - adds r3, r4, r5\n\ - movs r0, 0\n\ - str r0, [sp]\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - bl sub_81D2278\n\ - b _081D2690\n\ -_081D266E:\n\ - ldrh r6, [r1]\n\ - movs r0, 0x92\n\ - lsls r0, 2\n\ - adds r1, r4, r0\n\ - movs r3, 0x9E\n\ - lsls r3, 1\n\ - adds r2, r4, r3\n\ - movs r5, 0x96\n\ - lsls r5, 1\n\ - adds r3, r4, r5\n\ - movs r0, 0x1\n\ - str r0, [sp]\n\ - movs r0, 0\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - bl sub_81D2278\n\ -_081D2690:\n\ - movs r0, 0x92\n\ - lsls r0, 2\n\ - adds r5, r4, r0\n\ - movs r1, 0x9E\n\ - lsls r1, 1\n\ - adds r2, r4, r1\n\ - movs r0, 0x9C\n\ - lsls r0, 1\n\ - adds r3, r4, r0\n\ - movs r0, 0\n\ - str r0, [sp]\n\ - str r0, [sp, 0x4]\n\ - adds r0, r4, 0\n\ - adds r1, r5, 0\n\ - bl sub_81D2278\n\ - cmp r6, 0x38\n\ - ble _081D26C8\n\ - movs r0, 0\n\ - adds r1, r5, 0\n\ - adds r2, r6, 0\n\ - subs r2, 0x38\n\ -_081D26BC:\n\ - strh r0, [r1]\n\ - strh r0, [r1, 0x2]\n\ - adds r1, 0x4\n\ - subs r2, 0x1\n\ - cmp r2, 0\n\ - bne _081D26BC\n\ -_081D26C8:\n\ - movs r1, 0x97\n\ - lsls r1, 1\n\ - adds r0, r4, r1\n\ - ldrh r2, [r0]\n\ - movs r3, 0xD4\n\ - lsls r3, 2\n\ - adds r0, r4, r3\n\ - ldrh r5, [r0]\n\ - cmp r2, r5\n\ - bgt _081D26F6\n\ - movs r3, 0x9B\n\ - adds r1, r0, 0\n\ - lsls r0, r2, 2\n\ - movs r5, 0xB5\n\ - lsls r5, 1\n\ - adds r0, r5\n\ - adds r0, r4\n\ -_081D26EA:\n\ - strh r3, [r0]\n\ - adds r0, 0x4\n\ - adds r2, 0x1\n\ - ldrh r5, [r1]\n\ - cmp r2, r5\n\ - ble _081D26EA\n\ -_081D26F6:\n\ - movs r1, 0x9D\n\ - lsls r1, 1\n\ - adds r0, r4, r1\n\ - ldrh r0, [r0]\n\ - adds r1, r0, 0x1\n\ - movs r2, 0xD4\n\ - lsls r2, 2\n\ - adds r0, r4, r2\n\ - ldrh r0, [r0]\n\ - cmp r0, r1\n\ - bge _081D270E\n\ - adds r0, r1, 0\n\ -_081D270E:\n\ - adds r2, r0, 0\n\ - cmp r2, 0x79\n\ - bgt _081D272C\n\ - movs r1, 0\n\ - lsls r0, r2, 2\n\ - movs r3, 0xB4\n\ - lsls r3, 1\n\ - adds r0, r3\n\ - adds r0, r4\n\ -_081D2720:\n\ - strh r1, [r0]\n\ - strh r1, [r0, 0x2]\n\ - adds r0, 0x4\n\ - adds r2, 0x1\n\ - cmp r2, 0x79\n\ - ble _081D2720\n\ -_081D272C:\n\ - movs r3, 0\n\ - movs r5, 0x92\n\ - lsls r5, 2\n\ - adds r1, r4, r5\n\ - movs r2, 0x41\n\ -_081D2736:\n\ - ldrh r0, [r1]\n\ - ldrh r4, [r1, 0x2]\n\ - cmp r0, r4\n\ - bcc _081D2742\n\ - strh r3, [r1, 0x2]\n\ - strh r3, [r1]\n\ -_081D2742:\n\ - adds r1, 0x4\n\ - subs r2, 0x1\n\ - cmp r2, 0\n\ - bge _081D2736\n\ - add sp, 0x8\n\ - pop {r4-r6}\n\ - pop {r0}\n\ - bx r0\n\ - .syntax divided"); -} - -NAKED -void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1) -{ - // There are some register-renaming issues here. The cause of the problem seems to be that - // GCC tries to save sUnknown_08625410 in a register, instead of loading the constant repeatedly. - // But this is one too many things to keep track of, so GCC is forced to use the stack. -#ifdef NONMATCHING - u8* v1; - u8 v2; - u8 v3; - s8 v4; - u16 v5; - - v1 = arg0->unk0[0]; - v2 = sUnknown_08625410[*v1]; - v1++; - arg1[0].unk0 = 0x9B; - arg1[0].unk2 = 0x5B - v2; - for (v3 = 0x40, v4 = 0, v5 = 1; v5 < 5; v5++) + if (arg0->unk12C[0].unk2 < arg0->unk12C[1].unk2) { - v3 += 0x33; - v4--; - if (v4 < 0) - { - v4 = 4; - } - if (v4 == 2) - { - v3++; - } + r6 = arg0->unk12C[0].unk2; + sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[0], &arg0->unk12C[1], 1, NULL); + } + else + { + r6 = arg0->unk12C[1].unk2; + sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[1], &arg0->unk12C[0], 0, NULL); + } - v2 = sUnknown_08625410[*v1]; - v1++; - arg1[v4].unk0 = ((gSineTable[v3 + 0x40] * v2) >> 8) + 0x9B; - arg1[v4].unk2 = ((gSineTable[v3] * v2) >> 8) - 0x5B; - if (v4 <= 2 && (v2 != 0x20 || v4 != 2)) + sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[1], &arg0->unk12C[2], 1, NULL); + + i = (arg0->unk12C[2].unk2 <= arg0->unk12C[3].unk2); + sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[2], &arg0->unk12C[3], i, arg0->unk248); + for (i = 56; i < r6; i++) + { + arg0->unk140[i - 56][0] = 0; + arg0->unk140[i - 56][1] = 0; + } + + for (i = arg0->unk12C[0].unk2; i <= arg0->unk350; i++) + arg0->unk140[i - 56][0] = 155; + + varMax = max(arg0->unk350, arg0->unk12C[2].unk2); + for (i = varMax + 1; i < 122; i++) + { + arg0->unk140[i - 56][0] = 0; + arg0->unk140[i - 56][1] = 0; + } + + for (i = 56; i < 122; i++) + { + if (arg0->unk140[i - 56][0] == 0 && arg0->unk140[i - 56][1] != 0) + arg0->unk140[i - 56][0] = 155; + } +} + +static void sub_81D2634(struct UnknownStruct_81D1ED4 *arg0) +{ + s32 i, r6, varMax; + + if (arg0->unk12C[0].unk2 < arg0->unk12C[4].unk2) + { + r6 = arg0->unk12C[0].unk2; + sub_81D2278(arg0, arg0->unk248, &arg0->unk12C[0], &arg0->unk12C[4], 0, NULL); + } + else + { + r6 = arg0->unk12C[4].unk2; + sub_81D2278(arg0, arg0->unk248, &arg0->unk12C[4], &arg0->unk12C[0], 1, NULL); + } + + sub_81D2278(arg0, arg0->unk248, &arg0->unk12C[4], &arg0->unk12C[3], 0, NULL); + + for (i = 56; i < r6; i++) + { + arg0->unk140[i + 10][0] = 0; + arg0->unk140[i + 10][1] = 0; + } + + for (i = arg0->unk12C[0].unk2; i <= arg0->unk350; i++) + arg0->unk140[i + 10][1] = 155; + + varMax = max(arg0->unk350, arg0->unk12C[3].unk2 + 1); + for (i = varMax; i < 122; i++) + { + arg0->unk140[i + 10][0] = 0; + arg0->unk140[i + 10][1] = 0; + } + + for (i = 0; i < 66; i++) + { + if (arg0->unk248[i][0] >= arg0->unk248[i][1]) { - arg1[v4].unk0 = arg1[v4].unk0 + 1; + arg0->unk248[i][1] = 0; + arg0->unk248[i][0] = 0; } } -#else - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - adds r6, r0, 0\n\ - mov r8, r1\n\ - ldr r1, =sUnknown_08625410\n\ - ldrb r0, [r6]\n\ - adds r0, r1\n\ - ldrb r2, [r0]\n\ - adds r6, 0x1\n\ - movs r0, 0x9B\n\ - mov r3, r8\n\ - strh r0, [r3]\n\ - movs r0, 0x5B\n\ - subs r0, r2\n\ - strh r0, [r3, 0x2]\n\ - movs r7, 0x40\n\ - movs r0, 0\n\ - mov r12, r0\n\ - movs r2, 0x1\n\ - mov r9, r2\n\ - ldr r3, =gSineTable\n\ - mov r10, r3\n\ -_081D2786:\n\ - adds r0, r7, 0\n\ - adds r0, 0x33\n\ - lsls r0, 24\n\ - lsrs r7, r0, 24\n\ - mov r1, r12\n\ - lsls r0, r1, 24\n\ - movs r2, 0xFF\n\ - lsls r2, 24\n\ - adds r0, r2\n\ - lsrs r3, r0, 24\n\ - mov r12, r3\n\ - cmp r0, 0\n\ - bge _081D27A4\n\ - movs r0, 0x4\n\ - mov r12, r0\n\ -_081D27A4:\n\ - mov r1, r12\n\ - lsls r0, r1, 24\n\ - asrs r4, r0, 24\n\ - cmp r4, 0x2\n\ - bne _081D27B4\n\ - adds r0, r7, 0x1\n\ - lsls r0, 24\n\ - lsrs r7, r0, 24\n\ -_081D27B4:\n\ - ldrb r0, [r6]\n\ - ldr r2, =sUnknown_08625410\n\ - adds r0, r2\n\ - ldrb r2, [r0]\n\ - adds r6, 0x1\n\ - lsls r0, r4, 2\n\ - mov r1, r8\n\ - adds r3, r0, r1\n\ - adds r0, r7, 0\n\ - adds r0, 0x40\n\ - lsls r0, 1\n\ - add r0, r10\n\ - movs r1, 0\n\ - ldrsh r0, [r0, r1]\n\ - muls r0, r2\n\ - asrs r5, r0, 8\n\ - adds r0, r5, 0\n\ - adds r0, 0x9B\n\ - strh r0, [r3]\n\ - lsls r0, r7, 1\n\ - add r0, r10\n\ - movs r1, 0\n\ - ldrsh r0, [r0, r1]\n\ - adds r1, r2, 0\n\ - muls r1, r0\n\ - asrs r1, 8\n\ - movs r0, 0x5B\n\ - subs r0, r1\n\ - strh r0, [r3, 0x2]\n\ - cmp r4, 0x2\n\ - bgt _081D2800\n\ - cmp r2, 0x20\n\ - bne _081D27FA\n\ - cmp r4, 0x2\n\ - beq _081D2800\n\ -_081D27FA:\n\ - adds r0, r5, 0\n\ - adds r0, 0x9C\n\ - strh r0, [r3]\n\ -_081D2800:\n\ - mov r0, r9\n\ - adds r0, 0x1\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - mov r9, r0\n\ - cmp r0, 0x4\n\ - bls _081D2786\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); -#endif +} + +void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1) +{ + u8 r2, r7; + s8 r12; + u16 i; + + r2 = sUnknown_08625410[*(arg0++)]; + arg1->unk0 = 155; + arg1->unk2 = 91 - r2; + + r7 = 64; + r12 = 0; + for (i = 1; i < 5; i++) + { + r7 += 51; + if (--r12 < 0) + r12 = 4; + + if (r12 == 2) + r7++; + + r2 = sUnknown_08625410[*(arg0++)]; + arg1[r12].unk0 = 155 + ((r2 * gSineTable[64 + r7]) >> 8); + arg1[r12].unk2 = 91 - ((r2 * gSineTable[r7]) >> 8); + + if (r12 < 3 && (r2 != 32 || r12 != 2)) + arg1[r12].unk0 = 156 + ((r2 * gSineTable[64 + r7]) >> 8); + } } void InitMoveRelearnerWindows(bool8 useContextWindow) @@ -1578,7 +904,7 @@ void InitMoveRelearnerWindows(bool8 useContextWindow) DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 1, 0xE0); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); - + for (i = 0; i < 5; i++) { FillWindowPixelBuffer(i, PIXEL_FILL(1)); @@ -1624,314 +950,86 @@ u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices) return gMultiuseListMenuTemplate.maxShowed; } -NAKED static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) { - // Two small issues, and a few renamed registers. -#ifdef NONMATCHING - u8 offset; - s32 width; + s32 x; const struct BattleMove *move; u8 buffer[0x20]; - const u8 *labelStr; + const u8 *str; FillWindowPixelBuffer(0, PIXEL_FILL(1)); - labelStr = gText_MoveRelearnerBattleMoves; - offset = GetStringCenterAlignXOffset(1, labelStr, 0x80); - AddTextPrinterParameterized(0, 1, labelStr, offset, 1, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerBattleMoves; + x = GetStringCenterAlignXOffset(1, str, 0x80); + AddTextPrinterParameterized(0, 1, str, x, 1, TEXT_SPEED_FF, NULL); - labelStr = gText_MoveRelearnerPP; - AddTextPrinterParameterized(0, 1, labelStr, 4, 0x29, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerPP; + AddTextPrinterParameterized(0, 1, str, 4, 0x29, TEXT_SPEED_FF, NULL); - labelStr = gText_MoveRelearnerPower; - offset = GetStringRightAlignXOffset(1, labelStr, 0x6A); - AddTextPrinterParameterized(0, 1, labelStr, offset, 0x19, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerPower; + x = GetStringRightAlignXOffset(1, str, 0x6A); + AddTextPrinterParameterized(0, 1, str, x, 0x19, TEXT_SPEED_FF, NULL); - labelStr = gText_MoveRelearnerAccuracy; - offset = GetStringRightAlignXOffset(1, labelStr, 0x6A); - AddTextPrinterParameterized(0, 1, labelStr, offset, 0x29, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerAccuracy; + x = GetStringRightAlignXOffset(1, str, 0x6A); + AddTextPrinterParameterized(0, 1, str, x, 0x29, TEXT_SPEED_FF, NULL); if (chosenMove == LIST_CANCEL) { CopyWindowToVram(0, 2); return; } move = &gBattleMoves[chosenMove]; - labelStr = gTypeNames[move->type]; - // GCC tries to be smart, and preserves the same 0x19 from above for this. - // The original asm just loads the constant 0x19 twice. - AddTextPrinterParameterized(0, 1, labelStr, 4, 0x19, TEXT_SPEED_FF, NULL); - - // GCC tries to generate this as: - // add r4, r0, 0 - // add r4, r4, 4 - // But the original asm is: - // add r4, r0, 4 - width = 4 + GetStringWidth(1, gText_MoveRelearnerPP, 0); + str = gTypeNames[move->type]; + AddTextPrinterParameterized(0, 1, str, 4, 0x19, TEXT_SPEED_FF, NULL); + x = 4 + GetStringWidth(1, gText_MoveRelearnerPP, 0); ConvertIntToDecimalStringN(buffer, move->pp, 0, 2); - AddTextPrinterParameterized(0, 1, buffer, width, 0x29, TEXT_SPEED_FF, NULL); - + AddTextPrinterParameterized(0, 1, buffer, x, 0x29, TEXT_SPEED_FF, NULL); if (move->power < 2) { - labelStr = gText_ThreeDashes; + str = gText_ThreeDashes; } else { ConvertIntToDecimalStringN(buffer, move->power, 0, 3); - labelStr = buffer; + str = buffer; } - AddTextPrinterParameterized(0, 1, labelStr, 0x6A, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, 1, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL); if (move->accuracy == 0) { - labelStr = gText_ThreeDashes; + str = gText_ThreeDashes; } else { ConvertIntToDecimalStringN(buffer, move->accuracy, 0, 3); - labelStr = buffer; + str = buffer; } - AddTextPrinterParameterized(0, 1, labelStr, 0x6A, 0x29, TEXT_SPEED_FF, NULL); - labelStr = gMoveDescriptionPointers[chosenMove - 1]; - AddTextPrinterParameterized(0, 7, labelStr, 0, 0x41, 0, NULL); -#else - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x2C\n\ - mov r9, r0\n\ - movs r0, 0\n\ - movs r1, 0x11\n\ - bl FillWindowPixelBuffer\n\ - ldr r5, =gText_MoveRelearnerBattleMoves\n\ - movs r0, 0x1\n\ - adds r1, r5, 0\n\ - movs r2, 0x80\n\ - bl GetStringCenterAlignXOffset\n\ - adds r4, r0, 0\n\ - lsls r3, r4, 24\n\ - lsrs r3, 24\n\ - movs r0, 0x1\n\ - str r0, [sp]\n\ - movs r0, 0xFF\n\ - mov r8, r0\n\ - str r0, [sp, 0x4]\n\ - movs r7, 0\n\ - str r7, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - bl AddTextPrinterParameterized\n\ - ldr r5, =gText_MoveRelearnerPP\n\ - movs r1, 0x29\n\ - mov r10, r1\n\ - str r1, [sp]\n\ - mov r0, r8\n\ - str r0, [sp, 0x4]\n\ - str r7, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - movs r3, 0x4\n\ - bl AddTextPrinterParameterized\n\ - ldr r5, =gText_MoveRelearnerPower\n\ - movs r0, 0x1\n\ - adds r1, r5, 0\n\ - movs r2, 0x6A\n\ - bl GetStringRightAlignXOffset\n\ - adds r4, r0, 0\n\ - lsls r3, r4, 24\n\ - lsrs r3, 24\n\ - movs r1, 0x19\n\ - str r1, [sp]\n\ - mov r0, r8\n\ - str r0, [sp, 0x4]\n\ - str r7, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - bl AddTextPrinterParameterized\n\ - ldr r5, =gText_MoveRelearnerAccuracy\n\ - movs r0, 0x1\n\ - adds r1, r5, 0\n\ - movs r2, 0x6A\n\ - bl GetStringRightAlignXOffset\n\ - adds r4, r0, 0\n\ - lsls r3, r4, 24\n\ - lsrs r3, 24\n\ - mov r1, r10\n\ - str r1, [sp]\n\ - mov r0, r8\n\ - str r0, [sp, 0x4]\n\ - str r7, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - bl AddTextPrinterParameterized\n\ - movs r0, 0x2\n\ - negs r0, r0\n\ - cmp r9, r0\n\ - bne _081D29C4\n\ - movs r0, 0\n\ - movs r1, 0x2\n\ - bl CopyWindowToVram\n\ - b _081D2AB6\n\ - .pool\n\ -_081D29C4:\n\ - mov r1, r9\n\ - lsls r0, r1, 1\n\ - add r0, r9\n\ - lsls r0, 2\n\ - ldr r1, =gBattleMoves\n\ - adds r6, r0, r1\n\ - ldrb r1, [r6, 0x2]\n\ - lsls r0, r1, 3\n\ - subs r0, r1\n\ - ldr r1, =gTypeNames\n\ - adds r5, r0, r1\n\ - movs r0, 0x19\n\ - str r0, [sp]\n\ - mov r1, r8\n\ - str r1, [sp, 0x4]\n\ - str r7, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - movs r3, 0x4\n\ - bl AddTextPrinterParameterized\n\ - ldr r1, =gText_MoveRelearnerPP\n\ - movs r0, 0x1\n\ - movs r2, 0\n\ - bl GetStringWidth\n\ - adds r4, r0, 0x4\n\ - ldrb r1, [r6, 0x4]\n\ - add r0, sp, 0xC\n\ - movs r2, 0\n\ - movs r3, 0x2\n\ - bl ConvertIntToDecimalStringN\n\ - lsls r3, r4, 24\n\ - lsrs r3, 24\n\ - mov r0, r10\n\ - str r0, [sp]\n\ - mov r1, r8\n\ - str r1, [sp, 0x4]\n\ - str r7, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - add r2, sp, 0xC\n\ - bl AddTextPrinterParameterized\n\ - ldrb r0, [r6, 0x1]\n\ - cmp r0, 0x1\n\ - bhi _081D2A3C\n\ - ldr r5, =gText_ThreeDashes\n\ - b _081D2A4A\n\ - .pool\n\ -_081D2A3C:\n\ - ldrb r1, [r6, 0x1]\n\ - add r0, sp, 0xC\n\ - movs r2, 0\n\ - movs r3, 0x3\n\ - bl ConvertIntToDecimalStringN\n\ - add r5, sp, 0xC\n\ -_081D2A4A:\n\ - movs r0, 0x19\n\ - str r0, [sp]\n\ - movs r0, 0xFF\n\ - str r0, [sp, 0x4]\n\ - movs r0, 0\n\ - str r0, [sp, 0x8]\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - movs r3, 0x6A\n\ - bl AddTextPrinterParameterized\n\ - ldrb r0, [r6, 0x3]\n\ - cmp r0, 0\n\ - bne _081D2A70\n\ - ldr r5, =gText_ThreeDashes\n\ - b _081D2A7E\n\ - .pool\n\ -_081D2A70:\n\ - ldrb r1, [r6, 0x3]\n\ - add r0, sp, 0xC\n\ - movs r2, 0\n\ - movs r3, 0x3\n\ - bl ConvertIntToDecimalStringN\n\ - add r5, sp, 0xC\n\ -_081D2A7E:\n\ - movs r0, 0x29\n\ - str r0, [sp]\n\ - movs r0, 0xFF\n\ - str r0, [sp, 0x4]\n\ - movs r4, 0\n\ - str r4, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - movs r3, 0x6A\n\ - bl AddTextPrinterParameterized\n\ - ldr r1, =gMoveDescriptionPointers\n\ - mov r0, r9\n\ - subs r0, 0x1\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - ldr r5, [r0]\n\ - movs r0, 0x41\n\ - str r0, [sp]\n\ - str r4, [sp, 0x4]\n\ - str r4, [sp, 0x8]\n\ - movs r0, 0\n\ - movs r1, 0x7\n\ - adds r2, r5, 0\n\ - movs r3, 0\n\ - bl AddTextPrinterParameterized\n\ -_081D2AB6:\n\ - add sp, 0x2C\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); -#endif + AddTextPrinterParameterized(0, 1, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL); + + str = gMoveDescriptionPointers[chosenMove - 1]; + AddTextPrinterParameterized(0, 7, str, 0, 0x41, 0, NULL); } -NAKED static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) { -#ifdef NONMATCHING - //u8 offset; - const u8 *labelStr; + s32 x; + const u8 *str; const struct ContestMove *move; - u8 category; - const u8 **temp; MoveRelearnerShowHideHearts(chosenMove); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - labelStr = gText_MoveRelearnerContestMovesTitle; - // GCC compiles these as: - // add r3, r0, 0 - // lsls r3, r3, 24 - // lsrs r3, r3, 24 - // But in the original asm: - // lsls r3, r0, 24 - // lsrs r3, r3, 24 - //offset = GetStringCenterAlignXOffset(1, labelStr, 0x80); - AddTextPrinterParameterized(1, 1, labelStr, GetStringCenterAlignXOffset(1, labelStr, 0x80), 1, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerContestMovesTitle; + x = GetStringCenterAlignXOffset(1, str, 0x80); + AddTextPrinterParameterized(1, 1, str, x, 1, TEXT_SPEED_FF, NULL); - labelStr = gText_MoveRelearnerAppeal; - //offset = GetStringRightAlignXOffset(1, labelStr, 0x5C); - AddTextPrinterParameterized(1, 1, labelStr, GetStringCenterAlignXOffset(1, labelStr, 0x5C), 0x19, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerAppeal; + x = GetStringRightAlignXOffset(1, str, 0x5C); + AddTextPrinterParameterized(1, 1, str, x, 0x19, TEXT_SPEED_FF, NULL); - labelStr = gText_MoveRelearnerJam; - //offset = GetStringRightAlignXOffset(1, labelStr, 0x5C); - AddTextPrinterParameterized(1, 1, labelStr, GetStringCenterAlignXOffset(1, labelStr, 0x5C), 0x29, TEXT_SPEED_FF, NULL); + str = gText_MoveRelearnerJam; + x = GetStringRightAlignXOffset(1, str, 0x5C); + AddTextPrinterParameterized(1, 1, str, x, 0x29, TEXT_SPEED_FF, NULL); if (chosenMove == MENU_NOTHING_CHOSEN) { @@ -1940,128 +1038,13 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) } move = &gContestMoves[chosenMove]; - temp = (const u8**)gContestMoveTypeTextPointers; - category = move->contestCategory; - labelStr = temp[category]; - AddTextPrinterParameterized(1, 1, labelStr, 4, 0x19, TEXT_SPEED_FF, NULL); + str = gContestMoveTypeTextPointers[move->contestCategory]; + AddTextPrinterParameterized(1, 1, str, 4, 0x19, TEXT_SPEED_FF, NULL); - labelStr = gContestEffectDescriptionPointers[move->effect]; - AddTextPrinterParameterized(1, 1, labelStr, 0, 0x41, TEXT_SPEED_FF, NULL); + str = gContestEffectDescriptionPointers[move->effect]; + AddTextPrinterParameterized(1, 7, str, 0, 0x41, TEXT_SPEED_FF, NULL); CopyWindowToVram(1, 2); -#else - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r8\n\ - push {r7}\n\ - sub sp, 0xC\n\ - adds r4, r0, 0\n\ - bl MoveRelearnerShowHideHearts\n\ - movs r0, 0x1\n\ - movs r1, 0x11\n\ - bl FillWindowPixelBuffer\n\ - ldr r5, =gText_MoveRelearnerContestMovesTitle\n\ - movs r0, 0x1\n\ - adds r1, r5, 0\n\ - movs r2, 0x80\n\ - bl GetStringCenterAlignXOffset\n\ - lsls r3, r0, 24\n\ - lsrs r3, 24\n\ - movs r0, 0x1\n\ - str r0, [sp]\n\ - movs r7, 0xFF\n\ - str r7, [sp, 0x4]\n\ - movs r6, 0\n\ - str r6, [sp, 0x8]\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - bl AddTextPrinterParameterized\n\ - ldr r5, =gText_MoveRelearnerAppeal\n\ - movs r0, 0x1\n\ - adds r1, r5, 0\n\ - movs r2, 0x5C\n\ - bl GetStringRightAlignXOffset\n\ - lsls r3, r0, 24\n\ - lsrs r3, 24\n\ - movs r0, 0x19\n\ - mov r8, r0\n\ - str r0, [sp]\n\ - str r7, [sp, 0x4]\n\ - str r6, [sp, 0x8]\n\ - movs r0, 0x1\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - bl AddTextPrinterParameterized\n\ - ldr r5, =gText_MoveRelearnerJam\n\ - movs r0, 0x1\n\ - adds r1, r5, 0\n\ - movs r2, 0x5C\n\ - bl GetStringRightAlignXOffset\n\ - lsls r3, r0, 24\n\ - lsrs r3, 24\n\ - movs r0, 0x29\n\ - str r0, [sp]\n\ - str r7, [sp, 0x4]\n\ - str r6, [sp, 0x8]\n\ - movs r0, 0x1\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - bl AddTextPrinterParameterized\n\ - movs r0, 0x2\n\ - negs r0, r0\n\ - cmp r4, r0\n\ - bne _081D2B6C\n\ - movs r0, 0x1\n\ - movs r1, 0x2\n\ - bl CopyWindowToVram\n\ - b _081D2BB8\n\ - .pool\n\ -_081D2B6C:\n\ - lsls r4, 3\n\ - ldr r0, =gContestMoves\n\ - adds r4, r0\n\ - ldr r1, =gContestMoveTypeTextPointers\n\ - ldrb r0, [r4, 0x1]\n\ - lsls r0, 29\n\ - lsrs r0, 27\n\ - adds r0, r1\n\ - ldr r5, [r0]\n\ - mov r0, r8\n\ - str r0, [sp]\n\ - str r7, [sp, 0x4]\n\ - str r6, [sp, 0x8]\n\ - movs r0, 0x1\n\ - movs r1, 0x1\n\ - adds r2, r5, 0\n\ - movs r3, 0x4\n\ - bl AddTextPrinterParameterized\n\ - ldr r1, =gContestEffectDescriptionPointers\n\ - ldrb r0, [r4]\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - ldr r5, [r0]\n\ - movs r0, 0x41\n\ - str r0, [sp]\n\ - str r7, [sp, 0x4]\n\ - str r6, [sp, 0x8]\n\ - movs r0, 0x1\n\ - movs r1, 0x7\n\ - adds r2, r5, 0\n\ - movs r3, 0\n\ - bl AddTextPrinterParameterized\n\ - movs r0, 0x1\n\ - movs r1, 0x2\n\ - bl CopyWindowToVram\n\ -_081D2BB8:\n\ - add sp, 0xC\n\ - pop {r3}\n\ - mov r8, r3\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); -#endif } static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *list) @@ -2091,4 +1074,4 @@ bool16 MoveRelearnerRunTextPrinters(void) void MoveRelearnerCreateYesNoMenu(void) { CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, 1, 0xE, 0); -} \ No newline at end of file +} diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 49aff99ab..59077b059 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -272,14 +272,14 @@ void sub_8166380(void) gUnknown_0203BC90->field_50++; break; case 11: - sub_81D2754(&gUnknown_0203BCAC->field_7C58, gUnknown_0203BCAC->field_7C58.unk14[0]); + sub_81D2754(gUnknown_0203BCAC->field_7C58.unk0[0], gUnknown_0203BCAC->field_7C58.unk14[0]); sub_81D20AC(&gUnknown_0203BCAC->field_7C58); gUnknown_0203BC90->field_50++; break; case 12: if (!sub_81D20BC(&gUnknown_0203BCAC->field_7C58)) { - sub_81D1F84(&gUnknown_0203BCAC->field_7C58, gUnknown_0203BCAC->field_7C58.unk14, gUnknown_0203BCAC->field_7C58.unk14); + sub_81D1F84(&gUnknown_0203BCAC->field_7C58, gUnknown_0203BCAC->field_7C58.unk14[0], gUnknown_0203BCAC->field_7C58.unk14[0]); gUnknown_0203BC90->field_50++; } break;