game_corner_slots2.asm 620 B

1234567891011121314151617181920212223242526272829303132
  1. AbleToPlaySlotsCheck:
  2. ld a, [wSpriteStateData1 + 2]
  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. GameCornerCoinCaseText:
  25. TX_FAR _GameCornerCoinCaseText
  26. db "@"
  27. GameCornerNoCoinsText:
  28. TX_FAR _GameCornerNoCoinsText
  29. db "@"