Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/home/money.asm
1270 views
1
HasEnoughMoney::
2
; Check if the player has at least as much
3
; money as the 3-byte BCD value at hMoney.
4
ld de, wPlayerMoney
5
ld hl, hMoney
6
ld c, 3
7
jp StringCmp
8
9
HasEnoughCoins::
10
; Check if the player has at least as many
11
; coins as the 2-byte BCD value at hCoins.
12
ld de, wPlayerCoins
13
ld hl, hCoins
14
ld c, 2
15
jp StringCmp
16
17