mirror of
https://github.com/pret/pokeemerald.git
synced 2026-04-26 17:38:12 -05:00
Finish Mossdeep Gym doc, beging documenting rotating tile puzzle
This commit is contained in:
parent
1b41b8b7ca
commit
90a05cf824
|
|
@ -1478,21 +1478,21 @@
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ In FireRed, this command is a nop.
|
@ In FireRed, this command is a nop.
|
||||||
.macro mossdeepgym3 var:req
|
.macro initrotatingtilepuzzle isTrickHouse:req
|
||||||
.byte 0xd5
|
.byte 0xd5
|
||||||
.2byte \var
|
.2byte \isTrickHouse
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro mossdeepgym4
|
.macro mossdeepgym4
|
||||||
.byte 0xd6
|
.byte 0xd6
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro warp7 map:req, byte:req, word1:req, word2:req
|
.macro warpmossdeepgym map:req, warpId:req, x:req, y:req
|
||||||
.byte 0xd7
|
.byte 0xd7
|
||||||
map \map
|
map \map
|
||||||
.byte \byte
|
.byte \warpId
|
||||||
.2byte \word1
|
.2byte \x
|
||||||
.2byte \word2
|
.2byte \y
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro cmdD8
|
.macro cmdD8
|
||||||
|
|
|
||||||
|
|
@ -591,7 +591,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220C67"
|
"script": "MossdeepCity_Gym_EventScript_YellowFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -600,7 +600,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220C7D"
|
"script": "MossdeepCity_Gym_EventScript_BlueFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -609,7 +609,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220C7D"
|
"script": "MossdeepCity_Gym_EventScript_BlueFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -618,7 +618,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220C93"
|
"script": "MossdeepCity_Gym_EventScript_GreenFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -627,7 +627,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220CA9"
|
"script": "MossdeepCity_Gym_EventScript_PurpleFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -636,7 +636,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220CA9"
|
"script": "MossdeepCity_Gym_EventScript_PurpleFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -645,7 +645,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220CBF"
|
"script": "MossdeepCity_Gym_EventScript_RedFloorSwitch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -654,7 +654,7 @@
|
||||||
"elevation": 0,
|
"elevation": 0,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220AF1"
|
"script": "MossdeepCity_Gym_EventScript_WarpToEntrance"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
|
|
@ -663,7 +663,7 @@
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"var": "VAR_TEMP_1",
|
"var": "VAR_TEMP_1",
|
||||||
"var_value": "0",
|
"var_value": "0",
|
||||||
"script": "MossdeepCity_Gym_EventScript_220C67"
|
"script": "MossdeepCity_Gym_EventScript_YellowFloorSwitch"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"bg_events": [
|
"bg_events": [
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,50 @@ MossdeepCity_Gym_MapScripts:: @ 8220800
|
||||||
map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
|
map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
@ NOTE: Mossdeep Gym was redesigned between R/S and E. Leftover (and now functionally unused) scripts are commented below
|
||||||
|
|
||||||
|
@ All the below checks are leftover from RS. FLAG_MOSSDEEP_GYM_SWITCH_X is never set
|
||||||
MossdeepCity_Gym_OnLoad: @ 8220806
|
MossdeepCity_Gym_OnLoad: @ 8220806
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_22083D
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_SetSwitch1Metatiles
|
||||||
goto MossdeepCity_Gym_EventScript_220815
|
goto MossdeepCity_Gym_EventScript_CheckSwitch2
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220815:: @ 8220815
|
MossdeepCity_Gym_EventScript_CheckSwitch2:: @ 8220815
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_220855
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_SetSwitch2Metatiles
|
||||||
goto MossdeepCity_Gym_EventScript_220824
|
goto MossdeepCity_Gym_EventScript_CheckSwitch3
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220824:: @ 8220824
|
MossdeepCity_Gym_EventScript_CheckSwitch3:: @ 8220824
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_22086D
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_SetSwitch3Metatiles
|
||||||
goto MossdeepCity_Gym_EventScript_220833
|
goto MossdeepCity_Gym_EventScript_CheckSwitch4
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220833:: @ 8220833
|
MossdeepCity_Gym_EventScript_CheckSwitch4:: @ 8220833
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_220885
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_SetSwitch4Metatiles
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_22083D:: @ 822083D
|
@ All the below set metatile scripts are leftover from RS and are functionally unused
|
||||||
setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
|
MossdeepCity_Gym_EventScript_SetSwitch1Metatiles:: @ 822083D
|
||||||
setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0
|
||||||
goto MossdeepCity_Gym_EventScript_220815
|
setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
|
goto MossdeepCity_Gym_EventScript_CheckSwitch2
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220855:: @ 8220855
|
MossdeepCity_Gym_EventScript_SetSwitch2Metatiles:: @ 8220855
|
||||||
setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
|
setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0
|
||||||
setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
goto MossdeepCity_Gym_EventScript_220824
|
goto MossdeepCity_Gym_EventScript_CheckSwitch3
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_22086D:: @ 822086D
|
MossdeepCity_Gym_EventScript_SetSwitch3Metatiles:: @ 822086D
|
||||||
setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
|
setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0
|
||||||
setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
goto MossdeepCity_Gym_EventScript_220833
|
goto MossdeepCity_Gym_EventScript_CheckSwitch4
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220885:: @ 8220885
|
MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: @ 8220885
|
||||||
setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
|
setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0
|
||||||
setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_TateAndLiza:: @ 8220898
|
MossdeepCity_Gym_EventScript_TateAndLiza:: @ 8220898
|
||||||
|
|
@ -90,7 +94,7 @@ MossdeepCity_Gym_EventScript_GiveCalmMind2:: @ 8220937
|
||||||
giveitem_std ITEM_TM04
|
giveitem_std ITEM_TM04
|
||||||
compare VAR_RESULT, 0
|
compare VAR_RESULT, 0
|
||||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||||
msgbox MossdeepCity_Gym_Text_221A40, MSGBOX_DEFAULT
|
msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT
|
||||||
setflag FLAG_RECEIVED_TM04
|
setflag FLAG_RECEIVED_TM04
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
@ -99,7 +103,7 @@ MossdeepCity_Gym_EventScript_GiveCalmMind:: @ 822095B
|
||||||
giveitem_std ITEM_TM04
|
giveitem_std ITEM_TM04
|
||||||
compare VAR_RESULT, 0
|
compare VAR_RESULT, 0
|
||||||
goto_if_eq Common_EventScript_BagIsFull
|
goto_if_eq Common_EventScript_BagIsFull
|
||||||
msgbox MossdeepCity_Gym_Text_221A40, MSGBOX_DEFAULT
|
msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT
|
||||||
setflag FLAG_RECEIVED_TM04
|
setflag FLAG_RECEIVED_TM04
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -108,14 +112,15 @@ MossdeepCity_Gym_EventScript_TateAndLizaRematch:: @ 822097E
|
||||||
msgbox MossdeepCity_Gym_Text_TateAndLizaPostRematch, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_TateAndLizaPostRematch, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220999:: @ 8220999
|
@ All the below switch scripts are leftover from RS and are functionally unused
|
||||||
|
MossdeepCity_Gym_EventScript_Switch1:: @ 8220999
|
||||||
lockall
|
lockall
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_2209D0
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_ClearSwitch1
|
||||||
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
|
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
|
setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0
|
||||||
setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -125,78 +130,78 @@ MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed:: @ 82209C8
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_2209D0:: @ 82209D0
|
MossdeepCity_Gym_EventScript_ClearSwitch1:: @ 82209D0
|
||||||
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
|
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Base, 0
|
setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, 0
|
||||||
setmetatile 2, 7, METATILE_MossdeepGym_Empty0, 1
|
setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_2209F5:: @ 82209F5
|
MossdeepCity_Gym_EventScript_Switch2:: @ 82209F5
|
||||||
lockall
|
lockall
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_220A24
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_ClearSwitch2
|
||||||
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
|
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
|
setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0
|
||||||
setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220A24:: @ 8220A24
|
MossdeepCity_Gym_EventScript_ClearSwitch2:: @ 8220A24
|
||||||
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
|
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 8, 14, METATILE_MossdeepGym_OuterWall_RightCorner, 0
|
setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, 0
|
||||||
setmetatile 8, 10, METATILE_MossdeepGym_Empty0, 1
|
setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220A49:: @ 8220A49
|
MossdeepCity_Gym_EventScript_Switch3:: @ 8220A49
|
||||||
lockall
|
lockall
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_220A78
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_ClearSwitch3
|
||||||
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
|
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
|
setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0
|
||||||
setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220A78:: @ 8220A78
|
MossdeepCity_Gym_EventScript_ClearSwitch3:: @ 8220A78
|
||||||
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
|
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Top, 0
|
setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, 0
|
||||||
setmetatile 17, 15, METATILE_MossdeepGym_Empty0, 1
|
setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220A9D:: @ 8220A9D
|
MossdeepCity_Gym_EventScript_Switch4:: @ 8220A9D
|
||||||
lockall
|
lockall
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_220ACC
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_ClearSwitch4
|
||||||
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
|
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
|
setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0
|
||||||
setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
|
setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220ACC:: @ 8220ACC
|
MossdeepCity_Gym_EventScript_ClearSwitch4:: @ 8220ACC
|
||||||
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
|
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
|
||||||
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_Delay32
|
applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setmetatile 1, 23, METATILE_MossdeepGym_Obelisk_Top, 0
|
setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, 0
|
||||||
setmetatile 5, 24, METATILE_MossdeepGym_Empty0, 1
|
setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, 1
|
||||||
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220AF1:: @ 8220AF1
|
MossdeepCity_Gym_EventScript_WarpToEntrance:: @ 8220AF1
|
||||||
lockall
|
lockall
|
||||||
warp7 MAP_MOSSDEEP_CITY_GYM, 255, 7, 30
|
warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 255, 7, 30
|
||||||
waitstate
|
waitstate
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
@ -232,49 +237,50 @@ MossdeepCity_Gym_EventScript_Maura:: @ 8220B70
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_Sylvia:: @ 8220B87
|
MossdeepCity_Gym_EventScript_Sylvia:: @ 8220B87
|
||||||
trainerbattle_single TRAINER_SYLVIA, MossdeepCity_Gym_Text_2213C2, MossdeepCity_Gym_Text_2213F4
|
trainerbattle_single TRAINER_SYLVIA, MossdeepCity_Gym_Text_SylviaPreBattle, MossdeepCity_Gym_Text_SylviaDefeat
|
||||||
msgbox MossdeepCity_Gym_Text_221412, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_SylviaPostBattle, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_Nate:: @ 8220B9E
|
MossdeepCity_Gym_EventScript_Nate:: @ 8220B9E
|
||||||
trainerbattle_single TRAINER_NATE, MossdeepCity_Gym_Text_221460, MossdeepCity_Gym_Text_2214A7
|
trainerbattle_single TRAINER_NATE, MossdeepCity_Gym_Text_NatePreBattle, MossdeepCity_Gym_Text_NateDefeat
|
||||||
msgbox MossdeepCity_Gym_Text_2214D3, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_NatePostBattle, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_Macey:: @ 8220BB5
|
MossdeepCity_Gym_EventScript_Macey:: @ 8220BB5
|
||||||
trainerbattle_single TRAINER_MACEY, MossdeepCity_Gym_Text_22161B, MossdeepCity_Gym_Text_221658
|
trainerbattle_single TRAINER_MACEY, MossdeepCity_Gym_Text_MaceyPreBattle, MossdeepCity_Gym_Text_MaceyDefeat
|
||||||
msgbox MossdeepCity_Gym_Text_221680, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_MaceyPostBattle, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_Clifford:: @ 8220BCC
|
MossdeepCity_Gym_EventScript_Clifford:: @ 8220BCC
|
||||||
trainerbattle_single TRAINER_CLIFFORD, MossdeepCity_Gym_Text_22157C, MossdeepCity_Gym_Text_2215B8
|
trainerbattle_single TRAINER_CLIFFORD, MossdeepCity_Gym_Text_CliffordPreBattle, MossdeepCity_Gym_Text_CliffordDefeat
|
||||||
msgbox MossdeepCity_Gym_Text_2215E2, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_CliffordPostBattle, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_Nicholas:: @ 8220BE3
|
MossdeepCity_Gym_EventScript_Nicholas:: @ 8220BE3
|
||||||
trainerbattle_single TRAINER_NICHOLAS, MossdeepCity_Gym_Text_2216EE, MossdeepCity_Gym_Text_22172D
|
trainerbattle_single TRAINER_NICHOLAS, MossdeepCity_Gym_Text_NicholasPreBattle, MossdeepCity_Gym_Text_NicholasDefeat
|
||||||
msgbox MossdeepCity_Gym_Text_22173A, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_NicholasPostBattle, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_Kathleen:: @ 8220BFA
|
MossdeepCity_Gym_EventScript_Kathleen:: @ 8220BFA
|
||||||
trainerbattle_single TRAINER_KATHLEEN, MossdeepCity_Gym_Text_221507, MossdeepCity_Gym_Text_22153B
|
trainerbattle_single TRAINER_KATHLEEN, MossdeepCity_Gym_Text_KathleenPreBattle, MossdeepCity_Gym_Text_KathleenDefeat
|
||||||
msgbox MossdeepCity_Gym_Text_221545, MSGBOX_AUTOCLOSE
|
msgbox MossdeepCity_Gym_Text_KathleenPostBattle, MSGBOX_AUTOCLOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_GymGuide:: @ 8220C11
|
MossdeepCity_Gym_EventScript_GymGuide:: @ 8220C11
|
||||||
lock
|
lock
|
||||||
faceplayer
|
faceplayer
|
||||||
goto_if_set FLAG_DEFEATED_MOSSDEEP_GYM, MossdeepCity_Gym_EventScript_220C26
|
goto_if_set FLAG_DEFEATED_MOSSDEEP_GYM, MossdeepCity_Gym_EventScript_GymGuidePostVictory
|
||||||
msgbox MossdeepCity_Gym_Text_GymGuideAdvice, MSGBOX_DEFAULT
|
msgbox MossdeepCity_Gym_Text_GymGuideAdvice, MSGBOX_DEFAULT
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220C26:: @ 8220C26
|
MossdeepCity_Gym_EventScript_GymGuidePostVictory:: @ 8220C26
|
||||||
msgbox MossdeepCity_Gym_Text_220E2A, MSGBOX_DEFAULT
|
msgbox MossdeepCity_Gym_Text_GymGuidePostVictory, MSGBOX_DEFAULT
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_Movement_Delay32: @ 8220C30
|
@ Leftover from RS, functionally unused
|
||||||
|
MossdeepCity_Gym_Movement_WaitAfterSwitchUse: @ 8220C30
|
||||||
delay_16
|
delay_16
|
||||||
delay_16
|
delay_16
|
||||||
step_end
|
step_end
|
||||||
|
|
@ -301,11 +307,11 @@ MossdeepCity_Gym_EventScript_GymStatue:: @ 8220C5D
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220C67:: @ 8220C67
|
MossdeepCity_Gym_EventScript_YellowFloorSwitch:: @ 8220C67
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 0
|
initrotatingtilepuzzle FALSE
|
||||||
mossdeepgym1 0
|
mossdeepgym1 0
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -313,11 +319,11 @@ MossdeepCity_Gym_EventScript_220C67:: @ 8220C67
|
||||||
mossdeepgym4
|
mossdeepgym4
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220C7D:: @ 8220C7D
|
MossdeepCity_Gym_EventScript_BlueFloorSwitch:: @ 8220C7D
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 0
|
initrotatingtilepuzzle FALSE
|
||||||
mossdeepgym1 1
|
mossdeepgym1 1
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -325,11 +331,11 @@ MossdeepCity_Gym_EventScript_220C7D:: @ 8220C7D
|
||||||
mossdeepgym4
|
mossdeepgym4
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220C93:: @ 8220C93
|
MossdeepCity_Gym_EventScript_GreenFloorSwitch:: @ 8220C93
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 0
|
initrotatingtilepuzzle FALSE
|
||||||
mossdeepgym1 2
|
mossdeepgym1 2
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -337,11 +343,11 @@ MossdeepCity_Gym_EventScript_220C93:: @ 8220C93
|
||||||
mossdeepgym4
|
mossdeepgym4
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220CA9:: @ 8220CA9
|
MossdeepCity_Gym_EventScript_PurpleFloorSwitch:: @ 8220CA9
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 0
|
initrotatingtilepuzzle FALSE
|
||||||
mossdeepgym1 3
|
mossdeepgym1 3
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -349,11 +355,11 @@ MossdeepCity_Gym_EventScript_220CA9:: @ 8220CA9
|
||||||
mossdeepgym4
|
mossdeepgym4
|
||||||
end
|
end
|
||||||
|
|
||||||
MossdeepCity_Gym_EventScript_220CBF:: @ 8220CBF
|
MossdeepCity_Gym_EventScript_RedFloorSwitch:: @ 8220CBF
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 0
|
initrotatingtilepuzzle FALSE
|
||||||
mossdeepgym1 4
|
mossdeepgym1 4
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -375,7 +381,7 @@ MossdeepCity_Gym_Text_GymGuideAdvice: @ 8220CD5
|
||||||
.string "them how tight you are with your\l"
|
.string "them how tight you are with your\l"
|
||||||
.string "POKéMON. Go for it!$"
|
.string "POKéMON. Go for it!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_220E2A: @ 8220E2A
|
MossdeepCity_Gym_Text_GymGuidePostVictory: @ 8220E2A
|
||||||
.string "Wow, you're astounding!\n"
|
.string "Wow, you're astounding!\n"
|
||||||
.string "You're one great TRAINER!$"
|
.string "You're one great TRAINER!$"
|
||||||
|
|
||||||
|
|
@ -468,77 +474,77 @@ MossdeepCity_Gym_Text_MauraPostBattle: @ 822132E
|
||||||
.string "only despair at the end.\p"
|
.string "only despair at the end.\p"
|
||||||
.string "What goes around comes around…$"
|
.string "What goes around comes around…$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2213C2: @ 82213C2
|
MossdeepCity_Gym_Text_SylviaPreBattle: @ 82213C2
|
||||||
.string "Even at the risk of life, I will win\n"
|
.string "Even at the risk of life, I will win\n"
|
||||||
.string "this battle!$"
|
.string "this battle!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2213F4: @ 82213F4
|
MossdeepCity_Gym_Text_SylviaDefeat: @ 82213F4
|
||||||
.string "What you do…\n"
|
.string "What you do…\n"
|
||||||
.string "It horrifies me…$"
|
.string "It horrifies me…$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221412: @ 8221412
|
MossdeepCity_Gym_Text_SylviaPostBattle: @ 8221412
|
||||||
.string "How dare you beat me…\p"
|
.string "How dare you beat me…\p"
|
||||||
.string "It won't be my fault if something\n"
|
.string "It won't be my fault if something\n"
|
||||||
.string "horrible befalls you…$"
|
.string "horrible befalls you…$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221460: @ 8221460
|
MossdeepCity_Gym_Text_NatePreBattle: @ 8221460
|
||||||
.string "Hohoho.\p"
|
.string "Hohoho.\p"
|
||||||
.string "You need me to show you how tenacious\n"
|
.string "You need me to show you how tenacious\n"
|
||||||
.string "the PSYCHIC type can be.$"
|
.string "the PSYCHIC type can be.$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2214A7: @ 82214A7
|
MossdeepCity_Gym_Text_NateDefeat: @ 82214A7
|
||||||
.string "Oh! My, my!\n"
|
.string "Oh! My, my!\n"
|
||||||
.string "Your battle style is fantastic!$"
|
.string "Your battle style is fantastic!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2214D3: @ 82214D3
|
MossdeepCity_Gym_Text_NatePostBattle: @ 82214D3
|
||||||
.string "I… I don't let defeat rattle m-me,\n"
|
.string "I… I don't let defeat rattle m-me,\n"
|
||||||
.string "however b-badly.$"
|
.string "however b-badly.$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221507: @ 8221507
|
MossdeepCity_Gym_Text_KathleenPreBattle: @ 8221507
|
||||||
.string "Let me show you a perfectly awful,\n"
|
.string "Let me show you a perfectly awful,\n"
|
||||||
.string "horrifying time!$"
|
.string "horrifying time!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_22153B: @ 822153B
|
MossdeepCity_Gym_Text_KathleenDefeat: @ 822153B
|
||||||
.string "N-nooooo!$"
|
.string "N-nooooo!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221545: @ 8221545
|
MossdeepCity_Gym_Text_KathleenPostBattle: @ 8221545
|
||||||
.string "Your vitality is contagious!\n"
|
.string "Your vitality is contagious!\n"
|
||||||
.string "Get away from me quickly!$"
|
.string "Get away from me quickly!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_22157C: @ 822157C
|
MossdeepCity_Gym_Text_CliffordPreBattle: @ 822157C
|
||||||
.string "I may be past my prime, but I suggest\n"
|
.string "I may be past my prime, but I suggest\n"
|
||||||
.string "you not patronize me.$"
|
.string "you not patronize me.$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2215B8: @ 82215B8
|
MossdeepCity_Gym_Text_CliffordDefeat: @ 82215B8
|
||||||
.string "Ah, you overflow with the power\n"
|
.string "Ah, you overflow with the power\n"
|
||||||
.string "of youth!$"
|
.string "of youth!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2215E2: @ 82215E2
|
MossdeepCity_Gym_Text_CliffordPostBattle: @ 82215E2
|
||||||
.string "It seems that I could not overcome\n"
|
.string "It seems that I could not overcome\n"
|
||||||
.string "your youthful energy.$"
|
.string "your youthful energy.$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_22161B: @ 822161B
|
MossdeepCity_Gym_Text_MaceyPreBattle: @ 822161B
|
||||||
.string "You're not getting through to the end!\n"
|
.string "You're not getting through to the end!\n"
|
||||||
.string "Not if I can help it!$"
|
.string "Not if I can help it!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221658: @ 8221658
|
MossdeepCity_Gym_Text_MaceyDefeat: @ 8221658
|
||||||
.string "How could you be so ludicrously\n"
|
.string "How could you be so ludicrously\n"
|
||||||
.string "strong?$"
|
.string "strong?$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221680: @ 8221680
|
MossdeepCity_Gym_Text_MaceyPostBattle: @ 8221680
|
||||||
.string "Humph! You may be strong, but you're\n"
|
.string "Humph! You may be strong, but you're\n"
|
||||||
.string "not suitable for the PSYCHIC type!\p"
|
.string "not suitable for the PSYCHIC type!\p"
|
||||||
.string "The way you battle is somehow brutal!$"
|
.string "The way you battle is somehow brutal!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_2216EE: @ 82216EE
|
MossdeepCity_Gym_Text_NicholasPreBattle: @ 82216EE
|
||||||
.string "Wroooar! Have a taste of my super\n"
|
.string "Wroooar! Have a taste of my super\n"
|
||||||
.string "POKéMON hard-battling power!$"
|
.string "POKéMON hard-battling power!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_22172D: @ 822172D
|
MossdeepCity_Gym_Text_NicholasDefeat: @ 822172D
|
||||||
.string "Oh!\n"
|
.string "Oh!\n"
|
||||||
.string "Done in!$"
|
.string "Done in!$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_22173A: @ 822173A
|
MossdeepCity_Gym_Text_NicholasPostBattle: @ 822173A
|
||||||
.string "All right! I think I'll develop a special\n"
|
.string "All right! I think I'll develop a special\n"
|
||||||
.string "invincible POKéMON power next.$"
|
.string "invincible POKéMON power next.$"
|
||||||
|
|
||||||
|
|
@ -573,7 +579,7 @@ MossdeepCity_Gym_Text_ExplainMindBadgeTakeThis: @ 8221999
|
||||||
.string "DIVE outside of battle.\p"
|
.string "DIVE outside of battle.\p"
|
||||||
.string "TATE: You should also take this, too.$"
|
.string "TATE: You should also take this, too.$"
|
||||||
|
|
||||||
MossdeepCity_Gym_Text_221A40: @ 8221A40
|
MossdeepCity_Gym_Text_ExplainCalmMind: @ 8221A40
|
||||||
.string "TATE: That TM04 contains…\n"
|
.string "TATE: That TM04 contains…\n"
|
||||||
.string "LIZA: CALM MIND!\p"
|
.string "LIZA: CALM MIND!\p"
|
||||||
.string "TATE: It raises SP. ATK and…\n"
|
.string "TATE: It raises SP. ATK and…\n"
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ Route110_TrickHousePuzzle7_EventScript_26E31B:: @ 826E31B
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 1
|
initrotatingtilepuzzle TRUE
|
||||||
mossdeepgym1 0
|
mossdeepgym1 0
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -234,7 +234,7 @@ Route110_TrickHousePuzzle7_EventScript_26E331:: @ 826E331
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 1
|
initrotatingtilepuzzle TRUE
|
||||||
mossdeepgym1 1
|
mossdeepgym1 1
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -246,7 +246,7 @@ Route110_TrickHousePuzzle7_EventScript_26E347:: @ 826E347
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 1
|
initrotatingtilepuzzle TRUE
|
||||||
mossdeepgym1 2
|
mossdeepgym1 2
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -258,7 +258,7 @@ Route110_TrickHousePuzzle7_EventScript_26E35D:: @ 826E35D
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 1
|
initrotatingtilepuzzle TRUE
|
||||||
mossdeepgym1 3
|
mossdeepgym1 3
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
@ -270,7 +270,7 @@ Route110_TrickHousePuzzle7_EventScript_26E373:: @ 826E373
|
||||||
playse SE_MU_PACHI
|
playse SE_MU_PACHI
|
||||||
waitse
|
waitse
|
||||||
playse SE_TU_SAA
|
playse SE_TU_SAA
|
||||||
mossdeepgym3 1
|
initrotatingtilepuzzle TRUE
|
||||||
mossdeepgym1 4
|
mossdeepgym1 4
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
mossdeepgym2
|
mossdeepgym2
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,9 @@ gScriptCmdTable:: @ 81DB67C
|
||||||
.4byte ScrCmd_setmonmetlocation
|
.4byte ScrCmd_setmonmetlocation
|
||||||
.4byte ScrCmd_mossdeepgym1
|
.4byte ScrCmd_mossdeepgym1
|
||||||
.4byte ScrCmd_mossdeepgym2
|
.4byte ScrCmd_mossdeepgym2
|
||||||
.4byte ScrCmd_mossdeepgym3
|
.4byte ScrCmd_initrotatingtilepuzzle
|
||||||
.4byte ScrCmd_mossdeepgym4
|
.4byte ScrCmd_mossdeepgym4
|
||||||
.4byte ScrCmd_warpD7
|
.4byte ScrCmd_warpmossdeepgym
|
||||||
.4byte ScrCmd_cmdD8
|
.4byte ScrCmd_cmdD8
|
||||||
.4byte ScrCmd_cmdD9
|
.4byte ScrCmd_cmdD9
|
||||||
.4byte ScrCmd_cmdDA
|
.4byte ScrCmd_cmdDA
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,10 @@
|
||||||
#define FLAG_MET_TEAM_AQUA_HARBOR 0x61
|
#define FLAG_MET_TEAM_AQUA_HARBOR 0x61
|
||||||
#define FLAG_TV_EXPLAINED 0x62
|
#define FLAG_TV_EXPLAINED 0x62
|
||||||
#define FLAG_MAUVILLE_GYM_BARRIERS_STATE 0x63
|
#define FLAG_MAUVILLE_GYM_BARRIERS_STATE 0x63
|
||||||
#define FLAG_MOSSDEEP_GYM_SWITCH_1 0x64
|
#define FLAG_MOSSDEEP_GYM_SWITCH_1 0x64 // Leftover from the RS version of Mossdeep Gym, functionally always zero
|
||||||
#define FLAG_MOSSDEEP_GYM_SWITCH_2 0x65
|
#define FLAG_MOSSDEEP_GYM_SWITCH_2 0x65 //
|
||||||
#define FLAG_MOSSDEEP_GYM_SWITCH_3 0x66
|
#define FLAG_MOSSDEEP_GYM_SWITCH_3 0x66 //
|
||||||
#define FLAG_MOSSDEEP_GYM_SWITCH_4 0x67
|
#define FLAG_MOSSDEEP_GYM_SWITCH_4 0x67 //
|
||||||
|
|
||||||
#define FLAG_UNUSED_0x068 0x68 // Unused Flag
|
#define FLAG_UNUSED_0x068 0x68 // Unused Flag
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,15 +68,16 @@
|
||||||
#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B
|
#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B
|
||||||
#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C
|
#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C
|
||||||
|
|
||||||
// gTileset_MossdeepGym
|
// gTileset_MossdeepGym from R/S
|
||||||
#define METATILE_MossdeepGym_Obelisk_Top 0x204
|
#define METATILE_RS_MossdeepGym_RedArrow_Right 0x204
|
||||||
#define METATILE_MossdeepGym_Obelisk_Base 0x20C
|
#define METATILE_RS_MossdeepGym_RedArrow_Left 0x20C
|
||||||
#define METATILE_MossdeepGym_Wall_LeftCorner 0x20D
|
#define METATILE_RS_MossdeepGym_RedArrow_Up 0x20D
|
||||||
#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205
|
#define METATILE_RS_MossdeepGym_RedArrow_Down 0x205
|
||||||
#define METATILE_MossdeepGym_Empty0 0x238
|
#define METATILE_RS_MossdeepGym_Switch_Up 0x238
|
||||||
#define METATILE_MossdeepGym_Empty1 0x239
|
#define METATILE_RS_MossdeepGym_Switch_Down 0x239
|
||||||
#define METATILE_MossdeepGym_YellowRightArrow 0x250
|
|
||||||
|
|
||||||
|
// gTileset_MossdeepGym from Emerald
|
||||||
|
#define METATILE_MossdeepGym_YellowRightArrow 0x250
|
||||||
|
|
||||||
// gTileset_BrendansMaysHouse
|
// gTileset_BrendansMaysHouse
|
||||||
#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A
|
#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A
|
||||||
|
|
@ -378,6 +379,7 @@
|
||||||
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263
|
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263
|
||||||
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B
|
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B
|
||||||
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C
|
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C
|
||||||
|
#define METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right 0x298
|
||||||
|
|
||||||
// gTileset_BikeShop
|
// gTileset_BikeShop
|
||||||
#define METATILE_BikeShop_Barrier_Hidden_Top 0x269
|
#define METATILE_BikeShop_Barrier_Hidden_Top 0x269
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ void sub_80AF80C(u8 metatileBehavior);
|
||||||
void sub_80AF828(void);
|
void sub_80AF828(void);
|
||||||
void sub_80AF838(void);
|
void sub_80AF838(void);
|
||||||
void sub_80AF848(void);
|
void sub_80AF848(void);
|
||||||
void sub_80AF87C(void);
|
void DoMossdeepGymWarp(void);
|
||||||
void sub_80AF8B8(void);
|
void sub_80AF8B8(void);
|
||||||
void sub_80AF948(void);
|
void sub_80AF948(void);
|
||||||
void sub_80AF9F8(void);
|
void sub_80AF9F8(void);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#ifndef GUARD_MOSSDEEP_GYM_H
|
|
||||||
#define GUARD_MOSSDEEP_GYM_H
|
|
||||||
|
|
||||||
void InitMossdeepGymTiles(bool8 arg0);
|
|
||||||
void FinishMossdeepGymTiles(void);
|
|
||||||
u16 MossdeepGym_MoveEvents(u8 arg0);
|
|
||||||
void MossdeepGym_TurnEvents(void);
|
|
||||||
|
|
||||||
#endif // GUARD_MOSSDEEP_GYM_H
|
|
||||||
9
include/rotating_tile_puzzle.h
Normal file
9
include/rotating_tile_puzzle.h
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef GUARD_ROTATING_TILE_PUZZLE_H
|
||||||
|
#define GUARD_ROTATING_TILE_PUZZLE_H
|
||||||
|
|
||||||
|
void InitRotatingTilePuzzle(bool8 isTrickHouse);
|
||||||
|
void FinishMossdeepGymTiles(void);
|
||||||
|
u16 MossdeepGym_MoveEvents(u8 puzzleNumber);
|
||||||
|
void MossdeepGym_TurnEvents(void);
|
||||||
|
|
||||||
|
#endif // GUARD_ROTATING_TILE_PUZZLE_H
|
||||||
|
|
@ -287,7 +287,7 @@ SECTIONS {
|
||||||
src/battle_arena.o(.text);
|
src/battle_arena.o(.text);
|
||||||
src/battle_factory.o(.text);
|
src/battle_factory.o(.text);
|
||||||
src/battle_pike.o(.text);
|
src/battle_pike.o(.text);
|
||||||
src/mossdeep_gym.o(.text);
|
src/rotating_tile_puzzle.o(.text);
|
||||||
src/battle_pyramid.o(.text);
|
src/battle_pyramid.o(.text);
|
||||||
src/item_menu.o(.text);
|
src/item_menu.o(.text);
|
||||||
src/list_menu.o(.text);
|
src/list_menu.o(.text);
|
||||||
|
|
@ -644,8 +644,8 @@ SECTIONS {
|
||||||
src/battle_arena.o(.rodata);
|
src/battle_arena.o(.rodata);
|
||||||
src/battle_factory.o(.rodata);
|
src/battle_factory.o(.rodata);
|
||||||
src/battle_pike.o(.rodata);
|
src/battle_pike.o(.rodata);
|
||||||
src/mossdeep_gym.o(.rodata);
|
src/rotating_tile_puzzle.o(.rodata);
|
||||||
data/mossdeep_gym.o(.rodata);
|
data/rotating_tile_puzzle.o(.rodata);
|
||||||
src/battle_pyramid.o(.rodata);
|
src/battle_pyramid.o(.rodata);
|
||||||
src/item_menu.o(.rodata);
|
src/item_menu.o(.rodata);
|
||||||
src/list_menu.o(.rodata);
|
src/list_menu.o(.rodata);
|
||||||
|
|
|
||||||
|
|
@ -738,7 +738,7 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB
|
||||||
}
|
}
|
||||||
if (MetatileBehavior_IsMossdeepGymWarp(metatileBehavior) == TRUE)
|
if (MetatileBehavior_IsMossdeepGymWarp(metatileBehavior) == TRUE)
|
||||||
{
|
{
|
||||||
sub_80AF87C();
|
DoMossdeepGymWarp();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
DoWarp();
|
DoWarp();
|
||||||
|
|
|
||||||
|
|
@ -556,7 +556,7 @@ void sub_80AF848(void)
|
||||||
gFieldCallback = sub_80AF3E8;
|
gFieldCallback = sub_80AF3E8;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80AF87C(void)
|
void DoMossdeepGymWarp(void)
|
||||||
{
|
{
|
||||||
sub_8085540(1);
|
sub_8085540(1);
|
||||||
ScriptContext2_Enable();
|
ScriptContext2_Enable();
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
#include "event_object_movement.h"
|
#include "event_object_movement.h"
|
||||||
#include "fieldmap.h"
|
#include "fieldmap.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "mossdeep_gym.h"
|
#include "rotating_tile_puzzle.h"
|
||||||
#include "script_movement.h"
|
#include "script_movement.h"
|
||||||
#include "constants/event_object_movement_constants.h"
|
#include "constants/event_object_movement_constants.h"
|
||||||
#include "constants/event_objects.h"
|
#include "constants/event_objects.h"
|
||||||
|
#include "constants/metatile_labels.h"
|
||||||
|
|
||||||
// Movement scripts.
|
// Movement scripts.
|
||||||
extern const u8 gUnknown_08612698[];
|
extern const u8 gUnknown_08612698[];
|
||||||
|
|
@ -23,11 +24,11 @@ struct MossdeepSubStruct
|
||||||
u8 eventTemplateId;
|
u8 eventTemplateId;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MossdeepStruct
|
struct RotatingTilePuzzle
|
||||||
{
|
{
|
||||||
struct MossdeepSubStruct objects[EVENT_OBJECTS_COUNT];
|
struct MossdeepSubStruct objects[EVENT_OBJECTS_COUNT];
|
||||||
u8 count;
|
u8 count;
|
||||||
bool8 unk41;
|
bool8 isTrickHouse;
|
||||||
};
|
};
|
||||||
|
|
||||||
// This file's functions.
|
// This file's functions.
|
||||||
|
|
@ -35,57 +36,57 @@ static void AddEventObject(u8 eventTemplateId, u8 arg1);
|
||||||
static void sub_81A8D94(u8 eventTemplateId, u8 arg1);
|
static void sub_81A8D94(u8 eventTemplateId, u8 arg1);
|
||||||
|
|
||||||
// EWRAM vars
|
// EWRAM vars
|
||||||
EWRAM_DATA static struct MossdeepStruct *sMossdeepGym = NULL;
|
EWRAM_DATA static struct RotatingTilePuzzle *sRotatingTilePuzzle = NULL;
|
||||||
|
|
||||||
// code
|
// code
|
||||||
void InitMossdeepGymTiles(bool8 arg0)
|
void InitRotatingTilePuzzle(bool8 isTrickHouse)
|
||||||
{
|
{
|
||||||
if (sMossdeepGym == NULL)
|
if (sRotatingTilePuzzle == NULL)
|
||||||
sMossdeepGym = AllocZeroed(sizeof(*sMossdeepGym));
|
sRotatingTilePuzzle = AllocZeroed(sizeof(*sRotatingTilePuzzle));
|
||||||
|
|
||||||
sMossdeepGym->unk41 = arg0;
|
sRotatingTilePuzzle->isTrickHouse = isTrickHouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishMossdeepGymTiles(void)
|
void FinishMossdeepGymTiles(void)
|
||||||
{
|
{
|
||||||
u8 id;
|
u8 id;
|
||||||
|
|
||||||
if (sMossdeepGym != NULL)
|
if (sRotatingTilePuzzle != NULL)
|
||||||
FREE_AND_SET_NULL(sMossdeepGym);
|
FREE_AND_SET_NULL(sRotatingTilePuzzle);
|
||||||
|
|
||||||
id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
|
id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
|
||||||
EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
|
EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
|
||||||
ScriptMovement_UnfreezeEventObjects();
|
ScriptMovement_UnfreezeEventObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 MossdeepGym_MoveEvents(u8 arg0)
|
u16 MossdeepGym_MoveEvents(u8 puzzleNumber)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
struct EventObjectTemplate *events = gSaveBlock1Ptr->eventObjectTemplates;
|
struct EventObjectTemplate *eventObjects = gSaveBlock1Ptr->eventObjectTemplates;
|
||||||
u16 localId = 0;
|
u16 localId = 0;
|
||||||
|
|
||||||
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
for (i = 0; i < EVENT_OBJECT_TEMPLATES_COUNT; i++)
|
||||||
{
|
{
|
||||||
s32 var;
|
s32 puzzleTileStart;
|
||||||
u8 r5;
|
u8 r5;
|
||||||
s16 x = events[i].x + 7;
|
s16 x = eventObjects[i].x + 7;
|
||||||
s16 y = events[i].y + 7;
|
s16 y = eventObjects[i].y + 7;
|
||||||
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
||||||
|
|
||||||
if (!sMossdeepGym->unk41)
|
if (!sRotatingTilePuzzle->isTrickHouse)
|
||||||
var = 0x250;
|
puzzleTileStart = METATILE_MossdeepGym_YellowRightArrow;
|
||||||
else
|
else
|
||||||
var = 0x298;
|
puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right;
|
||||||
|
|
||||||
if (metatile < 0x250)
|
if (metatile < METATILE_MossdeepGym_YellowRightArrow)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((u8)((metatile - var) / 8) >= 5)
|
if ((u8)((metatile - puzzleTileStart) / 8) >= 5)
|
||||||
continue;
|
continue;
|
||||||
if ((u8)((metatile - var) / 8) != arg0)
|
if ((u8)((metatile - puzzleTileStart) / 8) != puzzleNumber)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
r5 = (u8)((metatile - var) % 8);
|
r5 = (u8)((metatile - puzzleTileStart) % 8);
|
||||||
if (r5 < 4)
|
if (r5 < 4)
|
||||||
{
|
{
|
||||||
s8 x = 0;
|
s8 x = 0;
|
||||||
|
|
@ -114,12 +115,12 @@ u16 MossdeepGym_MoveEvents(u8 arg0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
events[i].x += x;
|
eventObjects[i].x += x;
|
||||||
events[i].y += y;
|
eventObjects[i].y += y;
|
||||||
if (GetEventObjectIdByLocalIdAndMap(events[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup) != EVENT_OBJECTS_COUNT)
|
if (GetEventObjectIdByLocalIdAndMap(eventObjects[i].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup) != EVENT_OBJECTS_COUNT)
|
||||||
{
|
{
|
||||||
AddEventObject(i, r5);
|
AddEventObject(i, r5);
|
||||||
localId = events[i].localId;
|
localId = eventObjects[i].localId;
|
||||||
ScriptMovement_StartObjectMovementScript(localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, movementScript);
|
ScriptMovement_StartObjectMovementScript(localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, movementScript);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -135,29 +136,29 @@ u16 MossdeepGym_MoveEvents(u8 arg0)
|
||||||
void MossdeepGym_TurnEvents(void)
|
void MossdeepGym_TurnEvents(void)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
s32 var;
|
s32 puzzleTileStart;
|
||||||
struct EventObjectTemplate *events;
|
struct EventObjectTemplate *eventObjects;
|
||||||
|
|
||||||
if (sMossdeepGym == NULL)
|
if (sRotatingTilePuzzle == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!sMossdeepGym->unk41)
|
if (!sRotatingTilePuzzle->isTrickHouse)
|
||||||
var = 0x250;
|
puzzleTileStart = METATILE_MossdeepGym_YellowRightArrow;
|
||||||
else
|
else
|
||||||
var = 0x298;
|
puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right;
|
||||||
|
|
||||||
events = gSaveBlock1Ptr->eventObjectTemplates;
|
eventObjects = gSaveBlock1Ptr->eventObjectTemplates;
|
||||||
for (i = 0; i < sMossdeepGym->count; i++)
|
for (i = 0; i < sRotatingTilePuzzle->count; i++)
|
||||||
{
|
{
|
||||||
s32 r6;
|
s32 r6;
|
||||||
s8 r0;
|
s8 r0;
|
||||||
u8 eventObjectId;
|
u8 eventObjectId;
|
||||||
s16 x = events[sMossdeepGym->objects[i].eventTemplateId].x + 7;
|
s16 x = eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].x + 7;
|
||||||
s16 y = events[sMossdeepGym->objects[i].eventTemplateId].y + 7;
|
s16 y = eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].y + 7;
|
||||||
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
||||||
|
|
||||||
r0 = (u8)((metatile - var) % 8);
|
r0 = (u8)((metatile - puzzleTileStart) % 8);
|
||||||
r0 -= (sMossdeepGym->objects[i].unk0);
|
r0 -= (sRotatingTilePuzzle->objects[i].unk0);
|
||||||
if (r0 < 0 || r0 == 3)
|
if (r0 < 0 || r0 == 3)
|
||||||
{
|
{
|
||||||
if (r0 == -3)
|
if (r0 == -3)
|
||||||
|
|
@ -173,7 +174,7 @@ void MossdeepGym_TurnEvents(void)
|
||||||
r6 = 2;
|
r6 = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
eventObjectId = GetEventObjectIdByLocalIdAndMap(events[sMossdeepGym->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
eventObjectId = GetEventObjectIdByLocalIdAndMap(eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||||
if (eventObjectId != EVENT_OBJECTS_COUNT)
|
if (eventObjectId != EVENT_OBJECTS_COUNT)
|
||||||
{
|
{
|
||||||
const u8 *movementScript;
|
const u8 *movementScript;
|
||||||
|
|
@ -184,24 +185,24 @@ void MossdeepGym_TurnEvents(void)
|
||||||
{
|
{
|
||||||
case DIR_EAST:
|
case DIR_EAST:
|
||||||
movementScript = MossdeepGym_Movement_FaceUp;
|
movementScript = MossdeepGym_Movement_FaceUp;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||||
break;
|
break;
|
||||||
case DIR_SOUTH:
|
case DIR_SOUTH:
|
||||||
movementScript = MossdeepGym_Movement_FaceRight;
|
movementScript = MossdeepGym_Movement_FaceRight;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||||
break;
|
break;
|
||||||
case DIR_WEST:
|
case DIR_WEST:
|
||||||
movementScript = MossdeepGym_Movement_FaceDown;
|
movementScript = MossdeepGym_Movement_FaceDown;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||||
break;
|
break;
|
||||||
case DIR_NORTH:
|
case DIR_NORTH:
|
||||||
movementScript = MossdeepGym_Movement_FaceLeft;
|
movementScript = MossdeepGym_Movement_FaceLeft;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ScriptMovement_StartObjectMovementScript(events[sMossdeepGym->objects[i].eventTemplateId].localId,
|
ScriptMovement_StartObjectMovementScript(eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].localId,
|
||||||
gSaveBlock1Ptr->location.mapNum,
|
gSaveBlock1Ptr->location.mapNum,
|
||||||
gSaveBlock1Ptr->location.mapGroup,
|
gSaveBlock1Ptr->location.mapGroup,
|
||||||
movementScript);
|
movementScript);
|
||||||
|
|
@ -212,24 +213,24 @@ void MossdeepGym_TurnEvents(void)
|
||||||
{
|
{
|
||||||
case DIR_EAST:
|
case DIR_EAST:
|
||||||
movementScript = MossdeepGym_Movement_FaceDown;
|
movementScript = MossdeepGym_Movement_FaceDown;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||||
break;
|
break;
|
||||||
case DIR_SOUTH:
|
case DIR_SOUTH:
|
||||||
movementScript = MossdeepGym_Movement_FaceLeft;
|
movementScript = MossdeepGym_Movement_FaceLeft;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||||
break;
|
break;
|
||||||
case DIR_WEST:
|
case DIR_WEST:
|
||||||
movementScript = MossdeepGym_Movement_FaceUp;
|
movementScript = MossdeepGym_Movement_FaceUp;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||||
break;
|
break;
|
||||||
case DIR_NORTH:
|
case DIR_NORTH:
|
||||||
movementScript = MossdeepGym_Movement_FaceRight;
|
movementScript = MossdeepGym_Movement_FaceRight;
|
||||||
events[sMossdeepGym->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ScriptMovement_StartObjectMovementScript(events[sMossdeepGym->objects[i].eventTemplateId].localId,
|
ScriptMovement_StartObjectMovementScript(eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].localId,
|
||||||
gSaveBlock1Ptr->location.mapNum,
|
gSaveBlock1Ptr->location.mapNum,
|
||||||
gSaveBlock1Ptr->location.mapGroup,
|
gSaveBlock1Ptr->location.mapGroup,
|
||||||
movementScript);
|
movementScript);
|
||||||
|
|
@ -240,28 +241,28 @@ void MossdeepGym_TurnEvents(void)
|
||||||
|
|
||||||
static void AddEventObject(u8 eventTemplateId, u8 arg1)
|
static void AddEventObject(u8 eventTemplateId, u8 arg1)
|
||||||
{
|
{
|
||||||
sMossdeepGym->objects[sMossdeepGym->count].eventTemplateId = eventTemplateId;
|
sRotatingTilePuzzle->objects[sRotatingTilePuzzle->count].eventTemplateId = eventTemplateId;
|
||||||
sMossdeepGym->objects[sMossdeepGym->count].unk0 = arg1;
|
sRotatingTilePuzzle->objects[sRotatingTilePuzzle->count].unk0 = arg1;
|
||||||
sMossdeepGym->count++;
|
sRotatingTilePuzzle->count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
|
static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
|
||||||
{
|
{
|
||||||
s8 r0;
|
s8 r0;
|
||||||
s32 r6;
|
s32 r6;
|
||||||
s32 var;
|
s32 puzzleTileStart;
|
||||||
u16 movementType;
|
u16 movementType;
|
||||||
struct EventObjectTemplate *events = gSaveBlock1Ptr->eventObjectTemplates;
|
struct EventObjectTemplate *eventObjects = gSaveBlock1Ptr->eventObjectTemplates;
|
||||||
s16 x = events[eventTemplateId].x + 7;
|
s16 x = eventObjects[eventTemplateId].x + 7;
|
||||||
s16 y = events[eventTemplateId].y + 7;
|
s16 y = eventObjects[eventTemplateId].y + 7;
|
||||||
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
u16 metatile = MapGridGetMetatileIdAt(x, y);
|
||||||
|
|
||||||
if (!sMossdeepGym->unk41)
|
if (!sRotatingTilePuzzle->isTrickHouse)
|
||||||
var = 0x250;
|
puzzleTileStart = METATILE_MossdeepGym_YellowRightArrow;
|
||||||
else
|
else
|
||||||
var = 0x298;
|
puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right;
|
||||||
|
|
||||||
r0 = (u8)((metatile - var) % 8);
|
r0 = (u8)((metatile - puzzleTileStart) % 8);
|
||||||
r0 -= arg1;
|
r0 -= arg1;
|
||||||
if (r0 < 0 || r0 == 3)
|
if (r0 < 0 || r0 == 3)
|
||||||
r6 = 0;
|
r6 = 0;
|
||||||
|
|
@ -270,22 +271,22 @@ static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
|
||||||
else
|
else
|
||||||
r6 = 2;
|
r6 = 2;
|
||||||
|
|
||||||
movementType = events[eventTemplateId].movementType;
|
movementType = eventObjects[eventTemplateId].movementType;
|
||||||
if (r6 == 0)
|
if (r6 == 0)
|
||||||
{
|
{
|
||||||
switch (movementType)
|
switch (movementType)
|
||||||
{
|
{
|
||||||
case MOVEMENT_TYPE_FACE_RIGHT:
|
case MOVEMENT_TYPE_FACE_RIGHT:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||||
break;
|
break;
|
||||||
case MOVEMENT_TYPE_FACE_DOWN:
|
case MOVEMENT_TYPE_FACE_DOWN:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||||
break;
|
break;
|
||||||
case MOVEMENT_TYPE_FACE_LEFT:
|
case MOVEMENT_TYPE_FACE_LEFT:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||||
break;
|
break;
|
||||||
case MOVEMENT_TYPE_FACE_UP:
|
case MOVEMENT_TYPE_FACE_UP:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -296,16 +297,16 @@ static void sub_81A8D94(u8 eventTemplateId, u8 arg1)
|
||||||
switch (movementType)
|
switch (movementType)
|
||||||
{
|
{
|
||||||
case MOVEMENT_TYPE_FACE_RIGHT:
|
case MOVEMENT_TYPE_FACE_RIGHT:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||||
break;
|
break;
|
||||||
case MOVEMENT_TYPE_FACE_DOWN:
|
case MOVEMENT_TYPE_FACE_DOWN:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||||
break;
|
break;
|
||||||
case MOVEMENT_TYPE_FACE_LEFT:
|
case MOVEMENT_TYPE_FACE_LEFT:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||||
break;
|
break;
|
||||||
case MOVEMENT_TYPE_FACE_UP:
|
case MOVEMENT_TYPE_FACE_UP:
|
||||||
events[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
eventObjects[eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
14
src/scrcmd.c
14
src/scrcmd.c
|
|
@ -815,7 +815,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext *ctx)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ScrCmd_warpD7(struct ScriptContext *ctx)
|
bool8 ScrCmd_warpmossdeepgym(struct ScriptContext *ctx)
|
||||||
{
|
{
|
||||||
u8 mapGroup = ScriptReadByte(ctx);
|
u8 mapGroup = ScriptReadByte(ctx);
|
||||||
u8 mapNum = ScriptReadByte(ctx);
|
u8 mapNum = ScriptReadByte(ctx);
|
||||||
|
|
@ -824,7 +824,7 @@ bool8 ScrCmd_warpD7(struct ScriptContext *ctx)
|
||||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||||
|
|
||||||
SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||||
sub_80AF87C();
|
DoMossdeepGymWarp();
|
||||||
ResetInitialPlayerAvatarState();
|
ResetInitialPlayerAvatarState();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -2151,9 +2151,9 @@ bool8 ScrCmd_takecoins(struct ScriptContext *ctx)
|
||||||
|
|
||||||
bool8 ScrCmd_mossdeepgym1(struct ScriptContext *ctx)
|
bool8 ScrCmd_mossdeepgym1(struct ScriptContext *ctx)
|
||||||
{
|
{
|
||||||
u16 v1 = VarGet(ScriptReadHalfword(ctx));
|
u16 puzzleNumber = VarGet(ScriptReadHalfword(ctx));
|
||||||
|
|
||||||
sMovingNpcId = MossdeepGym_MoveEvents(v1);
|
sMovingNpcId = MossdeepGym_MoveEvents(puzzleNumber);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2163,11 +2163,11 @@ bool8 ScrCmd_mossdeepgym2(struct ScriptContext *ctx)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ScrCmd_mossdeepgym3(struct ScriptContext *ctx)
|
bool8 ScrCmd_initrotatingtilepuzzle(struct ScriptContext *ctx)
|
||||||
{
|
{
|
||||||
u16 v1 = VarGet(ScriptReadHalfword(ctx));
|
u16 isTrickHouse = VarGet(ScriptReadHalfword(ctx));
|
||||||
|
|
||||||
InitMossdeepGymTiles(v1);
|
InitRotatingTilePuzzle(isTrickHouse);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@
|
||||||
.include "src/match_call.o"
|
.include "src/match_call.o"
|
||||||
.include "src/menu.o"
|
.include "src/menu.o"
|
||||||
.include "src/battle_factory_screen.o"
|
.include "src/battle_factory_screen.o"
|
||||||
.include "src/mossdeep_gym.o"
|
.include "src/rotating_tile_puzzle.o"
|
||||||
.include "src/item_menu.o"
|
.include "src/item_menu.o"
|
||||||
.include "src/list_menu.o"
|
.include "src/list_menu.o"
|
||||||
.include "src/dynamic_placeholder_text_util.o"
|
.include "src/dynamic_placeholder_text_util.o"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user