pokeyellow/scripts/seafoamislands1.asm

48 lines
1.1 KiB
NASM
Raw Normal View History

SeafoamIslands1Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
2015-07-21 17:36:03 +00:00
SetEvent EVENT_IN_SEAFOAM_ISLANDS
2014-05-18 18:19:10 +00:00
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
jr z, .asm_4483b
2014-05-18 18:19:10 +00:00
ld hl, Seafoam1HolesCoords
call CheckBoulderCoords
ret nc
2015-07-21 17:36:03 +00:00
EventFlagAddress hl, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
2015-07-19 03:49:52 +00:00
ld a, [wCoordIndex]
2014-05-18 18:19:10 +00:00
cp $1
jr nz, .asm_44819
2015-07-21 17:36:03 +00:00
SetEventReuseHL EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1
2015-07-25 03:27:59 +00:00
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
2015-07-25 03:27:59 +00:00
ld [wObjectToShow], a
jr .asm_44825
2014-05-18 18:19:10 +00:00
.asm_44819
2015-07-21 17:36:03 +00:00
SetEventAfterBranchReuseHL EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2
2015-07-25 03:27:59 +00:00
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2
2015-07-25 03:27:59 +00:00
ld [wObjectToShow], a
2014-05-18 18:19:10 +00:00
.asm_44825
2015-07-25 03:27:59 +00:00
ld a, [wObjectToHide]
ld [wMissableObjectIndex], a
predef HideObject
2015-07-25 03:27:59 +00:00
ld a, [wObjectToShow]
ld [wMissableObjectIndex], a
predef_jump ShowObject
2014-05-18 18:19:10 +00:00
.asm_4483b
ld a, $9f
2014-09-13 07:50:56 +00:00
ld [wDungeonWarpDestinationMap], a
2014-05-18 18:19:10 +00:00
ld hl, Seafoam1HolesCoords
2015-07-19 03:49:52 +00:00
jp IsPlayerOnDungeonWarp
2014-05-18 18:19:10 +00:00
Seafoam1HolesCoords:
2014-05-18 18:19:10 +00:00
db $06,$11
db $06,$18
db $ff
SeafoamIslands1TextPointers:
2014-05-18 18:19:10 +00:00
dw BoulderText
dw BoulderText