mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Rename movobjectoffscreen to copyobjectxytoperm
Renaming the command to something that makes more sense as to what the command actually does. The command copies the current xy of the instantiated object back to its template, so that the object remains in the same place if the player walks away and despawns the object, and then comes back. "moveobjectoffscreen" implies that it might be taking the object and moving it physically to an off-screen location somehow.
This commit is contained in:
parent
ea724278b7
commit
6508469259
@ -765,7 +765,8 @@
|
||||
.2byte \y
|
||||
.endm
|
||||
|
||||
.macro moveobjectoffscreen index:req
|
||||
@ Copies a live event object's xy position to its template, so that if the sprite goes off screen, it'll still be there when it comes back on screen.
|
||||
.macro copyobjectxytoperm index:req
|
||||
.byte 0x64
|
||||
.2byte \index
|
||||
.endm
|
||||
|
@ -63,7 +63,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E41:: @ 8243E41
|
||||
waitmovement 0
|
||||
applymovement 1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_243E77
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 1
|
||||
copyobjectxytoperm 1
|
||||
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
|
||||
waitmovement 0
|
||||
msgbox BattleFrontier_BattleTowerMultiBattleRoom_Text_244056, MSGBOX_DEFAULT
|
||||
|
@ -180,7 +180,7 @@ DewfordTown_EventScript_1E96E7:: @ 81E96E7
|
||||
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
|
||||
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN
|
||||
resetobjectpriority 2, MAP_ROUTE109
|
||||
moveobjectoffscreen 2
|
||||
copyobjectxytoperm 2
|
||||
release
|
||||
end
|
||||
|
||||
|
@ -67,8 +67,8 @@ EverGrandeCity_PokemonLeague_1F_EventScript_229636:: @ 8229636
|
||||
waitmessage
|
||||
waitfanfare
|
||||
closemessage
|
||||
moveobjectoffscreen 3
|
||||
moveobjectoffscreen 4
|
||||
copyobjectxytoperm 3
|
||||
copyobjectxytoperm 4
|
||||
setflag FLAG_ENTERED_ELITE_FOUR
|
||||
releaseall
|
||||
end
|
||||
|
@ -62,7 +62,7 @@ FarawayIsland_Interior_EventScript_267DA2:: @ 8267DA2
|
||||
waitmovement 0
|
||||
applymovement 1, FarawayIsland_Interior_Movement_267DCE
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 1
|
||||
copyobjectxytoperm 1
|
||||
setvar VAR_TEMP_1, 1
|
||||
releaseall
|
||||
end
|
||||
|
@ -236,7 +236,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_22321F:: @ 822321F
|
||||
msgbox MossdeepCity_SpaceCenter_1F_Text_223B90, MSGBOX_DEFAULT
|
||||
trainerbattle_no_intro TRAINER_GRUNT_23, MossdeepCity_SpaceCenter_1F_Text_223BC2
|
||||
setflag FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F
|
||||
moveobjectoffscreen 9
|
||||
copyobjectxytoperm 9
|
||||
switch VAR_FACING
|
||||
case 3, MossdeepCity_SpaceCenter_1F_EventScript_223278
|
||||
case 3, MossdeepCity_SpaceCenter_1F_EventScript_223289
|
||||
|
@ -70,9 +70,9 @@ MossdeepCity_SpaceCenter_2F_EventScript_223E09:: @ 8223E09
|
||||
applymovement 7, MossdeepCity_SpaceCenter_2F_Movement_223E89
|
||||
waitmovement 0
|
||||
setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 2
|
||||
moveobjectoffscreen 5
|
||||
moveobjectoffscreen 7
|
||||
moveobjectoffscreen 6
|
||||
copyobjectxytoperm 5
|
||||
copyobjectxytoperm 7
|
||||
copyobjectxytoperm 6
|
||||
releaseall
|
||||
end
|
||||
|
||||
|
@ -114,7 +114,7 @@ Route104_EventScript_1ECD4B:: @ 81ECD4B
|
||||
waitmovement 0
|
||||
applymovement 34, Route104_Movement_1ECDCA
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 34
|
||||
copyobjectxytoperm 34
|
||||
msgbox Route104_Text_1EDCED, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq Route104_EventScript_1ECDED
|
||||
@ -203,7 +203,7 @@ Route104_EventScript_1ECE6F:: @ 81ECE6F
|
||||
waitmovement 0
|
||||
applymovement 34, Route104_Movement_1ECDCA
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 34
|
||||
copyobjectxytoperm 34
|
||||
msgbox Route104_Text_1EE009, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq Route104_EventScript_1ECF09
|
||||
@ -416,7 +416,7 @@ Route104_EventScript_1ED139:: @ 81ED139
|
||||
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
|
||||
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE104
|
||||
resetobjectpriority 2, MAP_DEWFORD_TOWN
|
||||
moveobjectoffscreen 2
|
||||
copyobjectxytoperm 2
|
||||
setvar VAR_BOARD_BRINEY_BOAT_STATE, 0
|
||||
goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1B4
|
||||
goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1BE
|
||||
|
@ -58,7 +58,7 @@ Route109_EventScript_1EE7D5:: @ 81EE7D5
|
||||
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
|
||||
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109
|
||||
resetobjectpriority 2, MAP_DEWFORD_TOWN
|
||||
moveobjectoffscreen 2
|
||||
copyobjectxytoperm 2
|
||||
release
|
||||
end
|
||||
|
||||
|
@ -77,7 +77,7 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8
|
||||
fadescreen 0
|
||||
applymovement 5, Route119_WeatherInstitute_2F_Movement_270187
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 5
|
||||
copyobjectxytoperm 5
|
||||
goto Route119_WeatherInstitute_2F_EventScript_27004D
|
||||
end
|
||||
|
||||
|
@ -494,7 +494,7 @@ RustboroCity_EventScript_1E0B2E:: @ 81E0B2E
|
||||
call_if_eq RustboroCity_EventScript_1E0BF3
|
||||
setflag FLAG_INTERACTED_WITH_DEVON_EMPLOYEE_GOODS_STOLEN
|
||||
setvar VAR_RUSTBORO_CITY_STATE, 3
|
||||
moveobjectoffscreen 9
|
||||
copyobjectxytoperm 9
|
||||
msgbox RustboroCity_Text_1E183E, MSGBOX_DEFAULT
|
||||
releaseall
|
||||
end
|
||||
|
@ -285,8 +285,8 @@ RusturfTunnel_EventScript_22D083:: @ 822D083
|
||||
applymovement 6, RusturfTunnel_Movement_22D0AB
|
||||
applymovement 7, RusturfTunnel_Movement_22D0AB
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 6
|
||||
moveobjectoffscreen 7
|
||||
copyobjectxytoperm 6
|
||||
copyobjectxytoperm 7
|
||||
setvar VAR_RUSTURF_TUNNEL_STATE, 3
|
||||
releaseall
|
||||
end
|
||||
|
@ -26,7 +26,7 @@ SeafloorCavern_Entrance_EventScript_234485:: @ 8234485
|
||||
call_if_eq SeafloorCavern_Entrance_EventScript_234539
|
||||
delay 30
|
||||
setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1
|
||||
moveobjectoffscreen 1
|
||||
copyobjectxytoperm 1
|
||||
msgbox SeafloorCavern_Entrance_Text_234544, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
applymovement 1, Common_Movement_WalkInPlaceUp
|
||||
|
@ -77,7 +77,7 @@ SlateportCity_Harbor_EventScript_20C9F5:: @ 820C9F5
|
||||
closemessage
|
||||
setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE
|
||||
setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE
|
||||
moveobjectoffscreen 4
|
||||
copyobjectxytoperm 4
|
||||
setobjectmovementtype 4, MOVEMENT_TYPE_FACE_RIGHT
|
||||
releaseall
|
||||
end
|
||||
|
@ -1366,14 +1366,14 @@ SootopolisCity_EventScript_1E646F:: @ 81E646F
|
||||
SootopolisCity_EventScript_1E64B2:: @ 81E64B2
|
||||
applymovement 18, SootopolisCity_Movement_1E64EC
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 18
|
||||
copyobjectxytoperm 18
|
||||
setvar VAR_SOOTOPOLIS_WALLACE_STATE, 1
|
||||
return
|
||||
|
||||
SootopolisCity_EventScript_1E64C5:: @ 81E64C5
|
||||
applymovement 18, SootopolisCity_Movement_1E64EF
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 18
|
||||
copyobjectxytoperm 18
|
||||
setvar VAR_SOOTOPOLIS_WALLACE_STATE, 2
|
||||
return
|
||||
|
||||
|
@ -36,7 +36,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7:: @ 82279B7
|
||||
waitmovement 0
|
||||
applymovement 1, SootopolisCity_MysteryEventsHouse_1F_Movement_227A21
|
||||
waitmovement 0
|
||||
moveobjectoffscreen 1
|
||||
copyobjectxytoperm 1
|
||||
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
|
||||
waitmovement 0
|
||||
compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1
|
||||
|
@ -44,7 +44,7 @@ VictoryRoad_1F_EventScript_235DE1:: @ 8235DE1
|
||||
trainerbattle_no_intro TRAINER_WALLY_1, VictoryRoad_1F_Text_235FFC
|
||||
msgbox VictoryRoad_1F_Text_236020, MSGBOX_DEFAULT
|
||||
clearflag FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY
|
||||
moveobjectoffscreen 4
|
||||
copyobjectxytoperm 4
|
||||
setflag FLAG_DEFEATED_WALLY_VICTORY_ROAD
|
||||
copyvar VAR_VICTORY_ROAD_1F_STATE, VAR_0x8008
|
||||
releaseall
|
||||
|
@ -100,7 +100,7 @@ gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_settrainerflag
|
||||
.4byte ScrCmd_cleartrainerflag
|
||||
.4byte ScrCmd_setobjectxyperm
|
||||
.4byte ScrCmd_moveobjectoffscreen
|
||||
.4byte ScrCmd_copyobjectxytoperm
|
||||
.4byte ScrCmd_setobjectmovementtype
|
||||
.4byte ScrCmd_waitmessage
|
||||
.4byte ScrCmd_message
|
||||
|
@ -1102,7 +1102,7 @@ bool8 ScrCmd_setobjectxyperm(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_copyobjectxytoperm(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 localId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user