Skip to content
Permalink
Browse files

Add debug flags for toggling intro sequence effects

  • Loading branch information...
kemenaran committed Sep 4, 2016
1 parent 932f9e0 commit 83ac7dfeeb970d5aea5dcec75f1ba0b6355dee87
Showing with 29 additions and 1 deletion.
  1. +8 −0 src/bank1.asm
  2. +6 −0 src/constants/constants.asm
  3. +15 −1 src/main.asm
@@ -7749,7 +7749,11 @@ label_7447::
ret

RenderRain::
if !DEBUG_INTRO_SFX_ENABLED
ret
ELSE
call GetRandomByte
ENDC
and $18
add a, $10
ld [$FFD8], a
@@ -7816,7 +7820,11 @@ label_74CF::
ret

RenderIntroEntities::
IF !DEBUG_INTRO_ENTITIES_ENABLED
ret
ELSE
xor a
ENDC
ld [$C3C0], a
ld c, $02 ; Entities count
ld b, $00
@@ -5,3 +5,9 @@ include "constants/vram.asm"
include "constants/hram.asm"
include "constants/wram.asm"
include "constants/gameplay.asm"

DEBUG_DIFFERENTIAL_SCROLLING_ENABLED equ 1
DEBUG_INTRO_HORIZON_COMPENSATION_ENABLED equ 1
DEBUG_ANIMATE_INTRO_TILES equ 1
DEBUG_INTRO_SFX_ENABLED equ 1
DEBUG_INTRO_ENTITIES_ENABLED equ 1
@@ -707,7 +707,12 @@ skipScrollY::
ld a, [hl]
ld hl, hBaseScrollX ; a = hBaseScrollX + [hl]
add a, [hl]
IF !DEBUG_DIFFERENTIAL_SCROLLING_ENABLED
nop
nop
ELSE
ld [rSCX], a ; set scrollX
ENDC
ld a, [WR1_GameplaySubtype]
cp $06 ; if GameplaySubtype < 6 (intro sea)
jr c, setupNextInterruptForIntroSea
@@ -741,7 +746,12 @@ skipResetSectionIndex::
cp $04 ; if SectionIndex != 4
jr nz, restoreSavedWRAMBankAndReturn ; skip
; If we are drawing the last section (4)
IF !DEBUG_INTRO_HORIZON_COMPENSATION_ENABLED
ld a, $FF
nop
ELSE
ld a, [WR0_IntroBGYOffset] ; Apply the Y offset to compensate for sea vertical movement
ENDC
ld [rSCY], a ; (so that the horizon position stays constant).
cpl ; a = $FF - a + $61
inc a ;
@@ -4341,7 +4351,11 @@ label_1B0D::
cp GAMEPLAY_INTRO
jr nz, .continue1
; GameplayType == INTRO
ld a, [$D601]
if !DEBUG_ANIMATE_INTRO_TILES
jp .returnEarly
ELSE
ld a, [$D601]
ENDC
and a ; if $D601 != 0
jp nz, .returnEarly ; return immediatly
ld a, [hFrameCounter]

0 comments on commit 83ac7df

Please sign in to comment.
You can’t perform that action at this time.