forked from KatDevsGames/z3randomizer
-
Notifications
You must be signed in to change notification settings - Fork 6
/
capacityupgrades.asm
42 lines (37 loc) · 1.19 KB
/
capacityupgrades.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
;================================================================================
; Capacity Logic
;================================================================================
!BOMB_UPGRADES = "$7EF370"
!BOMB_CURRENT = "$7EF343"
;--------------------------------------------------------------------------------
IncrementBombs:
LDA !BOMB_UPGRADES ; get bomb upgrades
!ADD.l StartingMaxBombs : DEC
CMP !BOMB_CURRENT
!BLT +
LDA !BOMB_CURRENT
CMP.b #99 : !BGE +
INC : STA !BOMB_CURRENT
+
RTL
;--------------------------------------------------------------------------------
!ARROW_UPGRADES = "$7EF371"
!ARROW_CURRENT = "$7EF377"
;--------------------------------------------------------------------------------
IncrementArrows:
LDA !ARROW_UPGRADES ; get arrow upgrades
!ADD.l StartingMaxArrows : DEC
CMP !ARROW_CURRENT
!BLT +
LDA !ARROW_CURRENT
CMP.b #99 : !BGE +
INC : STA !ARROW_CURRENT
+
RTL
;--------------------------------------------------------------------------------
CompareBombsToMax:
LDA !BOMB_UPGRADES ; get bomb upgrades
!ADD.l StartingMaxBombs
CMP !BOMB_CURRENT
RTL
;--------------------------------------------------------------------------------