Shops VRAM transfer

This commit is contained in:
cassidoxa
2023-08-13 18:55:52 -04:00
parent aaf970b837
commit cc83fef9b0
3 changed files with 44 additions and 12 deletions

View File

@@ -35,7 +35,27 @@ PostNMIHookAction:
.return
STZ.w NMIAux ; zero bank byte of NMI hook pointer
+
JSR.w TransferItemGFX
LDA.b INIDISPQ : STA.w INIDISP ; thing we wrote over, turn screen back on
JML.l 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 ItemQueuePtr : BEQ .done
-
LDA.w ItemGFXQueue,X : STA.w ItemGFXPtr
LDA.w ItemTargetQueue,X : STA.w ItemGFXTarget
PHX
JSL.l TransferItemToVRAM
REP #$10
PLX
DEX #2
BPL -
STZ.w ItemQueuePtr
.done
SEP #$30
RTS