aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events/hidden_objects/safari_game.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2026-01-07 22:05:37 -0500
committerGitHub <noreply@github.com>2026-01-07 22:05:37 -0500
commit0e49aef88ef94b9d3e80d89e4eb718e9425045df (patch)
treec63433287b9e2aceda14ff977cc06875cd0735d3 /engine/events/hidden_objects/safari_game.asm
parentUse macros to enforce "missable/hide/show object" constraints, and rename the... (diff)
downloadpokeyellow-0e49aef88ef94b9d3e80d89e4eb718e9425045df.tar.gz
pokeyellow-0e49aef88ef94b9d3e80d89e4eb718e9425045df.tar.xz
pokeyellow-0e49aef88ef94b9d3e80d89e4eb718e9425045df.zip
Use macros to enforce "hidden object" constraints, and rename them to "hidden events" (#559)
Diffstat (limited to 'engine/events/hidden_objects/safari_game.asm')
-rw-r--r--engine/events/hidden_objects/safari_game.asm83
1 files changed, 0 insertions, 83 deletions
diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm
deleted file mode 100644
index fc014ce0..00000000
--- a/engine/events/hidden_objects/safari_game.asm
+++ /dev/null
@@ -1,83 +0,0 @@
-SafariZoneCheck::
- CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone,
- jr z, SafariZoneGameStillGoing ; don't bother printing game over text
- ld a, [wNumSafariBalls]
- and a
- jr z, SafariZoneGameOver
- jr SafariZoneGameStillGoing
-
-SafariZoneCheckSteps::
-IF DEF(_DEBUG)
- call DebugPressedOrHeldB
- ret nz
-ENDC
- ld a, [wSafariSteps]
- ld b, a
- ld a, [wSafariSteps + 1]
- ld c, a
- or b
- jr z, SafariZoneGameOver
- dec bc
- ld a, b
- ld [wSafariSteps], a
- ld a, c
- ld [wSafariSteps + 1], a
-SafariZoneGameStillGoing:
- xor a
- ld [wSafariZoneGameOver], a
- ret
-
-SafariZoneGameOver:
- call EnableAutoTextBoxDrawing
- xor a
- ld [wAudioFadeOutControl], a
- dec a ; SFX_STOP_ALL_MUSIC
- call PlaySound
- ld c, BANK(SFX_Safari_Zone_PA)
- ld a, SFX_SAFARI_ZONE_PA
- call PlayMusic
-.waitForMusicToPlay
- ld a, [wChannelSoundIDs + CHAN5]
- cp SFX_SAFARI_ZONE_PA
- jr nz, .waitForMusicToPlay
- ld a, TEXT_SAFARI_GAME_OVER
- ldh [hTextID], a
- call DisplayTextID
- xor a
- ld [wPlayerMovingDirection], a
- ld a, SAFARI_ZONE_GATE
- ldh [hWarpDestinationMap], a
- ld a, $3
- ld [wDestinationWarpID], a
- ld a, SCRIPT_SAFARIZONEGATE_LEAVING_SAFARI
- ld [wSafariZoneGateCurScript], a
- SetEvent EVENT_SAFARI_GAME_OVER
- ld a, 1
- ld [wSafariZoneGameOver], a
- ret
-
-PrintSafariGameOverText::
- xor a
- ld [wJoyIgnore], a
- ld hl, SafariGameOverText
- jp PrintText
-
-SafariGameOverText:
- text_asm
- ld a, [wNumSafariBalls]
- and a
- jr z, .noMoreSafariBalls
- ld hl, TimesUpText
- call PrintText
-.noMoreSafariBalls
- ld hl, GameOverText
- call PrintText
- jp TextScriptEnd
-
-TimesUpText:
- text_far _TimesUpText
- text_end
-
-GameOverText:
- text_far _GameOverText
- text_end