pokered/engine/game_corner_slots2.asm

32 lines
671 B
NASM
Raw Normal View History

2015-07-19 03:49:52 +00:00
AbleToPlaySlotsCheck: ; 2ff09 (b:7f09)
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: ; 2ff32 (b:7f32)
TX_FAR _GameCornerCoinCaseText
db "@"
GameCornerNoCoinsText: ; 2ff37 (b:7f37)
TX_FAR _GameCornerNoCoinsText
db "@"