diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-01-01 19:03:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-01 19:03:47 -0800 |
commit | 397f32f29dbcd8fb6ad47afe5ba1ee354ca2b5c7 (patch) | |
tree | b4c05276d2e5d65f5bf7cf55a054947c92235f8e | |
parent | 79a9ff94719b5397647ddf11efc1d3dc1d388e1d (diff) | |
parent | 664b42470fb6c590dd2bd8b02707a790feda23fe (diff) |
Merge pull request #503 from huderlem/specials
Label a bunch of specials
101 files changed, 918 insertions, 910 deletions
diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index 7670d867d..69c6d9e4f 100644 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -87,8 +87,8 @@ _08095B66: bx r1 thumb_func_end sub_8095B24 - thumb_func_start sub_8095B6C -sub_8095B6C: @ 8095B6C + thumb_func_start GetNumValidDaycarePartyMons +GetNumValidDaycarePartyMons: @ 8095B6C push {r4-r6,lr} movs r5, 0 movs r6, 0 @@ -124,7 +124,7 @@ _08095B9A: bx r1 .align 2, 0 _08095BB0: .4byte gPlayerParty - thumb_func_end sub_8095B6C + thumb_func_end GetNumValidDaycarePartyMons thumb_func_start CountAlivePartyMonsExceptOne CountAlivePartyMonsExceptOne: @ 8095BB4 @@ -174,8 +174,8 @@ _08095BF6: _08095C0C: .4byte gPlayerParty thumb_func_end CountAlivePartyMonsExceptOne - thumb_func_start sub_8095C10 -sub_8095C10: @ 8095C10 + thumb_func_start CountAlivePartyMonsExceptSelectedOne +CountAlivePartyMonsExceptSelectedOne: @ 8095C10 push {lr} ldr r0, _08095C24 @ =gSpecialVar_0x8004 ldrb r0, [r0] @@ -186,7 +186,7 @@ sub_8095C10: @ 8095C10 bx r1 .align 2, 0 _08095C24: .4byte gSpecialVar_0x8004 - thumb_func_end sub_8095C10 + thumb_func_end CountAlivePartyMonsExceptSelectedOne thumb_func_start StorageSystemGetPartySize StorageSystemGetPartySize: @ 8095C28 diff --git a/asm/pokenav.s b/asm/pokenav.s index 066d16d5d..83ceed00f 100644 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -4038,7 +4038,7 @@ sub_80F2598: @ 80F2598 asrs r1, 24 lsls r1, 16 lsrs r1, 16 - bl sub_8082C0C + bl DoesSomeoneWantRematchIn cmp r0, 0x1 bne _080F2618 ldr r0, _080F25FC @ =gSpriteSheet_PokenavBlueLight diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 64b211199..e786a6ab1 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -490,7 +490,7 @@ EventScript_15F4A1: goto_if_eq EventScript_15F4E0 compare RESULT, 2 goto_if_eq EventScript_15F503 - special sub_80BC224 + special BufferSecretBaseOwnerName msgbox UnknownString_81A3958, 5 compare RESULT, 0 goto_if_eq EventScript_15F452 @@ -1815,7 +1815,7 @@ DewfordTown_EventScript_1A0102:: @ 81A0102 DewfordTown_Hall_EventScript_1A0102:: @ 81A0102 dodailyevents setvar VAR_SPECIAL_4, 0 - special sub_80FA5BC + special BufferTrendyPhraseString return DewfordTown_EventScript_1A010C:: @ 81A010C @@ -2544,7 +2544,7 @@ MossdeepCity_StevensHouse_EventScript_1A0678:: @ 81A0678 RustboroCity_DevonCorp_2F_EventScript_1A0678:: @ 81A0678 SlateportCity_House1_EventScript_1A0678:: @ 81A0678 fadescreen 1 - special sub_80BF9F8 + special ChangePokemonNickname waitstate return @@ -3813,7 +3813,7 @@ EventScript_1A2E45: compare RESULT, 0 goto_if_eq EventScript_1A2F3A fadescreen 1 - special sub_80BC50C + special MoveSecretBase closemessage fadescreen 0 msgbox UnknownString_81A3CC9, 5 @@ -4317,7 +4317,7 @@ SecretBase_RedCave1_EventScript_1A350A:: @ 81A350A special sub_80BCE1C setvar VAR_SPECIAL_4, 1 setvar VAR_SPECIAL_5, 0 - special sub_813556C + special StartSpecialBattle waitstate special ScrSpecial_HealPlayerParty release @@ -4415,14 +4415,14 @@ BattleTower_Lobby_EventScript_1ADE46:: @ 81ADE46 FallarborTown_ContestLobby_EventScript_1ADE46:: @ 81ADE46 SlateportCity_OceanicMuseum_1F_EventScript_1ADE46:: @ 81ADE46 SlateportCity_PokemonFanClub_EventScript_1ADE46:: @ 81ADE46 - special sub_80BDE48 + special InterviewAfter incrementgamestat GAME_STAT_GOT_INTERVIEWED release end SlateportCity_PokemonFanClub_EventScript_1ADE4D:: @ 81ADE4D setvar VAR_SPECIAL_5, 1 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADED6 copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4467,7 +4467,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0 lock faceplayer setvar VAR_SPECIAL_5, 2 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96 copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4522,11 +4522,11 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96 SlateportCity_PokemonFanClub_EventScript_1ADFA0:: @ 81ADFA0 lock faceplayer - specialvar RESULT, sub_80BF544 + specialvar RESULT, LeadMonNicknamed compare RESULT, 0 goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE4D setvar VAR_SPECIAL_5, 3 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0AC copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4603,7 +4603,7 @@ VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6 checkflag FLAG_TEMP_2 goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E setvar VAR_SPECIAL_5, 6 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4663,7 +4663,7 @@ VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188 compare VAR_LINK_CONTEST_ROOM_STATE, 2 goto_if 5, FallarborTown_ContestLobby_EventScript_1AE1FE setvar VAR_SPECIAL_5, 6 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq FallarborTown_ContestLobby_EventScript_1AE1FE switch VAR_CONTEST_LOCATION @@ -4700,7 +4700,7 @@ BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF checkflag FLAG_TEMP_2 goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 setvar VAR_SPECIAL_5, 7 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4769,7 +4769,7 @@ BattleTower_Lobby_EventScript_1AE2ED:: @ 81AE2ED compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 goto_if_eq BattleTower_Lobby_EventScript_1AE30F setvar VAR_SPECIAL_5, 7 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq BattleTower_Lobby_EventScript_1AE30F clearflag FLAG_HIDE_REPORTER_BATTLE_TOWER diff --git a/data-de/field_move_scripts.inc b/data-de/field_move_scripts.inc index 2b86dc4dc..edecb0312 100644 --- a/data-de/field_move_scripts.inc +++ b/data-de/field_move_scripts.inc @@ -90,7 +90,7 @@ DoRockSmashMovement: @ 81B0F0C applymovement LAST_TALKED, RockSmashMovement waitmovement 0 removeobject LAST_TALKED - specialvar RESULT, sub_810F5BC + specialvar RESULT, TryUpdateRusturfTunnelState compare RESULT, 1 goto_if_eq DoRockSmashMovement_Done special ScrSpecial_RockSmashWildEncounter diff --git a/data/event_scripts.s b/data/event_scripts.s index 7b69ac338..7d59b5234 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -490,7 +490,7 @@ EventScript_15F4A1: goto_if_eq EventScript_15F4E0 compare RESULT, 2 goto_if_eq EventScript_15F503 - special sub_80BC224 + special BufferSecretBaseOwnerName msgbox UnknownString_81A3958, 5 compare RESULT, 0 goto_if_eq EventScript_15F452 @@ -1809,7 +1809,7 @@ DewfordTown_EventScript_1A0102:: @ 81A0102 DewfordTown_Hall_EventScript_1A0102:: @ 81A0102 dodailyevents setvar VAR_SPECIAL_4, 0 - special sub_80FA5BC + special BufferTrendyPhraseString return DewfordTown_EventScript_1A010C:: @ 81A010C @@ -2538,7 +2538,7 @@ MossdeepCity_StevensHouse_EventScript_1A0678:: @ 81A0678 RustboroCity_DevonCorp_2F_EventScript_1A0678:: @ 81A0678 SlateportCity_House1_EventScript_1A0678:: @ 81A0678 fadescreen 1 - special sub_80BF9F8 + special ChangePokemonNickname waitstate return @@ -3792,7 +3792,7 @@ EventScript_1A2E45: compare RESULT, 0 goto_if_eq EventScript_1A2F3A fadescreen 1 - special sub_80BC50C + special MoveSecretBase closemessage fadescreen 0 msgbox UnknownString_81A3CC9, 5 @@ -4296,7 +4296,7 @@ SecretBase_RedCave1_EventScript_1A350A:: @ 81A350A special sub_80BCE1C setvar VAR_SPECIAL_4, 1 setvar VAR_SPECIAL_5, 0 - special sub_813556C + special StartSpecialBattle waitstate special ScrSpecial_HealPlayerParty release @@ -4383,14 +4383,14 @@ BattleTower_Lobby_EventScript_1ADE46:: @ 81ADE46 FallarborTown_ContestLobby_EventScript_1ADE46:: @ 81ADE46 SlateportCity_OceanicMuseum_1F_EventScript_1ADE46:: @ 81ADE46 SlateportCity_PokemonFanClub_EventScript_1ADE46:: @ 81ADE46 - special sub_80BDE48 + special InterviewAfter incrementgamestat GAME_STAT_GOT_INTERVIEWED release end SlateportCity_PokemonFanClub_EventScript_1ADE4D:: @ 81ADE4D setvar VAR_SPECIAL_5, 1 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADED6 copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4435,7 +4435,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0 lock faceplayer setvar VAR_SPECIAL_5, 2 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96 copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4490,11 +4490,11 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96 SlateportCity_PokemonFanClub_EventScript_1ADFA0:: @ 81ADFA0 lock faceplayer - specialvar RESULT, sub_80BF544 + specialvar RESULT, LeadMonNicknamed compare RESULT, 0 goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE4D setvar VAR_SPECIAL_5, 3 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0AC copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4571,7 +4571,7 @@ VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6 checkflag FLAG_TEMP_2 goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E setvar VAR_SPECIAL_5, 6 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4631,7 +4631,7 @@ VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188 compare VAR_LINK_CONTEST_ROOM_STATE, 2 goto_if 5, FallarborTown_ContestLobby_EventScript_1AE1FE setvar VAR_SPECIAL_5, 6 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq FallarborTown_ContestLobby_EventScript_1AE1FE switch VAR_CONTEST_LOCATION @@ -4668,7 +4668,7 @@ BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF checkflag FLAG_TEMP_2 goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 setvar VAR_SPECIAL_5, 7 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 copyvar VAR_SPECIAL_9, VAR_SPECIAL_6 @@ -4737,7 +4737,7 @@ BattleTower_Lobby_EventScript_1AE2ED:: @ 81AE2ED compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 goto_if_eq BattleTower_Lobby_EventScript_1AE30F setvar VAR_SPECIAL_5, 7 - special sub_80BF2C4 + special InterviewBefore compare RESULT, 1 goto_if_eq BattleTower_Lobby_EventScript_1AE30F clearflag FLAG_HIDE_REPORTER_BATTLE_TOWER diff --git a/data/field_move_scripts.inc b/data/field_move_scripts.inc index 0a0eeaa73..0a7112125 100644 --- a/data/field_move_scripts.inc +++ b/data/field_move_scripts.inc @@ -87,7 +87,7 @@ DoRockSmashMovement: @ 81B0F0C applymovement LAST_TALKED, RockSmashMovement waitmovement 0 removeobject LAST_TALKED - specialvar RESULT, sub_810F5BC + specialvar RESULT, TryUpdateRusturfTunnelState compare RESULT, 1 goto_if_eq DoRockSmashMovement_Done special ScrSpecial_RockSmashWildEncounter diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 7664a14ca..8c2325e04 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -96,7 +96,7 @@ Route117_PokemonDayCare_EventScript_1B2327:: @ 81B2327 end Route117_PokemonDayCare_EventScript_1B236C:: @ 81B236C - specialvar RESULT, sub_8095B6C + specialvar RESULT, GetNumValidDaycarePartyMons compare RESULT, 1 goto_if_eq Route117_PokemonDayCare_EventScript_1B23F3 msgbox Route117_PokemonDayCare_Text_1B2947, 4 @@ -105,7 +105,7 @@ Route117_PokemonDayCare_EventScript_1B236C:: @ 81B236C waitstate compare VAR_SPECIAL_4, 255 goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0 - specialvar RESULT, sub_8095C10 + specialvar RESULT, CountAlivePartyMonsExceptSelectedOne compare RESULT, 0 goto_if_eq Route117_PokemonDayCare_EventScript_1B23FD specialvar VAR_SPECIAL_5, GetSelectedDaycareMonNickname @@ -196,7 +196,7 @@ Route117_PokemonDayCare_EventScript_1B24A8:: @ 81B24A8 end Route117_PokemonDayCare_EventScript_1B24C4:: @ 81B24C4 - specialvar RESULT, sub_80B7CE8 + specialvar RESULT, HasEnoughMoneyFor compare RESULT, 1 goto_if_eq Route117_PokemonDayCare_EventScript_1B24DE msgbox Route117_PokemonDayCare_Text_1B2A30, 4 @@ -207,7 +207,7 @@ Route117_PokemonDayCare_EventScript_1B24DE:: @ 81B24DE applymovement 1, Route117_PokemonDayCare_Movement_1B2543 waitmovement 0 specialvar RESULT, TakePokemonFromDaycare - special sub_80B7D0C + special PayMoneyFor playse 95 msgbox Route117_PokemonDayCare_Text_1B2B75, 4 waitse diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index ff45d2cff..e2f43b77e 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -248,7 +248,7 @@ Route120_EventScript_1AE60F:: @ 81AE60F compare RESULT, 0 goto_if_eq Route111_EventScript_1AE69F msgbox Route111_Text_1AC10A, 4 - specialvar RESULT, sub_80BDD18 + specialvar RESULT, GabbyAndTyGetLastBattleTrivia switch RESULT case 0, Route111_EventScript_1AE6AD case 1, Route111_EventScript_1AE6BB @@ -310,7 +310,7 @@ Route111_EventScript_1AE6F3:: @ 81AE6F3 compare RESULT, 0 goto_if_eq Route111_EventScript_1AE72D msgbox Route111_Text_1AC487, 4 - special sub_80BDC14 + special GabbyAndTyAfterInterview setflag FLAG_TEMP_1 release end diff --git a/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc b/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc index 343ef4233..9ad419da1 100644 --- a/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc +++ b/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc @@ -43,7 +43,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15ED9B:: @ 815ED9B setfieldeffectargument 1, 10 setfieldeffectargument 2, 0 dofieldeffect 54 - specialvar RESULT, sub_810F4D4 + specialvar RESULT, FoundAbandonedShipRoom4Key compare RESULT, 0 call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE8B waitfieldeffect 54 @@ -54,7 +54,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EDC4:: @ 815EDC4 end AbandonedShip_HiddenFloorRooms_EventScript_15EDC5:: @ 815EDC5 - specialvar RESULT, sub_810F488 + specialvar RESULT, FoundAbandonedShipRoom1Key compare RESULT, 1 goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EDEA delay 20 @@ -77,7 +77,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EDEB:: @ 815EDEB setfieldeffectargument 1, 3 setfieldeffectargument 2, 0 dofieldeffect 54 - specialvar RESULT, sub_810F4FC + specialvar RESULT, FoundAbandonedShipRoom6Key compare RESULT, 0 call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE9B waitfieldeffect 54 @@ -98,7 +98,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EE23:: @ 815EE23 setfieldeffectargument 1, 6 setfieldeffectargument 2, 0 dofieldeffect 54 - specialvar RESULT, sub_810F4B0 + specialvar RESULT, FoundAbandonedShipRoom2Key compare RESULT, 0 call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE7B waitfieldeffect 54 diff --git a/data/scripts/maps/AbandonedShip_Rooms2_1F.inc b/data/scripts/maps/AbandonedShip_Rooms2_1F.inc index 5e8ab1062..e1e903cc0 100644 --- a/data/scripts/maps/AbandonedShip_Rooms2_1F.inc +++ b/data/scripts/maps/AbandonedShip_Rooms2_1F.inc @@ -3,7 +3,7 @@ AbandonedShip_Rooms2_1F_MapScripts:: @ 815EA67 AbandonedShip_Rooms2_1F_EventScript_15EA68:: @ 815EA68 trainerbattle 4, OPPONENT_LOIS_AND_HAL_1, 0, AbandonedShip_Rooms2_1F_Text_1987C1, AbandonedShip_Rooms2_1F_Text_1987FE, AbandonedShip_Rooms2_1F_Text_19887F - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq AbandonedShip_Rooms2_1F_EventScript_15EA93 msgbox AbandonedShip_Rooms2_1F_Text_198835, 6 @@ -16,7 +16,7 @@ AbandonedShip_Rooms2_1F_EventScript_15EA93:: @ 815EA93 AbandonedShip_Rooms2_1F_EventScript_15EAAE:: @ 815EAAE trainerbattle 4, OPPONENT_LOIS_AND_HAL_1, 0, AbandonedShip_Rooms2_1F_Text_1988CC, AbandonedShip_Rooms2_1F_Text_198916, AbandonedShip_Rooms2_1F_Text_19899A - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq AbandonedShip_Rooms2_1F_EventScript_15EAD9 msgbox AbandonedShip_Rooms2_1F_Text_198934, 6 diff --git a/data/scripts/maps/BattleTower_BattleRoom.inc b/data/scripts/maps/BattleTower_BattleRoom.inc index 87ba8c01a..7853b3598 100644 --- a/data/scripts/maps/BattleTower_BattleRoom.inc +++ b/data/scripts/maps/BattleTower_BattleRoom.inc @@ -23,16 +23,16 @@ BattleTower_BattleRoom_EventScript_1608FA:: @ 81608FA special ScrSpecial_HealPlayerParty setvar VAR_SPECIAL_4, 0 setvar VAR_SPECIAL_5, 0 - special sub_813556C + special StartSpecialBattle waitstate switch RESULT case 1, BattleTower_BattleRoom_EventScript_160961 special LoadPlayerParty setvar VAR_SPECIAL_4, 0 setvar VAR_SPECIAL_5, 5 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 14 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 3 special sub_810FF60 warp MAP_BATTLE_TOWER_LOBBY, 255, 6, 6 @@ -40,7 +40,7 @@ BattleTower_BattleRoom_EventScript_1608FA:: @ 81608FA BattleTower_BattleRoom_EventScript_160961:: @ 8160961 setvar VAR_SPECIAL_4, 6 - special sub_8135668 + special SetBattleTowerProperty switch RESULT case 8, BattleTower_BattleRoom_EventScript_160A56 applymovement 1, BattleTower_BattleRoom_Movement_160AC6 @@ -53,7 +53,7 @@ BattleTower_BattleRoom_EventScript_160961:: @ 8160961 msgbox BattleTower_BattleRoom_Text_19ACDC, 4 special LoadPlayerParty special SavePlayerParty - special sub_8135A14 + special SetBattleTowerParty playfanfare 368 waitfanfare special ScrSpecial_HealPlayerParty @@ -91,14 +91,14 @@ BattleTower_BattleRoom_EventScript_160A56:: @ 8160A56 special LoadPlayerParty setvar VAR_SPECIAL_4, 0 setvar VAR_SPECIAL_5, 4 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 2 setvar VAR_SPECIAL_5, 1 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 7 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 14 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 3 special sub_810FF60 warp MAP_BATTLE_TOWER_LOBBY, 255, 6, 6 @@ -106,7 +106,7 @@ BattleTower_BattleRoom_EventScript_160A56:: @ 8160A56 BattleTower_BattleRoom_EventScript_160A94:: @ 8160A94 setvar VAR_SPECIAL_4, 2 - special sub_8135BA0 + special SaveBattleTowerProgress message BattleTower_BattleRoom_Text_1C6CE1 delay 60 waitmessage diff --git a/data/scripts/maps/BattleTower_Elevator.inc b/data/scripts/maps/BattleTower_Elevator.inc index fccfcdb2c..6749c5623 100644 --- a/data/scripts/maps/BattleTower_Elevator.inc +++ b/data/scripts/maps/BattleTower_Elevator.inc @@ -12,7 +12,7 @@ BattleTower_Elevator_EventScript_1607E4:: @ 81607E4 applymovement 1, BattleTower_Elevator_Movement_160835 applymovement 255, BattleTower_Elevator_Movement_160839 waitmovement 0 - special sub_810EBEC + special ShakeScreenInElevator waitstate delay 64 applymovement 1, BattleTower_Elevator_Movement_16083D diff --git a/data/scripts/maps/BattleTower_Lobby.inc b/data/scripts/maps/BattleTower_Lobby.inc index 527bae389..4058d5aae 100644 --- a/data/scripts/maps/BattleTower_Lobby.inc +++ b/data/scripts/maps/BattleTower_Lobby.inc @@ -6,18 +6,18 @@ BattleTower_Lobby_MapScripts:: @ 816027E .byte 0 BattleTower_Lobby_MapScript1_160293:: @ 8160293 - special sub_813610C + special TryEnableBravoTrainerBattleTower call BattleTower_Lobby_EventScript_16029C end BattleTower_Lobby_EventScript_16029C:: @ 816029C setvar VAR_SPECIAL_4, 10 - special sub_8135668 + special SetBattleTowerProperty checkflag FLAG_RECEIVED_GOLD_SHIELD goto_if_eq BattleTower_Lobby_EventScript_1602E4 checkflag FLAG_RECEIVED_SILVER_SHIELD goto_if_eq BattleTower_Lobby_EventScript_1602CD - specialvar VAR_SPECIAL_7, sub_810F404 + specialvar VAR_SPECIAL_7, GetBestBattleTowerStreak compare VAR_SPECIAL_7, 50 goto_if 0, BattleTower_Lobby_EventScript_1602E4 clearflag FLAG_HIDE_AWARD_MAN_BATTLE_TOWER @@ -25,7 +25,7 @@ BattleTower_Lobby_EventScript_16029C:: @ 816029C return BattleTower_Lobby_EventScript_1602CD:: @ 81602CD - specialvar VAR_SPECIAL_7, sub_810F404 + specialvar VAR_SPECIAL_7, GetBestBattleTowerStreak compare VAR_SPECIAL_7, 100 goto_if 0, BattleTower_Lobby_EventScript_1602E4 clearflag FLAG_HIDE_AWARD_MAN_BATTLE_TOWER @@ -76,7 +76,7 @@ BattleTower_Lobby_EventScript_160342:: @ 8160342 message BattleTower_Lobby_Text_19A487 waitmessage setvar VAR_SPECIAL_4, 0 - special sub_81358A4 + special BattleTowerUtil compare RESULT, 6 goto_if_eq BattleTower_Lobby_EventScript_16037D special AwardBattleTowerRibbons @@ -90,23 +90,23 @@ BattleTower_Lobby_EventScript_160342:: @ 8160342 BattleTower_Lobby_EventScript_16037D:: @ 816037D setvar VAR_SPECIAL_4, 8 - special sub_81358A4 + special BattleTowerUtil compare RESULT, 1 goto_if_eq BattleTower_Lobby_EventScript_1603AD message BattleTower_Lobby_Text_19A589 waitmessage setvar VAR_SPECIAL_4, 13 - special sub_8135668 + special SetBattleTowerProperty special DetermineBattleTowerPrize setvar VAR_SPECIAL_4, 3 - special sub_8135BA0 + special SaveBattleTowerProgress playse 55 waitse BattleTower_Lobby_EventScript_1603AD:: @ 81603AD setvar VAR_SPECIAL_4, 0 setvar VAR_SPECIAL_5, 3 - special sub_8135668 + special SetBattleTowerProperty message BattleTower_Lobby_Text_19A4BB waitmessage special GiveBattleTowerPrize @@ -117,7 +117,7 @@ BattleTower_Lobby_EventScript_1603AD:: @ 81603AD playfanfare 370 waitfanfare setvar VAR_SPECIAL_4, 9 - special sub_81358A4 + special BattleTowerUtil compare RESULT, 49 goto_if 5, BattleTower_Lobby_EventScript_1603F8 msgbox BattleTower_Lobby_Text_19A617, 4 @@ -145,9 +145,9 @@ BattleTower_Lobby_EventScript_160419:: @ 8160419 message BattleTower_Lobby_Text_19A589 waitmessage setvar VAR_SPECIAL_4, 13 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 0 - special sub_8135BA0 + special SaveBattleTowerProgress playse 55 waitse msgbox BattleTower_Lobby_Text_199FA9, 4 @@ -165,15 +165,15 @@ BattleTower_Lobby_EventScript_16044B:: @ 816044B message BattleTower_Lobby_Text_19A5CE waitmessage setvar VAR_SPECIAL_4, 1 - special sub_8135BA0 + special SaveBattleTowerProgress playse 55 waitse setvar VAR_SPECIAL_4, 8 setvar VAR_SPECIAL_5, 0 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_TEMP_0, 5 special SavePlayerParty - special sub_8135A14 + special SetBattleTowerParty msgbox BattleTower_Lobby_Text_19A0A8, 4 closemessage call BattleTower_Lobby_EventScript_160664 @@ -185,7 +185,7 @@ BattleTower_Lobby_EventScript_16049E:: @ 816049E lock faceplayer setvar VAR_SPECIAL_4, 0 - special sub_81358A4 + special BattleTowerUtil compare RESULT, 6 goto_if_eq BattleTower_Lobby_EventScript_160342 special SavePlayerParty @@ -214,7 +214,7 @@ BattleTower_Lobby_EventScript_1604FA:: @ 81604FA setvar VAR_SPECIAL_4, 1 copyvar VAR_SPECIAL_5, RESULT copyvar VAR_SPECIAL_6, RESULT - special sub_8135668 + special SetBattleTowerProperty msgbox BattleTower_Lobby_Text_19A07B, 4 fadescreen 1 special ChooseBattleTowerPlayerParty @@ -229,16 +229,16 @@ BattleTower_Lobby_EventScript_1604FA:: @ 81604FA BattleTower_Lobby_EventScript_160587:: @ 8160587 setvar VAR_SPECIAL_4, 5 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_TEMP_0, 0 setvar VAR_SPECIAL_4, 11 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 0 setvar VAR_SPECIAL_5, 1 - special sub_8135668 + special SetBattleTowerProperty setvar VAR_SPECIAL_4, 8 setvar VAR_SPECIAL_5, 0 - special sub_8135668 + special SetBattleTowerProperty special LoadPlayerParty closemessage delay 2 @@ -249,7 +249,7 @@ BattleTower_Lobby_EventScript_160587:: @ 8160587 goto_if_eq BattleTower_Lobby_EventScript_160642 incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER special SavePlayerParty - special sub_8135A14 + special SetBattleTowerParty setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 1 msgbox BattleTower_Lobby_Text_19A0A8, 4 closemessage @@ -277,7 +277,7 @@ BattleTower_Lobby_EventScript_160635:: @ 8160635 BattleTower_Lobby_EventScript_160642:: @ 8160642 setvar VAR_SPECIAL_4, 12 - special sub_8135668 + special SetBattleTowerProperty goto BattleTower_Lobby_EventScript_160652 BattleTower_Lobby_EventScript_16064F:: @ 816064F @@ -286,7 +286,7 @@ BattleTower_Lobby_EventScript_16064F:: @ 816064F BattleTower_Lobby_EventScript_160652:: @ 8160652 msgbox BattleTower_Lobby_Text_199FA9, 4 setvar VAR_SPECIAL_4, 11 - special sub_8135668 + special SetBattleTowerProperty BattleTower_Lobby_EventScript_160662:: @ 8160662 release @@ -402,7 +402,7 @@ BattleTower_Lobby_EventScript_160733:: @ 8160733 end BattleTower_Lobby_EventScript_160773:: @ 8160773 - specialvar RESULT, sub_810F404 + specialvar RESULT, GetBestBattleTowerStreak compare RESULT, 100 goto_if 0, BattleTower_Lobby_EventScript_1607C5 msgbox BattleTower_Lobby_Text_19AAC4, 4 diff --git a/data/scripts/maps/CaveOfOrigin_B4F.inc b/data/scripts/maps/CaveOfOrigin_B4F.inc index ee702c102..669b0a5fe 100644 --- a/data/scripts/maps/CaveOfOrigin_B4F.inc +++ b/data/scripts/maps/CaveOfOrigin_B4F.inc @@ -65,7 +65,7 @@ CaveOfOrigin_B4F_EventScript_15DDD7:: @ 815DDD7 special ScrSpecial_StartGroudonKyogreBattle waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE - specialvar RESULT, sub_810E300 + specialvar RESULT, GetBattleOutcome compare RESULT, 1 call_if 1, CaveOfOrigin_B4F_EventScript_15DE73 setflag FLAG_HIDE_WALLACE_SOOTOPOLIS diff --git a/data/scripts/maps/DewfordTown_Hall.inc b/data/scripts/maps/DewfordTown_Hall.inc index e54ef8e50..530a4e04d 100644 --- a/data/scripts/maps/DewfordTown_Hall.inc +++ b/data/scripts/maps/DewfordTown_Hall.inc @@ -5,7 +5,7 @@ DewfordTown_Hall_EventScript_153293:: @ 8153293 lock faceplayer call DewfordTown_Hall_EventScript_1A0102 - special sub_80FA5E4 + special TrendyPhraseIsOld compare RESULT, 1 goto_if_eq DewfordTown_Hall_EventScript_1532B2 msgbox DewfordTown_Hall_Text_1754C9, 4 @@ -29,7 +29,7 @@ DewfordTown_Hall_EventScript_1532CD:: @ 81532CD lock faceplayer call DewfordTown_Hall_EventScript_1A0102 - special sub_80EB83C + special BufferRandomHobbyOrLifestyleString msgbox DewfordTown_Hall_Text_1755F9, 5 compare RESULT, 1 goto_if_eq DewfordTown_Hall_EventScript_1532F6 @@ -87,7 +87,7 @@ DewfordTown_Hall_EventScript_153353:: @ 8153353 DewfordTown_Hall_EventScript_153363:: @ 8153363 lockall call DewfordTown_Hall_EventScript_1A0102 - special sub_80FA648 + special GetDewfordHallPaintingNameIndex switch RESULT case 0, DewfordTown_Hall_EventScript_1533CA case 4, DewfordTown_Hall_EventScript_1533CA @@ -133,7 +133,7 @@ DewfordTown_Hall_EventScript_1533FE:: @ 81533FE DewfordTown_Hall_EventScript_15340A:: @ 815340A call DewfordTown_Hall_EventScript_1A0102 - special sub_80FA648 + special GetDewfordHallPaintingNameIndex switch RESULT case 0, DewfordTown_Hall_EventScript_153470 case 1, DewfordTown_Hall_EventScript_153470 diff --git a/data/scripts/maps/FallarborTown_ContestLobby.inc b/data/scripts/maps/FallarborTown_ContestLobby.inc index a0fd0ac3d..270575bcb 100644 --- a/data/scripts/maps/FallarborTown_ContestLobby.inc +++ b/data/scripts/maps/FallarborTown_ContestLobby.inc @@ -11,7 +11,7 @@ FallarborTown_ContestLobby_EventScript_1539CD:: @ 81539CD setvar CONTEST_RANK, 1 call FallarborTown_ContestLobby_EventScript_1A4E92 call FallarborTown_ContestLobby_EventScript_1539F8 - special sub_80C4BF0 + special SetContestTrainerGfxIds call FallarborTown_ContestLobby_EventScript_15FBDB setvar VAR_CONTEST_LOCATION, 2 warp MAP_LINK_CONTEST_ROOM1, 255, 7, 5 diff --git a/data/scripts/maps/FallarborTown_House2.inc b/data/scripts/maps/FallarborTown_House2.inc index 081850326..0546ef5be 100644 --- a/data/scripts/maps/FallarborTown_House2.inc +++ b/data/scripts/maps/FallarborTown_House2.inc @@ -24,11 +24,11 @@ FallarborTown_House2_EventScript_153CB6:: @ 8153CB6 FallarborTown_House2_EventScript_153CE4:: @ 8153CE4 msgbox FallarborTown_House2_Text_177C3F, 4 - special sub_80F9A4C + special SelectMoveTutorMon waitstate compare VAR_SPECIAL_4, 255 goto_if_eq FallarborTown_House2_EventScript_153D60 - special sub_80FA148 + special IsSelectedMonEgg compare RESULT, 1 goto_if_eq FallarborTown_House2_EventScript_153D52 compare VAR_SPECIAL_5, 0 @@ -38,7 +38,7 @@ FallarborTown_House2_EventScript_153CE4:: @ 8153CE4 FallarborTown_House2_EventScript_153D1A:: @ 8153D1A msgbox FallarborTown_House2_Text_177C5D, 4 - special sub_8132670 + special TeachMoveTutorMove waitstate compare VAR_SPECIAL_4, 0 goto_if_eq FallarborTown_House2_EventScript_153CE4 diff --git a/data/scripts/maps/FortreeCity_House1.inc b/data/scripts/maps/FortreeCity_House1.inc index aee4141a8..f6f8aafa6 100644 --- a/data/scripts/maps/FortreeCity_House1.inc +++ b/data/scripts/maps/FortreeCity_House1.inc @@ -8,25 +8,25 @@ FortreeCity_House1_EventScript_157E13:: @ 8157E13 goto_if_eq FortreeCity_House1_EventScript_157EAD setvar VAR_SPECIAL_8, 1 copyvar VAR_SPECIAL_4, VAR_SPECIAL_8 - specialvar RESULT, sub_804D89C + specialvar RESULT, GetInGameTradeSpeciesInfo copyvar VAR_SPECIAL_9, RESULT msgbox FortreeCity_House1_Text_18568C, 5 compare RESULT, 0 goto_if_eq FortreeCity_House1_EventScript_157E95 - special sub_80F9A0C + special SelectMonForNPCTrade waitstate copyvar VAR_SPECIAL_A, VAR_SPECIAL_4 compare VAR_SPECIAL_4, 255 goto_if_eq FortreeCity_House1_EventScript_157E95 copyvar VAR_SPECIAL_5, VAR_SPECIAL_A - specialvar RESULT, sub_804DB2C + specialvar RESULT, GetTradeSpecies copyvar VAR_SPECIAL_B, RESULT compare RESULT, VAR_SPECIAL_9 goto_if 5, FortreeCity_House1_EventScript_157E9F copyvar VAR_SPECIAL_4, VAR_SPECIAL_8 copyvar VAR_SPECIAL_5, VAR_SPECIAL_A - special sub_804DB68 - special sub_804E174 + special CreateInGameTradePokemon + special DoInGameTradeScene waitstate bufferspeciesname 0, VAR_SPECIAL_9 msgbox FortreeCity_House1_Text_1856F7, 4 diff --git a/data/scripts/maps/JaggedPass.inc b/data/scripts/maps/JaggedPass.inc index 1a4fd9bdc..bf1f0233d 100644 --- a/data/scripts/maps/JaggedPass.inc +++ b/data/scripts/maps/JaggedPass.inc @@ -24,7 +24,7 @@ JaggedPass_EventScript_15D285:: @ 815D285 JaggedPass_EventScript_15D29C:: @ 815D29C trainerbattle 0, OPPONENT_DIANA_1, 0, JaggedPass_Text_195E9E, JaggedPass_Text_195EDF - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq JaggedPass_EventScript_15D2C3 msgbox JaggedPass_Text_195F04, 6 @@ -37,7 +37,7 @@ JaggedPass_EventScript_15D2C3:: @ 815D2C3 JaggedPass_EventScript_15D2DA:: @ 815D2DA trainerbattle 0, OPPONENT_ETHAN_1, 0, JaggedPass_Text_195FF2, JaggedPass_Text_196032 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq JaggedPass_EventScript_15D301 msgbox JaggedPass_Text_196077, 6 diff --git a/data/scripts/maps/LilycoveCity_ContestLobby.inc b/data/scripts/maps/LilycoveCity_ContestLobby.inc index 7a13b1c48..377c2908d 100644 --- a/data/scripts/maps/LilycoveCity_ContestLobby.inc +++ b/data/scripts/maps/LilycoveCity_ContestLobby.inc @@ -575,7 +575,7 @@ LilycoveCity_ContestLobby_EventScript_158EB0:: @ 8158EB0 setvar CONTEST_RANK, 3 call LilycoveCity_ContestLobby_EventScript_1A4E92 call LilycoveCity_ContestLobby_EventScript_158F86 - special sub_80C4BF0 + special SetContestTrainerGfxIds call LilycoveCity_ContestLobby_EventScript_15FBDB setvar VAR_CONTEST_LOCATION, 4 call LilycoveCity_ContestLobby_EventScript_158F08 diff --git a/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc b/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc index 00a10b655..7e221122b 100644 --- a/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc +++ b/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc @@ -8,7 +8,7 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_1583A1:: @ 81583A1 call_if 0, LilycoveCity_CoveLilyMotel_2F_EventScript_1583C7 checkflag FLAG_TEMP_2 call_if 1, LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD - specialvar RESULT, sub_8090FC0 + specialvar RESULT, CompletedHoennPokedex compare RESULT, 1 goto_if_eq LilycoveCity_CoveLilyMotel_2F_EventScript_1583D0 release diff --git a/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc b/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc index 8233504dd..1198054f0 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc @@ -7,7 +7,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_15A39C:: @ 815A39C checkflag FLAG_TEMP_2 call_if 0, LilycoveCity_DepartmentStoreElevator_EventScript_15A4CF copyvar VAR_SPECIAL_5, VAR_DEPT_STORE_FLOOR - special sub_810E944 + special DisplayCurrentElevatorFloor message LilycoveCity_DepartmentStoreElevator_Text_1A0EF6 waitmessage multichoice 0, 0, 57, 0 @@ -74,7 +74,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8:: @ 815A4B8 erasebox 0, 0, 29, 19 applymovement LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_1A0845 waitmovement 0 - special sub_810EBEC + special ShakeScreenInElevator waitstate setflag FLAG_TEMP_2 return diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc index a9680e3a5..d4dedb0c2 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc @@ -21,7 +21,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_159D5E:: @ 8159D5E waitmessage special RetrieveLotteryNumber copyvar VAR_SPECIAL_8, RESULT - special sub_810F9AC + special BufferLottoTicketNumber msgbox LilycoveCity_DepartmentStore_1F_Text_1C4CF6, 4 applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_1A0843 waitmovement 0 diff --git a/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc b/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc index 1024d30e9..a3c8d23af 100644 --- a/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc +++ b/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc @@ -14,11 +14,11 @@ LilycoveCity_MoveDeletersHouse_EventScript_159AAE:: @ 8159AAE LilycoveCity_MoveDeletersHouse_EventScript_159ADE:: @ 8159ADE msgbox LilycoveCity_MoveDeletersHouse_Text_18B68C, 4 - special sub_80F9A0C + special SelectMonForNPCTrade waitstate compare VAR_SPECIAL_4, 255 goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B7B - special sub_80FA148 + special IsSelectedMonEgg compare RESULT, 1 goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B71 special ScrSpecial_CountPokemonMoves @@ -26,7 +26,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_159ADE:: @ 8159ADE goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B64 msgbox LilycoveCity_MoveDeletersHouse_Text_18B6B0, 4 fadescreen 1 - special sub_80F9EEC + special SelectMove fadescreen 0 compare VAR_SPECIAL_5, 4 goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159ADE @@ -39,7 +39,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_159ADE:: @ 8159ADE end LilycoveCity_MoveDeletersHouse_EventScript_159B53:: @ 8159B53 - special sub_80FA0DC + special DeleteMonMove playfanfare 378 waitfanfare msgbox LilycoveCity_MoveDeletersHouse_Text_18B71E, 4 diff --git a/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc b/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc index 2db702ffc..4656f0182 100644 --- a/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc +++ b/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc @@ -68,37 +68,37 @@ LilycoveCity_PokemonTrainerFanClub_MapScript1_159412:: @ 8159412 end LilycoveCity_PokemonTrainerFanClub_EventScript_159429:: @ 8159429 - special sub_810FCE8 + special UpdateMovedLilycoveFanClubMembers setvar VAR_SPECIAL_4, 8 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5 setvar VAR_SPECIAL_4, 9 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD setvar VAR_SPECIAL_4, 10 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5 setvar VAR_SPECIAL_4, 11 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED setvar VAR_SPECIAL_4, 12 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5 setvar VAR_SPECIAL_4, 13 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD setvar VAR_SPECIAL_4, 14 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_159505 setvar VAR_SPECIAL_4, 15 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 0 call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_15950D end @@ -147,13 +147,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15952F:: @ 815952F lock faceplayer setvar VAR_SPECIAL_4, 13 - special sub_810FDAC + special BufferStreakTrainerText compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15959C - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15956E - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159592 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A400, 4 @@ -161,7 +161,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15952F:: @ 815952F end LilycoveCity_PokemonTrainerFanClub_EventScript_15956E:: @ 815956E - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159588 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A36A, 4 @@ -187,13 +187,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1595A6:: @ 81595A6 lock faceplayer setvar VAR_SPECIAL_4, 8 - special sub_810FDAC + special BufferStreakTrainerText compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159613 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159609 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A629, 4 @@ -201,7 +201,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1595A6:: @ 81595A6 end LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5:: @ 81595E5 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1595FF msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A584, 4 @@ -227,13 +227,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15961D:: @ 815961D lock faceplayer setvar VAR_SPECIAL_4, 9 - special sub_810FDAC + special BufferStreakTrainerText compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15968A - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15965C - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159680 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A814, 4 @@ -241,7 +241,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15961D:: @ 815961D end LilycoveCity_PokemonTrainerFanClub_EventScript_15965C:: @ 815965C - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159676 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A71E, 4 @@ -267,13 +267,13 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159694:: @ 8159694 lock faceplayer setvar VAR_SPECIAL_4, 10 - special sub_810FDAC + special BufferStreakTrainerText compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159701 - specialvar RESULT, sub_810FD60 + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596F7 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AB0A, 4 @@ -281,7 +281,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159694:: @ 8159694 end LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3:: @ 81596D3 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596ED msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AA39, 4 @@ -307,11 +307,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15970B:: @ 815970B lock faceplayer setvar VAR_SPECIAL_4, 11 - special sub_810FDAC - specialvar RESULT, sub_810FD60 + special BufferStreakTrainerText + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15973F - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159763 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18ACC7, 4 @@ -319,7 +319,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15970B:: @ 815970B end LilycoveCity_PokemonTrainerFanClub_EventScript_15973F:: @ 815973F - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159759 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AC15, 4 @@ -340,11 +340,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15976D:: @ 815976D lock faceplayer setvar VAR_SPECIAL_4, 12 - special sub_810FDAC - specialvar RESULT, sub_810FD60 + special BufferStreakTrainerText + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597C5 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AE63, 4 @@ -352,7 +352,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15976D:: @ 815976D end LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1:: @ 81597A1 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597BB msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AD6D, 4 @@ -373,11 +373,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1597CF:: @ 81597CF lock faceplayer setvar VAR_SPECIAL_4, 14 - special sub_810FDAC - specialvar RESULT, sub_810FD60 + special BufferStreakTrainerText + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159803 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159827 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B030, 4 @@ -385,7 +385,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1597CF:: @ 81597CF end LilycoveCity_PokemonTrainerFanClub_EventScript_159803:: @ 8159803 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15981D msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AF62, 4 @@ -406,11 +406,11 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159831:: @ 8159831 lock faceplayer setvar VAR_SPECIAL_4, 15 - special sub_810FDAC - specialvar RESULT, sub_810FD60 + special BufferStreakTrainerText + specialvar RESULT, ShouldMoveLilycoveFanClubMember compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159865 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 7 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159889 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B1FD, 4 @@ -418,7 +418,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159831:: @ 8159831 end LilycoveCity_PokemonTrainerFanClub_EventScript_159865:: @ 8159865 - specialvar RESULT, sub_810FCB0 + specialvar RESULT, GetNumMovedLilycoveFanClubMembers compare RESULT, 1 goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15987F msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B16E, 4 diff --git a/data/scripts/maps/MauvilleCity_GameCorner.inc b/data/scripts/maps/MauvilleCity_GameCorner.inc index 6befb5fb9..c2b785254 100644 --- a/data/scripts/maps/MauvilleCity_GameCorner.inc +++ b/data/scripts/maps/MauvilleCity_GameCorner.inc @@ -525,7 +525,7 @@ MauvilleCity_GameCorner_EventScript_157135:: @ 8157135 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 0 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -536,7 +536,7 @@ MauvilleCity_GameCorner_EventScript_157155:: @ 8157155 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 1 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -547,7 +547,7 @@ MauvilleCity_GameCorner_EventScript_157175:: @ 8157175 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 2 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -558,7 +558,7 @@ MauvilleCity_GameCorner_EventScript_157195:: @ 8157195 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 3 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -569,7 +569,7 @@ MauvilleCity_GameCorner_EventScript_1571B5:: @ 81571B5 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 4 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -580,7 +580,7 @@ MauvilleCity_GameCorner_EventScript_1571D5:: @ 81571D5 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 5 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -591,7 +591,7 @@ MauvilleCity_GameCorner_EventScript_1571F5:: @ 81571F5 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 6 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -602,7 +602,7 @@ MauvilleCity_GameCorner_EventScript_157215:: @ 8157215 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 7 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -613,7 +613,7 @@ MauvilleCity_GameCorner_EventScript_157235:: @ 8157235 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 8 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -624,7 +624,7 @@ MauvilleCity_GameCorner_EventScript_157255:: @ 8157255 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 9 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -635,7 +635,7 @@ MauvilleCity_GameCorner_EventScript_157275:: @ 8157275 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 10 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end @@ -646,7 +646,7 @@ MauvilleCity_GameCorner_EventScript_157295:: @ 8157295 compare RESULT, 0 goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar VAR_SPECIAL_4, 11 - specialvar RESULT, sub_810F424 + specialvar RESULT, GetSlotMachineId playslotmachine RESULT releaseall end diff --git a/data/scripts/maps/MeteorFalls_1F_2R.inc b/data/scripts/maps/MeteorFalls_1F_2R.inc index b3a0c51fe..49d629294 100644 --- a/data/scripts/maps/MeteorFalls_1F_2R.inc +++ b/data/scripts/maps/MeteorFalls_1F_2R.inc @@ -3,7 +3,7 @@ MeteorFalls_1F_2R_MapScripts:: @ 815C678 MeteorFalls_1F_2R_EventScript_15C679:: @ 815C679 trainerbattle 0, OPPONENT_NICOLAS_1, 0, MeteorFalls_1F_2R_Text_1939C5, MeteorFalls_1F_2R_Text_193A35 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq MeteorFalls_1F_2R_EventScript_15C6A0 msgbox MeteorFalls_1F_2R_Text_193A60, 6 @@ -16,7 +16,7 @@ MeteorFalls_1F_2R_EventScript_15C6A0:: @ 815C6A0 MeteorFalls_1F_2R_EventScript_15C6B7:: @ 815C6B7 trainerbattle 4, OPPONENT_JOHN_AND_JAY_1, 0, MeteorFalls_1F_2R_Text_193BB7, MeteorFalls_1F_2R_Text_193C10, MeteorFalls_1F_2R_Text_193C9F - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq MeteorFalls_1F_2R_EventScript_15C6E2 msgbox MeteorFalls_1F_2R_Text_193C35, 6 @@ -29,7 +29,7 @@ MeteorFalls_1F_2R_EventScript_15C6E2:: @ 815C6E2 MeteorFalls_1F_2R_EventScript_15C6FD:: @ 815C6FD trainerbattle 4, OPPONENT_JOHN_AND_JAY_1, 0, MeteorFalls_1F_2R_Text_193D10, MeteorFalls_1F_2R_Text_193D6E, MeteorFalls_1F_2R_Text_193DFB - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq MeteorFalls_1F_2R_EventScript_15C728 msgbox MeteorFalls_1F_2R_Text_193D9A, 6 diff --git a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc index 1e7c26511..ad3b366a8 100644 --- a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc +++ b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc @@ -92,7 +92,7 @@ MossdeepCity_GameCorner_1F_EventScript_15AD42:: @ 815AD42 MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59 special SavePlayerParty - special sub_810F414 + special BufferEReaderTrainerName msgbox MossdeepCity_GameCorner_1F_Text_18E650, 5 compare RESULT, 0 goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8 diff --git a/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc index 9395633e7..9f20b6310 100644 --- a/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc +++ b/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc @@ -20,7 +20,7 @@ MossdeepCity_GameCorner_B1F_EventScript_15AE6E:: @ 815AE6E closemessage setvar VAR_SPECIAL_4, 2 setvar VAR_SPECIAL_5, 0 - special sub_813556C + special StartSpecialBattle waitstate compare RESULT, 3 call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AED5 diff --git a/data/scripts/maps/MtChimney.inc b/data/scripts/maps/MtChimney.inc index a831f0dcc..d93ec772a 100644 --- a/data/scripts/maps/MtChimney.inc +++ b/data/scripts/maps/MtChimney.inc @@ -440,7 +440,7 @@ MtChimney_EventScript_15D1DA:: @ 815D1DA MtChimney_EventScript_15D1E3:: @ 815D1E3 trainerbattle 0, OPPONENT_SHELBY_1, 0, MtChimney_Text_19597F, MtChimney_Text_1959D8 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq MtChimney_EventScript_15D20A msgbox MtChimney_Text_195A04, 6 diff --git a/data/scripts/maps/MtPyre_6F.inc b/data/scripts/maps/MtPyre_6F.inc index 433b533b3..ae09300a3 100644 --- a/data/scripts/maps/MtPyre_6F.inc +++ b/data/scripts/maps/MtPyre_6F.inc @@ -3,7 +3,7 @@ MtPyre_6F_MapScripts:: @ 815D447 MtPyre_6F_EventScript_15D448:: @ 815D448 trainerbattle 0, OPPONENT_VALERIE_1, 0, MtPyre_6F_Text_1969FE, MtPyre_6F_Text_196A30 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq MtPyre_6F_EventScript_15D46F msgbox MtPyre_6F_Text_196A4C, 6 diff --git a/data/scripts/maps/PacifidlogTown_House2.inc b/data/scripts/maps/PacifidlogTown_House2.inc index f073201ca..df7f42a8b 100644 --- a/data/scripts/maps/PacifidlogTown_House2.inc +++ b/data/scripts/maps/PacifidlogTown_House2.inc @@ -25,7 +25,7 @@ PacifidlogTown_House2_EventScript_154168:: @ 8154168 PacifidlogTown_House2_EventScript_1541B4:: @ 81541B4 checkflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK goto_if 0, PacifidlogTown_House2_EventScript_1A14DC - specialvar RESULT, sub_810F908 + specialvar RESULT, GetDaysUntilPacifidlogTMAvailable compare RESULT, 0 call_if 1, PacifidlogTown_House2_EventScript_1541E8 return @@ -49,7 +49,7 @@ PacifidlogTown_House2_EventScript_1541EC:: @ 81541EC compare RESULT, 0 goto_if_eq PacifidlogTown_House2_EventScript_1A029B setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK - special sub_810F950 + special SetPacifidlogTMReceivedDay msgbox PacifidlogTown_House2_Text_179283, 4 release end @@ -65,13 +65,13 @@ PacifidlogTown_House2_EventScript_154225:: @ 8154225 compare RESULT, 0 goto_if_eq PacifidlogTown_House2_EventScript_1A029B setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK - special sub_810F950 + special SetPacifidlogTMReceivedDay msgbox PacifidlogTown_House2_Text_179283, 4 release end PacifidlogTown_House2_EventScript_154254:: @ 8154254 - specialvar RESULT, sub_810F908 + specialvar RESULT, GetDaysUntilPacifidlogTMAvailable buffernumberstring 0, RESULT msgbox PacifidlogTown_House2_Text_1792F2, 4 release diff --git a/data/scripts/maps/PacifidlogTown_House3.inc b/data/scripts/maps/PacifidlogTown_House3.inc index b65c2e67d..f5f93f05a 100644 --- a/data/scripts/maps/PacifidlogTown_House3.inc +++ b/data/scripts/maps/PacifidlogTown_House3.inc @@ -8,25 +8,25 @@ PacifidlogTown_House3_EventScript_15429E:: @ 815429E goto_if_eq PacifidlogTown_House3_EventScript_154338 setvar VAR_SPECIAL_8, 2 copyvar VAR_SPECIAL_4, VAR_SPECIAL_8 - specialvar RESULT, sub_804D89C + specialvar RESULT, GetInGameTradeSpeciesInfo copyvar VAR_SPECIAL_9, RESULT msgbox PacifidlogTown_House3_Text_17940E, 5 compare RESULT, 0 goto_if_eq PacifidlogTown_House3_EventScript_154320 - special sub_80F9A0C + special SelectMonForNPCTrade waitstate copyvar VAR_SPECIAL_A, VAR_SPECIAL_4 compare VAR_SPECIAL_4, 255 goto_if_eq PacifidlogTown_House3_EventScript_154320 copyvar VAR_SPECIAL_5, VAR_SPECIAL_A - specialvar RESULT, sub_804DB2C + specialvar RESULT, GetTradeSpecies copyvar VAR_SPECIAL_B, RESULT compare RESULT, VAR_SPECIAL_9 goto_if 5, PacifidlogTown_House3_EventScript_15432A copyvar VAR_SPECIAL_4, VAR_SPECIAL_8 copyvar VAR_SPECIAL_5, VAR_SPECIAL_A - special sub_804DB68 - special sub_804E174 + special CreateInGameTradePokemon + special DoInGameTradeScene waitstate bufferspeciesname 0, VAR_SPECIAL_9 msgbox PacifidlogTown_House3_Text_1794C4, 4 diff --git a/data/scripts/maps/PetalburgWoods.inc b/data/scripts/maps/PetalburgWoods.inc index 83bfe7da4..73eb4f661 100644 --- a/data/scripts/maps/PetalburgWoods.inc +++ b/data/scripts/maps/PetalburgWoods.inc @@ -271,7 +271,7 @@ PetalburgWoods_EventScript_15CF27:: @ 815CF27 PetalburgWoods_EventScript_15CF3E:: @ 815CF3E trainerbattle 0, OPPONENT_JAMES_1, 0, PetalburgWoods_Text_19526A, PetalburgWoods_Text_1952AE - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq PetalburgWoods_EventScript_15CF65 msgbox PetalburgWoods_Text_1952CC, 6 diff --git a/data/scripts/maps/Route102.inc b/data/scripts/maps/Route102.inc index 95a0a4a1f..ad1571caa 100644 --- a/data/scripts/maps/Route102.inc +++ b/data/scripts/maps/Route102.inc @@ -19,7 +19,7 @@ Route102_EventScript_14EAF5:: @ 814EAF5 Route102_EventScript_14EAFE:: @ 814EAFE trainerbattle 0, OPPONENT_CALVIN_1, 0, Route102_Text_1B79C3, Route102_Text_1B7A2C - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route102_EventScript_14EB25 msgbox Route102_Text_1B7A60, 6 diff --git a/data/scripts/maps/Route103.inc b/data/scripts/maps/Route103.inc index 35994cd45..bfcbeb87a 100644 --- a/data/scripts/maps/Route103.inc +++ b/data/scripts/maps/Route103.inc @@ -173,7 +173,7 @@ Route103_EventScript_14ED94:: @ 814ED94 Route103_EventScript_14EDAB:: @ 814EDAB trainerbattle 4, OPPONENT_AMY_AND_LIV_1, 0, Route103_Text_1B7DF7, Route103_Text_1B7E3B, Route103_Text_1B7EAC - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route103_EventScript_14EDD6 msgbox Route103_Text_1B7E50, 6 @@ -186,7 +186,7 @@ Route103_EventScript_14EDD6:: @ 814EDD6 Route103_EventScript_14EDF1:: @ 814EDF1 trainerbattle 4, OPPONENT_AMY_AND_LIV_1, 0, Route103_Text_1B7EFB, Route103_Text_1B7F20, Route103_Text_1B7F8E - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route103_EventScript_14EE1C msgbox Route103_Text_1B7F40, 6 @@ -204,7 +204,7 @@ Route103_EventScript_14EE37:: @ 814EE37 Route103_EventScript_14EE4E:: @ 814EE4E trainerbattle 0, OPPONENT_MIGUEL_1, 0, Route103_Text_1B82A9, Route103_Text_1B82EC - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route103_EventScript_14EE75 msgbox Route103_Text_1B830D, 6 diff --git a/data/scripts/maps/Route104.inc b/data/scripts/maps/Route104.inc index b97d92c7d..c90a97531 100644 --- a/data/scripts/maps/Route104.inc +++ b/data/scripts/maps/Route104.inc @@ -409,7 +409,7 @@ Route104_EventScript_14F189:: @ 814F189 Route104_EventScript_14F1A0:: @ 814F1A0 trainerbattle 0, OPPONENT_HALEY_1, 0, Route104_Text_1B8770, Route104_Text_1B87A7 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route104_EventScript_14F1C7 msgbox Route104_Text_1B87C3, 6 @@ -422,7 +422,7 @@ Route104_EventScript_14F1C7:: @ 814F1C7 Route104_EventScript_14F1DE:: @ 814F1DE trainerbattle 0, OPPONENT_WINSTON_1, 0, Route104_Text_1B88D4, Route104_Text_1B8911 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route104_EventScript_14F205 msgbox Route104_Text_1B8925, 6 @@ -435,7 +435,7 @@ Route104_EventScript_14F205:: @ 814F205 Route104_EventScript_14F21C:: @ 814F21C trainerbattle 0, OPPONENT_CINDY_1, 0, Route104_Text_1B8A24, Route104_Text_1B8A61 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route104_EventScript_14F243 msgbox Route104_Text_1B8A69, 6 diff --git a/data/scripts/maps/Route106.inc b/data/scripts/maps/Route106.inc index 2ec903363..ae65c7013 100644 --- a/data/scripts/maps/Route106.inc +++ b/data/scripts/maps/Route106.inc @@ -17,7 +17,7 @@ Route106_EventScript_14F34F:: @ 814F34F Route106_EventScript_14F366:: @ 814F366 trainerbattle 0, OPPONENT_ELLIOT_1, 0, Route106_Text_1B8EF0, Route106_Text_1B8F25 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route106_EventScript_14F38D msgbox Route106_Text_1B8F55, 6 diff --git a/data/scripts/maps/Route107.inc b/data/scripts/maps/Route107.inc index b6973407b..ad2d293fc 100644 --- a/data/scripts/maps/Route107.inc +++ b/data/scripts/maps/Route107.inc @@ -8,7 +8,7 @@ Route107_EventScript_14F3BC:: @ 814F3BC Route107_EventScript_14F3D3:: @ 814F3D3 trainerbattle 0, OPPONENT_TONY_1, 0, Route107_Text_1B933A, Route107_Text_1B9365 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route107_EventScript_14F3FA msgbox Route107_Text_1B938E, 6 diff --git a/data/scripts/maps/Route109.inc b/data/scripts/maps/Route109.inc index f56081097..28bf046a4 100644 --- a/data/scripts/maps/Route109.inc +++ b/data/scripts/maps/Route109.inc @@ -396,7 +396,7 @@ Route109_EventScript_14F7F2:: @ 814F7F2 Route109_EventScript_14F809:: @ 814F809 trainerbattle 0, OPPONENT_RICKY_1, 0, Route109_Text_1B9C23, Route109_Text_1B9C65 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route109_EventScript_14F830 msgbox Route109_Text_1B9C6E, 6 @@ -409,7 +409,7 @@ Route109_EventScript_14F830:: @ 814F830 Route109_EventScript_14F847:: @ 814F847 trainerbattle 0, OPPONENT_LOLA_1, 0, Route109_Text_1B9D54, Route109_Text_1B9D87 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route109_EventScript_14F86E msgbox Route109_Text_1B9D8E, 6 diff --git a/data/scripts/maps/Route110.inc b/data/scripts/maps/Route110.inc index 2b4293ed4..586031a1a 100644 --- a/data/scripts/maps/Route110.inc +++ b/data/scripts/maps/Route110.inc @@ -177,7 +177,7 @@ Route110_EventScript_14FAA5:: @ 814FAA5 Route110_EventScript_14FABC:: @ 814FABC trainerbattle 0, OPPONENT_EDWIN_1, 0, Route110_Text_1BA7D2, Route110_Text_1BA803 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route110_EventScript_14FAE3 msgbox Route110_Text_1BA829, 6 @@ -205,7 +205,7 @@ Route110_EventScript_14FB28:: @ 814FB28 Route110_EventScript_14FB3F:: @ 814FB3F trainerbattle 0, OPPONENT_BENJAMIN_1, 0, Route110_Text_1BA352, Route110_Text_1BA379 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route110_EventScript_14FB66 msgbox Route110_Text_1BA3A5, 6 @@ -223,7 +223,7 @@ Route110_EventScript_14FB7D:: @ 814FB7D Route110_EventScript_14FB94:: @ 814FB94 trainerbattle 0, OPPONENT_ABIGAIL_1, 0, Route110_Text_1BA4A0, Route110_Text_1BA50F - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route110_EventScript_14FBBB msgbox Route110_Text_1BA52E, 6 @@ -236,7 +236,7 @@ Route110_EventScript_14FBBB:: @ 814FBBB Route110_EventScript_14FBD2:: @ 814FBD2 trainerbattle 0, OPPONENT_ISABEL_1, 0, Route110_Text_1BA990, Route110_Text_1BA9D0 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route110_EventScript_14FBF9 msgbox Route110_Text_1BA9E9, 6 diff --git a/data/scripts/maps/Route111.inc b/data/scripts/maps/Route111.inc index aa136559b..5336bd510 100644 --- a/data/scripts/maps/Route111.inc +++ b/data/scripts/maps/Route111.inc @@ -392,7 +392,7 @@ Route111_EventScript_1503EC:: @ 81503EC Route111_EventScript_150403:: @ 8150403 trainerbattle 0, OPPONENT_DUSTY_1, 0, Route111_Text_1BAEC9, Route111_Text_1BAF14 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route111_EventScript_15042A msgbox Route111_Text_1BAF5B, 6 @@ -420,7 +420,7 @@ Route111_EventScript_15046F:: @ 815046F Route111_EventScript_150486:: @ 8150486 trainerbattle 0, OPPONENT_WILTON_1, 0, Route111_Text_1BB2E3, Route111_Text_1BB313 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route111_EventScript_1504AD msgbox Route111_Text_1BB33E, 6 @@ -433,7 +433,7 @@ Route111_EventScript_1504AD:: @ 81504AD Route111_EventScript_1504C4:: @ 81504C4 trainerbattle 0, OPPONENT_BROOKE_1, 0, Route111_Text_1BB44F, Route111_Text_1BB49F - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route111_EventScript_1504EB msgbox Route111_Text_1BB4CE, 6 diff --git a/data/scripts/maps/Route112.inc b/data/scripts/maps/Route112.inc index f38a296e7..83d93f222 100644 --- a/data/scripts/maps/Route112.inc +++ b/data/scripts/maps/Route112.inc @@ -38,7 +38,7 @@ Route112_EventScript_150549:: @ 8150549 Route112_EventScript_150560:: @ 8150560 trainerbattle 0, OPPONENT_TRENT_1, 0, Route112_Text_1BB6A0, Route112_Text_1BB707 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route112_EventScript_150587 msgbox Route112_Text_1BB721, 6 diff --git a/data/scripts/maps/Route113.inc b/data/scripts/maps/Route113.inc index 82f7855e1..1b589fcde 100644 --- a/data/scripts/maps/Route113.inc +++ b/data/scripts/maps/Route113.inc @@ -60,7 +60,7 @@ Route113_EventScript_150652:: @ 8150652 Route113_EventScript_150669:: @ 8150669 trainerbattle 0, OPPONENT_MADELINE_1, 0, Route113_Text_1BBB27, Route113_Text_1BBB7A - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route113_EventScript_150690 msgbox Route113_Text_1BBB9A, 6 @@ -73,7 +73,7 @@ Route113_EventScript_150690:: @ 8150690 Route113_EventScript_1506A7:: @ 81506A7 trainerbattle 0, OPPONENT_LAO_1, 0, Route113_Text_1BBC59, Route113_Text_1BBC90 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route113_EventScript_1506CE msgbox Route113_Text_1BBCAB, 6 diff --git a/data/scripts/maps/Route114.inc b/data/scripts/maps/Route114.inc index 302c162b0..f6bb6d8ba 100644 --- a/data/scripts/maps/Route114.inc +++ b/data/scripts/maps/Route114.inc @@ -87,7 +87,7 @@ Route114_EventScript_150836:: @ 8150836 Route114_EventScript_15084D:: @ 815084D trainerbattle 0, OPPONENT_STEVE_1, 0, Route114_Text_1BC2F5, Route114_Text_1BC327 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route114_EventScript_150874 msgbox Route114_Text_1BC337, 6 @@ -100,7 +100,7 @@ Route114_EventScript_150874:: @ 8150874 Route114_EventScript_15088B:: @ 815088B trainerbattle 0, OPPONENT_BERNIE_1, 0, Route114_Text_1BC45A, Route114_Text_1BC499 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route114_EventScript_1508B2 msgbox Route114_Text_1BC4B5, 6 diff --git a/data/scripts/maps/Route115.inc b/data/scripts/maps/Route115.inc index 8e0eb7855..f16c2088a 100644 --- a/data/scripts/maps/Route115.inc +++ b/data/scripts/maps/Route115.inc @@ -15,7 +15,7 @@ Route115_EventScript_150940:: @ 8150940 Route115_EventScript_150949:: @ 8150949 trainerbattle 0, OPPONENT_TIMOTHY_1, 0, Route115_Text_1BC9AC, Route115_Text_1BC9E6 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route115_EventScript_150970 msgbox Route115_Text_1BCA0E, 6 @@ -33,7 +33,7 @@ Route115_EventScript_150987:: @ 8150987 Route115_EventScript_15099E:: @ 815099E trainerbattle 0, OPPONENT_NOB_1, 0, Route115_Text_1BCB8A, Route115_Text_1BCBC1 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route115_EventScript_1509C5 msgbox Route115_Text_1BCBDE, 6 @@ -46,7 +46,7 @@ Route115_EventScript_1509C5:: @ 81509C5 Route115_EventScript_1509DC:: @ 81509DC trainerbattle 0, OPPONENT_CYNDY_1, 0, Route115_Text_1BCCF4, Route115_Text_1BCD32 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route115_EventScript_150A03 msgbox Route115_Text_1BCD4C, 6 diff --git a/data/scripts/maps/Route116.inc b/data/scripts/maps/Route116.inc index 5fab808bc..4e08705cf 100644 --- a/data/scripts/maps/Route116.inc +++ b/data/scripts/maps/Route116.inc @@ -240,7 +240,7 @@ Route116_EventScript_150C79:: @ 8150C79 Route116_EventScript_150C90:: @ 8150C90 trainerbattle 0, OPPONENT_JERRY_1, 0, Route116_Text_1BD1C0, Route116_Text_1BD21A - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route116_EventScript_150CB7 msgbox Route116_Text_1BD248, 6 @@ -263,7 +263,7 @@ Route116_EventScript_150CE5:: @ 8150CE5 Route116_EventScript_150CFC:: @ 8150CFC trainerbattle 0, OPPONENT_KAREN_1, 0, Route116_Text_1BD377, Route116_Text_1BD3AC - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route116_EventScript_150D23 msgbox Route116_Text_1BD3C3, 6 diff --git a/data/scripts/maps/Route117.inc b/data/scripts/maps/Route117.inc index 44c4c156c..fa648f79e 100644 --- a/data/scripts/maps/Route117.inc +++ b/data/scripts/maps/Route117.inc @@ -40,7 +40,7 @@ Route117_EventScript_150D84:: @ 8150D84 Route117_EventScript_150D8D:: @ 8150D8D trainerbattle 0, OPPONENT_ISAAC_1, 0, Route117_Text_1BD49E, Route117_Text_1BD4D9 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route117_EventScript_150DB4 msgbox Route117_Text_1BD4F9, 6 @@ -53,7 +53,7 @@ Route117_EventScript_150DB4:: @ 8150DB4 Route117_EventScript_150DCB:: @ 8150DCB trainerbattle 0, OPPONENT_LYDIA_1, 0, Route117_Text_1BD634, Route117_Text_1BD67B - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route117_EventScript_150DF2 msgbox Route117_Text_1BD69B, 6 @@ -66,7 +66,7 @@ Route117_EventScript_150DF2:: @ 8150DF2 Route117_EventScript_150E09:: @ 8150E09 trainerbattle 0, OPPONENT_DYLAN_1, 0, Route117_Text_1BD79A, Route117_Text_1BD7E0 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route117_EventScript_150E30 msgbox Route117_Text_1BD7F5, 6 @@ -79,7 +79,7 @@ Route117_EventScript_150E30:: @ 8150E30 Route117_EventScript_150E47:: @ 8150E47 trainerbattle 0, OPPONENT_MARIA_1, 0, Route117_Text_1BD914, Route117_Text_1BD965 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route117_EventScript_150E6E msgbox Route117_Text_1BD98F, 6 @@ -97,7 +97,7 @@ Route117_EventScript_150E85:: @ 8150E85 Route117_EventScript_150E9C:: @ 8150E9C trainerbattle 4, OPPONENT_ANNA_AND_MEG_1, 0, Route117_Text_1BDBC3, Route117_Text_1BDC07, Route117_Text_1BDC96 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route117_EventScript_150EC7 msgbox Route117_Text_1BDC44, 6 @@ -110,7 +110,7 @@ Route117_EventScript_150EC7:: @ 8150EC7 Route117_EventScript_150EE2:: @ 8150EE2 trainerbattle 4, OPPONENT_ANNA_AND_MEG_1, 0, Route117_Text_1BDCD2, Route117_Text_1BDD1E, Route117_Text_1BDD8B - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route117_EventScript_150F0D msgbox Route117_Text_1BDD4E, 6 diff --git a/data/scripts/maps/Route118.inc b/data/scripts/maps/Route118.inc index b34c22a50..63decb5d6 100644 --- a/data/scripts/maps/Route118.inc +++ b/data/scripts/maps/Route118.inc @@ -161,7 +161,7 @@ Route118_Movement_151086:: @ 8151086 Route118_EventScript_15108F:: @ 815108F trainerbattle 0, OPPONENT_ROSE_1, 0, Route118_Text_1BDFF4, Route118_Text_1BE03C - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route118_EventScript_1510B6 msgbox Route118_Text_1BE05E, 6 @@ -184,7 +184,7 @@ Route118_EventScript_1510E4:: @ 81510E4 Route118_EventScript_1510FB:: @ 81510FB trainerbattle 0, OPPONENT_DALTON_1, 0, Route118_Text_1BE3E8, Route118_Text_1BE406 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route118_EventScript_151122 msgbox Route118_Text_1BE413, 6 diff --git a/data/scripts/maps/Route119.inc b/data/scripts/maps/Route119.inc index 95edf346c..e82d7b313 100644 --- a/data/scripts/maps/Route119.inc +++ b/data/scripts/maps/Route119.inc @@ -296,7 +296,7 @@ Route119_EventScript_1514A8:: @ 81514A8 Route119_EventScript_1514BF:: @ 81514BF trainerbattle 0, OPPONENT_JACKSON_1, 0, Route119_Text_1BE8BB, Route119_Text_1BE90E - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route119_EventScript_1514E6 msgbox Route119_Text_1BE937, 6 @@ -309,7 +309,7 @@ Route119_EventScript_1514E6:: @ 81514E6 Route119_EventScript_1514FD:: @ 81514FD trainerbattle 0, OPPONENT_CATHERINE_1, 0, Route119_Text_1BEA3A, Route119_Text_1BEA88 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route119_EventScript_151524 msgbox Route119_Text_1BEAB3, 6 diff --git a/data/scripts/maps/Route120.inc b/data/scripts/maps/Route120.inc index 9e5ff95be..d2866cceb 100644 --- a/data/scripts/maps/Route120.inc +++ b/data/scripts/maps/Route120.inc @@ -292,7 +292,7 @@ Route120_EventScript_1519B3:: @ 81519B3 Route120_EventScript_1519CA:: @ 81519CA trainerbattle 0, OPPONENT_ROBERT_1, 0, Route120_Text_1BF07E, Route120_Text_1BF0A5 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route120_EventScript_1519F1 msgbox Route120_Text_1BF0C3, 6 @@ -315,7 +315,7 @@ Route120_EventScript_151A1F:: @ 8151A1F Route120_EventScript_151A36:: @ 8151A36 trainerbattle 0, OPPONENT_BRANDON_1, 0, Route120_Text_1BF32B, Route120_Text_1BF36B - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route120_EventScript_151A5D msgbox Route120_Text_1BF38D, 6 diff --git a/data/scripts/maps/Route121.inc b/data/scripts/maps/Route121.inc index d1f153117..6108b129d 100644 --- a/data/scripts/maps/Route121.inc +++ b/data/scripts/maps/Route121.inc @@ -73,7 +73,7 @@ Route121_EventScript_151B72:: @ 8151B72 Route121_EventScript_151B89:: @ 8151B89 trainerbattle 0, OPPONENT_WALTER_1, 0, Route121_Text_1BFA1B, Route121_Text_1BFA8C - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route121_EventScript_151BB0 msgbox Route121_Text_1BFA9D, 6 @@ -101,7 +101,7 @@ Route121_EventScript_151BF9:: @ 8151BF9 Route121_EventScript_151C14:: @ 8151C14 trainerbattle 0, OPPONENT_JESSICA_1, 0, Route121_Text_1BFE51, Route121_Text_1BFE80 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route121_EventScript_151C3B msgbox Route121_Text_1BFEAE, 6 diff --git a/data/scripts/maps/Route123.inc b/data/scripts/maps/Route123.inc index adfebfe08..a25c306cc 100644 --- a/data/scripts/maps/Route123.inc +++ b/data/scripts/maps/Route123.inc @@ -62,7 +62,7 @@ Route123_EventScript_151CFF:: @ 8151CFF Route123_EventScript_151D16:: @ 8151D16 trainerbattle 0, OPPONENT_CAMERON_1, 0, Route123_Text_1C013F, Route123_Text_1C01A3 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route123_EventScript_151D3D msgbox Route123_Text_1C01B1, 6 @@ -75,7 +75,7 @@ Route123_EventScript_151D3D:: @ 8151D3D Route123_EventScript_151D54:: @ 8151D54 trainerbattle 0, OPPONENT_JACKI_1, 0, Route123_Text_1C028C, Route123_Text_1C0303 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route123_EventScript_151D7B msgbox Route123_Text_1C030F, 6 diff --git a/data/scripts/maps/Route124.inc b/data/scripts/maps/Route124.inc index 3e062bfdc..289ea2d29 100644 --- a/data/scripts/maps/Route124.inc +++ b/data/scripts/maps/Route124.inc @@ -23,7 +23,7 @@ Route124_EventScript_151E0F:: @ 8151E0F Route124_EventScript_151E26:: @ 8151E26 trainerbattle 0, OPPONENT_JENNY_1, 0, Route124_Text_1C07B4, Route124_Text_1C07F9 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route124_EventScript_151E4D msgbox Route124_Text_1C080E, 6 @@ -46,7 +46,7 @@ Route124_EventScript_151E7B:: @ 8151E7B Route124_EventScript_151E92:: @ 8151E92 trainerbattle 4, OPPONENT_RITA_AND_SAM_1, 0, Route124_Text_1C0ABD, Route124_Text_1C0B36, Route124_Text_1C0BC8 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route124_EventScript_151EBD msgbox Route124_Text_1C0B72, 6 @@ -59,7 +59,7 @@ Route124_EventScript_151EBD:: @ 8151EBD Route124_EventScript_151ED8:: @ 8151ED8 trainerbattle 4, OPPONENT_RITA_AND_SAM_1, 0, Route124_Text_1C0C0E, Route124_Text_1C0C4F, Route124_Text_1C0CE0 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route124_EventScript_151F03 msgbox Route124_Text_1C0C7F, 6 diff --git a/data/scripts/maps/Route125.inc b/data/scripts/maps/Route125.inc index ea24434e2..58bf75c51 100644 --- a/data/scripts/maps/Route125.inc +++ b/data/scripts/maps/Route125.inc @@ -29,7 +29,7 @@ Route125_EventScript_151F73:: @ 8151F73 Route125_EventScript_151F8A:: @ 8151F8A trainerbattle 0, OPPONENT_ERNEST_1, 0, Route125_Text_1C11AF, Route125_Text_1C11ED - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route125_EventScript_151FB1 msgbox Route125_Text_1C1208, 6 diff --git a/data/scripts/maps/Route128.inc b/data/scripts/maps/Route128.inc index 7a08d0acb..a97a1e93f 100644 --- a/data/scripts/maps/Route128.inc +++ b/data/scripts/maps/Route128.inc @@ -182,7 +182,7 @@ Route128_Movement_1522A1:: @ 81522A1 Route128_EventScript_1522A4:: @ 81522A4 trainerbattle 0, OPPONENT_ISAIAH_1, 0, Route128_Text_1C1C67, Route128_Text_1C1C95 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route128_EventScript_1522CB msgbox Route128_Text_1C1CC3, 6 @@ -195,7 +195,7 @@ Route128_EventScript_1522CB:: @ 81522CB Route128_EventScript_1522E2:: @ 81522E2 trainerbattle 0, OPPONENT_KATELYN_1, 0, Route128_Text_1C1DB0, Route128_Text_1C1E25 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq Route128_EventScript_152309 msgbox Route128_Text_1C1E4A, 6 diff --git a/data/scripts/maps/RustboroCity_House1.inc b/data/scripts/maps/RustboroCity_House1.inc index cf91c31bd..2e0d106bb 100644 --- a/data/scripts/maps/RustboroCity_House1.inc +++ b/data/scripts/maps/RustboroCity_House1.inc @@ -8,25 +8,25 @@ RustboroCity_House1_EventScript_157C7D:: @ 8157C7D goto_if_eq RustboroCity_House1_EventScript_157D13 setvar VAR_SPECIAL_8, 0 copyvar VAR_SPECIAL_4, VAR_SPECIAL_8 - specialvar RESULT, sub_804D89C + specialvar RESULT, GetInGameTradeSpeciesInfo copyvar VAR_SPECIAL_9, RESULT msgbox RustboroCity_House1_Text_184EBA, 5 compare RESULT, 0 goto_if_eq RustboroCity_House1_EventScript_157CFB - special sub_80F9A0C + special SelectMonForNPCTrade waitstate copyvar VAR_SPECIAL_A, VAR_SPECIAL_4 compare VAR_SPECIAL_4, 255 goto_if_eq RustboroCity_House1_EventScript_157CFB copyvar VAR_SPECIAL_5, VAR_SPECIAL_A - specialvar RESULT, sub_804DB2C + specialvar RESULT, GetTradeSpecies copyvar VAR_SPECIAL_B, RESULT compare RESULT, VAR_SPECIAL_9 goto_if 5, RustboroCity_House1_EventScript_157D05 copyvar VAR_SPECIAL_4, VAR_SPECIAL_8 copyvar VAR_SPECIAL_5, VAR_SPECIAL_A - special sub_804DB68 - special sub_804E174 + special CreateInGameTradePokemon + special DoInGameTradeScene waitstate msgbox RustboroCity_House1_Text_184F6B, 4 setflag FLAG_RUSTBORO_NPC_TRADE_COMPLETED diff --git a/data/scripts/maps/SlateportCity_ContestLobby.inc b/data/scripts/maps/SlateportCity_ContestLobby.inc index 72528a929..2fd62e9af 100644 --- a/data/scripts/maps/SlateportCity_ContestLobby.inc +++ b/data/scripts/maps/SlateportCity_ContestLobby.inc @@ -11,7 +11,7 @@ SlateportCity_ContestLobby_EventScript_15541D:: @ 815541D setvar CONTEST_RANK, 2 call SlateportCity_ContestLobby_EventScript_1A4E92 call SlateportCity_ContestLobby_EventScript_155448 - special sub_80C4BF0 + special SetContestTrainerGfxIds call SlateportCity_ContestLobby_EventScript_15FBDB setvar VAR_CONTEST_LOCATION, 3 warp MAP_LINK_CONTEST_ROOM1, 255, 7, 5 diff --git a/data/scripts/maps/SlateportCity_House1.inc b/data/scripts/maps/SlateportCity_House1.inc index e760beab5..aa1157d7e 100644 --- a/data/scripts/maps/SlateportCity_House1.inc +++ b/data/scripts/maps/SlateportCity_House1.inc @@ -13,7 +13,7 @@ SlateportCity_House1_EventScript_15567B:: @ 815567B SlateportCity_House1_EventScript_15569C:: @ 815569C msgbox SlateportCity_House1_Text_17D4DB, 4 - special sub_80F9A0C + special SelectMonForNPCTrade waitstate compare VAR_SPECIAL_4, 255 goto_if 5, SlateportCity_House1_EventScript_1556C9 @@ -30,12 +30,12 @@ SlateportCity_House1_EventScript_1556C9:: @ 81556C9 specialvar RESULT, ScriptGetPartyMonSpecies compare RESULT, SPECIES_EGG goto_if_eq SlateportCity_House1_EventScript_15571C - special sub_80BFAE0 - special sub_80BFB10 + special TV_CopyNicknameToStringVar1AndEnsureTerminated + special TV_CheckMonOTIDEqualsPlayerID compare RESULT, 1 goto_if_eq SlateportCity_House1_EventScript_155726 - specialvar RESULT, sub_810F96C - special sub_80BFAE0 + specialvar RESULT, MonOTNameMatchesPlayer + special TV_CopyNicknameToStringVar1AndEnsureTerminated compare RESULT, 1 goto_if_eq SlateportCity_House1_EventScript_155726 msgbox SlateportCity_House1_Text_17D505, 5 @@ -58,8 +58,8 @@ SlateportCity_House1_EventScript_155726:: @ 8155726 SlateportCity_House1_EventScript_155730:: @ 8155730 msgbox SlateportCity_House1_Text_17D580, 4 call SlateportCity_House1_EventScript_1A0678 - specialvar RESULT, sub_80BF9B4 - special sub_80BFAE0 + specialvar RESULT, TV_PutNameRaterShowOnTheAirIfNicnkameChanged + special TV_CopyNicknameToStringVar1AndEnsureTerminated compare RESULT, 1 goto_if_eq SlateportCity_House1_EventScript_15575A msgbox SlateportCity_House1_Text_17D63A, 4 diff --git a/data/scripts/maps/SootopolisCity_Gym_1F.inc b/data/scripts/maps/SootopolisCity_Gym_1F.inc index 9f2d6c35b..38514b03b 100644 --- a/data/scripts/maps/SootopolisCity_Gym_1F.inc +++ b/data/scripts/maps/SootopolisCity_Gym_1F.inc @@ -15,7 +15,7 @@ SootopolisCity_Gym_1F_MapScript1_15AF22:: @ 815AF22 SootopolisCity_Gym_1F_MapScript1_15AF25:: @ 815AF25 call SootopolisCity_Gym_1F_EventScript_15AF2E - special sub_8069D78 + special SetSootopolisGymCrackedIceMetatiles end SootopolisCity_Gym_1F_EventScript_15AF2E:: @ 815AF2E diff --git a/data/scripts/maps/SootopolisCity_House8.inc b/data/scripts/maps/SootopolisCity_House8.inc index 6a72ec1da..91dd3490b 100644 --- a/data/scripts/maps/SootopolisCity_House8.inc +++ b/data/scripts/maps/SootopolisCity_House8.inc @@ -6,7 +6,7 @@ SootopolisCity_House8_EventScript_15B401:: @ 815B401 lock faceplayer msgbox SootopolisCity_House8_Text_1900F7, 4 - special sub_80F9A0C + special SelectMonForNPCTrade waitstate copyvar RESULT, VAR_SPECIAL_4 compare RESULT, 255 @@ -55,7 +55,7 @@ SootopolisCity_House8_EventScript_15B492:: @ 815B492 lock faceplayer msgbox SootopolisCity_House8_Text_190431, 4 - special sub_80F9A0C + special SelectMonForNPCTrade waitstate copyvar RESULT, VAR_SPECIAL_4 compare RESULT, 255 diff --git a/data/scripts/maps/VerdanturfTown_ContestLobby.inc b/data/scripts/maps/VerdanturfTown_ContestLobby.inc index 568d9b207..016b2e7ba 100644 --- a/data/scripts/maps/VerdanturfTown_ContestLobby.inc +++ b/data/scripts/maps/VerdanturfTown_ContestLobby.inc @@ -11,7 +11,7 @@ VerdanturfTown_ContestLobby_EventScript_153D76:: @ 8153D76 setvar CONTEST_RANK, 0 call VerdanturfTown_ContestLobby_EventScript_1A4E92 call VerdanturfTown_ContestLobby_EventScript_153DA1 - special sub_80C4BF0 + special SetContestTrainerGfxIds call VerdanturfTown_ContestLobby_EventScript_15FBDB setvar VAR_CONTEST_LOCATION, 1 warp MAP_LINK_CONTEST_ROOM1, 255, 7, 5 diff --git a/data/scripts/maps/VictoryRoad_1F.inc b/data/scripts/maps/VictoryRoad_1F.inc index a206d5531..ed0440343 100644 --- a/data/scripts/maps/VictoryRoad_1F.inc +++ b/data/scripts/maps/VictoryRoad_1F.inc @@ -93,7 +93,7 @@ VictoryRoad_1F_EventScript_15DF28:: @ 815DF28 VictoryRoad_1F_EventScript_15DF31:: @ 815DF31 trainerbattle 0, OPPONENT_WALLY_3, 0, VictoryRoad_1F_Text_1979BA, VictoryRoad_1F_Text_197A23 - specialvar RESULT, sub_8082C68 + specialvar RESULT, ShouldTryRematchBattle compare RESULT, 1 goto_if_eq VictoryRoad_1F_EventScript_15DF58 msgbox VictoryRoad_1F_Text_197A47, 6 diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc index 4a659f469..eb12ab148 100644 --- a/data/scripts/pokeblocks.inc +++ b/data/scripts/pokeblocks.inc @@ -53,7 +53,7 @@ FallarborTown_ContestLobby_EventScript_1B76A1:: @ 81B76A1 compare RESULT, 0 goto_if_eq FallarborTown_ContestLobby_EventScript_1B770E msgbox FallarborTown_ContestLobby_Text_1B6E9D, 4 - specialvar RESULT, sub_810CA00 + specialvar RESULT, GetFirstFreePokeblockSlot compare RESULT, 65535 goto_if 5, FallarborTown_ContestLobby_EventScript_1B76EF compare RESULT, 65535 @@ -94,7 +94,7 @@ FallarborTown_ContestLobby_EventScript_1B7734:: @ 81B7734 FallarborTown_ContestLobby_EventScript_1B7742:: @ 81B7742 copyvar VAR_SPECIAL_4, VAR_SPECIAL_9 fadescreen 1 - special sub_804E538 + special DoBerryBlending waitstate releaseall end @@ -214,7 +214,7 @@ VerdanturfTown_ContestLobby_EventScript_1B783B:: @ 81B783B checkitem ITEM_POKEBLOCK_CASE, 1 compare RESULT, 0 goto_if_eq FallarborTown_ContestLobby_EventScript_1B7942 - specialvar RESULT, sub_810CA00 + specialvar RESULT, GetFirstFreePokeblockSlot compare RESULT, 65535 goto_if 5, FallarborTown_ContestLobby_EventScript_1B7878 compare RESULT, 65535 @@ -276,7 +276,7 @@ FallarborTown_ContestLobby_EventScript_1B791D:: @ 81B791D removeobject 239 removeobject 238 removeobject 237 - special sub_804E538 + special DoBerryBlending waitstate releaseall end diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index ca48bb41f..5dba65b8a 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -53,7 +53,7 @@ gUnknown_081C346A:: @ 81C346A EventScript_1C348E: fadescreen 1 - special sub_810BAF4 + special OpenPokeblockCaseOnFeeder waitstate compare RESULT, 0xFFFF goto_if 5, EventScript_1C34A0 diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index 4b55e505f..cf82cf943 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -1,7 +1,7 @@ Event_TV:: @ 81A6E72 lockall incrementgamestat GAME_STAT_WATCHED_TV - special sub_80C2014 + special ResetTVShowState specialvar RESULT, CheckForBigMovieOrEmergencyNewsOnTV compare RESULT, 2 goto_if_eq EventScript_1A6F01 @@ -21,11 +21,11 @@ EventScript_1A6EBB: specialvar VAR_SPECIAL_4, special_0x44 compare VAR_SPECIAL_4, 255 goto_if_eq EventScript_1A6F3F - specialvar RESULT, special_0x4a + specialvar RESULT, GetNonMassOutbreakActiveTVShow compare RESULT, 255 goto_if_eq EventScript_1A6F3F copyvar VAR_SPECIAL_4, RESULT - specialvar RESULT, sub_80BDA0C + specialvar RESULT, GetTVShowType compare RESULT, 0 goto_if 5, EventScript_1A6F21 end @@ -77,7 +77,7 @@ EventScript_1A6F3F: end EventScript_1A6F50: - special sub_80BECE8 + special DoPokeNews compare RESULT, 0 goto_if_eq EventScript_1A6EBB waitmessage diff --git a/data/specials.inc b/data/specials.inc index f39af822b..032a3884c 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -64,25 +64,25 @@ gSpecials:: def_special ScrSpecial_HasTrainerBeenFought def_special ScrSpecial_EndTrainerApproach def_special PlayTrainerEncounterMusic - def_special sub_8082C68 + def_special ShouldTryRematchBattle def_special ScrSpecial_GetTrainerEyeRematchFlag def_special ScrSpecial_StartTrainerEyeRematch def_special ShowPokemonStorageSystem def_special CheckForAlivePartyMons def_special TurnOffTVScreen def_special DoTVShow - def_special sub_80BECE8 + def_special DoPokeNews def_special special_0x44 - def_special sub_80BDA0C - def_special sub_80BF2C4 - def_special sub_80BDE48 - def_special sub_80BF544 + def_special GetTVShowType + def_special InterviewBefore + def_special InterviewAfter + def_special LeadMonNicknamed def_special SetContestCategoryStringVarForInterview - def_special special_0x4a - def_special sub_80BF974 + def_special GetNonMassOutbreakActiveTVShow + def_special TV_IsScriptShowKindAlreadyInQueue def_special CheckForBigMovieOrEmergencyNewsOnTV def_special GetMomOrDadStringForTVMessage - def_special sub_80C2014 + def_special ResetTVShowState def_special sub_80C47C0 def_special sub_80C496C def_special sub_80C4C28 @@ -90,7 +90,7 @@ gSpecials:: def_special sub_80C4858 def_special sub_80C4C64 def_special sub_80C4758 - def_special sub_80C4BF0 + def_special SetContestTrainerGfxIds def_special sub_80C43F4 def_special sub_80C4D80 def_special sub_80C4F70 @@ -130,17 +130,17 @@ gSpecials:: def_special CompareShroomishSize def_special GetBarboachSizeRecordInfo def_special CompareBarboachSize - def_special sub_80BF9B4 - def_special sub_80BFAE0 - def_special sub_80BFB10 - def_special sub_80FA5BC - def_special sub_80FA5E4 - def_special sub_80EB83C - def_special sub_80FA648 + def_special TV_PutNameRaterShowOnTheAirIfNicnkameChanged + def_special TV_CopyNicknameToStringVar1AndEnsureTerminated + def_special TV_CheckMonOTIDEqualsPlayerID + def_special BufferTrendyPhraseString + def_special TrendyPhraseIsOld + def_special BufferRandomHobbyOrLifestyleString + def_special GetDewfordHallPaintingNameIndex def_special SwapRegisteredBike def_special CalculatePlayerPartyCount - def_special sub_8095B6C - def_special sub_8095C10 + def_special GetNumValidDaycarePartyMons + def_special CountAlivePartyMonsExceptSelectedOne def_special sub_80C4CF8 def_special sub_80C4CEC def_special sub_80C4C78 @@ -165,29 +165,29 @@ gSpecials:: def_special ScrSpecial_ViewWallClock def_special ScrSpecial_ChooseStarter def_special ScrSpecial_StartWallyTutorialBattle - def_special sub_80BF9F8 - def_special sub_80F9A0C - def_special sub_810CA00 - def_special sub_804E538 + def_special ChangePokemonNickname + def_special SelectMonForNPCTrade + def_special GetFirstFreePokeblockSlot + def_special DoBerryBlending def_special PlayRoulette - def_special sub_810FD60 - def_special sub_810FCB0 - def_special sub_810FDAC + def_special ShouldMoveLilycoveFanClubMember + def_special GetNumMovedLilycoveFanClubMembers + def_special BufferStreakTrainerText def_special sub_810FA74 - def_special sub_810FCE8 + def_special UpdateMovedLilycoveFanClubMembers def_special sub_810FF48 def_special sub_810FAA0 def_special sub_810FF60 def_special ScrSpecial_RockSmashWildEncounter def_special GabbyAndTyGetBattleNum - def_special sub_80BDC14 + def_special GabbyAndTyAfterInterview def_special GabbyAndTyBeforeInterview def_special DoTVShowInSearchOfTrainers def_special IsTVShowInSearchOfTrainersAiring def_special GabbyAndTyGetLastQuote - def_special sub_80BDD18 + def_special GabbyAndTyGetLastBattleTrivia def_special GabbyAndTySetScriptVarsToFieldObjectLocalIds - def_special sub_810E300 + def_special GetBattleOutcome def_special GetDaycareMonNicknames def_special GetDaycareState def_special RejectEggFromDayCare @@ -204,8 +204,8 @@ gSpecials:: def_special EggHatch def_special sub_8042B4C def_special ShowLinkBattleRecords - def_special sub_80B7CE8 - def_special sub_80B7D0C + def_special HasEnoughMoneyFor + def_special PayMoneyFor def_special ExecuteWhiteOut def_special sp0C8_whiteout_maybe def_special RotatingGate_InitPuzzle @@ -215,7 +215,7 @@ gSpecials:: def_special EnterSafariMode def_special ExitSafariMode def_special SafariZoneGetPokeblockNameInFeeder - def_special sub_810BAF4 + def_special OpenPokeblockCaseOnFeeder def_special IsMirageIslandPresent def_special UpdateShoalTideFlag def_special InitBirchState @@ -226,12 +226,12 @@ gSpecials:: def_special SetDepartmentStoreFloorVar def_special DoLotteryCornerComputerEffect def_special EndLotteryCornerComputerEffect - def_special sub_80F9A4C - def_special sub_80F9EEC - def_special sub_80FA0DC + def_special SelectMoveTutorMon + def_special SelectMove + def_special DeleteMonMove def_special ScrSpecial_GetPokemonNicknameAndMoveName def_special ScrSpecial_CountPokemonMoves - def_special sub_8132670 + def_special TeachMoveTutorMove def_special GetRecordedCyclingRoadResults def_special ScrSpecial_BeginCyclingRoadChallenge def_special GetPlayerAvatarBike @@ -243,26 +243,26 @@ gSpecials:: def_special CheckPartyBattleTowerBanlist def_special PrintBattleTowerTrainerGreeting def_special PrintEReaderTrainerGreeting - def_special sub_813556C - def_special sub_8135668 - def_special sub_81358A4 - def_special sub_8135A14 - def_special sub_8135BA0 + def_special StartSpecialBattle + def_special SetBattleTowerProperty + def_special BattleTowerUtil + def_special SetBattleTowerParty + def_special SaveBattleTowerProgress def_special BattleTower_SoftReset def_special DetermineBattleTowerPrize def_special GiveBattleTowerPrize def_special AwardBattleTowerRibbons def_special ChooseBattleTowerPlayerParty def_special ValidateEReaderTrainer - def_special sub_810F404 + def_special GetBestBattleTowerStreak def_special ReducePlayerPartyToThree def_special BedroomPC def_special PlayerPC def_special FieldShowRegionMap - def_special sub_804D89C - def_special sub_804DB68 - def_special sub_804E174 - def_special sub_804DB2C + def_special GetInGameTradeSpeciesInfo + def_special CreateInGameTradePokemon + def_special DoInGameTradeScene + def_special GetTradeSpecies def_special GetWeekCount def_special RetrieveLotteryNumber def_special PickLotteryCornerTicket @@ -280,7 +280,7 @@ gSpecials:: def_special sub_80C7958 def_special DoSoftReset def_special GameClear - def_special sub_810EBEC + def_special ShakeScreenInElevator def_special ShowGlassWorkshopMenu def_special SpawnCameraDummy def_special RemoveCameraDummy @@ -292,31 +292,31 @@ gSpecials:: def_special sub_80818FC def_special ShowBattleTowerRecords def_special WaitWeather - def_special sub_810F414 - def_special sub_810F424 + def_special BufferEReaderTrainerName + def_special GetSlotMachineId def_special player_get_direction_lower_nybble - def_special sub_810F488 - def_special sub_810F4B0 - def_special sub_810F4D4 - def_special sub_810F4FC + def_special FoundAbandonedShipRoom1Key + def_special FoundAbandonedShipRoom2Key + def_special FoundAbandonedShipRoom4Key + def_special FoundAbandonedShipRoom6Key def_special LeadMonHasEffortRibbon def_special GivLeadMonEffortRibbon def_special ScrSpecial_AreLeadMonEVsMaxedOut def_special sub_8064EAC def_special sub_8064ED4 def_special InitRoamer - def_special sub_810F5BC + def_special TryUpdateRusturfTunnelState def_special IsGrassTypeInParty def_special sub_8081334 def_special PutZigzagoonInPlayerParty def_special IsStarterInParty - def_special sub_80BC224 + def_special BufferSecretBaseOwnerName def_special CheckFreePokemonStorageSpace def_special DoSealedChamberShakingEffect1 - def_special sub_810E944 + def_special DisplayCurrentElevatorFloor def_special GetShieldToyTVDecorationInfo def_special IsPokerusInParty - def_special sub_8069D78 + def_special SetSootopolisGymCrackedIceMetatiles def_special sub_810F758 def_special ScrSpecial_StartGroudonKyogreBattle def_special ScrSpecial_StartRayquazaBattle @@ -335,17 +335,17 @@ gSpecials:: def_special SetRoute123Weather def_special ScriptGetMultiplayerId def_special ScriptGetPartyMonSpecies - def_special sub_80FA148 + def_special IsSelectedMonEgg def_special sub_810F8FC - def_special sub_80BC50C + def_special MoveSecretBase def_special LoadPlayerBag def_special sub_8081924 - def_special sub_810F950 - def_special sub_810F908 - def_special sub_8090FC0 - def_special sub_810F96C - def_special sub_810F9AC - def_special sub_813610C + def_special SetPacifidlogTMReceivedDay + def_special GetDaysUntilPacifidlogTMAvailable + def_special CompletedHoennPokedex + def_special MonOTNameMatchesPlayer + def_special BufferLottoTicketNumber + def_special TryEnableBravoTrainerBattleTower def_special GetNameOfEnigmaBerryInPlayerParty def_special ScriptRandom def_special sub_80835D8 diff --git a/include/battle_setup.h b/include/battle_setup.h index 444ab5467..8423a6e6e 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -56,16 +56,15 @@ u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data); void TrainerWantsBattle(u8, u8 *); bool32 GetTrainerFlagFromScriptPointer(u8 *data); -//void sub_8082524(void); //u8 ScrSpecial_GetTrainerBattleMode(void); //u8 ScrSpecial_HasTrainerBeenFought(void); //void sub_808257C(void); //void unref_sub_8082590(void); // unused u8 HasTrainerAlreadyBeenFought(u16); -void trainer_flag_set(u16); -void trainer_flag_clear(u16); +void SetTrainerFlag(u16); +void ClearTrainerFlag(u16); void BattleSetup_StartTrainerBattle(void); -void sub_808260C(void); +void CB2_EndTrainerBattle(void); void do_choose_name_or_words_screen(void); //void ScrSpecial_StartTrainerEyeRematch(void); //void ScrSpecial_ShowTrainerIntroSpeech(void); @@ -74,10 +73,8 @@ u8 *BattleSetup_GetTrainerPostBattleScript(void); //void ScrSpecial_ShowTrainerNonBattlingSpeech(void); //void PlayTrainerEncounterMusic(void); //u8 *SanitizeString(u8 *str); -u8 *sub_808281C(void); -u8 *sub_8082830(void); +u8 *GetTrainerLoseText(void); //u8 *unref_sub_808286C(void); -u8 *sub_8082880(void); //s32 sub_8082894(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //s32 sub_80828B8(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool32 sub_80828FC(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum); @@ -89,14 +86,12 @@ u8 *sub_8082880(void); //void sub_8082AE4(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool8 sub_8082B10(const struct TrainerEyeTrainer *trainers, u16 trainerNum); //bool32 sub_8082B44(void); -void sub_8082B78(void); +void IncrementRematchStepCounter(void); //bool32 sub_8082BA4(void); -void sub_8082BD0(u16, u16); -s32 sub_8082C0C(u16 mapGroup, u16 mapNum); -s32 unref_sub_8082C2C(u16 mapGroup, u16 mapNum); -u16 sub_8082C4C(u16 a1); -//s32 sub_8082C68(void); +void TryUpdateRandomTrainerRematches(u16, u16); +s32 DoesSomeoneWantRematchIn(u16 mapGroup, u16 mapNum); +s32 IsRematchTrainerIn(u16 mapGroup, u16 mapNum); +u16 GetRematchTrainerId(u16 a1); //u8 ScrSpecial_GetTrainerEyeRematchFlag(void); -void sub_8082CB8(void); #endif // GUARD_BATTLE_SETUP_H diff --git a/include/constants/battle_constants.h b/include/constants/battle_constants.h index c61d54f76..f7efb0dfd 100644 --- a/include/constants/battle_constants.h +++ b/include/constants/battle_constants.h @@ -105,6 +105,8 @@ #define BATTLE_TYPE_REGI 0x4000 #define BATTLE_TYPE_LINK_DOUBLE (BATTLE_TYPE_MULTI | BATTLE_TYPE_TRAINER | BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLE) +#define SECRET_BASE_OPPONENT 0x400 + #define BATTLE_WON 0x1 #define BATTLE_LOST 0x2 #define BATTLE_DREW 0x3 diff --git a/include/constants/vars.h b/include/constants/vars.h index 13114e09b..682d45003 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -3,6 +3,8 @@ #define VAR_0x3F20 0x3F20 +#define VARS_START 0x4000 + // temporary vars // The first 0x10 vars are are temporary--they are cleared every time a map is loaded. #define VAR_TEMP_0 0x4000 @@ -60,7 +62,8 @@ #define VAR_ENIGMA_BERRY_AVAILABLE 0x402D #define VAR_DAYS 0x4040 - +#define VAR_FANCLUB_UNKNOWN_1 0x4041 // TODO: document these two fanclub vars +#define VAR_FANCLUB_UNKNOWN_2 0x4042 #define VAR_DEPT_STORE_FLOOR 0x4043 #define VAR_TRICK_HOUSE_ROOMS_COMPLETED 0x4044 #define VAR_LOTTERY_PRIZE 0x4045 diff --git a/include/global.h b/include/global.h index a4e71852c..4ae5de873 100644 --- a/include/global.h +++ b/include/global.h @@ -241,8 +241,8 @@ struct EasyChatPair struct TVShowCommon { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 pad02[20]; /*0x16*/ u16 var16[3]; /*0x1C*/ u8 srcTrainerId3Lo; @@ -257,8 +257,8 @@ struct TVShowCommon struct TVShowFanClubLetter { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 species; /*0x04*/ u16 pad04[6]; /*0x10*/ u8 playerName[8]; @@ -267,8 +267,8 @@ struct TVShowFanClubLetter struct TVShowRecentHappenings { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 var02; /*0x04*/ u16 var04[6]; /*0x10*/ u8 playerName[8]; @@ -278,8 +278,8 @@ struct TVShowRecentHappenings struct TVShowFanclubOpinions { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 var02; /*0x04*/ u8 var04A:4; /*0x04*/ u8 var04B:4; @@ -294,16 +294,16 @@ struct TVShowFanclubOpinions struct TVShowUnknownType04 { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 pad02[4]; /*0x06*/ u16 var06; }; struct TVShowNameRaterShow { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 species; /*0x04*/ u8 pokemonName[11]; /*0x0F*/ u8 trainerName[11]; @@ -316,8 +316,8 @@ struct TVShowNameRaterShow struct TVShowBravoTrainerPokemonProfiles { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 species; /*0x04*/ u16 var04[2]; /*0x08*/ u8 pokemonNickname[11]; @@ -333,8 +333,8 @@ struct TVShowBravoTrainerPokemonProfiles struct TVShowBravoTrainerBattleTowerSpotlight { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 trainerName[8]; /*0x0A*/ u16 species; /*0x0C*/ u8 pokemonName[8]; @@ -349,8 +349,8 @@ struct TVShowBravoTrainerBattleTowerSpotlight struct TVShowPokemonToday { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 language; /*0x03*/ u8 language2; /*0x04*/ u8 nickname[11]; @@ -362,8 +362,8 @@ struct TVShowPokemonToday struct TVShowSmartShopper { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 priceReduced; /*0x03*/ u8 language; /*0x04*/ u8 pad04[2]; @@ -375,8 +375,8 @@ struct TVShowSmartShopper struct TVShowPokemonTodayFailed { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 language; /*0x03*/ u8 pad03[9]; /*0x0c*/ u16 species; @@ -389,8 +389,8 @@ struct TVShowPokemonTodayFailed struct TVShowPokemonAngler { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 var02; /*0x03*/ u8 var03; /*0x04*/ u16 var04; @@ -401,8 +401,8 @@ struct TVShowPokemonAngler struct TVShowWorldOfMasters { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u16 var02; /*0x04*/ u16 var04; /*0x06*/ u16 var06; @@ -415,8 +415,8 @@ struct TVShowWorldOfMasters struct TVShowMassOutbreak { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; + /*0x00*/ u8 kind; + /*0x01*/ bool8 active; /*0x02*/ u8 var02; /*0x03*/ u8 var03; /*0x04*/ u16 moves[4]; @@ -428,7 +428,7 @@ struct TVShowMassOutbreak /*0x13*/ u8 probability; /*0x14*/ u8 level; /*0x15*/ u8 var15; - /*0x16*/ u16 var16; + /*0x16*/ u16 daysLeft; /*0x18*/ u8 language; u8 pad19[11]; }; @@ -524,11 +524,11 @@ union MauvilleMan u8 filler[0x40]; // needed to pad out the struct }; -struct UnknownSaveStruct2ABC +struct PokeNews { - u8 val0; - u8 val1; - u16 val2; + u8 kind; + u8 state; + u16 days; }; struct GabbyAndTyData @@ -671,7 +671,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; /*0x2738*/ TVShow tvShows[25]; - /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; + /*0x2ABC*/ struct PokeNews pokeNews[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; /*0x2AFF*/ u8 outbreakLocationMapGroup; diff --git a/include/learn_move.h b/include/learn_move.h index 85fbf046e..fca236ec9 100644 --- a/include/learn_move.h +++ b/include/learn_move.h @@ -1,6 +1,6 @@ #ifndef GUARD_LEARN_MOVE_H #define GUARD_LEARN_MOVE_H -void sub_8132670(void); +void TeachMoveTutorMove(void); #endif // GUARD_LEARN_MOVE_H diff --git a/include/money.h b/include/money.h index 5a0acd482..9f4ef71bc 100644 --- a/include/money.h +++ b/include/money.h @@ -11,7 +11,7 @@ void sub_80B7B34(u8, u8, int); void UpdateMoneyWindow(u32, u8, u8); void OpenMoneyWindow(u32, u8, u8); void CloseMoneyWindow(u8, u8); -bool8 sub_80B7CE8(void); -void sub_80B7D0C(void); +bool8 HasEnoughMoneyFor(void); +void PayMoneyFor(void); #endif // GUARD_MONEY_H diff --git a/include/pokedex.h b/include/pokedex.h index c47494e1f..d8416889a 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -22,7 +22,7 @@ s8 GetSetPokedexFlag(u16, u8); u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); -bool8 sub_8090FC0(void); +bool8 CompletedHoennPokedex(void); u16 sub_8090FF4(void); #endif // GUARD_POKEDEX_H diff --git a/include/secret_base.h b/include/secret_base.h index abe5d781f..a3fa22c05 100644 --- a/include/secret_base.h +++ b/include/secret_base.h @@ -17,7 +17,7 @@ u8 sub_80BC050(); u8 *GetSecretBaseMapName(u8 *dest); void sub_80BC300(); u8 sub_80BCCA4(u8 secretBaseIndex); -const u8 *sub_80BCCE8(void); +const u8 *GetSecretBaseTrainerLoseText(void); void sub_80BCF1C(u8 taskId); void sub_80BD674(void *playerRecords, u32 size, u8 c); diff --git a/include/trade.h b/include/trade.h index 642bdcd65..46f58a802 100644 --- a/include/trade.h +++ b/include/trade.h @@ -51,14 +51,11 @@ extern const u32 gUnknown_0820CA98[]; extern const u16 gUnknown_0820F798[]; void sub_8047CD8(void); -u16 sub_804DB2C(void); -void sub_804DB68(void); void sub_804E174(void); extern const u8 gOtherText_MaleSymbol3[2]; extern const u8 gOtherText_FemaleSymbol3[2]; extern const u8 gOtherText_GenderlessSymbol[2]; void sub_804E22C(void); -u16 sub_804D89C(void); #endif //POKERUBY_TRADE_H diff --git a/include/tv.h b/include/tv.h index c2158ece0..91b871f71 100644 --- a/include/tv.h +++ b/include/tv.h @@ -43,7 +43,7 @@ void sub_80BEA5C(u16); void sub_80BEA88(void); void sub_80BEA88(void); void sub_80BEB20(void); -int sub_80BEBC8(struct UnknownSaveStruct2ABC *arg0); +int sub_80BEBC8(struct PokeNews *arg0); extern void sub_80BEBF4(void); void sub_80BEC10(u8); bool8 GetPriceReduction(u8); @@ -80,7 +80,7 @@ void sub_80C01D4(void); void sub_80C03A8(u8 showidx); void sub_80C03C8(u16 species, u8 showidx); void sub_80C0408(void); -bool8 sub_80C06E8(struct UnknownSaveStruct2ABC *arg0, struct UnknownSaveStruct2ABC *arg1, s8 arg2); +bool8 sub_80C06E8(struct PokeNews *arg0, struct PokeNews *arg1, s8 arg2); void TVShowConvertInternationalString(u8 *, u8 *, u8); void DoTVShowTheNameRaterShow(void); void DoTVShowPokemonTodaySuccessfulCapture(void); diff --git a/src/battle/battle_message.c b/src/battle/battle_message.c index 6faa3ace3..4ac8c7a6f 100644 --- a/src/battle/battle_message.c +++ b/src/battle/battle_message.c @@ -756,7 +756,7 @@ u32 StrCpyDecodeBattle(const u8* src, u8* dst) toCpy = gSaveBlock2.playerName; break; case 33: // ? - toCpy = sub_8082830(); + toCpy = GetTrainerLoseText(); break; case 34: // ? HANDLE_NICKNAME_STRING_CASE(BATTLE_STRUCT->scriptingActive, BATTLE_STRUCT->unk1605E) diff --git a/src/battle/battle_setup.c b/src/battle/battle_setup.c index 2f94dd407..b4ff407fc 100644 --- a/src/battle/battle_setup.c +++ b/src/battle/battle_setup.c @@ -802,7 +802,7 @@ static u8 GetTrainerBattleTransition(void) u8 enemyLevel; u8 playerLevel; - if (gTrainerBattleOpponent == 1024) // link battle? + if (gTrainerBattleOpponent == SECRET_BASE_OPPONENT) // link battle? return B_TRANSITION_STEVEN; trainer = gTrainers; @@ -915,20 +915,21 @@ static bool32 IsPlayerDefeated(u32 battleOutcome) { switch (battleOutcome) { - case 2: - case 3: + case BATTLE_LOST: + case BATTLE_DREW: return TRUE; - case 1: - case 4: - case 5: - case 6: - case 7: + case BATTLE_WON: + case BATTLE_RAN: + case BATTLE_PLAYER_TELEPORTED: + case BATTLE_POKE_FLED: + case BATTLE_CAUGHT: + return FALSE; + default: return FALSE; } - return FALSE; } -static void sub_80822BC(void) +static void ResetTrainerOpponentIds(void) { sTrainerBattleMode = 0; gTrainerBattleOpponent = 0; @@ -976,7 +977,7 @@ static void TrainerBattleLoadArgs(const struct TrainerBattleParameter *specs, co } } -static void battle_80801F0(void) +static void SetMapVarsToTrainer(void) { if (sTrainerMapObjectLocalId) { @@ -987,7 +988,7 @@ static void battle_80801F0(void) u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) { - sub_80822BC(); + ResetTrainerOpponentIds(); sTrainerBattleMode = TrainerBattleLoadArg8(data); switch (sTrainerBattleMode) @@ -997,31 +998,31 @@ u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) return gUnknown_0819F878; case 4: TrainerBattleLoadArgs(gTrainerBattleSpecs_2, data); - battle_80801F0(); + SetMapVarsToTrainer(); return gUnknown_0819F840; case 1: case 2: TrainerBattleLoadArgs(gTrainerBattleSpecs_1, data); - battle_80801F0(); + SetMapVarsToTrainer(); return gUnknown_0819F818; case 6: case 8: TrainerBattleLoadArgs(gTrainerBattleSpecs_4, data); - battle_80801F0(); + SetMapVarsToTrainer(); return gUnknown_0819F840; case 7: TrainerBattleLoadArgs(gTrainerBattleSpecs_2, data); - battle_80801F0(); - gTrainerBattleOpponent = sub_8082C4C(gTrainerBattleOpponent); + SetMapVarsToTrainer(); + gTrainerBattleOpponent = GetRematchTrainerId(gTrainerBattleOpponent); return gUnknown_0819F8AE; case 5: TrainerBattleLoadArgs(gTrainerBattleSpecs_0, data); - battle_80801F0(); - gTrainerBattleOpponent = sub_8082C4C(gTrainerBattleOpponent); + SetMapVarsToTrainer(); + gTrainerBattleOpponent = GetRematchTrainerId(gTrainerBattleOpponent); return gUnknown_0819F887; default: TrainerBattleLoadArgs(gTrainerBattleSpecs_0, data); - battle_80801F0(); + SetMapVarsToTrainer(); return gUnknown_0819F818; } } @@ -1073,12 +1074,12 @@ u8 HasTrainerAlreadyBeenFought(u16 flag) return FlagGet(TRAINER_FLAG_START + flag); } -void trainer_flag_set(u16 flag) +void SetTrainerFlag(u16 flag) { FlagSet(TRAINER_FLAG_START + flag); } -void trainer_flag_clear(u16 flag) +void ClearTrainerFlag(u16 flag) { FlagClear(TRAINER_FLAG_START + flag); } @@ -1086,14 +1087,14 @@ void trainer_flag_clear(u16 flag) void BattleSetup_StartTrainerBattle(void) { gBattleTypeFlags = BATTLE_TYPE_TRAINER; - gMain.savedCallback = sub_808260C; + gMain.savedCallback = CB2_EndTrainerBattle; StartTheBattle(); ScriptContext1_Stop(); } -void sub_808260C(void) +void CB2_EndTrainerBattle(void) { - if (gTrainerBattleOpponent == 1024) + if (gTrainerBattleOpponent == SECRET_BASE_OPPONENT) { SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); // link battle? } @@ -1110,7 +1111,7 @@ void sub_808260C(void) void CB2_EndTrainerEyeRematchBattle(void) { - if (gTrainerBattleOpponent == 1024) + if (gTrainerBattleOpponent == SECRET_BASE_OPPONENT) { SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); // link battle? } @@ -1231,12 +1232,12 @@ static const u8 *GetTrainerIntroSpeech(void) return SanitizeString(sTrainerIntroSpeech); } -u8 *sub_8082830(void) +u8 *GetTrainerLoseText(void) { const u8 *str; - if (gTrainerBattleOpponent == 1024) - str = sub_80BCCE8(); + if (gTrainerBattleOpponent == SECRET_BASE_OPPONENT) + str = GetSecretBaseTrainerLoseText(); else str = sTrainerDefeatSpeech; @@ -1254,7 +1255,7 @@ static const u8 *GetTrainerNonBattlingSpeech(void) return SanitizeString(sTrainerCannotBattleSpeech); } -s32 sub_8082894(const struct TrainerEyeTrainer *trainers, u16 opponentId) +s32 FirstBattleTrainerIdToRematchTableId(const struct TrainerEyeTrainer *trainers, u16 opponentId) { s32 i; @@ -1266,7 +1267,7 @@ s32 sub_8082894(const struct TrainerEyeTrainer *trainers, u16 opponentId) return -1; } -s32 sub_80828B8(const struct TrainerEyeTrainer *trainers, u16 opponentId) +s32 TrainerIdToRematchTableId(const struct TrainerEyeTrainer *trainers, u16 opponentId) { s32 i; s32 j; @@ -1312,7 +1313,7 @@ bool32 UpdateRandomTrainerEyeRematches(const struct TrainerEyeTrainer *trainers, return ret; } -s32 sub_80829A8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum) +s32 DoesSomeoneWantRematchIn_(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum) { s32 i; @@ -1324,7 +1325,7 @@ s32 sub_80829A8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapN return 0; } -s32 sub_80829E8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum) +s32 IsRematchTrainerIn_(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapNum) { s32 i; @@ -1336,9 +1337,9 @@ s32 sub_80829E8(const struct TrainerEyeTrainer *trainers, u16 mapGroup, u16 mapN return 0; } -bool8 sub_8082A18(const struct TrainerEyeTrainer *trainers, u16 opponentId) +bool8 IsFirstTrainerIdReadyForRematch(const struct TrainerEyeTrainer *trainers, u16 opponentId) { - s32 trainerEyeIndex = sub_8082894(trainers, opponentId); + s32 trainerEyeIndex = FirstBattleTrainerIdToRematchTableId(trainers, opponentId); if (trainerEyeIndex != -1 && trainerEyeIndex < 100 && gSaveBlock1.trainerRematches[trainerEyeIndex]) return TRUE; @@ -1348,7 +1349,7 @@ bool8 sub_8082A18(const struct TrainerEyeTrainer *trainers, u16 opponentId) bool8 GetTrainerEyeRematchFlag(const struct TrainerEyeTrainer *trainers, u16 opponentId) { - s32 trainerEyeIndex = sub_80828B8(trainers, opponentId); + s32 trainerEyeIndex = TrainerIdToRematchTableId(trainers, opponentId); if (trainerEyeIndex != -1 && trainerEyeIndex < 100 && gSaveBlock1.trainerRematches[trainerEyeIndex]) return TRUE; @@ -1356,11 +1357,11 @@ bool8 GetTrainerEyeRematchFlag(const struct TrainerEyeTrainer *trainers, u16 opp return FALSE; } -u16 sub_8082A90(const struct TrainerEyeTrainer *trainers, u16 opponentId) +u16 GetRematchTrainerIdFromTable(const struct TrainerEyeTrainer *trainers, u16 opponentId) { int i; const struct TrainerEyeTrainer *trainer; - s32 trainerEyeIndex = sub_8082894(trainers, opponentId); + s32 trainerEyeIndex = FirstBattleTrainerIdToRematchTableId(trainers, opponentId); if (trainerEyeIndex == -1) return 0; @@ -1377,15 +1378,15 @@ u16 sub_8082A90(const struct TrainerEyeTrainer *trainers, u16 opponentId) void ClearTrainerEyeRematchFlag(const struct TrainerEyeTrainer *trainers, u16 opponentId) { - s32 trainerEyeIndex = sub_80828B8(trainers, opponentId); + s32 trainerEyeIndex = TrainerIdToRematchTableId(trainers, opponentId); if (trainerEyeIndex != -1) gSaveBlock1.trainerRematches[trainerEyeIndex] = 0; } -bool8 sub_8082B10(const struct TrainerEyeTrainer *trainers, u16 opponentId) +bool8 WasSecondRematchWon(const struct TrainerEyeTrainer *trainers, u16 opponentId) { - s32 trainerEyeIndex = sub_8082894(trainers, opponentId); + s32 trainerEyeIndex = FirstBattleTrainerIdToRematchTableId(trainers, opponentId); if (trainerEyeIndex != -1 && HasTrainerAlreadyBeenFought(trainers[trainerEyeIndex].opponentIDs[1])) return TRUE; @@ -1393,7 +1394,7 @@ bool8 sub_8082B10(const struct TrainerEyeTrainer *trainers, u16 opponentId) return FALSE; } -bool32 sub_8082B44(void) +bool32 HasAtLeastFiveBadges(void) { int badgeCount = 0; u32 i; @@ -1410,9 +1411,9 @@ bool32 sub_8082B44(void) return FALSE; } -void sub_8082B78(void) +void IncrementRematchStepCounter(void) { - if (sub_8082B44()) + if (HasAtLeastFiveBadges()) { if (gSaveBlock1.trainerRematchStepCounter >= TRAINER_REMATCH_STEPS) gSaveBlock1.trainerRematchStepCounter = TRAINER_REMATCH_STEPS; @@ -1421,41 +1422,41 @@ void sub_8082B78(void) } } -bool32 sub_8082BA4(void) +bool32 IsRematchStepCounterMaxed(void) { - if (sub_8082B44() && gSaveBlock1.trainerRematchStepCounter >= TRAINER_REMATCH_STEPS) + if (HasAtLeastFiveBadges() && gSaveBlock1.trainerRematchStepCounter >= TRAINER_REMATCH_STEPS) return TRUE; else return FALSE; } -void sub_8082BD0(u16 mapGroup, u16 mapNum) +void TryUpdateRandomTrainerRematches(u16 mapGroup, u16 mapNum) { - if (sub_8082BA4() && UpdateRandomTrainerEyeRematches(gTrainerEyeTrainers, mapGroup, mapNum) == TRUE) + if (IsRematchStepCounterMaxed() && UpdateRandomTrainerEyeRematches(gTrainerEyeTrainers, mapGroup, mapNum) == TRUE) gSaveBlock1.trainerRematchStepCounter = 0; } -s32 sub_8082C0C(u16 mapGroup, u16 mapNum) +s32 DoesSomeoneWantRematchIn(u16 mapGroup, u16 mapNum) { - return sub_80829A8(gTrainerEyeTrainers, mapGroup, mapNum); + return DoesSomeoneWantRematchIn_(gTrainerEyeTrainers, mapGroup, mapNum); } -s32 unref_sub_8082C2C(u16 mapGroup, u16 mapNum) +s32 IsRematchTrainerIn(u16 mapGroup, u16 mapNum) { - return sub_80829E8(gTrainerEyeTrainers, mapGroup, mapNum); + return IsRematchTrainerIn_(gTrainerEyeTrainers, mapGroup, mapNum); } -u16 sub_8082C4C(u16 opponentId) +u16 GetRematchTrainerId(u16 opponentId) { - return sub_8082A90(gTrainerEyeTrainers, opponentId); + return GetRematchTrainerIdFromTable(gTrainerEyeTrainers, opponentId); } -s32 sub_8082C68(void) +bool8 ShouldTryRematchBattle(void) { - if (sub_8082A18(gTrainerEyeTrainers, gTrainerBattleOpponent)) + if (IsFirstTrainerIdReadyForRematch(gTrainerEyeTrainers, gTrainerBattleOpponent)) return 1; else - return sub_8082B10(gTrainerEyeTrainers, gTrainerBattleOpponent); + return WasSecondRematchWon(gTrainerEyeTrainers, gTrainerBattleOpponent); } u8 ScrSpecial_GetTrainerEyeRematchFlag(void) diff --git a/src/debug/mori_debug_menu.c b/src/debug/mori_debug_menu.c index 2c937bb28..83dba8b73 100644 --- a/src/debug/mori_debug_menu.c +++ b/src/debug/mori_debug_menu.c @@ -136,7 +136,7 @@ u8 MoriDebugMenu_10000Steps(void) u8 MoriDebugMenu_MoveTutor(void) { - sub_8132670(); + TeachMoveTutorMove(); CloseMenu(); return 1; } diff --git a/src/engine/record_mixing.c b/src/engine/record_mixing.c index 997a257f5..c8e2e34d5 100644 --- a/src/engine/record_mixing.c +++ b/src/engine/record_mixing.c @@ -36,7 +36,7 @@ static u8 gUnknown_0300071C[4]; void *recordMixingSecretBases = &gSaveBlock1.secretBases; void *recordMixingTvShows = &gSaveBlock1.tvShows; -void *gUnknown_083D0274 = &gSaveBlock1.unknown_2ABC; +void *gUnknown_083D0274 = &gSaveBlock1.pokeNews; void *gUnknown_083D0278 = &gSaveBlock1.mauvilleMan; void *recordMixingEasyChatPairs = &gSaveBlock1.easyChatPairs; struct RecordMixingDayCareMail *gUnknown_083D0280 = &gUnknown_02038738; diff --git a/src/engine/trade.c b/src/engine/trade.c index 0567b4d2f..0bc589ff4 100644 --- a/src/engine/trade.c +++ b/src/engine/trade.c @@ -5391,7 +5391,7 @@ static void sub_804D80C(struct Sprite *sprite) } } -u16 sub_804D89C(void) +u16 GetInGameTradeSpeciesInfo(void) { const struct InGameTrade *inGameTrade = &gIngameTrades[gSpecialVar_0x8004]; StringCopy(gStringVar1, gSpeciesNames[inGameTrade->playerSpecies]); @@ -5408,7 +5408,7 @@ static void sub_804D8E4(void) StringCopy(gStringVar2, gSpeciesNames[inGameTrade->species]); } -static void sub_804D948(u8 whichPlayerMon, u8 whichInGameTrade) +static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) { const struct InGameTrade *inGameTrade = &gIngameTrades[whichInGameTrade]; u8 level = GetMonData(&gPlayerParty[whichPlayerMon], MON_DATA_LEVEL); @@ -5478,16 +5478,16 @@ static void sub_804DAD4(struct MailStruct *mail, const struct InGameTrade *trade mail->itemId = trade->heldItem; } -u16 sub_804DB2C(void) +u16 GetTradeSpecies(void) { if (GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_IS_EGG)) return SPECIES_NONE; return GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_SPECIES); } -void sub_804DB68(void) +void CreateInGameTradePokemon(void) { - sub_804D948(gSpecialVar_0x8005, gSpecialVar_0x8004); + _CreateInGameTradePokemon(gSpecialVar_0x8005, gSpecialVar_0x8004); } #ifdef NONMATCHING @@ -5670,7 +5670,7 @@ static void sub_804E144(void) UpdatePaletteFade(); } -void sub_804E174(void) +void DoInGameTradeScene(void) { ScriptContext2_Enable(); CreateTask(sub_804E1A0, 10); diff --git a/src/engine/trainer_card.c b/src/engine/trainer_card.c index dcd1197cb..ffa4cbd08 100644 --- a/src/engine/trainer_card.c +++ b/src/engine/trainer_card.c @@ -321,7 +321,7 @@ void sub_8093390(struct TrainerCard *trainerCard) trainerCard->firstHallOfFameC = playTime & 0xFF; trainerCard->hasPokedex = FlagGet(FLAG_SYS_POKEDEX_GET); - trainerCard->var_3 = sub_8090FC0(); + trainerCard->var_3 = CompletedHoennPokedex(); trainerCard->pokedexSeen = GetPokedexSeenCount(); trainerCard->trainerId = (gSaveBlock2.playerTrainerId[1] << 8) | gSaveBlock2.playerTrainerId[0]; diff --git a/src/field/battle_tower.c b/src/field/battle_tower.c index 12337631f..caebc6a7b 100644 --- a/src/field/battle_tower.c +++ b/src/field/battle_tower.c @@ -1608,7 +1608,7 @@ void sub_8135534(u8 taskId) } } -void sub_813556C(void) +void StartSpecialBattle(void) { s32 i; u16 heldItem; @@ -1616,7 +1616,7 @@ void sub_813556C(void) switch (gSpecialVar_0x8004) { - case 0: + case 0: // battle tower battle gBattleTypeFlags = (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_TRAINER); gTrainerBattleOpponent = 0; @@ -1627,7 +1627,7 @@ void sub_813556C(void) transition = BattleSetup_GetBattleTowerBattleTransition(); BattleTransition_StartOnField(transition); break; - case 1: + case 1: // secret base battle for (i = 0; i < PARTY_SIZE; i++) { heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); @@ -1639,7 +1639,7 @@ void sub_813556C(void) transition = BattleSetup_GetBattleTowerBattleTransition(); BattleTransition_StartOnField(transition); break; - case 2: + case 2: // e-reader trainer battle ZeroEnemyPartyMons(); for (i = 0; i < 3; i++) @@ -1658,7 +1658,7 @@ void sub_813556C(void) } } -void sub_8135668(void) +void SetBattleTowerProperty(void) { s32 i; u8 battleTowerLevelType = gSaveBlock2.battleTower.battleTowerLevelType; @@ -1740,7 +1740,7 @@ void sub_8135668(void) } } -void sub_81358A4(void) +void BattleTowerUtil(void) { u8 battleTowerLevelType = gSaveBlock2.battleTower.battleTowerLevelType; @@ -1789,7 +1789,7 @@ void sub_81358A4(void) } } -void sub_8135A14(void) +void SetBattleTowerParty(void) { s32 i; @@ -1954,7 +1954,7 @@ void sub_8135AC4(void) sub_8135A3C(); } -void sub_8135BA0(void) +void SaveBattleTowerProgress(void) { u8 battleTowerLevelType = gSaveBlock2.battleTower.battleTowerLevelType; @@ -2336,7 +2336,7 @@ void PrintEReaderTrainerFarewellMessage(void) } } -void sub_813610C(void) +void TryEnableBravoTrainerBattleTower(void) { s32 i; diff --git a/src/field/dewford_trend.c b/src/field/dewford_trend.c index b67f3a2bd..9afb7a16d 100644 --- a/src/field/dewford_trend.c +++ b/src/field/dewford_trend.c @@ -202,14 +202,14 @@ void sub_80FA4E4(void *a, u32 b, u8 unused) *(dst++) = *(src++); } -void sub_80FA5BC(void) +void BufferTrendyPhraseString(void) { struct EasyChatPair *s = &gSaveBlock1.easyChatPairs[gSpecialVar_0x8004]; ConvertEasyChatWordsToString(gStringVar1, s->words, 2, 1); } -void sub_80FA5E4(void) +void TrendyPhraseIsOld(void) { u16 result = 0; @@ -222,7 +222,7 @@ void sub_80FA5E4(void) gSpecialVar_Result = result; } -void sub_80FA648(void) +void GetDewfordHallPaintingNameIndex(void) { gSpecialVar_Result = (gSaveBlock1.easyChatPairs[0].words[0] + gSaveBlock1.easyChatPairs[0].words[1]) & 7; } diff --git a/src/field/easy_chat.c b/src/field/easy_chat.c index 1dce5863e..94532506f 100644 --- a/src/field/easy_chat.c +++ b/src/field/easy_chat.c @@ -314,7 +314,7 @@ void sub_80EB7C4(void) ShowFieldAutoScrollMessage(gStringVar4); } -void sub_80EB83C(void) +void BufferRandomHobbyOrLifestyleString(void) { u16 group, local2; diff --git a/src/field/event_data.c b/src/field/event_data.c index 86045df15..9d6d2372b 100644 --- a/src/field/event_data.c +++ b/src/field/event_data.c @@ -112,10 +112,10 @@ bool32 CanResetRTC(void) u16 *GetVarPointer(u16 id) { - if (id < 0x4000) + if (id < VARS_START) return NULL; if (id < 0x8000) - return &gSaveBlock1.vars[id - 0x4000]; + return &gSaveBlock1.vars[id - VARS_START]; return gSpecialVars[id - 0x8000]; } diff --git a/src/field/field_control_avatar.c b/src/field/field_control_avatar.c index 947dc3e56..52e66f16e 100644 --- a/src/field/field_control_avatar.c +++ b/src/field/field_control_avatar.c @@ -493,7 +493,7 @@ bool8 sub_8068870(u16 a) bool8 sub_8068894(void) { - sub_8082B78(); + IncrementRematchStepCounter(); happiness_algorithm_step(); if (overworld_poison_step() == TRUE) { diff --git a/src/field/field_specials.c b/src/field/field_specials.c index 1a4ebe1af..fc6f690a3 100644 --- a/src/field/field_specials.c +++ b/src/field/field_specials.c @@ -688,7 +688,7 @@ void GetRivalSonDaughterString(void) } } -u8 sub_810E300(void) +u8 GetBattleOutcome(void) { return gBattleOutcome; } @@ -958,11 +958,11 @@ void EndLotteryCornerComputerEffect(void) } static void sub_810E874(void); -void sub_810E944(void); +void DisplayCurrentElevatorFloor(void); void sub_810E984(u8); bool8 sub_810EAC8(u8, u8); void sub_810EB90(u8, u8); -void sub_810EBEC(void); +void ShakeScreenInElevator(void); void sub_810EC34(u8); void sub_810EC9C(u8); void sub_810ECB0(void); @@ -1074,11 +1074,11 @@ static void sub_810E874(void) { MenuPrint(gUnknown_083F8380[gUnknown_03000760[i].var0], 1, 2 * i + 1); } - sub_810E944(); + DisplayCurrentElevatorFloor(); CreateTask(sub_810E984, 8); } -void sub_810E944(void) +void DisplayCurrentElevatorFloor(void) { MenuDrawTextWindow(20, 0, 29, 5); sub_8072BD8(gOtherText_NowOn, 21, 1, 64); @@ -1116,7 +1116,7 @@ void sub_810E984(u8 taskId) { gSpecialVar_Result = 1; gSpecialVar_0x8005 = gUnknown_0203925B; - sub_810EBEC(); + ShakeScreenInElevator(); FieldObjectTurnByLocalIdAndMap(gSpecialVar_LastTalked, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup, DIR_SOUTH); sub_810EEDC(); MenuZeroFillScreen(); @@ -1300,7 +1300,7 @@ void sub_810EB90(u8 newPos, u8 maxItems) } } -void sub_810EBEC(void) +void ShakeScreenInElevator(void) { u8 taskId = CreateTask(sub_810EC34, 9); gTasks[taskId].data[0] = 1; @@ -1779,12 +1779,12 @@ void GetSecretBaseNearbyMapName(void) GetMapSectionName(gStringVar1, VarGet(VAR_SECRET_BASE_MAP), 0); } -u16 sub_810F404(void) +u16 GetBestBattleTowerStreak(void) { return GetGameStat(GAME_STAT_BATTLE_TOWER_BEST_STREAK); } -void sub_810F414(void) +void BufferEReaderTrainerName(void) { SetEReaderTrainerName(gStringVar1); } @@ -1793,7 +1793,7 @@ const u8 gUnknown_083F83E0[] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6}; const u8 gUnknown_083F83EC[] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5}; const u8 gUnknown_083F83F8[] = {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5}; -u8 sub_810F424(void) +u8 GetSlotMachineId(void) { u32 v0 = gSaveBlock1.easyChatPairs[0].unk0_0 + gSaveBlock1.easyChatPairs[0].unk2 + gUnknown_083F83E0[gSpecialVar_0x8004]; if (GetPriceReduction(2)) @@ -1803,10 +1803,10 @@ u8 sub_810F424(void) return gUnknown_083F83EC[v0 % 12]; } -bool8 sub_810F488(void) +bool8 FoundAbandonedShipRoom1Key(void) { u16 *specVar = &gSpecialVar_0x8004; - u16 flag = 0x277; + u16 flag = FLAG_HIDDEN_ITEM_1F; *specVar = flag; if (!FlagGet(flag)) { @@ -1815,10 +1815,10 @@ bool8 sub_810F488(void) return TRUE; } -bool8 sub_810F4B0(void) +bool8 FoundAbandonedShipRoom2Key(void) { u16 *specVar = &gSpecialVar_0x8004; - u16 flag = 0x278; + u16 flag = FLAG_HIDDEN_ITEM_20; *specVar = flag; if (!FlagGet(flag)) { @@ -1827,10 +1827,10 @@ bool8 sub_810F4B0(void) return TRUE; } -bool8 sub_810F4D4(void) +bool8 FoundAbandonedShipRoom4Key(void) { u16 *specVar = &gSpecialVar_0x8004; - u16 flag = 0x279; + u16 flag = FLAG_HIDDEN_ITEM_21; *specVar = flag; if (!FlagGet(flag)) { @@ -1839,10 +1839,10 @@ bool8 sub_810F4D4(void) return TRUE; } -bool8 sub_810F4FC(void) +bool8 FoundAbandonedShipRoom6Key(void) { u16 *specVar = &gSpecialVar_0x8004; - u16 flag = 0x27a; + u16 flag = FLAG_HIDDEN_ITEM_22; *specVar = flag; if (!FlagGet(flag)) { @@ -1874,7 +1874,7 @@ bool8 ScrSpecial_AreLeadMonEVsMaxedOut(void) return FALSE; } -u8 sub_810F5BC(void) +u8 TryUpdateRusturfTunnelState(void) { if (!FlagGet(FLAG_RUSTURF_TUNNEL_OPENED) && gSaveBlock1.location.mapGroup == MAP_GROUP(RUSTURF_TUNNEL) && gSaveBlock1.location.mapNum == MAP_NUM(RUSTURF_TUNNEL)) { @@ -2040,7 +2040,7 @@ void sub_810F8FC(void) sub_805ADDC(6); } -u16 sub_810F908(void) +u16 GetDaysUntilPacifidlogTMAvailable(void) { u16 tmReceivedDay = VarGet(VAR_PACIFIDLOG_TM_RECEIVED_DAY); if (gLocalTime.days - tmReceivedDay >= 7) @@ -2054,13 +2054,13 @@ u16 sub_810F908(void) return 7 - (gLocalTime.days - tmReceivedDay); } -u16 sub_810F950(void) +u16 SetPacifidlogTMReceivedDay(void) { VarSet(VAR_PACIFIDLOG_TM_RECEIVED_DAY, gLocalTime.days); return gLocalTime.days; } -bool8 sub_810F96C(void) +bool8 MonOTNameMatchesPlayer(void) { GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_NAME, gStringVar1); if (!StringCompareWithoutExtCtrlCodes(gSaveBlock2.playerName, gStringVar1)) @@ -2070,7 +2070,7 @@ bool8 sub_810F96C(void) return TRUE; } -void sub_810F9AC(void) +void BufferLottoTicketNumber(void) { if (gSpecialVar_Result >= 10000) { @@ -2109,38 +2109,38 @@ const u8 gUnknown_083F8408[] = {8, 9, 10, 11, 12, 13, 14, 15}; const u8 gUnknown_083F8410[] = {8, 13, 14, 11, 10, 12, 15, 9}; bool8 sub_810FF30(void); -void sub_810FCE8(void); +void UpdateMovedLilycoveFanClubMembers(void); void sub_810FF48(void); void sub_810FD80(void); -u16 sub_810FCB0(void); +u16 GetNumMovedLilycoveFanClubMembers(void); int sub_810FB9C(void); void ResetFanClub(void) { - gSaveBlock1.vars[0x41] = 0; - gSaveBlock1.vars[0x42] = 0; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] = 0; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_2 - VARS_START] = 0; } void sub_810FA74(void) { if (sub_810FF30()) { - sub_810FCE8(); - gSaveBlock1.vars[0x42] = gSaveBlock2.playTimeHours; + UpdateMovedLilycoveFanClubMembers(); + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_2 - VARS_START] = gSaveBlock2.playTimeHours; } } void sub_810FAA0(void) { - if (!((gSaveBlock1.vars[0x41] >> 7) & 1)) + if (!((gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> 7) & 1)) { sub_810FF48(); sub_810FD80(); - gSaveBlock1.vars[0x42] = gSaveBlock2.playTimeHours; - FlagClear(0x315); - FlagClear(0x316); - FlagClear(0x317); - FlagClear(0x318); + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_2 - VARS_START] = gSaveBlock2.playTimeHours; + FlagClear(FLAG_HIDE_FANCLUB_OLD_LADY); + FlagClear(FLAG_HIDE_FANCLUB_BOY); + FlagClear(FLAG_HIDE_FANCLUB_LITTLE_BOY); + FlagClear(FLAG_HIDE_FANCLUB_LADY); VarSet(VAR_LILYCOVE_FAN_CLUB_STATE, 1); } } @@ -2149,24 +2149,24 @@ u8 sub_810FB10(u8 a0) { if (VarGet(VAR_LILYCOVE_FAN_CLUB_STATE) == 2) { - if ((gSaveBlock1.vars[0x41] & 0x7f) + gUnknown_083F8404[a0] >= 20) + if ((gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] & 0x7f) + gUnknown_083F8404[a0] >= 20) { - if (sub_810FCB0() < 3) + if (GetNumMovedLilycoveFanClubMembers() < 3) { sub_810FB9C(); - gSaveBlock1.vars[0x41] &= 0xff80; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] &= 0xff80; } else { - gSaveBlock1.vars[0x41] = (gSaveBlock1.vars[0x41] & 0xff80) | 20; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] = (gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] & 0xff80) | 20; } } else { - gSaveBlock1.vars[0x41] += gUnknown_083F8404[a0]; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] += gUnknown_083F8404[a0]; } } - return gSaveBlock1.vars[0x41] & 0x7f; + return gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] & 0x7f; } int sub_810FB9C(void) @@ -2175,17 +2175,17 @@ int sub_810FB9C(void) int retval = 0; for (i=0; i<8; i++) { - if (!((gSaveBlock1.vars[0x41] >> gUnknown_083F8408[i]) & 0x01)) + if (!((gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> gUnknown_083F8408[i]) & 0x01)) { retval = i; if (Random() & 1) { - gSaveBlock1.vars[0x41] |= (1 << gUnknown_083F8408[i]); + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] |= (1 << gUnknown_083F8408[i]); return retval; } } } - gSaveBlock1.vars[0x41] |= (1 << gUnknown_083F8408[retval]); + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] |= (1 << gUnknown_083F8408[retval]); return retval; } @@ -2193,85 +2193,86 @@ int sub_810FC18(void) { u8 i; int retval = 0; - if (sub_810FCB0() == TRUE) + if (GetNumMovedLilycoveFanClubMembers() == 1) { return 0; } for (i=0; i<8; i++) { - if ((gSaveBlock1.vars[0x41] >> gUnknown_083F8410[i]) & 1) + if ((gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> gUnknown_083F8410[i]) & 1) { retval = i; if (Random() & 1) { - gSaveBlock1.vars[0x41] ^= (1 << gUnknown_083F8410[i]); + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] ^= (1 << gUnknown_083F8410[i]); return retval; } } } - if ((gSaveBlock1.vars[0x41] >> gUnknown_083F8410[retval]) & 1) + if ((gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> gUnknown_083F8410[retval]) & 1) { - gSaveBlock1.vars[0x41] ^= (1 << gUnknown_083F8410[retval]); + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] ^= (1 << gUnknown_083F8410[retval]); } return retval; } -u16 sub_810FCB0(void) +u16 GetNumMovedLilycoveFanClubMembers(void) { u8 i; u8 retval = 0; - for (i=0; i<8; i++) + for (i = 0; i < 8; i++) { - if ((gSaveBlock1.vars[0x41] >> (i + 8)) & 1) + if ((gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> (i + 8)) & 1) { - retval ++; + retval++; } } + return retval; } -void sub_810FCE8(void) +void UpdateMovedLilycoveFanClubMembers(void) { u8 i = 0; if (gSaveBlock2.playTimeHours < 999) { while (1) { - if (sub_810FCB0() < 5) + if (GetNumMovedLilycoveFanClubMembers() < 5) { - gSaveBlock1.vars[0x42] = gSaveBlock2.playTimeHours; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_2 - VARS_START] = gSaveBlock2.playTimeHours; break; } else if (i == 8) { break; } - else if (gSaveBlock2.playTimeHours - gSaveBlock1.vars[0x42] < 12) + else if (gSaveBlock2.playTimeHours - gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_2 - VARS_START] < 12) { return; } sub_810FC18(); - gSaveBlock1.vars[0x42] += 12; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_2 - VARS_START] += 12; i++; } } } -bool8 sub_810FD60(void) +bool8 ShouldMoveLilycoveFanClubMember(void) { - return (gSaveBlock1.vars[0x41] >> gSpecialVar_0x8004) & 0x01; + return (gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> gSpecialVar_0x8004) & 0x01; } void sub_810FD80(void) { - gSaveBlock1.vars[0x41] |= 0x2000; - gSaveBlock1.vars[0x41] |= 0x100; - gSaveBlock1.vars[0x41] |= 0x400; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] |= 0x2000; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] |= 0x100; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] |= 0x400; } void sub_810FE1C(void *, u8, u8); -void sub_810FDAC(void) +void BufferStreakTrainerText(void) { u8 a = 0; u8 b = 0; @@ -2366,12 +2367,12 @@ void sub_810FEFC(void) bool8 sub_810FF30(void) { - return (gSaveBlock1.vars[0x41] >> 7) & 0x01; + return (gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] >> 7) & 0x01; } void sub_810FF48(void) { - gSaveBlock1.vars[0x41] |= 0x80; + gSaveBlock1.vars[VAR_FANCLUB_UNKNOWN_1 - VARS_START] |= 0x80; } u8 sub_810FF60(void) diff --git a/src/field/field_tasks.c b/src/field/field_tasks.c index 393c7d75a..ce5fc6c0e 100644 --- a/src/field/field_tasks.c +++ b/src/field/field_tasks.c @@ -608,14 +608,14 @@ bool32 sub_8069D34(s16 x, s16 y) return FALSE; } -void sub_8069D78(void) +void SetSootopolisGymCrackedIceMetatiles(void) { s32 x, y; s32 width = gMapHeader.mapData->width; s32 height = gMapHeader.mapData->height; - for (x=0; x<width; x++) + for (x = 0; x < width; x++) { - for (y=0; y<height; y++) + for (y = 0; y < height; y++) { if (sub_8069D34(x, y) == TRUE) { diff --git a/src/field/money.c b/src/field/money.c index f277ac905..d0f0ab1f6 100644 --- a/src/field/money.c +++ b/src/field/money.c @@ -291,12 +291,12 @@ void CloseMoneyWindow(u8 x, u8 y) MenuZeroFillWindowRect(x, y, x + 13, y + 3); } -bool8 sub_80B7CE8(void) +bool8 HasEnoughMoneyFor(void) { return IsEnoughMoney(gSaveBlock1.money, gSpecialVar_0x8005); } -void sub_80B7D0C(void) +void PayMoneyFor(void) { RemoveMoney(&gSaveBlock1.money, gSpecialVar_0x8005); } diff --git a/src/field/overworld.c b/src/field/overworld.c index c4d01f907..e239daec7 100644 --- a/src/field/overworld.c +++ b/src/field/overworld.c @@ -600,7 +600,7 @@ void sub_80538F0(u8 mapGroup, u8 mapNum) ClearTempFieldEventData(); ResetCyclingRoadChallengeData(); prev_quest_postbuffer_cursor_backup_reset(); - sub_8082BD0(mapGroup, mapNum); + TryUpdateRandomTrainerRematches(mapGroup, mapNum); DoTimeBasedEvents(); SetSav1WeatherFromCurrMapHeader(); ChooseAmbientCrySpecies(); @@ -635,7 +635,7 @@ void sub_8053994(u32 a1) ClearTempFieldEventData(); ResetCyclingRoadChallengeData(); prev_quest_postbuffer_cursor_backup_reset(); - sub_8082BD0(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum); + TryUpdateRandomTrainerRematches(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum); if (a1 != 1) DoTimeBasedEvents(); SetSav1WeatherFromCurrMapHeader(); diff --git a/src/field/pokeblock.c b/src/field/pokeblock.c index 4a904fbb1..640d4731f 100644 --- a/src/field/pokeblock.c +++ b/src/field/pokeblock.c @@ -426,7 +426,7 @@ void sub_810BADC(void) SetMainCallback2(sub_810B96C); } -void sub_810BAF4(void) +void OpenPokeblockCaseOnFeeder(void) { sub_810BA7C(3); SetMainCallback2(sub_810B96C); @@ -1041,7 +1041,7 @@ u8 sub_810C9E8(struct Pokeblock *pokeblock) return feel; } -s8 sub_810CA00(void) +s8 GetFirstFreePokeblockSlot(void) { u8 i; for (i=0; i<ARRAY_COUNT(gSaveBlock1.pokeblocks); i++) @@ -1056,7 +1056,7 @@ s8 sub_810CA00(void) bool8 sub_810CA34(struct Pokeblock *pokeblock) { - s8 idx = sub_810CA00(); + s8 idx = GetFirstFreePokeblockSlot(); if (idx == -1) { return FALSE; diff --git a/src/field/scrcmd.c b/src/field/scrcmd.c index d5fc56e8d..05a909e81 100644 --- a/src/field/scrcmd.c +++ b/src/field/scrcmd.c @@ -1722,7 +1722,7 @@ bool8 ScrCmd_settrainerflag(struct ScriptContext *ctx) { u16 index = VarGet(ScriptReadHalfword(ctx)); - trainer_flag_set(index); + SetTrainerFlag(index); return FALSE; } @@ -1730,7 +1730,7 @@ bool8 ScrCmd_cleartrainerflag(struct ScriptContext *ctx) { u16 index = VarGet(ScriptReadHalfword(ctx)); - trainer_flag_clear(index); + ClearTrainerFlag(index); return FALSE; } diff --git a/src/field/secret_base.c b/src/field/secret_base.c index 400074604..2e4138a3b 100644 --- a/src/field/secret_base.c +++ b/src/field/secret_base.c @@ -575,7 +575,7 @@ u8 *GetSecretBaseMapName(u8 *dest) { return sub_80BC190(dest, VarGet(VAR_CURRENT_SECRET_BASE)); } -void sub_80BC224(void) { +void BufferSecretBaseOwnerName(void) { u8 *var0 = gSaveBlock1.secretBases[(u8)VarGet(VAR_CURRENT_SECRET_BASE)].playerName; u8 *var1 = gStringVar1; u8 var2 = sub_80BB8A8(var0); @@ -830,7 +830,7 @@ void sub_80BC474(void) } } -void sub_80BC50C(void) +void MoveSecretBase(void) { u16 backupValue; sub_80BC474(); @@ -1197,7 +1197,7 @@ u8 sub_80BCCA4(u8 secretBaseIndex) + gSaveBlock1.secretBases[secretBaseIndex].gender * 5; } -const u8 *sub_80BCCE8(void) +const u8 *GetSecretBaseTrainerLoseText(void) { u8 param = sub_80BCCA4(VarGet(VAR_CURRENT_SECRET_BASE)); if (param == 0) return UnknownString_81A1BB2; diff --git a/src/field/tv.c b/src/field/tv.c index c38da1f4c..d7a75a709 100644 --- a/src/field/tv.c +++ b/src/field/tv.c @@ -80,7 +80,7 @@ extern u16 gLastUsedItem; static EWRAM_DATA u16 gUnknown_020387E0 = 0; static EWRAM_DATA u16 gUnknown_020387E2 = 0; static EWRAM_DATA u8 gUnknown_020387E4 = 0; -static EWRAM_DATA ALIGNED(4) u8 gUnknown_020387E8 = 0; // why is this aligned to a 4-byte boundary? +static EWRAM_DATA ALIGNED(4) u8 sTVShowState = 0; // why is this aligned to a 4-byte boundary? static u8 gUnknown_03000720; static u8 gUnknown_03000721; @@ -436,8 +436,8 @@ void ClearTVShowData(void) u8 showidx; u8 extradataidx; for (showidx=0; showidx<25; showidx++) { - gSaveBlock1.tvShows[showidx].common.var00 = 0; - gSaveBlock1.tvShows[showidx].common.var01 = 0; + gSaveBlock1.tvShows[showidx].common.kind = 0; + gSaveBlock1.tvShows[showidx].common.active = 0; for (extradataidx=0; extradataidx<34; extradataidx++) { gSaveBlock1.tvShows[showidx].common.pad02[extradataidx] = 0; } @@ -452,20 +452,20 @@ extern u8 gSpecialVar_ContestRank; extern u8 gUnknown_03004316[11]; extern u8 gBattleOutcome; -void sub_80BF334(void); -void sub_80BF3A4(void); -void sub_80BF3DC(void); -void sub_80BF46C(void); -void sub_80BF478(void); -void sub_80BF484(void); -void sub_80BF4BC(void); +void InterviewBefore_FanClubLetter(void); +void InterviewBefore_RecentHappenings(void); +void InterviewBefore_PkmnFanClubOpinions(void); +void InterviewBefore_Dummy(void); +void InterviewBefore_NameRater(void); +void InterviewBefore_BravoTrainerPkmnProfile(void); +void InterviewBefore_BravoTrainerBTProfile(void); void sub_80BE028(void); void sub_80BE074(void); void sub_80BE778(void); void sub_80BEB20(void); -u8 sub_80BFB54(u8); +u8 GetTVChannelByShowType(u8); s8 sub_80BF74C(TVShow tvShow[]); @@ -476,53 +476,62 @@ void sub_80BE138(TVShow *show); void sub_80BE160(TVShow *show); extern u16 gLastUsedItem; -void sub_80BE5FC(void); -void sub_80BE65C(void); -void sub_80BE6A0(void); -void nullsub_21(void); -void sub_80BE188(void); -void sub_80BE320(void); +void InterviewAfter_FanClubLetter(void); +void InterviewAfter_RecentHappenings(void); +void InterviewAfter_PkmnFanClubOpinions(void); +void InterviewAfter_DummyShow4(void); +void InterviewAfter_BravoTrainerPokemonProfile(void); +void InterviewAfter_BravoTrainerBattleTowerProfile(void); u8 special_0x44(void) { u8 i; u8 j; + u8 selIdx; + TVShow *show; -#ifndef NONMATCHING - asm("":::"r5"); -#endif - - for (i = 5; i < 24; i++) + for (i = 5; i < ARRAY_COUNT(gSaveBlock1.tvShows) - 1; i++) { - if (gSaveBlock1.tvShows[i].common.var00 == 0) + if (gSaveBlock1.tvShows[i].common.kind == 0) + { break; + } } - i = Random() % i; - j = i; + + j = Random() % i; + selIdx = j; + do { - if (sub_80BFB54(gSaveBlock1.tvShows[i].common.var00) != 4) + if (GetTVChannelByShowType(gSaveBlock1.tvShows[j].common.kind) != 4) { - if (gSaveBlock1.tvShows[i].common.var01 == 1) - return i; + if (gSaveBlock1.tvShows[j].common.active == TRUE) + { + return j; + } } else { - struct TVShowMassOutbreak *massOutbreak = &gSaveBlock1.tvShows[i].massOutbreak; - - if (massOutbreak->var16 == 0 && massOutbreak->var01 == 1) - return i; + show = &gSaveBlock1.tvShows[j]; + if (show->massOutbreak.daysLeft == 0 && show->massOutbreak.active == TRUE) + { + return j; + } + } + if (j == 0) + { + j = ARRAY_COUNT(gSaveBlock1.tvShows) - 2; } - - if (i == 0) - i = 23; else - i--; - } while (i != j); + { + j--; + } + } while (j != selIdx); + return 0xFF; } -u8 sub_80BDA30(void); +u8 FindNonMassOutbreakActiveTVShow(void); u8 sub_80BD8B8(void) { @@ -530,14 +539,14 @@ u8 sub_80BD8B8(void) if (retval == 0xff) return 0xff; - if (gSaveBlock1.outbreakPokemonSpecies != 0 && gSaveBlock1.tvShows[retval].common.var00 == TVSHOW_MASS_OUTBREAK) - return sub_80BDA30(); + if (gSaveBlock1.outbreakPokemonSpecies != 0 && gSaveBlock1.tvShows[retval].common.kind == TVSHOW_MASS_OUTBREAK) + return FindNonMassOutbreakActiveTVShow(); return retval; } u8 CheckForBigMovieOrEmergencyNewsOnTV(void); void SetTVMetatilesOnMap(int, int, u16); -bool8 sub_80BECA0(void); +bool8 FindAnyTVNewsOnTheAir(void); bool8 IsTVShowInSearchOfTrainersAiring(void); void UpdateTVScreensOnMap(int width, int height) @@ -556,7 +565,7 @@ void UpdateTVScreensOnMap(int width, int height) { SetTVMetatilesOnMap(width, height, 0x3); } - else if (FlagGet(FLAG_SYS_TV_START) && (sub_80BD8B8() != 0xff || sub_80BECA0() != 0xff || IsTVShowInSearchOfTrainersAiring())) + else if (FlagGet(FLAG_SYS_TV_START) && (sub_80BD8B8() != 0xff || FindAnyTVNewsOnTheAir() != 0xff || IsTVShowInSearchOfTrainersAiring())) { FlagClear(FLAG_SYS_TV_WATCH); SetTVMetatilesOnMap(width, height, 0x3); @@ -586,28 +595,28 @@ void TurnOffTVScreen(void) DrawWholeMapView(); } -u8 sub_80BDA0C(void) +u8 GetTVShowType(void) { - return gSaveBlock1.tvShows[gSpecialVar_0x8004].common.var00; + return gSaveBlock1.tvShows[gSpecialVar_0x8004].common.kind; } -u8 sub_80BDA30(void) +u8 FindNonMassOutbreakActiveTVShow(void) { u8 showIdx; for (showIdx=0; showIdx<24; showIdx++) { - if (gSaveBlock1.tvShows[showIdx].common.var00 != 0 && gSaveBlock1.tvShows[showIdx].common.var00 != TVSHOW_MASS_OUTBREAK && gSaveBlock1.tvShows[showIdx].common.var01 == 1) + if (gSaveBlock1.tvShows[showIdx].common.kind != 0 && gSaveBlock1.tvShows[showIdx].common.kind != TVSHOW_MASS_OUTBREAK && gSaveBlock1.tvShows[showIdx].common.active == 1) return showIdx; } return 0xff; } -u8 special_0x4a(void) +u8 GetNonMassOutbreakActiveTVShow(void) { TVShow *tvShow; tvShow = &gSaveBlock1.tvShows[gSpecialVar_0x8004]; - if (tvShow->common.var00 == TVSHOW_MASS_OUTBREAK && gSaveBlock1.outbreakPokemonSpecies) - return sub_80BDA30(); + if (tvShow->common.kind == TVSHOW_MASS_OUTBREAK && gSaveBlock1.outbreakPokemonSpecies) + return FindNonMassOutbreakActiveTVShow(); return gSpecialVar_0x8004; } @@ -677,7 +686,7 @@ void GabbyAndTyBeforeInterview(void) FlagSet(FLAG_TEMP_1); } -void sub_80BDC14(void) +void GabbyAndTyAfterInterview(void) { gSaveBlock1.gabbyAndTyData.valB_0 = gSaveBlock1.gabbyAndTyData.valA_0; gSaveBlock1.gabbyAndTyData.valB_1 = gSaveBlock1.gabbyAndTyData.valA_1; @@ -716,7 +725,7 @@ bool8 GabbyAndTyGetLastQuote(void) return TRUE; } -u8 sub_80BDD18(void) +u8 GabbyAndTyGetLastBattleTrivia(void) { if (!gSaveBlock1.gabbyAndTyData.valB_0) return 1; @@ -768,27 +777,27 @@ void GabbyAndTySetScriptVarsToFieldObjectLocalIds(void) } } -void sub_80BDE48(void) +void InterviewAfter(void) { switch (gSpecialVar_0x8005) { case TVSHOW_FAN_CLUB_LETTER: - sub_80BE5FC(); + InterviewAfter_FanClubLetter(); break; case TVSHOW_RECENT_HAPPENINGS: - sub_80BE65C(); + InterviewAfter_RecentHappenings(); break; case TVSHOW_PKMN_FAN_CLUB_OPINIONS: - sub_80BE6A0(); + InterviewAfter_PkmnFanClubOpinions(); break; case TVSHOW_UNKN_SHOWTYPE_04: - nullsub_21(); + InterviewAfter_DummyShow4(); break; case TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE: - sub_80BE188(); + InterviewAfter_BravoTrainerPokemonProfile(); break; case TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE: - sub_80BE320(); + InterviewAfter_BravoTrainerBattleTowerProfile(); break; } } @@ -832,8 +841,8 @@ void sub_80BDEC8(void) total = 0; pokemonToday = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].pokemonToday; - pokemonToday->var00 = TVSHOW_POKEMON_TODAY_CAUGHT; - pokemonToday->var01 = total; + pokemonToday->kind = TVSHOW_POKEMON_TODAY_CAUGHT; + pokemonToday->active = total; if (gBattleResults.unk5_1 != 0) { total = 1; @@ -866,11 +875,11 @@ void sub_80BE028(void) { struct TVShowWorldOfMasters *worldOfMasters = &gSaveBlock1.tvShows[24].worldOfMasters; - if (worldOfMasters->var00 != TVSHOW_WORLD_OF_MASTERS) + if (worldOfMasters->kind != TVSHOW_WORLD_OF_MASTERS) { sub_80BF55C(gSaveBlock1.tvShows, 24); worldOfMasters->var06 = GetGameStat(GAME_STAT_STEPS); - worldOfMasters->var00 = TVSHOW_WORLD_OF_MASTERS; + worldOfMasters->kind = TVSHOW_WORLD_OF_MASTERS; } worldOfMasters->var02++; worldOfMasters->var04 = gBattleResults.caughtPoke; @@ -898,8 +907,8 @@ void sub_80BE074(void) struct TVShowPokemonTodayFailed *pokemonTodayFailed = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].pokemonTodayFailed; zero = 0; - pokemonTodayFailed->var00 = TVSHOW_POKEMON_TODAY_FAILED; - pokemonTodayFailed->var01 = zero; + pokemonTodayFailed->kind = TVSHOW_POKEMON_TODAY_FAILED; + pokemonTodayFailed->active = zero; pokemonTodayFailed->species = gBattleResults.poke1Species; pokemonTodayFailed->species2 = gBattleResults.lastOpponentSpecies; pokemonTodayFailed->var10 = total; @@ -936,16 +945,16 @@ void sub_80BE160(TVShow *show) show->common.trainerIdHi = playerId >> 8; } -void sub_80BE188(void) +void InterviewAfter_BravoTrainerPokemonProfile(void) { struct TVShowBravoTrainerPokemonProfiles *bravoTrainerSrc = &gSaveBlock1.tvShows[24].bravoTrainer; - if (bravoTrainerSrc->var00 == TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE) + if (bravoTrainerSrc->kind == TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE) { struct TVShowBravoTrainerPokemonProfiles *bravoTrainerNew = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].bravoTrainer; - bravoTrainerNew->var00 = TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE; - bravoTrainerNew->var01 = 1; + bravoTrainerNew->kind = TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE; + bravoTrainerNew->active = 1; bravoTrainerNew->species = bravoTrainerSrc->species; StringCopy(bravoTrainerNew->playerName, gSaveBlock2.playerName); StringCopy(bravoTrainerNew->pokemonNickname, bravoTrainerSrc->pokemonNickname); @@ -965,13 +974,13 @@ void sub_80BE23C(u16 a0) { struct TVShowBravoTrainerPokemonProfiles *bravoTrainer = &gSaveBlock1.tvShows[24].bravoTrainer; - sub_80BF484(); + InterviewBefore_BravoTrainerPkmnProfile(); gUnknown_03005D38.var0 = sub_80BF720(gSaveBlock1.tvShows); if (gUnknown_03005D38.var0 != -1) { sub_80BF55C(gSaveBlock1.tvShows, 24); bravoTrainer->var14 = a0; - bravoTrainer->var00 = TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE; + bravoTrainer->kind = TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE; } } @@ -990,12 +999,12 @@ void sub_80BE284(u8 a0) } } -void sub_80BE320(void) +void InterviewAfter_BravoTrainerBattleTowerProfile(void) { struct TVShowBravoTrainerBattleTowerSpotlight *bravoTrainerTower = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].bravoTrainerTower; - bravoTrainerTower->var00 = TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE; - bravoTrainerTower->var01 = 1; + bravoTrainerTower->kind = TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE; + bravoTrainerTower->active = 1; StringCopy(bravoTrainerTower->trainerName, gSaveBlock2.playerName); StringCopy(bravoTrainerTower->pokemonName, gSaveBlock2.battleTower.defeatedByTrainerName); bravoTrainerTower->species = gSaveBlock2.battleTower.firstMonSpecies; @@ -1027,8 +1036,8 @@ void sub_80BE3BC(void) { struct TVShowSmartShopper *smartShopper = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].smartshopperShow; - smartShopper->var00 = TVSHOW_SMART_SHOPPER; - smartShopper->var01 = rval; + smartShopper->kind = TVSHOW_SMART_SHOPPER; + smartShopper->active = rval; smartShopper->shopLocation = gMapHeader.regionMapSectionId; for (i=0; i<3; i++) { @@ -1046,7 +1055,7 @@ void sub_80BE3BC(void) void sub_80BE478(void) { - sub_80BF478(); + InterviewBefore_NameRater(); if (gSpecialVar_Result == 1) return; @@ -1055,8 +1064,8 @@ void sub_80BE478(void) { struct TVShowNameRaterShow *nameRaterShow = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].nameRaterShow; - nameRaterShow->var00 = TVSHOW_NAME_RATER_SHOW; - nameRaterShow->var01 = 1; + nameRaterShow->kind = TVSHOW_NAME_RATER_SHOW; + nameRaterShow->active = 1; nameRaterShow->species = GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES, NULL); nameRaterShow->random = Random() % 3; nameRaterShow->random2 = Random() % 2; @@ -1089,37 +1098,37 @@ void StartMassOutbreak(void) gSaveBlock1.outbreakUnk5 = 2; } -void sub_80BE5FC(void) +void InterviewAfter_FanClubLetter(void) { struct TVShowFanClubLetter *fanclubLetter = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].fanclubLetter; - fanclubLetter->var00 = TVSHOW_FAN_CLUB_LETTER; - fanclubLetter->var01 = 1; + fanclubLetter->kind = TVSHOW_FAN_CLUB_LETTER; + fanclubLetter->active = 1; StringCopy(fanclubLetter->playerName, gSaveBlock2.playerName); fanclubLetter->species = GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL); sub_80BE160((TVShow *)fanclubLetter); fanclubLetter->language = GAME_LANGUAGE; } -void sub_80BE65C(void) +void InterviewAfter_RecentHappenings(void) { struct TVShowRecentHappenings *recentHappenings = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].recentHappenings; - recentHappenings->var00 = TVSHOW_RECENT_HAPPENINGS; - recentHappenings->var01 = 1; + recentHappenings->kind = TVSHOW_RECENT_HAPPENINGS; + recentHappenings->active = 1; StringCopy(recentHappenings->playerName, gSaveBlock2.playerName); recentHappenings->var02 = 0; sub_80BE160((TVShow *)recentHappenings); recentHappenings->language = GAME_LANGUAGE; } -void sub_80BE6A0(void) +void InterviewAfter_PkmnFanClubOpinions(void) { u8 monIndex; struct TVShowFanclubOpinions *fanclubOpinions = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].fanclubOpinions; - fanclubOpinions->var00 = TVSHOW_PKMN_FAN_CLUB_OPINIONS; - fanclubOpinions->var01 = 1; + fanclubOpinions->kind = TVSHOW_PKMN_FAN_CLUB_OPINIONS; + fanclubOpinions->active = 1; monIndex = GetLeadMonIndex(); fanclubOpinions->var04A = GetMonData(&gPlayerParty[monIndex], MON_DATA_FRIENDSHIP, NULL) / 16; fanclubOpinions->var04B = gSpecialVar_0x8007; @@ -1132,7 +1141,7 @@ void sub_80BE6A0(void) StripExtCtrlCodes(fanclubOpinions->var10); } -void nullsub_21(void) +void InterviewAfter_DummyShow4(void) { } @@ -1144,7 +1153,7 @@ void sub_80BE778(void) for (i = 0; i < 24; i++) { - if (gSaveBlock1.tvShows[i].massOutbreak.var00 == TVSHOW_MASS_OUTBREAK) + if (gSaveBlock1.tvShows[i].massOutbreak.kind == TVSHOW_MASS_OUTBREAK) return; } if (sub_80BF77C(0x147)) @@ -1158,8 +1167,8 @@ void sub_80BE778(void) s32 val2 = gUnknown_03005D38.var0; struct TVShowMassOutbreak *massOutbreak = &gSaveBlock1.tvShows[val2].massOutbreak; - massOutbreak->var00 = TVSHOW_MASS_OUTBREAK; - massOutbreak->var01 = 1; + massOutbreak->kind = TVSHOW_MASS_OUTBREAK; + massOutbreak->active = 1; massOutbreak->level = gPokeOutbreakSpeciesList[val].level; massOutbreak->var02 = 0; massOutbreak->var03 = 0; @@ -1174,7 +1183,7 @@ void sub_80BE778(void) massOutbreak->var12 = 0; massOutbreak->probability = 0x32; massOutbreak->var15 = 0; - massOutbreak->var16 = 0x01; + massOutbreak->daysLeft = 0x01; sub_80BE160((TVShow *)massOutbreak); massOutbreak->language = GAME_LANGUAGE; } @@ -1214,15 +1223,15 @@ void sub_80BE8EC(u16 arg0) { for (showidx=0; showidx<24; showidx++) { - if (gSaveBlock1.tvShows[showidx].massOutbreak.var00 == TVSHOW_MASS_OUTBREAK - && gSaveBlock1.tvShows[showidx].massOutbreak.var01 == 0x01) + if (gSaveBlock1.tvShows[showidx].massOutbreak.kind == TVSHOW_MASS_OUTBREAK + && gSaveBlock1.tvShows[showidx].massOutbreak.active == 0x01) { struct TVShowMassOutbreak *massOutbreak = &gSaveBlock1.tvShows[showidx].massOutbreak; - if (massOutbreak->var16 < arg0) - massOutbreak->var16 = 0; + if (massOutbreak->daysLeft < arg0) + massOutbreak->daysLeft = 0; else - massOutbreak->var16 -= arg0; + massOutbreak->daysLeft -= arg0; break; } } @@ -1272,8 +1281,8 @@ void sub_80BE9D4(void) register u8 zero asm("r1") = 0; asm(""::"r"(zero)); - pokemonAngler->var00 = TVSHOW_FISHING_ADVICE; - pokemonAngler->var01 = zero; + pokemonAngler->kind = TVSHOW_FISHING_ADVICE; + pokemonAngler->active = zero; pokemonAngler->var02 = gUnknown_020387E2 & 0xFF; pokemonAngler->var03 = gUnknown_020387E2 >> 8; pokemonAngler->var04 = gUnknown_020387E0; @@ -1294,7 +1303,7 @@ void sub_80BEA5C(u16 arg0) { struct TVShowWorldOfMasters *worldOfMasters = &gSaveBlock1.tvShows[24].worldOfMasters; - if (worldOfMasters->var00 == TVSHOW_WORLD_OF_MASTERS) + if (worldOfMasters->kind == TVSHOW_WORLD_OF_MASTERS) { if (worldOfMasters->var02 < 20) sub_80BF55C(gSaveBlock1.tvShows, 0x18); @@ -1313,8 +1322,8 @@ void sub_80BEA88(void) { struct TVShowWorldOfMasters *worldOfMastersDst = &gSaveBlock1.tvShows[gUnknown_03005D38.var0].worldOfMasters; - worldOfMastersDst->var00 = TVSHOW_WORLD_OF_MASTERS; - worldOfMastersDst->var01 = 0; + worldOfMastersDst->kind = TVSHOW_WORLD_OF_MASTERS; + worldOfMastersDst->active = 0; worldOfMastersDst->var02 = worldOfMastersSrc->var02; worldOfMastersDst->var06 = GetGameStat(GAME_STAT_STEPS) - worldOfMastersSrc->var06; worldOfMastersDst->var04 = worldOfMastersSrc->var04; @@ -1333,27 +1342,27 @@ void sub_80BEB20(void) if (FlagGet(FLAG_SYS_GAME_CLEAR) != 0) { - gUnknown_03005D38.var0 = sub_80BEBC8(gSaveBlock1.unknown_2ABC); + gUnknown_03005D38.var0 = sub_80BEBC8(gSaveBlock1.pokeNews); if (gUnknown_03005D38.var0 != -1 && sub_80BF77C(0x28f) != 1) { rval = (Random() % 3) + 1; if (sub_80BEE48(rval) != 1) { - gSaveBlock1.unknown_2ABC[gUnknown_03005D38.var0].val0 = rval; - gSaveBlock1.unknown_2ABC[gUnknown_03005D38.var0].val2 = 4; - gSaveBlock1.unknown_2ABC[gUnknown_03005D38.var0].val1 = 1; + gSaveBlock1.pokeNews[gUnknown_03005D38.var0].kind = rval; + gSaveBlock1.pokeNews[gUnknown_03005D38.var0].days = 4; + gSaveBlock1.pokeNews[gUnknown_03005D38.var0].state = 1; } } } } -int sub_80BEBC8(struct UnknownSaveStruct2ABC *arg0) +int sub_80BEBC8(struct PokeNews *pokeNews) { s8 i; for (i = 0; i < 16; i++) { - if (arg0[i].val0 == 0) + if (pokeNews[i].kind == 0) return i; } return -1; @@ -1369,9 +1378,9 @@ void sub_80BEBF4(void) void sub_80BEC10(u8 arg0) { - gSaveBlock1.unknown_2ABC[arg0].val0 = 0; - gSaveBlock1.unknown_2ABC[arg0].val1 = 0; - gSaveBlock1.unknown_2ABC[arg0].val2 = 0; + gSaveBlock1.pokeNews[arg0].kind = 0; + gSaveBlock1.pokeNews[arg0].state = 0; + gSaveBlock1.pokeNews[arg0].days = 0; } void sub_80BEC40(void) @@ -1380,13 +1389,13 @@ void sub_80BEC40(void) for (i = 0; i < 15; i++) { - if (gSaveBlock1.unknown_2ABC[i].val0 == 0) + if (gSaveBlock1.pokeNews[i].kind == 0) { for (j = i + 1; j < 16; j++) { - if (gSaveBlock1.unknown_2ABC[j].val0 != 0) + if (gSaveBlock1.pokeNews[j].kind != 0) { - gSaveBlock1.unknown_2ABC[i] = gSaveBlock1.unknown_2ABC[j]; + gSaveBlock1.pokeNews[i] = gSaveBlock1.pokeNews[j]; sub_80BEC10(j); break; } @@ -1395,43 +1404,43 @@ void sub_80BEC40(void) } } -u8 sub_80BECA0(void) +u8 FindAnyTVNewsOnTheAir(void) { u8 i; for (i = 0; i < 16; i++) { - if (gSaveBlock1.unknown_2ABC[i].val0 != 0 - && gSaveBlock1.unknown_2ABC[i].val1 == 1 - && gSaveBlock1.unknown_2ABC[i].val2 < 3) + if (gSaveBlock1.pokeNews[i].kind != 0 + && gSaveBlock1.pokeNews[i].state == 1 + && gSaveBlock1.pokeNews[i].days < 3) return i; } return 0xFF; } -void sub_80BECE8(void) +void DoPokeNews(void) { - u8 arg0; - arg0 = sub_80BECA0(); - if (arg0 == 0xff) + u8 i; + i = FindAnyTVNewsOnTheAir(); + if (i == 0xff) { gSpecialVar_Result = 0; return; } - if (gSaveBlock1.unknown_2ABC[arg0].val2 == 0) + if (gSaveBlock1.pokeNews[i].days == 0) { - gSaveBlock1.unknown_2ABC[arg0].val1 = 2; + gSaveBlock1.pokeNews[i].state = 2; if (gLocalTime.hours < 20) - ShowFieldMessage(gTVNewsTextGroup2[gSaveBlock1.unknown_2ABC[arg0].val0]); + ShowFieldMessage(gTVNewsTextGroup2[gSaveBlock1.pokeNews[i].kind]); else - ShowFieldMessage(gTVNewsTextGroup3[gSaveBlock1.unknown_2ABC[arg0].val0]); + ShowFieldMessage(gTVNewsTextGroup3[gSaveBlock1.pokeNews[i].kind]); } else { - u16 value = gSaveBlock1.unknown_2ABC[arg0].val2; + u16 value = gSaveBlock1.pokeNews[i].days; ConvertIntToDecimalStringN(gStringVar1, value, 0, 1); - gSaveBlock1.unknown_2ABC[arg0].val1 = 0; - ShowFieldMessage(gTVNewsTextGroup1[gSaveBlock1.unknown_2ABC[arg0].val0]); + gSaveBlock1.pokeNews[i].state = 0; + ShowFieldMessage(gTVNewsTextGroup1[gSaveBlock1.pokeNews[i].kind]); } gSpecialVar_Result = 1; } @@ -1444,9 +1453,9 @@ bool8 GetPriceReduction(u8 arg0) return FALSE; for (i=0; i<16; i++) { - if (gSaveBlock1.unknown_2ABC[i].val0 == arg0) + if (gSaveBlock1.pokeNews[i].kind == arg0) { - if (gSaveBlock1.unknown_2ABC[i].val1 == 2 && IsPriceDiscounted(arg0) != 0) + if (gSaveBlock1.pokeNews[i].state == 2 && IsPriceDiscounted(arg0) != 0) return TRUE; else return FALSE; @@ -1487,7 +1496,7 @@ bool8 sub_80BEE48(u8 arg0) return TRUE; for (i=0; i<16; i++) { - if (gSaveBlock1.unknown_2ABC[i].val0 == arg0) + if (gSaveBlock1.pokeNews[i].kind == arg0) return TRUE; } return FALSE; @@ -1499,17 +1508,17 @@ void sub_80BEE84(u16 var0) for (i=0; i<16; i++) { - if (gSaveBlock1.unknown_2ABC[i].val0) + if (gSaveBlock1.pokeNews[i].kind) { - if (gSaveBlock1.unknown_2ABC[i].val2 < var0) + if (gSaveBlock1.pokeNews[i].days < var0) { sub_80BEC10(i); } else { - if (!gSaveBlock1.unknown_2ABC[i].val1 && FlagGet(FLAG_SYS_GAME_CLEAR) == 1) - gSaveBlock1.unknown_2ABC[i].val1 = 1; - gSaveBlock1.unknown_2ABC[i].val2 -= var0; + if (!gSaveBlock1.pokeNews[i].state && FlagGet(FLAG_SYS_GAME_CLEAR) == 1) + gSaveBlock1.pokeNews[i].state = 1; + gSaveBlock1.pokeNews[i].days -= var0; } } } @@ -1619,7 +1628,7 @@ bool8 sub_80BF1B4(u8 showIdx) for (i = 5; i < 24; i++) { - if (tvShows[i].common.var00 == showIdx) + if (tvShows[i].common.kind == showIdx) { if ((trainerId & 0xFF) == tvShows[i].common.trainerIdLo && ((trainerId >> 8) & 0xFF) == tvShows[i].common.trainerIdHi) return TRUE; @@ -1656,9 +1665,9 @@ void sub_80BF25C(u8 showType) for (i = 0; i < 5; i++) { - if (gSaveBlock1.tvShows[i].common.var00 == showType) + if (gSaveBlock1.tvShows[i].common.kind == showType) { - if(gSaveBlock1.tvShows[i].common.var01 == 1) + if(gSaveBlock1.tvShows[i].common.active == 1) { gSpecialVar_Result = 1; } @@ -1674,36 +1683,36 @@ void sub_80BF25C(u8 showType) sub_80BF6D8(); } -void sub_80BF2C4(void) +void InterviewBefore(void) { - gSpecialVar_Result = 0; + gSpecialVar_Result = FALSE; switch (gSpecialVar_0x8005) { case TVSHOW_FAN_CLUB_LETTER: - sub_80BF334(); + InterviewBefore_FanClubLetter(); break; case TVSHOW_RECENT_HAPPENINGS: - sub_80BF3A4(); + InterviewBefore_RecentHappenings(); break; case TVSHOW_PKMN_FAN_CLUB_OPINIONS: - sub_80BF3DC(); + InterviewBefore_PkmnFanClubOpinions(); break; case TVSHOW_UNKN_SHOWTYPE_04: - sub_80BF46C(); + InterviewBefore_Dummy(); break; case TVSHOW_NAME_RATER_SHOW: - sub_80BF478(); + InterviewBefore_NameRater(); break; case TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE: - sub_80BF484(); + InterviewBefore_BravoTrainerPkmnProfile(); break; case TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE: - sub_80BF4BC(); + InterviewBefore_BravoTrainerBTProfile(); break; } } -void sub_80BF334(void) +void InterviewBefore_FanClubLetter(void) { struct TVShowFanClubLetter *fanclubLetter; @@ -1716,7 +1725,7 @@ void sub_80BF334(void) } } -void sub_80BF3A4(void) +void InterviewBefore_RecentHappenings(void) { struct TVShowRecentHappenings *recentHappenings; @@ -1728,7 +1737,7 @@ void sub_80BF3A4(void) } } -void sub_80BF3DC(void) +void InterviewBefore_PkmnFanClubOpinions(void) { struct TVShowFanclubOpinions *fanclubOpinions; @@ -1743,17 +1752,17 @@ void sub_80BF3DC(void) } } -void sub_80BF46C(void) +void InterviewBefore_Dummy(void) { gSpecialVar_Result = 1; } -void sub_80BF478(void) +void InterviewBefore_NameRater(void) { sub_80BF25C(TVSHOW_NAME_RATER_SHOW); } -void sub_80BF484(void) +void InterviewBefore_BravoTrainerPkmnProfile(void) { struct TVShowBravoTrainerPokemonProfiles *bravoTrainer; @@ -1765,7 +1774,7 @@ void sub_80BF484(void) } } -void sub_80BF4BC(void) +void InterviewBefore_BravoTrainerBTProfile(void) { struct TVShowBravoTrainerBattleTowerSpotlight *bravoTrainerTower; @@ -1778,32 +1787,32 @@ void sub_80BF4BC(void) } #if ENGLISH -u8 sub_80BF4F4(u8 arg0) +u8 NicknameDiffersFromSpeciesName(u8 monIndex) { u32 species; - GetMonData(&gPlayerParty[arg0], MON_DATA_NICKNAME, &gStringVar1); - species = GetMonData(&gPlayerParty[arg0], MON_DATA_SPECIES, NULL); - if (StringCompareWithoutExtCtrlCodes(gSpeciesNames[species], gStringVar1) == FALSE) + GetMonData(&gPlayerParty[monIndex], MON_DATA_NICKNAME, &gStringVar1); + species = GetMonData(&gPlayerParty[monIndex], MON_DATA_SPECIES, NULL); + if (StringCompareWithoutExtCtrlCodes(gSpeciesNames[species], gStringVar1) == 0) return FALSE; return TRUE; } #elif GERMAN -u8 sub_80BF4F4(u8 arg0) +u8 NicknameDiffersFromSpeciesName(u8 monIndex) { u8 langData[4]; u32 species; u8 *tmp; - GetMonData(&gPlayerParty[arg0], MON_DATA_NICKNAME, &gStringVar1); + GetMonData(&gPlayerParty[monIndex], MON_DATA_NICKNAME, &gStringVar1); tmp = langData; - tmp[0] = GetMonData(&gPlayerParty[arg0], MON_DATA_LANGUAGE, &langData); + tmp[0] = GetMonData(&gPlayerParty[monIndex], MON_DATA_LANGUAGE, &langData); if (tmp[0] != GAME_LANGUAGE) return TRUE; - species = GetMonData(&gPlayerParty[arg0], MON_DATA_SPECIES, NULL); + species = GetMonData(&gPlayerParty[monIndex], MON_DATA_SPECIES, NULL); if (StringCompareWithoutExtCtrlCodes(gSpeciesNames[species], gStringVar1)) return TRUE; @@ -1811,17 +1820,17 @@ u8 sub_80BF4F4(u8 arg0) } #endif -u8 sub_80BF544(void) +u8 LeadMonNicknamed(void) { - return sub_80BF4F4(GetLeadMonIndex()); + return NicknameDiffersFromSpeciesName(GetLeadMonIndex()); } void sub_80BF55C(TVShow tvShow[], u8 showidx) { u8 idx; - tvShow[showidx].common.var00 = 0; - tvShow[showidx].common.var01 = 0; + tvShow[showidx].common.kind = 0; + tvShow[showidx].common.active = 0; for (idx = 0; idx < 34; idx++) tvShow[showidx].common.pad02[idx] = 0; } @@ -1833,11 +1842,11 @@ void sub_80BF588(TVShow tvShow[]) for (showidx = 0; showidx < 4; showidx++) { - if (tvShow[showidx].common.var00 == 0) + if (tvShow[showidx].common.kind == 0) { for (showidx2 = showidx + 1; showidx2 < 5; showidx2++) { - if (tvShow[showidx2].common.var00 != 0) + if (tvShow[showidx2].common.kind != 0) { tvShow[showidx] = tvShow[showidx2]; sub_80BF55C(tvShow, showidx2); @@ -1848,11 +1857,11 @@ void sub_80BF588(TVShow tvShow[]) } for (showidx = 5; showidx < 24; showidx++) { - if (tvShow[showidx].common.var00 == 0) + if (tvShow[showidx].common.kind == 0) { for (showidx2 = showidx + 1; showidx2 < 24; showidx2++) { - if (tvShow[showidx2].common.var00 != 0) + if (tvShow[showidx2].common.kind != 0) { tvShow[showidx] = tvShow[showidx2]; sub_80BF55C(gSaveBlock1.tvShows, showidx2); @@ -1909,7 +1918,7 @@ s8 sub_80BF720(TVShow tvShow[]) for (idx = 0; idx < 5; idx++) { - if (tvShow[idx].common.var00 == 0) + if (tvShow[idx].common.kind == 0) return idx; } return -1; @@ -1921,7 +1930,7 @@ s8 sub_80BF74C(TVShow tvShow[]) for (idx = 5; idx < 24; idx++) { - if (tvShow[idx].common.var00 == 0) + if (tvShow[idx].common.kind == 0) return idx; } return -1; @@ -2043,19 +2052,19 @@ void sub_80BF820(u8 arg0, u8 arg1, u8 arg2, u16 arg3, u16 arg4, struct TVShowNam StringCopy(gUnknown_083D1464[arg0], flags); } -bool8 sub_80BF974(void) +bool8 TV_IsScriptShowKindAlreadyInQueue(void) { u8 i; for (i = 0; i < 5; i++) { - if (gSaveBlock1.tvShows[i].common.var00 == gSpecialVar_0x8004) + if (gSaveBlock1.tvShows[i].common.kind == gSpecialVar_0x8004) return TRUE; } return FALSE; } -bool8 sub_80BF9B4(void) +bool8 TV_PutNameRaterShowOnTheAirIfNicnkameChanged(void) { GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_NICKNAME, &gStringVar1); if (!StringCompareWithoutExtCtrlCodes(gStringVar3, gStringVar1)) @@ -2064,9 +2073,9 @@ bool8 sub_80BF9B4(void) return TRUE; } -void c2_080CC144(void); +void ChangePokemonNickname_CB(void); -void sub_80BF9F8(void) +void ChangePokemonNickname(void) { u16 spec; u16 gender; @@ -2077,22 +2086,22 @@ void sub_80BF9F8(void) spec = GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_SPECIES, 0); gender = GetMonGender(&(gPlayerParty[gSpecialVar_0x8004])); pval = GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_PERSONALITY, 0); - DoNamingScreen(3, gStringVar2, spec, gender, pval, c2_080CC144); + DoNamingScreen(3, gStringVar2, spec, gender, pval, ChangePokemonNickname_CB); } -void c2_080CC144(void) +void ChangePokemonNickname_CB(void) { SetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_NICKNAME, gStringVar2); c2_exit_to_overworld_1_continue_scripts_restart_music(); } -void sub_80BFAE0(void) +void TV_CopyNicknameToStringVar1AndEnsureTerminated(void) { GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_NICKNAME, &gStringVar1); StringGetEnd10(gStringVar1); } -void sub_80BFB10(void) +void TV_CheckMonOTIDEqualsPlayerID(void) { if (GetPlayerTrainerId() == GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_OT_ID, 0)) gSpecialVar_Result = 0; @@ -2100,7 +2109,7 @@ void sub_80BFB10(void) gSpecialVar_Result = 1; } -u8 sub_80BFB54(u8 arg0) +u8 GetTVChannelByShowType(u8 arg0) { if (arg0 == 0) return 0; @@ -2200,7 +2209,7 @@ void sub_80BFD20(void) typedef union ewramStruct_02007000 { TVShow tvshows[4][25]; - struct UnknownSaveStruct2ABC unknown_2abc[4][16]; + struct PokeNews pokeNews[4][16]; } ewramStruct_02007000; void sub_80BFE24(TVShow arg0[25], TVShow arg1[25], TVShow arg2[25], TVShow arg3[25]); @@ -2294,7 +2303,7 @@ bool8 sub_80BFF68(TVShow * arg1[25], TVShow * arg2[25], u8 idx) tv1 = *arg1; tv2 = *arg2; value = FALSE; - switchval = sub_80BFB54(tv2[gUnknown_03000722].common.var00); + switchval = GetTVChannelByShowType(tv2[gUnknown_03000722].common.kind); switch (switchval) { case 2: @@ -2329,7 +2338,7 @@ u8 sub_80C004C(TVShow *tv1, TVShow *tv2, u8 idx) tv2->common.srcTrainerIdLo = linkTrainerId & 0xFF; tv2->common.srcTrainerIdHi = linkTrainerId >> 8; *tv1 = *tv2; - tv1->common.var01 = 1; + tv1->common.active = 1; return TRUE; } @@ -2345,7 +2354,7 @@ u8 sub_80C00B4(TVShow *tv1, TVShow *tv2, u8 idx) tv2->common.srcTrainerId2Lo = linkTrainerId & 0xFF; tv2->common.srcTrainerId2Hi = linkTrainerId >> 8; *tv1 = *tv2; - tv1->common.var01 = 1; + tv1->common.active = 1; return TRUE; } @@ -2359,7 +2368,7 @@ u8 sub_80C0134(TVShow *tv1, TVShow *tv2, u8 idx) tv2->common.srcTrainerIdLo = linkTrainerId & 0xFF; tv2->common.srcTrainerIdHi = linkTrainerId >> 8; *tv1 = *tv2; - tv1->common.var01 = 1; + tv1->common.active = 1; tv1->common.var16[0] = 1; return TRUE; } @@ -2369,7 +2378,7 @@ s8 sub_80C019C(TVShow tvShows[]) u8 i; for (i = 0; i < 24; i++) { - if (tvShows[i].common.var01 == 0 && (u8)(tvShows[i].common.var00 - 1) < 60) + if (tvShows[i].common.active == 0 && (u8)(tvShows[i].common.kind - 1) < 60) return i; } return -1; @@ -2381,7 +2390,7 @@ void sub_80C01D4(void) u16 i; for (i=0; i<24; i++) { - switch (gSaveBlock1.tvShows[i].common.var00) + switch (gSaveBlock1.tvShows[i].common.kind) { case 0: case TVSHOW_RECENT_HAPPENINGS: @@ -2637,13 +2646,13 @@ _080C03A0:\n\ void sub_80C03A8(u8 showidx) { - gSaveBlock1.tvShows[showidx].common.var01 = 0; + gSaveBlock1.tvShows[showidx].common.active = 0; } void sub_80C03C8(u16 species, u8 showidx) { if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), 0) == 0) - gSaveBlock1.tvShows[showidx].common.var01 = 0; + gSaveBlock1.tvShows[showidx].common.active = 0; } void sub_80C0408(void) @@ -2654,10 +2663,10 @@ void sub_80C0408(void) return; for (i = 0; i < 24; i++) { - if (gSaveBlock1.tvShows[i].common.var00 == TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE) - gSaveBlock1.tvShows[i].common.var01 = 0; - else if (gSaveBlock1.tvShows[i].common.var00 == TVSHOW_MASS_OUTBREAK) - gSaveBlock1.tvShows[i].common.var01 = 0; + if (gSaveBlock1.tvShows[i].common.kind == TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE) + gSaveBlock1.tvShows[i].common.active = 0; + else if (gSaveBlock1.tvShows[i].common.kind == TVSHOW_MASS_OUTBREAK) + gSaveBlock1.tvShows[i].common.active = 0; } } @@ -2667,8 +2676,8 @@ void sub_80C045C(void) for (i = 0; i < 5; i++) { - if (sub_80BFB54(gSaveBlock1.tvShows[i].common.var00) == 2) - gSaveBlock1.tvShows[i].common.var01 = 0; + if (GetTVChannelByShowType(gSaveBlock1.tvShows[i].common.kind) == 2) + gSaveBlock1.tvShows[i].common.active = 0; } } @@ -2680,18 +2689,18 @@ void sub_80C04A0(void) for (showIdx = 5; showIdx < 24; showIdx++) { - if (gSaveBlock1.tvShows[showIdx].common.var00 == 0) + if (gSaveBlock1.tvShows[showIdx].common.kind == 0) count++; } for (showIdx = 0; showIdx < 5 - count; showIdx++) sub_80BF55C(gSaveBlock1.tvShows, showIdx+5); } -void sub_80C05C4(struct UnknownSaveStruct2ABC[16], struct UnknownSaveStruct2ABC[16], struct UnknownSaveStruct2ABC[16], struct UnknownSaveStruct2ABC[16]); +void sub_80C05C4(struct PokeNews[16], struct PokeNews[16], struct PokeNews[16], struct PokeNews[16]); void sub_80C0750(void); void sub_80C0788(void); -s8 sub_80C0730(struct UnknownSaveStruct2ABC[16], u8); -void sub_80C06BC(struct UnknownSaveStruct2ABC *[16], struct UnknownSaveStruct2ABC *[16]); +s8 sub_80C0730(struct PokeNews[16], u8); +void sub_80C06BC(struct PokeNews *[16], struct PokeNews *[16]); void sub_80C0514(void *a0, u32 a1, u8 a2) { @@ -2699,33 +2708,33 @@ void sub_80C0514(void *a0, u32 a1, u8 a2) u8 i; for (i = 0; i < 4; i++) - memcpy(gUnknown_02007000.unknown_2abc[i], a0 + i * a1, 64); + memcpy(gUnknown_02007000.pokeNews[i], a0 + i * a1, 64); struct02007000 = &gUnknown_02007000; switch (a2) { case 0: - sub_80C05C4(gSaveBlock1.unknown_2ABC, struct02007000->unknown_2abc[1], struct02007000->unknown_2abc[2], struct02007000->unknown_2abc[3]); + sub_80C05C4(gSaveBlock1.pokeNews, struct02007000->pokeNews[1], struct02007000->pokeNews[2], struct02007000->pokeNews[3]); break; case 1: - sub_80C05C4(struct02007000->unknown_2abc[0], gSaveBlock1.unknown_2ABC, struct02007000->unknown_2abc[2], struct02007000->unknown_2abc[3]); + sub_80C05C4(struct02007000->pokeNews[0], gSaveBlock1.pokeNews, struct02007000->pokeNews[2], struct02007000->pokeNews[3]); break; case 2: - sub_80C05C4(struct02007000->unknown_2abc[0], struct02007000->unknown_2abc[1], gSaveBlock1.unknown_2ABC, struct02007000->unknown_2abc[3]); + sub_80C05C4(struct02007000->pokeNews[0], struct02007000->pokeNews[1], gSaveBlock1.pokeNews, struct02007000->pokeNews[3]); break; case 3: - sub_80C05C4(struct02007000->unknown_2abc[0], struct02007000->unknown_2abc[1], struct02007000->unknown_2abc[2], gSaveBlock1.unknown_2ABC); + sub_80C05C4(struct02007000->pokeNews[0], struct02007000->pokeNews[1], struct02007000->pokeNews[2], gSaveBlock1.pokeNews); break; } sub_80C0750(); sub_80C0788(); } -void sub_80C05C4(struct UnknownSaveStruct2ABC a0[16], struct UnknownSaveStruct2ABC a1[16], struct UnknownSaveStruct2ABC a2[16], struct UnknownSaveStruct2ABC a3[16]) +void sub_80C05C4(struct PokeNews a0[16], struct PokeNews a1[16], struct PokeNews a2[16], struct PokeNews a3[16]) { u8 i; u8 j; u8 k; - struct UnknownSaveStruct2ABC ** arglist[4]; + struct PokeNews ** arglist[4]; arglist[0] = &a0; arglist[1] = &a1; @@ -2750,10 +2759,10 @@ void sub_80C05C4(struct UnknownSaveStruct2ABC a0[16], struct UnknownSaveStruct2A } } -void sub_80C06BC(struct UnknownSaveStruct2ABC *arg0[16], struct UnknownSaveStruct2ABC *arg1[16]) +void sub_80C06BC(struct PokeNews *arg0[16], struct PokeNews *arg1[16]) { - struct UnknownSaveStruct2ABC *str0; - struct UnknownSaveStruct2ABC *str1; + struct PokeNews *str0; + struct PokeNews *str1; str0 = arg0[0]; str1 = arg1[0]; @@ -2761,26 +2770,26 @@ void sub_80C06BC(struct UnknownSaveStruct2ABC *arg0[16], struct UnknownSaveStruc sub_80C06E8(str0, str1, gUnknown_03005D38.var0); } -bool8 sub_80C06E8(struct UnknownSaveStruct2ABC *arg0, struct UnknownSaveStruct2ABC *arg1, s8 arg2) +bool8 sub_80C06E8(struct PokeNews *arg0, struct PokeNews *arg1, s8 arg2) { u8 i; - if (arg1->val0 == 0) + if (arg1->kind == 0) return FALSE; for (i = 0; i < 16; i++) { - if (arg0[i].val0 == arg1->val0) + if (arg0[i].kind == arg1->kind) return FALSE; } - arg0[arg2].val0 = arg1->val0; - arg0[arg2].val1 = 1; - arg0[arg2].val2 = arg1->val2; + arg0[arg2].kind = arg1->kind; + arg0[arg2].state = 1; + arg0[arg2].days = arg1->days; return TRUE; } -s8 sub_80C0730(struct UnknownSaveStruct2ABC *arg0, u8 arg1) +s8 sub_80C0730(struct PokeNews *arg0, u8 arg1) { - if (arg0[arg1].val0 == 0) + if (arg0[arg1].kind == 0) return -1; return arg1; } @@ -2791,7 +2800,7 @@ void sub_80C0750(void) for (i = 0; i < 16; i++) { - if (gSaveBlock1.unknown_2ABC[i].val0 > 3) + if (gSaveBlock1.pokeNews[i].kind > 3) sub_80BEC10(i); } sub_80BEC40(); @@ -2804,15 +2813,15 @@ void sub_80C0788(void) if (FlagGet(FLAG_SYS_GAME_CLEAR) != 1) { for (i = 0; i < 16; i++) - gSaveBlock1.unknown_2ABC[i].val1 = 0; + gSaveBlock1.pokeNews[i].state = 0; } } void DoTVShow(void) { - if (gSaveBlock1.tvShows[gSpecialVar_0x8004].common.var01 != 0) + if (gSaveBlock1.tvShows[gSpecialVar_0x8004].common.active != 0) { - switch (gSaveBlock1.tvShows[gSpecialVar_0x8004].common.var00) + switch (gSaveBlock1.tvShows[gSpecialVar_0x8004].common.kind) { case TVSHOW_FAN_CLUB_LETTER: DoTVShowPokemonFanClubLetter(); @@ -2870,7 +2879,7 @@ void DoTVShowBravoTrainerPokemonProfile(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch(state) { case 0: @@ -2878,49 +2887,49 @@ void DoTVShowBravoTrainerPokemonProfile(void) CopyContestCategoryToStringVar(1, bravoTrainer->contestCategory); sub_80BEF10(2, bravoTrainer->contestRank); if (!StringCompareWithoutExtCtrlCodes(gSpeciesNames[bravoTrainer->species], bravoTrainer->pokemonNickname)) - gUnknown_020387E8 = 8; + sTVShowState = 8; else - gUnknown_020387E8 = 1; + sTVShowState = 1; break; case 1: StringCopy(gStringVar1, gSpeciesNames[bravoTrainer->species]); TVShowConvertInternationalString(gStringVar2, bravoTrainer->pokemonNickname, bravoTrainer->var1f); CopyContestCategoryToStringVar(2, bravoTrainer->contestCategory); - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 2: TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language); if (bravoTrainer->contestResult == 0) // placed first - gUnknown_020387E8 = 3; + sTVShowState = 3; else - gUnknown_020387E8 = 4; + sTVShowState = 4; break; case 3: TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language); EasyChat_GetWordText(gStringVar2, bravoTrainer->var04[0]); sub_80BF088(2, bravoTrainer->contestResult + 1); - gUnknown_020387E8 = 5; + sTVShowState = 5; break; case 4: TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language); EasyChat_GetWordText(gStringVar2, bravoTrainer->var04[0]); sub_80BF088(2, bravoTrainer->contestResult + 1); - gUnknown_020387E8 = 5; + sTVShowState = 5; break; case 5: TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language); CopyContestCategoryToStringVar(1, bravoTrainer->contestCategory); EasyChat_GetWordText(gStringVar3, bravoTrainer->var04[1]); if (bravoTrainer->var14) - gUnknown_020387E8 = 6; + sTVShowState = 6; else - gUnknown_020387E8 = 7; + sTVShowState = 7; break; case 6: StringCopy(gStringVar1, gSpeciesNames[bravoTrainer->species]); StringCopy(gStringVar2, gMoveNames[bravoTrainer->var14]); EasyChat_GetWordText(gStringVar3, bravoTrainer->var04[1]); - gUnknown_020387E8 = 7; + sTVShowState = 7; break; case 7: TVShowConvertInternationalString(gStringVar1, bravoTrainer->playerName, bravoTrainer->language); @@ -2929,7 +2938,7 @@ void DoTVShowBravoTrainerPokemonProfile(void) break; case 8: StringCopy(gStringVar1, gSpeciesNames[bravoTrainer->species]); - gUnknown_020387E8 = 2; + sTVShowState = 2; break; } ShowFieldMessage(gTVBravoTrainerTextGroup[state]); @@ -2941,79 +2950,79 @@ void DoTVShowBravoTrainerBattleTowerProfile(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch(state) { case 0: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->trainerName, bravoTrainerTower->language); StringCopy(gStringVar2, gSpeciesNames[bravoTrainerTower->species]); if (bravoTrainerTower->var16 >= 7) - gUnknown_020387E8 = 1; + sTVShowState = 1; else - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 1: sub_80BF088(0, bravoTrainerTower->btLevel); sub_80BF088(1, bravoTrainerTower->var16); if (bravoTrainerTower->var1c == 1) - gUnknown_020387E8 = 3; + sTVShowState = 3; else - gUnknown_020387E8 = 4; + sTVShowState = 4; break; case 2: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->pokemonName, bravoTrainerTower->language); sub_80BF088(1, bravoTrainerTower->var16 + 1); if (bravoTrainerTower->var1b == 0) - gUnknown_020387E8 = 5; + sTVShowState = 5; else - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 3: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->pokemonName, bravoTrainerTower->language); StringCopy(gStringVar2, gSpeciesNames[bravoTrainerTower->defeatedSpecies]); if (bravoTrainerTower->var1b == 0) - gUnknown_020387E8 = 5; + sTVShowState = 5; else - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 4: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->pokemonName, bravoTrainerTower->language); StringCopy(gStringVar2, gSpeciesNames[bravoTrainerTower->defeatedSpecies]); if (bravoTrainerTower->var1b == 0) - gUnknown_020387E8 = 5; + sTVShowState = 5; else - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 5: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->pokemonName, bravoTrainerTower->language); - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 6: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->pokemonName, bravoTrainerTower->language); - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 7: - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 8: case 9: case 10: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->trainerName, bravoTrainerTower->language); - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 11: EasyChat_GetWordText(gStringVar1, bravoTrainerTower->var18[0]); if (bravoTrainerTower->var1b == 0) - gUnknown_020387E8 = 12; + sTVShowState = 12; else - gUnknown_020387E8 = 13; + sTVShowState = 13; break; case 12: case 13: EasyChat_GetWordText(gStringVar1, bravoTrainerTower->var18[0]); TVShowConvertInternationalString(gStringVar2, bravoTrainerTower->trainerName, bravoTrainerTower->language); TVShowConvertInternationalString(gStringVar3, bravoTrainerTower->pokemonName, bravoTrainerTower->language); - gUnknown_020387E8 = 14; + sTVShowState = 14; break; case 14: TVShowConvertInternationalString(gStringVar1, bravoTrainerTower->trainerName, bravoTrainerTower->language); @@ -3030,61 +3039,61 @@ void DoTVShowTodaysSmartShopper(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch(state) { case 0: TVShowConvertInternationalString(gStringVar1, smartShopper->playerName, smartShopper->language); GetMapSectionName(gStringVar2, smartShopper->shopLocation, 0); if (smartShopper->itemAmounts[0] >= 0xff) - gUnknown_020387E8 = 11; + sTVShowState = 11; else - gUnknown_020387E8 = 1; + sTVShowState = 1; break; case 1: TVShowConvertInternationalString(gStringVar1, smartShopper->playerName, smartShopper->language); StringCopy(gStringVar2, ItemId_GetItem(smartShopper->itemIds[0])->name); sub_80BF088(2, smartShopper->itemAmounts[0]); - gUnknown_020387E8 += (Random() % 4) + 1; + sTVShowState += (Random() % 4) + 1; break; case 2: case 4: case 5: if (smartShopper->itemIds[1] != 0) - gUnknown_020387E8 = 6; + sTVShowState = 6; else - gUnknown_020387E8 = 10; + sTVShowState = 10; break; case 3: sub_80BF088(2, smartShopper->itemAmounts[0] + 1); if (smartShopper->itemIds[1] != 0) - gUnknown_020387E8 = 6; + sTVShowState = 6; else - gUnknown_020387E8 = 10; + sTVShowState = 10; break; case 6: StringCopy(gStringVar2, ItemId_GetItem(smartShopper->itemIds[1])->name); sub_80BF088(2, smartShopper->itemAmounts[1]); if (smartShopper->itemIds[2] != 0) - gUnknown_020387E8 = 7; + sTVShowState = 7; else if (smartShopper->priceReduced == 1) - gUnknown_020387E8 = 8; + sTVShowState = 8; else - gUnknown_020387E8 = 9; + sTVShowState = 9; break; case 7: StringCopy(gStringVar2, ItemId_GetItem(smartShopper->itemIds[2])->name); sub_80BF088(2, smartShopper->itemAmounts[2]); if (smartShopper->priceReduced == 1) - gUnknown_020387E8 = 8; + sTVShowState = 8; else - gUnknown_020387E8 = 9; + sTVShowState = 9; break; case 8: if (smartShopper->itemAmounts[0] < 0xff) - gUnknown_020387E8 = 9; + sTVShowState = 9; else - gUnknown_020387E8 = 12; + sTVShowState = 12; break; case 9: sub_80BF154(1, smartShopper); @@ -3092,17 +3101,17 @@ void DoTVShowTodaysSmartShopper(void) break; case 10: if (smartShopper->priceReduced == 1) - gUnknown_020387E8 = 8; + sTVShowState = 8; else - gUnknown_020387E8 = 9; + sTVShowState = 9; break; case 11: TVShowConvertInternationalString(gStringVar1, smartShopper->playerName, smartShopper->language); StringCopy(gStringVar2, ItemId_GetItem(smartShopper->itemIds[0])->name); if (smartShopper->priceReduced == 1) - gUnknown_020387E8 = 8; + sTVShowState = 8; else - gUnknown_020387E8 = 12; + sTVShowState = 12; break; case 12: TVShowConvertInternationalString(gStringVar1, smartShopper->playerName, smartShopper->language); @@ -3118,14 +3127,14 @@ void DoTVShowTheNameRaterShow(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: TVShowConvertInternationalString(gStringVar1, nameRaterShow->trainerName, nameRaterShow->language); StringCopy(gStringVar2, gSpeciesNames[nameRaterShow->species]); TVShowConvertInternationalString(gStringVar3, nameRaterShow->pokemonName, nameRaterShow->pokemonNameLanguage); - gUnknown_020387E8 = sub_80BF7E8(nameRaterShow) + 1; + sTVShowState = sub_80BF7E8(nameRaterShow) + 1; break; case 1: case 3: @@ -3135,20 +3144,20 @@ void DoTVShowTheNameRaterShow(void) case 7: case 8: if (nameRaterShow->random == 0) - gUnknown_020387E8 = 9; + sTVShowState = 9; else if (nameRaterShow->random == 1) - gUnknown_020387E8 = 10; + sTVShowState = 10; else if (nameRaterShow->random == 2) - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 2: TVShowConvertInternationalString(gStringVar1, nameRaterShow->trainerName, nameRaterShow->language); if (nameRaterShow->random == 0) - gUnknown_020387E8 = 9; + sTVShowState = 9; else if (nameRaterShow->random == 1) - gUnknown_020387E8 = 10; + sTVShowState = 10; else if (nameRaterShow->random == 2) - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 9: case 10: @@ -3158,7 +3167,7 @@ void DoTVShowTheNameRaterShow(void) sub_80BF820(0, 0, 0, 1, 0, nameRaterShow); TVShowConvertInternationalString(gStringVar2, gStringVar1, nameRaterShow->pokemonNameLanguage); TVShowConvertInternationalString(gStringVar1, nameRaterShow->pokemonName, nameRaterShow->pokemonNameLanguage); - gUnknown_020387E8 = 12; + sTVShowState = 12; break; case 13: sub_80BF820(0, 0, 3, 1, 0, nameRaterShow); @@ -3166,7 +3175,7 @@ void DoTVShowTheNameRaterShow(void) sub_80BF820(0, 0, 2, 0, 0, nameRaterShow); TVShowConvertInternationalString(gStringVar2, gStringVar1, nameRaterShow->language); TVShowConvertInternationalString(gStringVar1, nameRaterShow->trainerName, nameRaterShow->language); - gUnknown_020387E8 = 14; + sTVShowState = 14; break; case 14: sub_80BF820(0, 0, 3, 0, 0, nameRaterShow); @@ -3174,31 +3183,31 @@ void DoTVShowTheNameRaterShow(void) sub_80BF820(0, 0, 2, 1, 0, nameRaterShow); TVShowConvertInternationalString(gStringVar2, gStringVar1, nameRaterShow->pokemonNameLanguage); TVShowConvertInternationalString(gStringVar1, nameRaterShow->trainerName, nameRaterShow->language); - gUnknown_020387E8 = 18; + sTVShowState = 18; break; case 15: sub_80BF820(1, 0, 2, 1, 0, nameRaterShow); TVShowConvertInternationalString(gStringVar1, gStringVar2, nameRaterShow->pokemonNameLanguage); StringCopy(gStringVar2, gSpeciesNames[nameRaterShow->species]); sub_80BF820(2, 0, 3, 2, nameRaterShow->species, nameRaterShow); - gUnknown_020387E8 = 16; + sTVShowState = 16; break; case 16: sub_80BF820(0, 0, 3, 1, 0, nameRaterShow); TVShowConvertInternationalString(gStringVar3, gStringVar1, nameRaterShow->pokemonNameLanguage); sub_80BF820(0, 0, 2, 2, nameRaterShow->species, nameRaterShow); - gUnknown_020387E8 = 17; + sTVShowState = 17; break; case 17: sub_80BF820(1, 0, 2, 1, 0, nameRaterShow); TVShowConvertInternationalString(gStringVar1, gStringVar2, nameRaterShow->pokemonNameLanguage); sub_80BF820(2, 0, 3, 2, nameRaterShow->var1C, nameRaterShow); StringCopy(gStringVar2, gSpeciesNames[nameRaterShow->var1C]); - gUnknown_020387E8 = 18; + sTVShowState = 18; break; case 12: state = 18; - gUnknown_020387E8 = 18; + sTVShowState = 18; case 18: TVShowConvertInternationalString(gStringVar1, nameRaterShow->pokemonName, nameRaterShow->pokemonNameLanguage); TVShowConvertInternationalString(gStringVar2, nameRaterShow->trainerName, nameRaterShow->language); @@ -3214,7 +3223,7 @@ void DoTVShowPokemonTodaySuccessfulCapture(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: @@ -3222,53 +3231,53 @@ void DoTVShowPokemonTodaySuccessfulCapture(void) StringCopy(gStringVar2, gSpeciesNames[pokemonToday->species]); TVShowConvertInternationalString(gStringVar3, pokemonToday->nickname, pokemonToday->language2); if (pokemonToday->ball == ITEM_MASTER_BALL) - gUnknown_020387E8 = 5; + sTVShowState = 5; else - gUnknown_020387E8 = 1; + sTVShowState = 1; break; case 1: - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 2: StringCopy(gStringVar2, ItemId_GetItem(pokemonToday->ball)->name); sub_80BF088(2, pokemonToday->var12); if (pokemonToday->var12 < 4) - gUnknown_020387E8 = 3; + sTVShowState = 3; else - gUnknown_020387E8 = 4; + sTVShowState = 4; break; case 3: TVShowConvertInternationalString(gStringVar1, pokemonToday->playerName, pokemonToday->language); StringCopy(gStringVar2, gSpeciesNames[pokemonToday->species]); TVShowConvertInternationalString(gStringVar3, pokemonToday->nickname, pokemonToday->language2); - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 4: - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 5: TVShowConvertInternationalString(gStringVar1, pokemonToday->playerName, pokemonToday->language); StringCopy(gStringVar2, gSpeciesNames[pokemonToday->species]); - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 6: TVShowConvertInternationalString(gStringVar1, pokemonToday->playerName, pokemonToday->language); StringCopy(gStringVar2, gSpeciesNames[pokemonToday->species]); TVShowConvertInternationalString(gStringVar3, pokemonToday->nickname, pokemonToday->language2); - gUnknown_020387E8 += (Random() % 4) + 1; + sTVShowState += (Random() % 4) + 1; break; case 7: case 8: StringCopy(gStringVar1, gSpeciesNames[pokemonToday->species]); TVShowConvertInternationalString(gStringVar2, pokemonToday->nickname, pokemonToday->language2); sub_80BF638(2, pokemonToday->species); - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 9: case 10: StringCopy(gStringVar1, gSpeciesNames[pokemonToday->species]); TVShowConvertInternationalString(gStringVar2, pokemonToday->nickname, pokemonToday->language2); - gUnknown_020387E8 = 11; + sTVShowState = 11; break; case 11: TVShowDone(); @@ -3283,36 +3292,36 @@ void DoTVShowPokemonTodayFailedCapture(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: TVShowConvertInternationalString(gStringVar1, pokemonTodayFailed->playerName, pokemonTodayFailed->language); StringCopy(gStringVar2, gSpeciesNames[pokemonTodayFailed->species]); - gUnknown_020387E8 = 1; + sTVShowState = 1; break; case 1: TVShowConvertInternationalString(gStringVar1, pokemonTodayFailed->playerName, pokemonTodayFailed->language); GetMapSectionName(gStringVar2, pokemonTodayFailed->var12, 0); StringCopy(gStringVar3, gSpeciesNames[pokemonTodayFailed->species2]); if (pokemonTodayFailed->var11 == 1) - gUnknown_020387E8 = 3; + sTVShowState = 3; else - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 2: case 3: TVShowConvertInternationalString(gStringVar1, pokemonTodayFailed->playerName, pokemonTodayFailed->language); sub_80BF088(1, pokemonTodayFailed->var10); if ((Random() % 3) == 0) - gUnknown_020387E8 = 5; + sTVShowState = 5; else - gUnknown_020387E8 = 4; + sTVShowState = 4; break; case 4: case 5: TVShowConvertInternationalString(gStringVar1, pokemonTodayFailed->playerName, pokemonTodayFailed->language); - gUnknown_020387E8 = 6; + sTVShowState = 6; break; case 6: TVShowDone(); @@ -3328,32 +3337,32 @@ void DoTVShowPokemonFanClubLetter(void) u16 rval; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: TVShowConvertInternationalString(gStringVar1, fanclubLetter->playerName, fanclubLetter->language); StringCopy(gStringVar2, gSpeciesNames[fanclubLetter->species]); - gUnknown_020387E8 = 50; + sTVShowState = 50; break; case 1: rval = (Random() % 4) + 1; if (rval == 1) - gUnknown_020387E8 = 2; + sTVShowState = 2; else - gUnknown_020387E8 = rval + 2; + sTVShowState = rval + 2; break; case 2: - gUnknown_020387E8 = 51; + sTVShowState = 51; break; case 3: - gUnknown_020387E8 += (Random() % 3) + 1; + sTVShowState += (Random() % 3) + 1; break; case 4: case 5: case 6: sub_80BF79C((TVShow *)fanclubLetter); - gUnknown_020387E8 = 7; + sTVShowState = 7; break; case 7: rval = (Random() % 0x1f) + 0x46; @@ -3363,12 +3372,12 @@ void DoTVShowPokemonFanClubLetter(void) case 50: ConvertEasyChatWordsToString(gStringVar4, fanclubLetter->pad04, 2, 2); ShowFieldMessage(gStringVar4); - gUnknown_020387E8 = 1; + sTVShowState = 1; return; case 51: ConvertEasyChatWordsToString(gStringVar4, fanclubLetter->pad04, 2, 2); ShowFieldMessage(gStringVar4); - gUnknown_020387E8 = 3; + sTVShowState = 3; return; } ShowFieldMessage(gTVFanClubTextGroup[state]); @@ -3380,21 +3389,21 @@ void DoTVShowRecentHappenings(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: TVShowConvertInternationalString(gStringVar1, recentHappenings->playerName, recentHappenings->language); sub_80BF79C((TVShow *)recentHappenings); - gUnknown_020387E8 = 50; + sTVShowState = 50; break; case 1: - gUnknown_020387E8 += 1 + (Random() % 3); + sTVShowState += 1 + (Random() % 3); break; case 2: case 3: case 4: - gUnknown_020387E8 = 5; + sTVShowState = 5; break; case 5: TVShowDone(); @@ -3402,7 +3411,7 @@ void DoTVShowRecentHappenings(void) case 50: ConvertEasyChatWordsToString(gStringVar4, recentHappenings->var04, 2, 2); ShowFieldMessage(gStringVar4); - gUnknown_020387E8 = 1; + sTVShowState = 1; return; } ShowFieldMessage(gTVRecentHappeningsTextGroup[state]); @@ -3414,14 +3423,14 @@ void DoTVShowPokemonFanClubOpinions(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: TVShowConvertInternationalString(gStringVar1, fanclubOpinions->playerName, fanclubOpinions->language); StringCopy(gStringVar2, gSpeciesNames[fanclubOpinions->var02]); TVShowConvertInternationalString(gStringVar3, fanclubOpinions->var10, fanclubOpinions->var0E); - gUnknown_020387E8 = fanclubOpinions->var04B + 1; + sTVShowState = fanclubOpinions->var04B + 1; break; case 1: case 2: @@ -3429,7 +3438,7 @@ void DoTVShowPokemonFanClubOpinions(void) TVShowConvertInternationalString(gStringVar1, fanclubOpinions->playerName, fanclubOpinions->language); StringCopy(gStringVar2, gSpeciesNames[fanclubOpinions->var02]); EasyChat_GetWordText(gStringVar3, fanclubOpinions->var1C[0]); - gUnknown_020387E8 = 4; + sTVShowState = 4; break; case 4: TVShowConvertInternationalString(gStringVar1, fanclubOpinions->playerName, fanclubOpinions->language); @@ -3452,7 +3461,7 @@ void DoTVShowPokemonNewsMassOutbreak(void) StringCopy(gStringVar2, gSpeciesNames[massOutbreak->species]); TVShowDone(); StartMassOutbreak(); - ShowFieldMessage(gTVPokemonOutbreakTextGroup[gUnknown_020387E8]); + ShowFieldMessage(gTVPokemonOutbreakTextGroup[sTVShowState]); } void DoTVShowInSearchOfTrainers(void) @@ -3460,49 +3469,49 @@ void DoTVShowInSearchOfTrainers(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: GetMapSectionName(gStringVar1, gSaveBlock1.gabbyAndTyData.mapnum, 0); if (gSaveBlock1.gabbyAndTyData.battleNum > 1) - gUnknown_020387E8 = 1; + sTVShowState = 1; else - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 1: - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 2: if (gSaveBlock1.gabbyAndTyData.valA_0 == 0) - gUnknown_020387E8 = 4; + sTVShowState = 4; else if (gSaveBlock1.gabbyAndTyData.valA_3 != 0) - gUnknown_020387E8 = 5; + sTVShowState = 5; else if (gSaveBlock1.gabbyAndTyData.valA_2 != 0) - gUnknown_020387E8 = 6; + sTVShowState = 6; else if (gSaveBlock1.gabbyAndTyData.valA_1 != 0) - gUnknown_020387E8 = 7; + sTVShowState = 7; else - gUnknown_020387E8 = 3; + sTVShowState = 3; break; case 3: StringCopy(gStringVar1, gSpeciesNames[gSaveBlock1.gabbyAndTyData.mon1]); StringCopy(gStringVar2, gMoveNames[gSaveBlock1.gabbyAndTyData.lastMove]); StringCopy(gStringVar3, gSpeciesNames[gSaveBlock1.gabbyAndTyData.mon2]); - gUnknown_020387E8 = 8; + sTVShowState = 8; break; case 4: case 5: case 6: case 7: - gUnknown_020387E8 = 8; + sTVShowState = 8; break; case 8: EasyChat_GetWordText(gStringVar1, gSaveBlock1.gabbyAndTyData.quote); StringCopy(gStringVar2, gSpeciesNames[gSaveBlock1.gabbyAndTyData.mon1]); StringCopy(gStringVar3, gSpeciesNames[gSaveBlock1.gabbyAndTyData.mon2]); gSpecialVar_Result = 1; - gUnknown_020387E8 = 0;; + sTVShowState = 0;; TakeTVShowInSearchOfTrainersOffTheAir(); break; } @@ -3516,10 +3525,10 @@ void DoTVShowPokemonAngler(void) gSpecialVar_Result = 0; if (pokemonAngler->var02 < pokemonAngler->var03) - gUnknown_020387E8 = 0; + sTVShowState = 0; else - gUnknown_020387E8 = 1; - state = gUnknown_020387E8; + sTVShowState = 1; + state = sTVShowState; switch (state) { case 0: @@ -3544,7 +3553,7 @@ void DoTVShowTheWorldOfMasters(void) u8 state; gSpecialVar_Result = 0; - state = gUnknown_020387E8; + state = sTVShowState; switch (state) { case 0: @@ -3552,11 +3561,11 @@ void DoTVShowTheWorldOfMasters(void) worldOfMasters->language); sub_80BF088(1, worldOfMasters->var06); sub_80BF088(2, worldOfMasters->var02); - gUnknown_020387E8 = 1; + sTVShowState = 1; break; case 1: StringCopy(gStringVar1, gSpeciesNames[worldOfMasters->var08]); - gUnknown_020387E8 = 2; + sTVShowState = 2; break; case 2: TVShowConvertInternationalString(gStringVar1, worldOfMasters->playerName, @@ -3572,11 +3581,11 @@ void DoTVShowTheWorldOfMasters(void) void TVShowDone(void) { gSpecialVar_Result = 1; - gUnknown_020387E8 = 0; - gSaveBlock1.tvShows[gSpecialVar_0x8004].common.var01 = 0; + sTVShowState = 0; + gSaveBlock1.tvShows[gSpecialVar_0x8004].common.active = 0; } -void sub_80C2014(void) +void ResetTVShowState(void) { - gUnknown_020387E8 = 0; + sTVShowState = 0; } diff --git a/src/pokemon/learn_move.c b/src/pokemon/learn_move.c index 5eee45b23..ef1d66349 100644 --- a/src/pokemon/learn_move.c +++ b/src/pokemon/learn_move.c @@ -239,7 +239,7 @@ void VBlankCB_LearnMove(void) TransferPlttBuffer(); } -void sub_8132670(void) +void TeachMoveTutorMove(void) { ScriptContext2_Enable(); CreateTask(sub_813269C, 10); diff --git a/src/pokemon/pokedex.c b/src/pokemon/pokedex.c index a4d84bebd..1c1c71454 100644 --- a/src/pokemon/pokedex.c +++ b/src/pokemon/pokedex.c @@ -4109,7 +4109,7 @@ u16 GetHoennPokedexCount(u8 caseID) return count; } -bool8 sub_8090FC0(void) +bool8 CompletedHoennPokedex(void) { u16 i; diff --git a/src/scene/berry_blender.c b/src/scene/berry_blender.c index d147d11ce..53308e856 100644 --- a/src/scene/berry_blender.c +++ b/src/scene/berry_blender.c @@ -200,7 +200,7 @@ void sub_80A6978(void); u8 sub_80A7DEC(u8 berryId, u8 x, u8 y, bool8 animate); void sub_814A880(u8 a1, u8 a2); u8 sub_814A5C0(u8 a1, u16 a2, u8 a3, u16 a4, u8 a5); -s8 sub_810CA00(void); +s8 GetFirstFreePokeblockSlot(void); bool8 sub_810CA34(struct Pokeblock *pokeblock); #ifdef GERMAN extern void de_sub_8073110(); @@ -933,7 +933,7 @@ static void sub_804E4FC(void) REG_BG1VOFS = 0; } -void sub_804E538(void) +void DoBerryBlending(void) { u8* field6F; //this temp value is needed to match @@ -2621,7 +2621,7 @@ static void sub_8050954(void) gBerryBlenderData->field_7C = 2; gSendCmd[1] = 0x9999; } - else if (sub_810CA00() == -1) + else if (GetFirstFreePokeblockSlot() == -1) { gBerryBlenderData->field_7C = 3; gSendCmd[1] = 0xAAAA; @@ -2816,7 +2816,7 @@ static void sub_8050E30(void) if (!gPaletteFade.active) { if (gBerryBlenderData->field_70[0] == 0x2222) - SetMainCallback2(sub_804E538); + SetMainCallback2(DoBerryBlending); else { gBerryBlenderData->framesToWait = 0; @@ -2880,7 +2880,7 @@ static void sub_80510E8(void) if (!gPaletteFade.active) { if (gBerryBlenderData->field_7C == 0) - SetMainCallback2(sub_804E538); + SetMainCallback2(DoBerryBlending); else SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); } diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c index fc94b1b01..f397e5ebb 100644 --- a/src/script_pokemon_util_80C4BF0.c +++ b/src/script_pokemon_util_80C4BF0.c @@ -53,11 +53,11 @@ extern u8 gContestFinalStandings[]; extern s16 gUnknown_02038670[]; extern s16 gUnknown_02038678[]; -void sub_80C4BF0(void) +void SetContestTrainerGfxIds(void) { - gSaveBlock1.vars[0x10] = gContestMons[0].trainerGfxId; - gSaveBlock1.vars[0x11] = gContestMons[1].trainerGfxId; - gSaveBlock1.vars[0x12] = gContestMons[2].trainerGfxId; + gSaveBlock1.vars[VAR_OBJ_GFX_ID_0 - VARS_START] = gContestMons[0].trainerGfxId; + gSaveBlock1.vars[VAR_OBJ_GFX_ID_1 - VARS_START] = gContestMons[1].trainerGfxId; + gSaveBlock1.vars[VAR_OBJ_GFX_ID_2 - VARS_START] = gContestMons[2].trainerGfxId; } void sub_80C4C28(void) diff --git a/src/script_pokemon_util_80F99CC.c b/src/script_pokemon_util_80F99CC.c index b58363d31..df83d3e2d 100644 --- a/src/script_pokemon_util_80F99CC.c +++ b/src/script_pokemon_util_80F99CC.c @@ -39,7 +39,7 @@ void sub_80F99CC(void) BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); } -void sub_80F9A0C(void) +void SelectMonForNPCTrade(void) { u8 taskId; @@ -49,7 +49,7 @@ void sub_80F9A0C(void) BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); } -void sub_80F9A4C(void) +void SelectMoveTutorMon(void) { u8 taskId; @@ -272,7 +272,7 @@ void HandleMoveTutorPartyMenu(u8 var) } } -void sub_80F9EEC(void) +void SelectMove(void) { ShowSelectMovePokemonSummaryScreen(&gPlayerParty[0], gSpecialVar_0x8004, gPlayerPartyCount - 1, c2_exit_to_overworld_2_switch, 0); UNK_2018000_STRUCT.unk8 = 3; @@ -321,7 +321,7 @@ void sub_80F9FDC(struct Pokemon *pkmn, u8 moveIndex1, u8 moveIndex2) SetMonData(pkmn, MON_DATA_PP_BONUSES, &bonuses); } -void sub_80FA0DC(void) +void DeleteMonMove(void) { u16 i; @@ -332,7 +332,7 @@ void sub_80FA0DC(void) sub_80F9FDC(&gPlayerParty[gSpecialVar_0x8004], i, i + 1); } -void sub_80FA148(void) +void IsSelectedMonEgg(void) { struct Pokemon *party = &gPlayerParty[gSpecialVar_0x8004]; gSpecialVar_Result = 0; |