Catobat map fix

Cutoff table updated
Mutliworld mem location added for item ids
This commit is contained in:
aerinon
2021-08-31 15:35:19 -06:00
parent fa516b58d4
commit 07a3a9ad03
4 changed files with 313 additions and 310 deletions

View File

@@ -112,6 +112,7 @@ function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<
!MULTIWORLD_SPRITEITEM_PLAYER_ID = "$7EC099" !MULTIWORLD_SPRITEITEM_PLAYER_ID = "$7EC099"
!MULTIWORLD_HUD_TIMER = "$7EC09A" !MULTIWORLD_HUD_TIMER = "$7EC09A"
!MULTIWORLD_HUD_DELAY = "#120" !MULTIWORLD_HUD_DELAY = "#120"
!MULTIWORLD_ITEM_ID = "$7EC09B" ; for lua scripts?
!Dungeon_ChestData = "$01E96C" !Dungeon_ChestData = "$01E96C"
incsrc hooks.asm incsrc hooks.asm

View File

@@ -582,6 +582,8 @@ dw $00bc, $00a2, $00a3, $00c2, $001a, $0049, $0014, $008c
dw $009f, $0066, $005d, $00a8, $00a9, $00aa, $00b9, $0052 dw $009f, $0066, $005d, $00a8, $00a9, $00aa, $00b9, $0052
; HC West Hall, TR Dash Bridge, TR Hub, Pod Arena, GT Petting Zoo, Ice Spike Cross ; HC West Hall, TR Dash Bridge, TR Hub, Pod Arena, GT Petting Zoo, Ice Spike Cross
dw $0050, $00c5, $00c6, $0009, $0003, $002a, $007d, $005e dw $0050, $00c5, $00c6, $0009, $0003, $002a, $007d, $005e
; Sewer Drop, Mire Cross, GT Crystal Circles
dw $0011, $00b2, $003d
dw $ffff dw $ffff
; dungeon tables ; dungeon tables

View File

@@ -1,310 +1,309 @@
NewDrawHud: NewDrawHud:
SEP #$30 SEP #$30
;================================================================================ ;================================================================================
; Draw bomb count ; Draw bomb count
!BOMBCOUNT_DRAW_ADDRESS = "$7EC75A" !BOMBCOUNT_DRAW_ADDRESS = "$7EC75A"
!INFINITE_BOMBS = "$7F50C9" !INFINITE_BOMBS = "$7F50C9"
;================================================================================ ;================================================================================
LDA !INFINITE_BOMBS : BNE .infinite_bombs LDA !INFINITE_BOMBS : BNE .infinite_bombs
.finite_bombs .finite_bombs
LDA.l $7EF343 ; bombs LDA.l $7EF343 ; bombs
JSR HudHexToDec2Digit ;requires 8 bit registers! JSR HudHexToDec2Digit ;requires 8 bit registers!
REP #$20 REP #$20
LDX.b $06 : TXA : ORA.w #$2400 : STA !BOMBCOUNT_DRAW_ADDRESS ; Draw bombs 10 digit LDX.b $06 : TXA : ORA.w #$2400 : STA !BOMBCOUNT_DRAW_ADDRESS ; Draw bombs 10 digit
LDX.b $07 : TXA : ORA.w #$2400 : STA !BOMBCOUNT_DRAW_ADDRESS+2 ; Draw bombs 1 digit LDX.b $07 : TXA : ORA.w #$2400 : STA !BOMBCOUNT_DRAW_ADDRESS+2 ; Draw bombs 1 digit
BRA + BRA +
.infinite_bombs .infinite_bombs
REP #$20 REP #$20
LDA.w #$2431 : STA !BOMBCOUNT_DRAW_ADDRESS ; infinity (left half) LDA.w #$2431 : STA !BOMBCOUNT_DRAW_ADDRESS ; infinity (left half)
INC A : STA !BOMBCOUNT_DRAW_ADDRESS+2 ; infinity (right half) INC A : STA !BOMBCOUNT_DRAW_ADDRESS+2 ; infinity (right half)
+ +
;================================================================================ ;================================================================================
; Draw rupee counter ; Draw rupee counter
!RUPEE_DRAW_ADDRESS = "$7EC750" !RUPEE_DRAW_ADDRESS = "$7EC750"
;================================================================================ ;================================================================================
LDA.l $7EF362 ; Drawing bombs (above) always ends with 16-bit A, so, no need to REP here LDA.l $7EF362 ; Drawing bombs (above) always ends with 16-bit A, so, no need to REP here
JSR HudHexToDec4Digit JSR HudHexToDec4Digit
LDX.b $04 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS ; 1000s LDX.b $04 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS ; 1000s
LDX.b $05 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS+2 ; 100s LDX.b $05 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS+2 ; 100s
LDX.b $06 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS+4 ; 10s LDX.b $06 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS+4 ; 10s
LDX.b $07 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS+6 ; 1s LDX.b $07 : TXA : ORA.w #$2400 : STA !RUPEE_DRAW_ADDRESS+6 ; 1s
;================================================================================ ;================================================================================
; Draw arrow count ; Draw arrow count
!ARROWCOUNT_DRAW_ADDRESS = "$7EC760" !ARROWCOUNT_DRAW_ADDRESS = "$7EC760"
!INFINITE_ARROWS = "$7F50C8" !INFINITE_ARROWS = "$7F50C8"
;================================================================================ ;================================================================================
SEP #$20 SEP #$20
LDA.l ArrowMode : BNE + LDA.l ArrowMode : BNE +
LDA !INFINITE_ARROWS : BNE .infinite_arrows LDA !INFINITE_ARROWS : BNE .infinite_arrows
.finite_arrows .finite_arrows
LDA.l $7EF377 ; arrows LDA.l $7EF377 ; arrows
JSR HudHexToDec2Digit JSR HudHexToDec2Digit
REP #$20 REP #$20
LDX.b $06 : TXA : ORA.w #$2400 : STA !ARROWCOUNT_DRAW_ADDRESS ; Draw arrows 10 digit LDX.b $06 : TXA : ORA.w #$2400 : STA !ARROWCOUNT_DRAW_ADDRESS ; Draw arrows 10 digit
LDX.b $07 : TXA : ORA.w #$2400 : STA !ARROWCOUNT_DRAW_ADDRESS+2 ; Draw arrows 1 digit LDX.b $07 : TXA : ORA.w #$2400 : STA !ARROWCOUNT_DRAW_ADDRESS+2 ; Draw arrows 1 digit
BRA + BRA +
.infinite_arrows .infinite_arrows
REP #$20 REP #$20
LDA.w #$2431 : STA !ARROWCOUNT_DRAW_ADDRESS ; infinity (left half) LDA.w #$2431 : STA !ARROWCOUNT_DRAW_ADDRESS ; infinity (left half)
INC A : STA !ARROWCOUNT_DRAW_ADDRESS+2 ; infinity (right half) INC A : STA !ARROWCOUNT_DRAW_ADDRESS+2 ; infinity (right half)
+ +
;================================================================================ ;================================================================================
; Draw Goal Item Indicator ; Draw Goal Item Indicator
!GOAL_COUNTER = "$7EF418" !GOAL_COUNTER = "$7EF418"
!GOAL_DRAW_ADDRESS = "$7EC72A" !GOAL_DRAW_ADDRESS = "$7EC72A"
;================================================================================ ;================================================================================
SEP #$20 SEP #$20
LDA.l GoalItemRequirement : BNE + : JMP .done : + ; Star Meter LDA.l GoalItemRequirement : BNE + : JMP .done : + ; Star Meter
LDA.l !GOAL_COUNTER LDA.l !GOAL_COUNTER
JSR HudHexToDec3Digit JSR HudHexToDec3Digit
REP #$20 REP #$20
LDA.l GoalItemIcon : STA !GOAL_DRAW_ADDRESS ; draw star icon LDA.l GoalItemIcon : STA !GOAL_DRAW_ADDRESS ; draw star icon
LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+2 ; draw 100's digit LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+2 ; draw 100's digit
LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+4 ; draw 10's digit LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+4 ; draw 10's digit
LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+6 ; draw 1's digit LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+6 ; draw 1's digit
SEP #$20 SEP #$20
LDA.l GoalItemRequirement : CMP.b #$FF : BEQ .skip LDA.l GoalItemRequirement : CMP.b #$FF : BEQ .skip
LDA.l GoalItemRequirement LDA.l GoalItemRequirement
JSR HudHexToDec3Digit JSR HudHexToDec3Digit
REP #$20 REP #$20
LDA.w #$2830 : STA !GOAL_DRAW_ADDRESS+8 ; draw slash LDA.w #$2830 : STA !GOAL_DRAW_ADDRESS+8 ; draw slash
LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+10 ; draw 100's digit LDX.b $05 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+10 ; draw 100's digit
LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+12 ; draw 10's digit LDX.b $06 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+12 ; draw 10's digit
LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+14 ; draw 1's digit LDX.b $07 : TXA : ORA.w #$2400 : STA !GOAL_DRAW_ADDRESS+14 ; draw 1's digit
BRA .done BRA .done
.skip .skip
REP #$20 REP #$20
LDA.w #$207F ; transparent tile LDA.w #$207F ; transparent tile
STA !GOAL_DRAW_ADDRESS+8 STA !GOAL_DRAW_ADDRESS+8
STA !GOAL_DRAW_ADDRESS+10 STA !GOAL_DRAW_ADDRESS+10
STA !GOAL_DRAW_ADDRESS+12 STA !GOAL_DRAW_ADDRESS+12
.done .done
;================================================================================ ;================================================================================
; Draw Dungeon Compass Counts ; Draw Dungeon Compass Counts
;================================================================================ ;================================================================================
REP #$20 REP #$20
LDA.l CompassMode : AND #$00FF : BEQ + ; skip if CompassMode is 0. LDA.l CompassMode : AND #$00FF : BEQ + ; skip if CompassMode is 0.
JSL.l DrawDungeonCompassCounts ; compasses.asm JSL.l DrawDungeonCompassCounts ; compasses.asm
+ +
;================================================================================ ;================================================================================
; Draw key count ; Draw key count
!KEYS = "$7EF36F" !KEYS = "$7EF36F"
!KEY_DIGITS_ADDRESS = "$7EC764" !KEY_DIGITS_ADDRESS = "$7EC764"
!KEY_ICON_ADDRESS = "$7EC726" !KEY_ICON_ADDRESS = "$7EC726"
;================================================================================ ;================================================================================
SEP #$20 SEP #$20
LDA.l !KEYS : CMP.b #$FF : BEQ .not_in_dungeon LDA.l !KEYS : CMP.b #$FF : BEQ .not_in_dungeon
.in_dungeon .in_dungeon
JSR HudHexToDec2Digit : REP #$20 JSR HudHexToDec2Digit : REP #$20
; if 10s digit is 0, draw transparent tile instead of 0 ; if 10s digit is 0, draw transparent tile instead of 0
LDX.b $06 : TXA : CPX.b #$90 : BNE + LDX.b $06 : TXA : CPX.b #$90 : BNE +
LDA.w #$007F LDA.w #$007F
+ +
ORA.w #$2400 : STA !KEY_DIGITS_ADDRESS ORA.w #$2400 : STA !KEY_DIGITS_ADDRESS
; 1s digit ; 1s digit
LDX.b $07 : TXA : ORA.w #$2400 : STA !KEY_DIGITS_ADDRESS+2 LDX.b $07 : TXA : ORA.w #$2400 : STA !KEY_DIGITS_ADDRESS+2
BRA .done_keys BRA .done_keys
.not_in_dungeon .not_in_dungeon
REP #$20 REP #$20
;in the overworld, draw transparent tiles instead of key count ;in the overworld, draw transparent tiles instead of key count
LDA.w #$247F : STA !KEY_DIGITS_ADDRESS : STA !KEY_DIGITS_ADDRESS+2 LDA.w #$247F : STA !KEY_DIGITS_ADDRESS : STA !KEY_DIGITS_ADDRESS+2
STA !KEY_ICON_ADDRESS STA !KEY_ICON_ADDRESS
.done_keys .done_keys
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; Draw pendant/crystal icon ; Draw pendant/crystal icon
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!PRIZE_ICON = $7EC742 !PRIZE_ICON = $7EC742
!P_ICON = $296C !P_ICON = $296C
!C_ICON = $295F !C_ICON = $295F
SEP #$20 SEP #$20
LDA.b $1B : BEQ .noprize LDA.b $1B : BEQ .noprize
LDX.w $040C LDX.w $040C
CPX #$1A : !BGE .noprize CPX #$1A : !BGE .noprize
CPX #$04 : !BLT .noprize CPX #$04 : !BLT .noprize
CPX #$08 : BEQ .noprize CPX #$08 : BEQ .noprize
LDA $10 : CMP #$12 : BEQ .noprize LDA $10 : CMP #$12 : BEQ .noprize
REP #$20 LDA.l MapMode
REP #$20
LDA.l MapMode BEQ .drawprize
BEQ .drawprize
LDA.l $7EF368
LDA.l $7EF368 AND.l DungeonItemMasks,X
AND.l DungeonItemMasks,X BEQ .noprize
BEQ .noprize
.drawprize
.drawprize TXA : LSR : TAX
TXA : LSR : TAX LDA.l CrystalPendantFlags_2, X
LDA.l CrystalPendantFlags_2, X AND.w #$0040 : BNE .is_crystal
AND.w #$0040 : BNE .is_crystal
LDA.w #!P_ICON
LDA.w #!P_ICON BRA .doneprize
BRA .doneprize
.is_crystal
.is_crystal LDA.w #!C_ICON
LDA.w #!C_ICON BRA .doneprize
BRA .doneprize
.noprize
.noprize REP #$20
REP #$20 LDA.w #$207F
LDA.w #$207F
.doneprize
.doneprize STA.l !PRIZE_ICON
STA.l !PRIZE_ICON
;--------------------------------------------------------------------------------
;-------------------------------------------------------------------------------- ; Draw Magic Meter
; Draw Magic Meter !INFINITE_MAGIC = "$7F50CA"
!INFINITE_MAGIC = "$7F50CA" !DrawMagicMeter_mp_tilemap = "$0DFE0F"
!DrawMagicMeter_mp_tilemap = "$0DFE0F" ;--------------------------------------------------------------------------------
;-------------------------------------------------------------------------------- LDA $7EF36E : AND #$00FF ; crap we wrote over when placing the hook for OnDrawHud
LDA $7EF36E : AND #$00FF ; crap we wrote over when placing the hook for OnDrawHud !ADD #$0007
!ADD #$0007 AND #$FFF8
AND #$FFF8 TAX ; end of crap
TAX ; end of crap
LDA !INFINITE_MAGIC : AND.w #$00FF : BNE + : JMP .green : +
LDA !INFINITE_MAGIC : AND.w #$00FF : BNE + : JMP .green : + SEP #$20 : LDA.b #$80 : STA $7EF36E : REP #$30 ; set magic to max
SEP #$20 : LDA.b #$80 : STA $7EF36E : REP #$30 ; set magic to max LDX.w #$0080 ; load full magic meter graphics
LDX.w #$0080 ; load full magic meter graphics LDA $1A : AND.w #$000C : LSR #2
LDA $1A : AND.w #$000C : LSR #2 BEQ .red
BEQ .red CMP.w #0001 : BEQ .yellow
CMP.w #0001 : BEQ .yellow CMP.w #0002 : BNE + : JMP .green : +
CMP.w #0002 : BNE + : JMP .green : + .blue
.blue LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$EFFF : STA $7EC746
LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$EFFF : STA $7EC746 LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$EFFF : STA $7EC786
LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$EFFF : STA $7EC786 LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$EFFF : STA $7EC7C6
LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$EFFF : STA $7EC7C6 LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$EFFF : STA $7EC806
LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$EFFF : STA $7EC806 RTL
RTL .red
.red LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$E7FF : STA $7EC746
LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$E7FF : STA $7EC746 LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$E7FF : STA $7EC786
LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$E7FF : STA $7EC786 LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$E7FF : STA $7EC7C6
LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$E7FF : STA $7EC7C6 LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$E7FF : STA $7EC806
LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$E7FF : STA $7EC806 RTL
RTL .yellow
.yellow LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$EBFF : STA $7EC746
LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$EBFF : STA $7EC746 LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$EBFF : STA $7EC786
LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$EBFF : STA $7EC786 LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$EBFF : STA $7EC7C6
LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$EBFF : STA $7EC7C6 LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$EBFF : STA $7EC806
LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$EBFF : STA $7EC806 RTL
RTL .orange
.orange LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$E3FF : STA $7EC746
LDA !DrawMagicMeter_mp_tilemap+0, X : AND.w #$E3FF : STA $7EC746 LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$E3FF : STA $7EC786
LDA !DrawMagicMeter_mp_tilemap+2, X : AND.w #$E3FF : STA $7EC786 LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$E3FF : STA $7EC7C6
LDA !DrawMagicMeter_mp_tilemap+4, X : AND.w #$E3FF : STA $7EC7C6 LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$E3FF : STA $7EC806
LDA !DrawMagicMeter_mp_tilemap+6, X : AND.w #$E3FF : STA $7EC806 RTL
RTL .green
.green LDA !DrawMagicMeter_mp_tilemap+0, X : STA $7EC746
LDA !DrawMagicMeter_mp_tilemap+0, X : STA $7EC746 LDA !DrawMagicMeter_mp_tilemap+2, X : STA $7EC786
LDA !DrawMagicMeter_mp_tilemap+2, X : STA $7EC786 LDA !DrawMagicMeter_mp_tilemap+4, X : STA $7EC7C6
LDA !DrawMagicMeter_mp_tilemap+4, X : STA $7EC7C6 LDA !DrawMagicMeter_mp_tilemap+6, X : STA $7EC806
LDA !DrawMagicMeter_mp_tilemap+6, X : STA $7EC806 RTL
RTL
;================================================================================
;================================================================================ ; 16-bit A, 8-bit X
; 16-bit A, 8-bit X ; in: A(b) - Byte to Convert
; in: A(b) - Byte to Convert ; out: $04 - $07 (high - low)
; out: $04 - $07 (high - low) ;================================================================================
;================================================================================ HudHexToDec4Digit:
HudHexToDec4Digit: LDY.b #$90
LDY.b #$90 -
- CMP.w #1000 : !BLT +
CMP.w #1000 : !BLT + INY
INY SBC.w #1000 : BRA -
SBC.w #1000 : BRA - +
+ STY $04 : LDY #$90 ; Store 1000s digit & reset Y
STY $04 : LDY #$90 ; Store 1000s digit & reset Y -
- CMP.w #100 : !BLT +
CMP.w #100 : !BLT + INY
INY SBC.w #100 : BRA -
SBC.w #100 : BRA - +
+ STY $05 : LDY #$90 ; Store 100s digit & reset Y
STY $05 : LDY #$90 ; Store 100s digit & reset Y -
- CMP.w #10 : !BLT +
CMP.w #10 : !BLT + INY
INY SBC.w #10 : BRA -
SBC.w #10 : BRA - +
+ STY $06 : LDY #$90 ; Store 10s digit & reset Y
STY $06 : LDY #$90 ; Store 10s digit & reset Y CMP.w #1 : !BLT +
CMP.w #1 : !BLT + -
- INY
INY DEC : BNE -
DEC : BNE - +
+ STY $07 ; Store 1s digit
STY $07 ; Store 1s digit RTS
RTS
;================================================================================
;================================================================================ ; 8-bit registers
; 8-bit registers ; in: A(b) - Byte to Convert
; in: A(b) - Byte to Convert ; out: $05 - $07 (high - low)
; out: $05 - $07 (high - low) ;================================================================================
;================================================================================ HudHexToDec3Digit: ; this may be overkill, could have used the 4 digit one...
HudHexToDec3Digit: ; this may be overkill, could have used the 4 digit one... LDY.b #$90
LDY.b #$90 -
- CMP.b #100 : !BLT +
CMP.b #100 : !BLT + INY
INY SBC.b #100 : BRA -
SBC.b #100 : BRA - +
+ STY $05 : LDY.b #$90 ; Store 100s digit and reset Y
STY $05 : LDY.b #$90 ; Store 100s digit and reset Y -
- CMP.b #10 : !BLT +
CMP.b #10 : !BLT + INY
INY SBC.b #10 : BRA -
SBC.b #10 : BRA - +
+ STY $06 : LDY #$90 ; Store 10s digit and reset Y
STY $06 : LDY #$90 ; Store 10s digit and reset Y CMP.b #1 : !BLT +
CMP.b #1 : !BLT + -
- INY
INY DEC : BNE -
DEC : BNE - +
+ STY $07 ; Store 1s digit
STY $07 ; Store 1s digit RTS
RTS
;================================================================================
;================================================================================ ; 8-bit registers
; 8-bit registers ; in: A(b) - Byte to Convert
; in: A(b) - Byte to Convert ; out: $06 - $07 (high - low)
; out: $06 - $07 (high - low) ;================================================================================
;================================================================================ HudHexToDec2Digit:
HudHexToDec2Digit: LDY.b #$90
LDY.b #$90 -
- CMP.b #10 : !BLT +
CMP.b #10 : !BLT + INY
INY SBC.b #10 : BRA -
SBC.b #10 : BRA - +
+ STY $06 : LDY #$90 ; Store 10s digit and reset Y
STY $06 : LDY #$90 ; Store 10s digit and reset Y CMP.b #1 : !BLT +
CMP.b #1 : !BLT + -
- INY
INY DEC : BNE -
DEC : BNE - +
+ STY $07 ; Store 1s digit
STY $07 ; Store 1s digit RTS
RTS

View File

@@ -456,6 +456,7 @@ AddReceivedItemExpanded:
JSR IncrementItemCounters JSR IncrementItemCounters
+ +
LDA $02D8 ; Item Value LDA $02D8 ; Item Value
STA !MULTIWORLD_ITEM_ID
CMP.b #$16 : BEQ .bottle ; Bottle CMP.b #$16 : BEQ .bottle ; Bottle
CMP.b #$2B : BEQ .bottle ; Red Potion w/bottle CMP.b #$2B : BEQ .bottle ; Red Potion w/bottle