Re-add accidentally deleted HUD stuff
Fix some processor flags
This commit is contained in:
@@ -72,11 +72,6 @@ SprItemIndex = $7E0750
|
||||
SprItemMWPlayer = $7E0760 ; 0x16
|
||||
SprItemFlags = $7E0770 ; 0x16 (used for both pots and drops) (combine with SprDropsItem?)
|
||||
|
||||
; 7F:6600-7F:684F ($250 or 592 bytes) for pots and 7F:6850-7F:6A9F ($250 or 592 bytes) for sprites
|
||||
|
||||
PotItemSRAM = $7F6600
|
||||
SpriteItemSRAM = $7F6850
|
||||
|
||||
; todo: move sprites
|
||||
;org $09D62E
|
||||
;UWSpritesPointers ; 0x250 bytes for 0x128 rooms' 16-bit pointers
|
||||
@@ -164,8 +159,8 @@ RevealPotItem:
|
||||
; set bit and count if first time lifting this pot
|
||||
LDA.b $A0 : ASL : TAY
|
||||
TXA : ASL : TAX : LDA.l BitFieldMasks, X : STA $0A
|
||||
TYX : LDA.l PotItemSRAM, X : BIT $0A : BNE .obtained
|
||||
ORA $0A : STA PotItemSRAM, X
|
||||
TYX : LDA.l RoomPotData, X : BIT $0A : BNE .obtained
|
||||
ORA $0A : STA RoomPotData, X
|
||||
PLY : PHY
|
||||
JSR ShouldCountNormalPot : BCC .obtained
|
||||
; increment dungeon counts
|
||||
@@ -316,9 +311,9 @@ ShouldSpawnItem:
|
||||
TAX : LDA.l BitFieldMasks, X : STA $00
|
||||
PLX ; restore X again
|
||||
LDA.w SprItemFlags, X : AND #$00FF : CMP #$0001 : BEQ +
|
||||
TYX : LDA.l SpriteItemSRAM, X : BIT $00 : BEQ .notObtained
|
||||
TYX : LDA.l SpritePotData, X : BIT $00 : BEQ .notObtained
|
||||
BRA .obtained
|
||||
+ TYX : LDA.l PotItemSRAM, X : BIT $00 : BEQ .notObtained
|
||||
+ TYX : LDA.l RoomPotData, X : BIT $00 : BEQ .notObtained
|
||||
.obtained
|
||||
SEP #$30 : PLY : PLX : LDA #$01 : RTL ; already obtained
|
||||
.notObtained
|
||||
@@ -333,8 +328,8 @@ MarkSRAMForItem:
|
||||
TAX : LDA.l BitFieldMasks, X : STA $00
|
||||
TYX
|
||||
LDA.w SpawnedItemFlag : CMP #$0001 : BEQ +
|
||||
LDA SpriteItemSRAM, X : ORA $00 : STA SpriteItemSRAM, X : BRA .end
|
||||
+ LDA PotItemSRAM, X : ORA $00 : STA PotItemSRAM, X
|
||||
LDA SpritePotData, X : ORA $00 : STA SpritePotData, X : BRA .end
|
||||
+ LDA RoomPotData, X : ORA $00 : STA RoomPotData, X
|
||||
.end
|
||||
SEP #$30 : PLY : PLX
|
||||
LDA.w $0403
|
||||
|
||||
Reference in New Issue
Block a user