aboutsummaryrefslogtreecommitdiffstats
path: root/engine/slots/game_corner_slots2.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /engine/slots/game_corner_slots2.asm
parentMerge pull request #55 from Deokishisu/patch-1 (diff)
downloadpokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip
Sync with pokered
Diffstat (limited to 'engine/slots/game_corner_slots2.asm')
-rwxr-xr-xengine/slots/game_corner_slots2.asm31
1 files changed, 31 insertions, 0 deletions
diff --git a/engine/slots/game_corner_slots2.asm b/engine/slots/game_corner_slots2.asm
new file mode 100755
index 00000000..a4ba4ec1
--- /dev/null
+++ b/engine/slots/game_corner_slots2.asm
@@ -0,0 +1,31 @@
+AbleToPlaySlotsCheck:
+ ld a, [wSpritePlayerStateData1ImageIndex]
+ and $8
+ jr z, .done ; not able
+ ld b, COIN_CASE
+ predef GetQuantityOfItemInBag
+ ld a, b
+ and a
+ ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
+ jr z, .printCoinCaseRequired
+ ld hl, wPlayerCoins
+ ld a, [hli]
+ or [hl]
+ jr nz, .done ; able to play
+ ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
+.printCoinCaseRequired
+ call EnableAutoTextBoxDrawing
+ ld a, b
+ call PrintPredefTextID
+ xor a
+.done
+ ld [wCanPlaySlots], a
+ ret
+
+GameCornerCoinCaseText::
+ text_far _GameCornerCoinCaseText
+ text_end
+
+GameCornerNoCoinsText::
+ text_far _GameCornerNoCoinsText
+ text_end