Applied labels and byte designators

This commit is contained in:
codemann8
2024-04-05 20:50:04 -05:00
committed by aerinon
parent 2e2b493240
commit a70251d2b2
114 changed files with 2786 additions and 2970 deletions

View File

@@ -2,7 +2,7 @@
; Frame Hook
;--------------------------------------------------------------------------------
FrameHookAction:
JSL $8080B5 ; Module_MainRouting
JSL Module_MainRouting
JSL CheckMusicLoadRequest
PHP : REP #$30 : PHA
SEP #$20
@@ -24,16 +24,16 @@ RTL
NMIHookAction:
PHA : PHX : PHY : PHD ; thing we wrote over, push stuff
LDA !NMI_MW : BEQ ++
LDA.l !NMI_MW : BEQ ++
PHP
SEP #$30
LDA #$00 : STA !NMI_MW
LDA.b #$00 : STA.l !NMI_MW
; Multiworld text
LDA !NMI_MW+1 : BEQ +
LDA #$00 : STA !NMI_MW+1
JSL.l WriteText
LDA.l !NMI_MW+1 : BEQ +
LDA.b #$00 : STA.l !NMI_MW+1
JSL WriteText
+
PLP
++
@@ -43,7 +43,7 @@ NMIHookAction:
LDA.l NMIFrames+2 : INC : STA.l NMIFrames+2
+
JML.l NMIHookReturn
JML NMIHookReturn
;--------------------------------------------------------------------------------
PostNMIHookAction:
@@ -53,23 +53,23 @@ PostNMIHookAction:
.return
STZ.w NMIAux ; zero bank byte of NMI hook pointer
+
JSR.w TransferItemGFX
JSR TransferItemGFX
LDA.b INIDISPQ : STA.w INIDISP ; thing we wrote over, turn screen back on
JML.l PostNMIHookReturn
JML PostNMIHookReturn
;--------------------------------------------------------------------------------
TransferItemGFX:
; Only used for shops now but could be used for anything. We should look at how door rando does this
; and try to unify one approach.
REP #$30
LDX.w ItemStackPtr : BEQ .done
TXA : BIT #$0040 : BNE .fail ; Crash if we have more than 16 queued (should never happen.)
TXA : BIT.w #$0040 : BNE .fail ; Crash if we have more than 16 queued (should never happen.)
DEX #2
-
LDA.l ItemGFXStack,X : STA.w ItemGFXPtr
LDA.l ItemTargetStack,X : STA.w ItemGFXTarget
PHX
JSL.l TransferItemToVRAM
JSL TransferItemToVRAM
REP #$10
PLX
DEX #2