Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/slots/game_corner_slots2.asm
1271 views
1
AbleToPlaySlotsCheck:
2
ld a, [wSpritePlayerStateData1ImageIndex]
3
and $8
4
jr z, .done ; not able
5
ld b, COIN_CASE
6
predef GetQuantityOfItemInBag
7
ld a, b
8
and a
9
ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
10
jr z, .printCoinCaseRequired
11
ld hl, wPlayerCoins
12
ld a, [hli]
13
or [hl]
14
jr nz, .done ; able to play
15
ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
16
.printCoinCaseRequired
17
call EnableAutoTextBoxDrawing
18
ld a, b
19
call PrintPredefTextID
20
xor a
21
.done
22
ld [wCanPlaySlots], a
23
ret
24
25
GameCornerCoinCaseText::
26
text_far _GameCornerCoinCaseText
27
text_end
28
29
GameCornerNoCoinsText::
30
text_far _GameCornerNoCoinsText
31
text_end
32
33