mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Use constants for PC locations
This commit is contained in:
parent
3765c1e7f1
commit
f826a5a82d
@ -243,7 +243,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_PC::
|
|||||||
end
|
end
|
||||||
|
|
||||||
LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC::
|
LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC::
|
||||||
setvar VAR_0x8004, 1
|
setvar VAR_0x8004, PC_LOCATION_BRENDANS_HOUSE
|
||||||
special DoPCTurnOnEffect
|
special DoPCTurnOnEffect
|
||||||
playse SE_PC_ON
|
playse SE_PC_ON
|
||||||
msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT
|
msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT
|
||||||
@ -253,7 +253,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC::
|
|||||||
end
|
end
|
||||||
|
|
||||||
LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC::
|
LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC::
|
||||||
setvar VAR_0x8004, 1
|
setvar VAR_0x8004, PC_LOCATION_BRENDANS_HOUSE
|
||||||
playse SE_PC_OFF
|
playse SE_PC_OFF
|
||||||
special DoPCTurnOffEffect
|
special DoPCTurnOffEffect
|
||||||
releaseall
|
releaseall
|
||||||
|
@ -294,7 +294,7 @@ LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC::
|
|||||||
end
|
end
|
||||||
|
|
||||||
LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC::
|
LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC::
|
||||||
setvar VAR_0x8004, 2
|
setvar VAR_0x8004, PC_LOCATION_MAYS_HOUSE
|
||||||
special DoPCTurnOnEffect
|
special DoPCTurnOnEffect
|
||||||
playse SE_PC_ON
|
playse SE_PC_ON
|
||||||
msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT
|
msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT
|
||||||
@ -304,7 +304,7 @@ LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC::
|
|||||||
end
|
end
|
||||||
|
|
||||||
LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC::
|
LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC::
|
||||||
setvar VAR_0x8004, 2
|
setvar VAR_0x8004, PC_LOCATION_MAYS_HOUSE
|
||||||
playse SE_PC_OFF
|
playse SE_PC_OFF
|
||||||
special DoPCTurnOffEffect
|
special DoPCTurnOffEffect
|
||||||
releaseall
|
releaseall
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
EventScript_PC::
|
EventScript_PC::
|
||||||
lockall
|
lockall
|
||||||
setvar VAR_0x8004, 0
|
setvar VAR_0x8004, PC_LOCATION_OTHER
|
||||||
special DoPCTurnOnEffect
|
special DoPCTurnOnEffect
|
||||||
playse SE_PC_ON
|
playse SE_PC_ON
|
||||||
msgbox Text_BootUpPC, MSGBOX_DEFAULT
|
msgbox Text_BootUpPC, MSGBOX_DEFAULT
|
||||||
@ -51,7 +51,7 @@ EventScript_AccessLanettesPC::
|
|||||||
return
|
return
|
||||||
|
|
||||||
EventScript_TurnOffPC::
|
EventScript_TurnOffPC::
|
||||||
setvar VAR_0x8004, 0
|
setvar VAR_0x8004, PC_LOCATION_OTHER
|
||||||
playse SE_PC_OFF
|
playse SE_PC_OFF
|
||||||
special DoPCTurnOffEffect
|
special DoPCTurnOffEffect
|
||||||
releaseall
|
releaseall
|
||||||
|
@ -1069,11 +1069,11 @@ static void PCTurnOffEffect(void)
|
|||||||
dy = -1;
|
dy = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (gSpecialVar_0x8004 == 0)
|
if (gSpecialVar_0x8004 == PC_LOCATION_OTHER)
|
||||||
tileId = METATILE_Building_PC_Off;
|
tileId = METATILE_Building_PC_Off;
|
||||||
else if (gSpecialVar_0x8004 == 1)
|
else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE)
|
||||||
tileId = METATILE_BrendansMaysHouse_BrendanPC_Off;
|
tileId = METATILE_BrendansMaysHouse_BrendanPC_Off;
|
||||||
else if (gSpecialVar_0x8004 == 2)
|
else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE)
|
||||||
tileId = METATILE_BrendansMaysHouse_MayPC_Off;
|
tileId = METATILE_BrendansMaysHouse_MayPC_Off;
|
||||||
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK);
|
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK);
|
||||||
DrawWholeMapView();
|
DrawWholeMapView();
|
||||||
|
Loading…
Reference in New Issue
Block a user