mirror of https://github.com/pret/pokeemerald.git
Document misc field control
This commit is contained in:
parent
abdf7cbf02
commit
c84f98a7ff
|
@ -28,7 +28,7 @@ void DoFallWarp(void);
|
|||
void DoEscalatorWarp(u8 metatileBehavior);
|
||||
void DoLavaridgeGymB1FWarp(void);
|
||||
void DoLavaridgeGym1FWarp(void);
|
||||
void DoTeleportWarp(void);
|
||||
void DoTeleportTileWarp(void);
|
||||
void DoMossdeepGymWarp(void);
|
||||
void DoPortholeWarp(void);
|
||||
void DoCableClubWarp(void);
|
||||
|
|
|
@ -725,7 +725,7 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB
|
|||
}
|
||||
if (MetatileBehavior_IsAquaHideoutWarp(metatileBehavior) == TRUE)
|
||||
{
|
||||
DoTeleportWarp();
|
||||
DoTeleportTileWarp();
|
||||
return TRUE;
|
||||
}
|
||||
if (MetatileBehavior_IsWarpOrBridge(metatileBehavior) == TRUE)
|
||||
|
|
|
@ -44,7 +44,7 @@ static void sub_808115C(u8);
|
|||
static void FillPalBufferWhite(void);
|
||||
static void Task_ExitDoor(u8);
|
||||
static bool32 WaitForWeatherFadeIn(void);
|
||||
static void task0A_mpl_807E31C(u8 taskId);
|
||||
static void Task_TeleportTileWarpExit(u8 taskId);
|
||||
static void Task_WarpAndLoadMap(u8 taskId);
|
||||
static void Task_DoDoorWarp(u8 taskId);
|
||||
static void Task_EnableScriptAfterMusicFade(u8 taskId);
|
||||
|
@ -297,12 +297,12 @@ void FieldCB_WarpExitFadeFromBlack(void)
|
|||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
static void FieldCB_TeleportWarpExit(void)
|
||||
static void FieldCB_TeleportTileWarpExit(void)
|
||||
{
|
||||
Overworld_PlaySpecialMapMusic();
|
||||
WarpFadeInScreen();
|
||||
PlaySE(SE_TK_WARPOUT);
|
||||
CreateTask(task0A_mpl_807E31C, 10);
|
||||
CreateTask(Task_TeleportTileWarpExit, 10);
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
|
@ -545,14 +545,15 @@ void DoLavaridgeGym1FWarp(void)
|
|||
StartLavaridgeGym1FWarp(10);
|
||||
}
|
||||
|
||||
void DoTeleportWarp(void)
|
||||
// Warp from a teleporting tile, e.g. in Aqua Hideout (For the move Teleport see FldEff_TeleportWarpOut)
|
||||
void DoTeleportTileWarp(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
TryFadeOutOldMapMusic();
|
||||
WarpFadeOutScreen();
|
||||
PlaySE(SE_TK_WARPIN);
|
||||
CreateTask(Task_WarpAndLoadMap, 10);
|
||||
gFieldCallback = FieldCB_TeleportWarpExit;
|
||||
gFieldCallback = FieldCB_TeleportTileWarpExit;
|
||||
}
|
||||
|
||||
void DoMossdeepGymWarp(void)
|
||||
|
@ -999,7 +1000,7 @@ void WriteBattlePyramidViewScanlineEffectBuffer(void)
|
|||
CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480);
|
||||
}
|
||||
|
||||
static void task0A_mpl_807E31C(u8 taskId)
|
||||
static void Task_TeleportTileWarpExit(u8 taskId)
|
||||
{
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
|
@ -1056,7 +1057,7 @@ void sub_80B0244(void)
|
|||
{
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_WarpAndLoadMap, 10);
|
||||
gFieldCallback = FieldCB_TeleportWarpExit;
|
||||
gFieldCallback = FieldCB_TeleportTileWarpExit;
|
||||
}
|
||||
|
||||
void sub_80B0268(void)
|
||||
|
|
|
@ -801,6 +801,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// RS mossdeep gym warp, unused in Emerald
|
||||
bool8 ScrCmd_warpteleport(struct ScriptContext *ctx)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
|
@ -810,7 +811,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext *ctx)
|
|||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
DoTeleportWarp();
|
||||
DoTeleportTileWarp();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue