refactor bugfixes

reverse some labels for compactness and readability
This commit is contained in:
spannerisms
2021-03-24 07:37:32 -04:00
parent cd7260c5f4
commit f6f28d89a9

View File

@@ -32,7 +32,7 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;0 = Become (Perma)bunny ;0 = Become (Perma)bunny
DecideIfBunny: DecideIfBunny:
LDA $7EF357 : BEQ + : RTL : + LDA $7EF357 : BNE .done
LDA $7EF3CA : AND.b #$40 LDA $7EF3CA : AND.b #$40
PHA : LDA.l InvertedMode : BNE .inverted PHA : LDA.l InvertedMode : BNE .inverted
.normal .normal
@@ -47,8 +47,8 @@ RTL
DecideIfBunnyByScreenIndex: DecideIfBunnyByScreenIndex:
; If indoors we don't have a screen index. Return non-bunny to make mirror-based ; If indoors we don't have a screen index. Return non-bunny to make mirror-based
; superbunny work ; superbunny work
LDA $1B : BEQ + : RTL : + LDA $1B : BNE .done
LDA $7EF357 : BEQ + : RTL : + LDA $7EF357 : BNE .done
LDA $8A : AND.b #$40 : PHA LDA $8A : AND.b #$40 : PHA
LDA.l InvertedMode : BNE .inverted LDA.l InvertedMode : BNE .inverted
.normal .normal
@@ -114,12 +114,13 @@ RTS
FixFrogSmith: FixFrogSmith:
LDA.l $7EF3CA : BNE .darkWorld LDA.l $7EF3CA : BNE .darkWorld
LDA.l $7EF3CC : CMP.b #$07 : BNE .done LDA.l $7EF3CC : CMP.b #$07 : BNE .done
LDA.b #$08 : STA.l $7EF3CC ; make frog into smith in light world LDA.b #$08 : ; make frog into smith in light world
BRA .loadgfx BRA .loadgfx
.darkWorld .darkWorld
LDA.l $7EF3CC : CMP.b #$08 : BNE .done LDA.l $7EF3CC : CMP.b #$08 : BNE .done
LDA.b #$07 : STA.l $7EF3CC ; make smith into frog in dark world LDA.b #$07 ; make smith into frog in dark world
.loadgfx .loadgfx
STA.l $7EF3CC
JSL Tagalong_LoadGfx JSL Tagalong_LoadGfx
.done .done
RTS RTS
@@ -137,12 +138,11 @@ RTL
; Fix crystal not spawning when using somaria vs boss ; Fix crystal not spawning when using somaria vs boss
TryToSpawnCrystalUntilSuccess: TryToSpawnCrystalUntilSuccess:
STX $02D8 ; what we overwrote STX $02D8 ; what we overwrote
JSL AddAncillaLong : BCC .spawned ; a clear carry flag indicates success JSL AddAncillaLong : BCS .failed ; a clear carry flag indicates success
.failed .spawned
RTL
.spawned
STZ $AE ; the "trying to spawn crystal" flag STZ $AE ; the "trying to spawn crystal" flag
STZ $AF ; the "trying to spawn pendant" flag STZ $AF ; the "trying to spawn pendant" flag
.failed
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -173,22 +173,22 @@ CMP.w #$030E : BEQ .new ; opening dungeon map
CMP.w #$070E : BEQ .new ; opening overworld map CMP.w #$070E : BEQ .new ; opening overworld map
.original .original
- -
lda [$00] LDA [$00]
sta $7ec300, x STA $7EC300, X
sta $7ec500, x STA $7EC500, X
inc $00 : inc $00 INC $00 : INC $00
inx #2 INX #2
dey DEY
bpl - BPL -
RTL RTL
.new .new
- -
lda [$00] LDA [$00]
sta $7ec500, x STA $7EC500, X
inc $00 : inc $00 INC $00 : INC $00
inx #2 INX #2
dey DEY
bpl - BPL -
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------