mirror of
https://github.com/pret/pokeruby.git
synced 2024-11-30 08:20:51 +00:00
Sync cave_hole.inc
This commit is contained in:
parent
4722b1e2a2
commit
f0bf1e641c
41
data-de/event_scripts.s
vendored
41
data-de/event_scripts.s
vendored
@ -1641,46 +1641,7 @@ MauvilleCity_GameCorner_EventScript_1C40DA:: @ 81C40DA
|
|||||||
.include "data/text/berries.inc"
|
.include "data/text/berries.inc"
|
||||||
.include "data/text/shoal_cave.inc"
|
.include "data/text/shoal_cave.inc"
|
||||||
.include "data/text/check_furniture.inc"
|
.include "data/text/check_furniture.inc"
|
||||||
|
.include "data/scripts/cave_hole.inc"
|
||||||
GraniteCave_B1F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
MtPyre_2F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
SkyPillar_2F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
SkyPillar_4F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
map_script_2 VAR_ICE_STEP_COUNT, 0, S_FallDownHole
|
|
||||||
.2byte 0
|
|
||||||
|
|
||||||
GraniteCave_B1F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
MtPyre_2F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
SkyPillar_2F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
SkyPillar_4F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
copyvar VAR_ICE_STEP_COUNT, 0x1
|
|
||||||
end
|
|
||||||
|
|
||||||
S_FallDownHole:: @ 81C6BC5
|
|
||||||
lockall
|
|
||||||
delay 20
|
|
||||||
applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B1F_Movement_1C6BF7
|
|
||||||
waitmovement 0
|
|
||||||
playse SE_RU_HYUU
|
|
||||||
delay 60
|
|
||||||
warphole MAP_UNDEFINED
|
|
||||||
waitstate
|
|
||||||
end
|
|
||||||
|
|
||||||
gUnknown_081C6BDE:: @ 81C6BDE
|
|
||||||
lockall
|
|
||||||
delay 20
|
|
||||||
applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B1F_Movement_1C6BF7
|
|
||||||
waitmovement 0
|
|
||||||
playse SE_RU_HYUU
|
|
||||||
delay 60
|
|
||||||
special sp13F_fall_to_last_warp
|
|
||||||
waitstate
|
|
||||||
end
|
|
||||||
|
|
||||||
GraniteCave_B1F_Movement_1C6BF7:: @ 81C6BF7
|
|
||||||
set_invisible
|
|
||||||
step_end
|
|
||||||
|
|
||||||
@ 81C6BF9
|
@ 81C6BF9
|
||||||
msgbox Text_1C6C2B, MSGBOX_NPC
|
msgbox Text_1C6C2B, MSGBOX_NPC
|
||||||
|
41
data/event_scripts.s
vendored
41
data/event_scripts.s
vendored
@ -1634,46 +1634,7 @@ MauvilleCity_GameCorner_EventScript_1C40DA:: @ 81C40DA
|
|||||||
.include "data/text/berries.inc"
|
.include "data/text/berries.inc"
|
||||||
.include "data/text/shoal_cave.inc"
|
.include "data/text/shoal_cave.inc"
|
||||||
.include "data/text/check_furniture.inc"
|
.include "data/text/check_furniture.inc"
|
||||||
|
.include "data/scripts/cave_hole.inc"
|
||||||
GraniteCave_B1F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
MtPyre_2F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
SkyPillar_2F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
SkyPillar_4F_MapScript2_1C6BB5:: @ 81C6BB5
|
|
||||||
map_script_2 VAR_ICE_STEP_COUNT, 0, S_FallDownHole
|
|
||||||
.2byte 0
|
|
||||||
|
|
||||||
GraniteCave_B1F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
MtPyre_2F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
SkyPillar_2F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
SkyPillar_4F_MapScript1_1C6BBF:: @ 81C6BBF
|
|
||||||
copyvar VAR_ICE_STEP_COUNT, 0x1
|
|
||||||
end
|
|
||||||
|
|
||||||
S_FallDownHole:: @ 81C6BC5
|
|
||||||
lockall
|
|
||||||
delay 20
|
|
||||||
applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B1F_Movement_1C6BF7
|
|
||||||
waitmovement 0
|
|
||||||
playse SE_RU_HYUU
|
|
||||||
delay 60
|
|
||||||
warphole MAP_UNDEFINED
|
|
||||||
waitstate
|
|
||||||
end
|
|
||||||
|
|
||||||
gUnknown_081C6BDE:: @ 81C6BDE
|
|
||||||
lockall
|
|
||||||
delay 20
|
|
||||||
applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B1F_Movement_1C6BF7
|
|
||||||
waitmovement 0
|
|
||||||
playse SE_RU_HYUU
|
|
||||||
delay 60
|
|
||||||
special sp13F_fall_to_last_warp
|
|
||||||
waitstate
|
|
||||||
end
|
|
||||||
|
|
||||||
GraniteCave_B1F_Movement_1C6BF7:: @ 81C6BF7
|
|
||||||
set_invisible
|
|
||||||
step_end
|
|
||||||
|
|
||||||
@ 81C6BF9
|
@ 81C6BF9
|
||||||
msgbox Text_1C6C2B, MSGBOX_NPC
|
msgbox Text_1C6C2B, MSGBOX_NPC
|
||||||
|
4
data/maps/GraniteCave_B1F/scripts.inc
vendored
4
data/maps/GraniteCave_B1F/scripts.inc
vendored
@ -1,6 +1,6 @@
|
|||||||
GraniteCave_B1F_MapScripts:: @ 815CBDD
|
GraniteCave_B1F_MapScripts:: @ 815CBDD
|
||||||
map_script MAP_SCRIPT_ON_FRAME_TABLE, GraniteCave_B1F_MapScript2_1C6BB5
|
map_script MAP_SCRIPT_ON_FRAME_TABLE, CaveHole_CheckFallDownHole
|
||||||
map_script MAP_SCRIPT_ON_TRANSITION, GraniteCave_B1F_MapScript1_1C6BBF
|
map_script MAP_SCRIPT_ON_TRANSITION, CaveHole_FixCrackedGround
|
||||||
map_script MAP_SCRIPT_ON_RESUME, GraniteCave_B1F_MapScript1_15CBED
|
map_script MAP_SCRIPT_ON_RESUME, GraniteCave_B1F_MapScript1_15CBED
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
4
data/maps/MtPyre_2F/scripts.inc
vendored
4
data/maps/MtPyre_2F/scripts.inc
vendored
@ -1,6 +1,6 @@
|
|||||||
MtPyre_2F_MapScripts:: @ 815D36E
|
MtPyre_2F_MapScripts:: @ 815D36E
|
||||||
map_script MAP_SCRIPT_ON_FRAME_TABLE, MtPyre_2F_MapScript2_1C6BB5
|
map_script MAP_SCRIPT_ON_FRAME_TABLE, CaveHole_CheckFallDownHole
|
||||||
map_script MAP_SCRIPT_ON_TRANSITION, MtPyre_2F_MapScript1_1C6BBF
|
map_script MAP_SCRIPT_ON_TRANSITION, CaveHole_FixCrackedGround
|
||||||
map_script MAP_SCRIPT_ON_RESUME, MtPyre_2F_MapScript1_15D37E
|
map_script MAP_SCRIPT_ON_RESUME, MtPyre_2F_MapScript1_15D37E
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
4
data/maps/SkyPillar_2F/scripts.inc
vendored
4
data/maps/SkyPillar_2F/scripts.inc
vendored
@ -1,6 +1,6 @@
|
|||||||
SkyPillar_2F_MapScripts:: @ 815F2C9
|
SkyPillar_2F_MapScripts:: @ 815F2C9
|
||||||
map_script MAP_SCRIPT_ON_FRAME_TABLE, SkyPillar_2F_MapScript2_1C6BB5
|
map_script MAP_SCRIPT_ON_FRAME_TABLE, CaveHole_CheckFallDownHole
|
||||||
map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_2F_MapScript1_1C6BBF
|
map_script MAP_SCRIPT_ON_TRANSITION, CaveHole_FixCrackedGround
|
||||||
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_2F_MapScript1_15F2D9
|
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_2F_MapScript1_15F2D9
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
4
data/maps/SkyPillar_4F/scripts.inc
vendored
4
data/maps/SkyPillar_4F/scripts.inc
vendored
@ -1,6 +1,6 @@
|
|||||||
SkyPillar_4F_MapScripts:: @ 815F2E5
|
SkyPillar_4F_MapScripts:: @ 815F2E5
|
||||||
map_script MAP_SCRIPT_ON_FRAME_TABLE, SkyPillar_4F_MapScript2_1C6BB5
|
map_script MAP_SCRIPT_ON_FRAME_TABLE, CaveHole_CheckFallDownHole
|
||||||
map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_4F_MapScript1_1C6BBF
|
map_script MAP_SCRIPT_ON_TRANSITION, CaveHole_FixCrackedGround
|
||||||
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_4F_MapScript1_15F2F5
|
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_4F_MapScript1_15F2F5
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
33
data/scripts/cave_hole.inc
vendored
Normal file
33
data/scripts/cave_hole.inc
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
CaveHole_CheckFallDownHole:: @ 81C6BB5
|
||||||
|
map_script_2 VAR_ICE_STEP_COUNT, 0, EventScript_FallDownHole
|
||||||
|
.2byte 0
|
||||||
|
|
||||||
|
CaveHole_FixCrackedGround:: @ 81C6BBF
|
||||||
|
copyvar VAR_ICE_STEP_COUNT, 1
|
||||||
|
end
|
||||||
|
|
||||||
|
EventScript_FallDownHole:: @ 81C6BC5
|
||||||
|
lockall
|
||||||
|
delay 20
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Movement_SetInvisible
|
||||||
|
waitmovement 0
|
||||||
|
playse SE_RU_HYUU
|
||||||
|
delay 60
|
||||||
|
warphole MAP_UNDEFINED
|
||||||
|
waitstate
|
||||||
|
end
|
||||||
|
|
||||||
|
EventScript_FallDownHoleMtPyre:: @ 81C6BDE
|
||||||
|
lockall
|
||||||
|
delay 20
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Movement_SetInvisible
|
||||||
|
waitmovement 0
|
||||||
|
playse SE_RU_HYUU
|
||||||
|
delay 60
|
||||||
|
special DoFallWarp
|
||||||
|
waitstate
|
||||||
|
end
|
||||||
|
|
||||||
|
Movement_SetInvisible:: @ 81C6BF7
|
||||||
|
set_invisible
|
||||||
|
step_end
|
@ -327,7 +327,7 @@ gSpecials::
|
|||||||
def_special FoundBlackGlasses
|
def_special FoundBlackGlasses
|
||||||
def_special sub_807E25C
|
def_special sub_807E25C
|
||||||
def_special sp13E_warp_to_last_warp
|
def_special sp13E_warp_to_last_warp
|
||||||
def_special sp13F_fall_to_last_warp
|
def_special DoFallWarp
|
||||||
def_special ShowContestEntryMonPic
|
def_special ShowContestEntryMonPic
|
||||||
def_special sub_80C5164
|
def_special sub_80C5164
|
||||||
def_special SetEReaderTrainerGfxId
|
def_special SetEReaderTrainerGfxId
|
||||||
|
@ -20,7 +20,7 @@ bool32 sub_8080E70(void);
|
|||||||
void sub_8080E88(void);
|
void sub_8080E88(void);
|
||||||
void sp13E_warp_to_last_warp(void);
|
void sp13E_warp_to_last_warp(void);
|
||||||
void sub_8080EF0(void);
|
void sub_8080EF0(void);
|
||||||
void sp13F_fall_to_last_warp(void);
|
void DoFallWarp(void);
|
||||||
void sub_8080F2C(u8);
|
void sub_8080F2C(u8);
|
||||||
void sub_8080F48(void);
|
void sub_8080F48(void);
|
||||||
void sub_8080F58(void);
|
void sub_8080F58(void);
|
||||||
|
@ -75,11 +75,11 @@ extern u8 S_UseWaterfall[];
|
|||||||
extern u8 S_CannotUseWaterfall[];
|
extern u8 S_CannotUseWaterfall[];
|
||||||
extern u8 UseDiveScript[];
|
extern u8 UseDiveScript[];
|
||||||
extern u8 S_UseDiveUnderwater[];
|
extern u8 S_UseDiveUnderwater[];
|
||||||
extern u8 S_FallDownHole[];
|
extern u8 EventScript_FallDownHole[];
|
||||||
extern u8 gUnknown_081A14B8[];
|
extern u8 gUnknown_081A14B8[];
|
||||||
extern u8 S_EggHatch[];
|
extern u8 S_EggHatch[];
|
||||||
extern u8 gUnknown_0815FD0D[];
|
extern u8 gUnknown_0815FD0D[];
|
||||||
extern u8 gUnknown_081C6BDE[];
|
extern u8 EventScript_FallDownHoleMtPyre[];
|
||||||
|
|
||||||
static void GetPlayerPosition(struct MapPosition *);
|
static void GetPlayerPosition(struct MapPosition *);
|
||||||
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
||||||
@ -563,7 +563,7 @@ bool8 TryStartCrackedFloorHoleScript(u16 metatileBehavior)
|
|||||||
{
|
{
|
||||||
if (MetatileBehavior_IsCrackedFloorHole(metatileBehavior))
|
if (MetatileBehavior_IsCrackedFloorHole(metatileBehavior))
|
||||||
{
|
{
|
||||||
ScriptContext1_SetupScript(S_FallDownHole);
|
ScriptContext1_SetupScript(EventScript_FallDownHole);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -717,7 +717,7 @@ bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileBehavior
|
|||||||
}
|
}
|
||||||
if (MetatileBehavior_IsMtPyreHole(metatileBehavior) == TRUE)
|
if (MetatileBehavior_IsMtPyreHole(metatileBehavior) == TRUE)
|
||||||
{
|
{
|
||||||
ScriptContext1_SetupScript(gUnknown_081C6BDE);
|
ScriptContext1_SetupScript(EventScript_FallDownHoleMtPyre);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
sub_8080E88();
|
sub_8080E88();
|
||||||
|
@ -401,7 +401,7 @@ void sub_8080EF0(void)
|
|||||||
CreateTask(sub_808115C, 10);
|
CreateTask(sub_808115C, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sp13F_fall_to_last_warp(void)
|
void DoFallWarp(void)
|
||||||
{
|
{
|
||||||
sp13E_warp_to_last_warp();
|
sp13E_warp_to_last_warp();
|
||||||
gFieldCallback = sub_8086748;
|
gFieldCallback = sub_8086748;
|
||||||
|
@ -770,7 +770,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
|
|||||||
SetFixedHoleWarpAsDestination(x - 7, y - 7);
|
SetFixedHoleWarpAsDestination(x - 7, y - 7);
|
||||||
else
|
else
|
||||||
Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7);
|
Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7);
|
||||||
sp13F_fall_to_last_warp();
|
DoFallWarp();
|
||||||
ResetInitialPlayerAvatarState();
|
ResetInitialPlayerAvatarState();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user