Implement item table encryption

This commit is contained in:
Kevin Cathcart
2018-07-08 16:38:45 -04:00
parent bc2d9d95a5
commit 14783a12e0
11 changed files with 214 additions and 68 deletions

View File

@@ -2,20 +2,21 @@
; Randomize Book of Mudora
;--------------------------------------------------------------------------------
LoadLibraryItemGFX:
LDA.l LibraryItem
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
STA $0DA0, X ; Store item type
JSL.l PrepDynamicTile
RTL
;--------------------------------------------------------------------------------
DrawLibraryItemGFX:
PHA
LDA.l LibraryItem
LDA $0DA0, X ; Retrieve stored item type
JSL.l DrawDynamicTile
PLA
RTL
;--------------------------------------------------------------------------------
SetLibraryItem:
PHA
LDA LibraryItem : TAY
LDY $0DA0, X ; Retrieve stored item type
PLA
JSL.l ItemSet_Library ; contains thing we wrote over
RTL