Reformat compare + goto_if/call_if to single statements

This commit is contained in:
GriffinR
2021-11-18 23:06:30 -05:00
parent c57efdba5d
commit e66ea0cb99
293 changed files with 2990 additions and 5978 deletions
@@ -6,28 +6,22 @@ LittlerootTown_MaysHouse_2F_MapScripts::
.byte 0
LittlerootTown_MaysHouse_2F_OnTransition:
compare VAR_LITTLEROOT_RIVAL_STATE, 2
call_if_lt LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay
compare VAR_LITTLEROOT_RIVAL_STATE, 3
call_if_ge LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos
compare VAR_LITTLEROOT_INTRO_STATE, 4
call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet
call_if_lt VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay
call_if_ge VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos
call_if_eq VAR_LITTLEROOT_INTRO_STATE, 4, PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet
call SecretBase_EventScript_SetDecorationFlags
setvar VAR_SECRET_BASE_INITIALIZED, 0
end
LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos::
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos
compare VAR_BIRCH_LAB_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret
goto_if_ge VAR_BIRCH_LAB_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret
goto LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos
LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos::
checkplayergender
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_Ret
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret
goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_Ret
goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret
setobjectxyperm LOCALID_RIVAL, 8, 2
setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP
return
@@ -37,8 +31,7 @@ LittlerootTown_MaysHouse_2F_EventScript_Ret::
LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay::
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay
goto_if_eq VAR_RESULT, MALE, LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay
return
LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay::
@@ -51,14 +44,12 @@ LittlerootTown_MaysHouse_2F_OnWarp:
LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor::
checkplayergender
compare VAR_RESULT, FEMALE
goto_if_eq SecretBase_EventScript_InitDecorations
goto_if_eq VAR_RESULT, FEMALE, SecretBase_EventScript_InitDecorations
end
LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall::
lockall
compare VAR_LITTLEROOT_RIVAL_STATE, 2
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMay
goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_MeetMay
msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT
releaseall
end
@@ -75,14 +66,10 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMay::
waitmovement 0
delay 10
playbgm MUS_ENCOUNTER_MAY, TRUE
compare VAR_FACING, DIR_NORTH
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth
compare VAR_FACING, DIR_SOUTH
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth
compare VAR_FACING, DIR_WEST
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest
compare VAR_FACING, DIR_EAST
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast
call_if_eq VAR_FACING, DIR_NORTH, LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth
call_if_eq VAR_FACING, DIR_SOUTH, LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth
call_if_eq VAR_FACING, DIR_WEST, LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest
call_if_eq VAR_FACING, DIR_EAST, LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM
@@ -252,10 +239,8 @@ RivalsHouse_2F_EventScript_Rival::
lockall
goto_if_set FLAG_MET_RIVAL_LILYCOVE, RivalsHouse_2F_EventScript_RivalPostLilycove
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq RivalsHouse_2F_EventScript_May
compare VAR_RESULT, FEMALE
goto_if_eq RivalsHouse_2F_EventScript_Brendan
goto_if_eq VAR_RESULT, MALE, RivalsHouse_2F_EventScript_May
goto_if_eq VAR_RESULT, FEMALE, RivalsHouse_2F_EventScript_Brendan
end
RivalsHouse_2F_EventScript_May::
@@ -272,10 +257,8 @@ RivalsHouse_2F_EventScript_RivalPostLilycove::
applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
checkplayergender
compare VAR_RESULT, MALE
call_if_eq RivalsHouse_2F_EventScript_MayPostLilycove
compare VAR_RESULT, FEMALE
call_if_eq RivalsHouse_2F_EventScript_BrendanPostLilycove
call_if_eq VAR_RESULT, MALE, RivalsHouse_2F_EventScript_MayPostLilycove
call_if_eq VAR_RESULT, FEMALE, RivalsHouse_2F_EventScript_BrendanPostLilycove
setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE
releaseall
end
@@ -301,10 +284,8 @@ RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext::
LittlerootTown_MaysHouse_2F_EventScript_PC::
lockall
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC
compare VAR_RESULT, FEMALE
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC
goto_if_eq VAR_RESULT, MALE, LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC
goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC
end
LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC::