Files
alttpr-baserom/capacityupgrades.asm
cassidoxa 031e3965b2 Requires frontend changes
Change SRAM ammo capacity upgrades to flatly represent max capacity
2022-08-08 13:42:19 -04:00

28 lines
1.0 KiB
NASM

;================================================================================
; Capacity Logic
;================================================================================
IncrementBombs:
LDA.l BombCapacity : BEQ + ; Skip if we can't have bombs
DEC
CMP.l BombsEquipment : !BLT +
LDA.l BombsEquipment
CMP.b #99 : !BGE +
INC : STA.l BombsEquipment
+
RTL
;--------------------------------------------------------------------------------
IncrementArrows:
LDA.l ArrowCapacity : DEC
CMP.l CurrentArrows : !BLT +
LDA.l CurrentArrows
CMP.b #99 : !BGE +
INC : STA.l CurrentArrows
+
RTL
;--------------------------------------------------------------------------------
CompareBombsToMax:
LDA.l BombCapacity
CMP.l BombsEquipment
RTL
;--------------------------------------------------------------------------------