Cleanup overworld overlays jump table organization

This commit is contained in:
scawful
2024-10-06 12:33:34 -04:00
parent 7749e86421
commit 93553232ce

View File

@@ -78,12 +78,33 @@ RTS
pullpc pullpc
;=============================================== ; Zarby Notes
; Entrance Animation
;===============================================
; don't forget to set $C8 to zero (STZ.b $C8) ; don't forget to set $C8 to zero (STZ.b $C8)
; don't forget to set $B0 to zero (STZ.b $B0) ; don't forget to set $B0 to zero (STZ.b $B0)
ShakeScreen:
{
REP #$20
LDA.b $1A
AND.w #$0001
ASL A
TAX
LDA.l $01C961, X
STA.w $011A
LDA.l $01C965, X
STA.w $011C
.exit
SEP #$20
RTS
}
; =========================================================
; Zora Temple Hidden Waterfall
ZoraTemple_EntranceAnimation: ZoraTemple_EntranceAnimation:
{ {
; If $B0 is 8, then we move the camera back to the origin ; If $B0 is 8, then we move the camera back to the origin
@@ -122,33 +143,9 @@ ZoraTemple_EntranceAnimation:
dw Frame6 dw Frame6
dw Frame7 dw Frame7
dw Frame8 dw Frame8
}
; ========================================================= Frame0:
; Shake screen {
; =========================================================
ShakeScreen:
{
REP #$20
LDA.b $1A
AND.w #$0001
ASL A
TAX
LDA.l $01C961, X
STA.w $011A
LDA.l $01C965, X
STA.w $011C
.exit
SEP #$20
RTS
}
Frame0:
{
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -199,10 +196,10 @@ Frame0:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame1: Frame1:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -254,10 +251,10 @@ Frame1:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame2: Frame2:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -308,10 +305,10 @@ Frame2:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame3: Frame3:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -368,10 +365,10 @@ Frame3:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame4: Frame4:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -417,10 +414,10 @@ Frame4:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame5: Frame5:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -485,10 +482,10 @@ Frame5:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame6: Frame6:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -552,10 +549,10 @@ Frame6:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame7: Frame7:
{ {
LDA.b $C8 : BEQ .doInit ; Load the timer LDA.b $C8 : BEQ .doInit ; Load the timer
JMP .notfirstframe JMP .notfirstframe
.doInit .doInit
@@ -620,10 +617,10 @@ Frame7:
STZ.b $C8 ; reset timer for next frame STZ.b $C8 ; reset timer for next frame
.wait .wait
RTS RTS
} }
Frame8: Frame8:
{ {
JSR ShakeScreen ; make the screen shake JSR ShakeScreen ; make the screen shake
INC.b $C8 : LDA.b $C8 : CMP.b #$1E ; Load and compare timer INC.b $C8 : LDA.b $C8 : CMP.b #$1E ; Load and compare timer
BNE .wait BNE .wait
@@ -643,6 +640,8 @@ Frame8:
STA.l $7EF280,X STA.l $7EF280,X
.wait .wait
RTS RTS
}
} }
; ========================================================= ; =========================================================
@@ -928,7 +927,7 @@ Castle_Frame3:
RTS RTS
} }
;=============================================== ; =========================================================
TailPalace_EntranceAnimation: TailPalace_EntranceAnimation:
{ {