pokered/engine/slots/game_corner_slots2.asm

32 lines
630 B
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
AbleToPlaySlotsCheck:
ld a, [wSpriteStateData1 + 2]
2014-05-22 22:13:20 +00:00
and $8
jr z, .done ; not able
ld b, COIN_CASE
2015-08-13 05:14:31 +00:00
predef GetQuantityOfItemInBag
2014-05-22 22:13:20 +00:00
ld a, b
and a
ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
2014-05-22 22:13:20 +00:00
jr z, .printCoinCaseRequired
ld hl, wPlayerCoins
ld a, [hli]
or [hl]
jr nz, .done ; able to play
ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
2014-05-22 22:13:20 +00:00
.printCoinCaseRequired
call EnableAutoTextBoxDrawing
ld a, b
call PrintPredefTextID
xor a
.done
2015-07-19 03:49:52 +00:00
ld [wCanPlaySlots], a
2014-05-22 22:13:20 +00:00
ret
GameCornerCoinCaseText::
text_far _GameCornerCoinCaseText
text_end
2014-05-22 22:13:20 +00:00
GameCornerNoCoinsText::
text_far _GameCornerNoCoinsText
text_end