ram.asm initial commit. Replaced all address defines with labels
Value defines styled without quotes, # moved to load/store/cmp site Added registers.asm (copied from spannerisms JP disassembly) Added a bunch of length annotations Deleted old or trivial commented out code Deleted: ganonfixes.asm, map.asm, seedtag.asm Replaced obsolete credits.asm with creditsnew.asm Moved scratch space at $7F5020-3F to mirrored WRAM (7E1E70-8F) Moved clock RAM to mirrored WRAM (7E1E90-9F) dialog.asm: FreeDungeonItemNotice preserves callee-preserved scratch RAM Toast buffer moved to mirrored WRAM (7E1E0E-0F) servicerequest.asm: long store to $012E converted to word length store
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
; Randomize Book of Mudora
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadLibraryItemGFX:
|
||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||
STA $0E80, X ; Store item type
|
||||
JSL.l PrepDynamicTile
|
||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||
STA.w $0E80, X ; Store item type
|
||||
JSL.l PrepDynamicTile
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawLibraryItemGFX:
|
||||
PHA
|
||||
LDA $0E80, X ; Retrieve stored item type
|
||||
JSL.l DrawDynamicTile
|
||||
PLA
|
||||
PHA
|
||||
LDA $0E80, X ; Retrieve stored item type
|
||||
JSL.l DrawDynamicTile
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
SetLibraryItem:
|
||||
LDY $0E80, X ; Retrieve stored item type
|
||||
JSL.l ItemSet_Library ; contains thing we wrote over
|
||||
LDY.w $0E80, X ; Retrieve stored item type
|
||||
JSL.l ItemSet_Library ; contains thing we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,37 +24,34 @@ RTL
|
||||
;================================================================================
|
||||
; Randomize Bonk Keys
|
||||
;--------------------------------------------------------------------------------
|
||||
!REDRAW = "$7F5000"
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadBonkItemGFX:
|
||||
LDA.b #$08 : STA $0F50, X ; thing we wrote over
|
||||
LDA.b #$08 : STA.w $0F50, X ; thing we wrote over
|
||||
LoadBonkItemGFX_inner:
|
||||
LDA.b #$00 : STA !REDRAW
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
JSR LoadBonkItem
|
||||
JSL.l PrepDynamicTile
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawBonkItemGFX:
|
||||
PHA
|
||||
LDA !REDRAW : BEQ .skipInit ; skip init if already ready
|
||||
JSL.l LoadBonkItemGFX_inner
|
||||
BRA .done ; don't draw on the init frame
|
||||
|
||||
PHA
|
||||
LDA.l RedrawFlag : BEQ .skipInit ; skip init if already ready
|
||||
JSL.l LoadBonkItemGFX_inner
|
||||
BRA .done ; don't draw on the init frame
|
||||
|
||||
.skipInit
|
||||
|
||||
JSR LoadBonkItem
|
||||
JSL.l DrawDynamicTileNoShadow
|
||||
|
||||
.done
|
||||
PLA
|
||||
JSR LoadBonkItem
|
||||
JSL.l DrawDynamicTileNoShadow
|
||||
|
||||
.done
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GiveBonkItem:
|
||||
JSR LoadBonkItem
|
||||
CMP #$24 : BNE .notKey
|
||||
CMP.b #$24 : BNE .notKey
|
||||
.key
|
||||
PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key
|
||||
LDA CurrentSmallKeys : INC A : STA CurrentSmallKeys
|
||||
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
|
||||
LDA.b #$2F : JSL.l Sound_SetSfx3PanLong
|
||||
JSL CountBonkItem
|
||||
RTL
|
||||
@@ -64,11 +61,11 @@ RTL
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadBonkItem:
|
||||
LDA $A0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
CMP #115 : BNE + ; Desert Bonk Key
|
||||
LDA.b $A0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
CMP.b #115 : BNE + ; Desert Bonk Key
|
||||
LDA.l BonkKey_Desert
|
||||
BRA ++
|
||||
+ : CMP #140 : BNE + ; GTower Bonk Key
|
||||
+ : CMP.b #140 : BNE + ; GTower Bonk Key
|
||||
LDA.l BonkKey_GTower
|
||||
BRA ++
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user