aboutsummaryrefslogtreecommitdiffstats
path: root/engine/slots/game_corner_slots.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_slots.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_slots.asm')
-rwxr-xr-xengine/slots/game_corner_slots.asm54
1 files changed, 54 insertions, 0 deletions
diff --git a/engine/slots/game_corner_slots.asm b/engine/slots/game_corner_slots.asm
new file mode 100755
index 00000000..48321974
--- /dev/null
+++ b/engine/slots/game_corner_slots.asm
@@ -0,0 +1,54 @@
+StartSlotMachine:
+ ld a, [wHiddenObjectFunctionArgument]
+ cp SLOTS_OUTOFORDER
+ jr z, .printOutOfOrder
+ cp SLOTS_OUTTOLUNCH
+ jr z, .printOutToLunch
+ cp SLOTS_SOMEONESKEYS
+ jr z, .printSomeonesKeys
+ farcall AbleToPlaySlotsCheck
+ ld a, [wCanPlaySlots]
+ and a
+ ret z
+ ld a, [wLuckySlotHiddenObjectIndex]
+ ld b, a
+ ld a, [wHiddenObjectIndex]
+ inc a
+ cp b
+ jr z, .match
+ ld a, 253
+ jr .next
+.match
+ ld a, 250
+.next
+ ld [wSlotMachineSevenAndBarModeChance], a
+ ldh a, [hLoadedROMBank]
+ ld [wSlotMachineSavedROMBank], a
+ call PromptUserToPlaySlots
+ ret
+.printOutOfOrder
+ tx_pre_id GameCornerOutOfOrderText
+ jr .printText
+.printOutToLunch
+ tx_pre_id GameCornerOutToLunchText
+ jr .printText
+.printSomeonesKeys
+ tx_pre_id GameCornerSomeonesKeysText
+.printText
+ push af
+ call EnableAutoTextBoxDrawing
+ pop af
+ call PrintPredefTextID
+ ret
+
+GameCornerOutOfOrderText::
+ text_far _GameCornerOutOfOrderText
+ text_end
+
+GameCornerOutToLunchText::
+ text_far _GameCornerOutToLunchText
+ text_end
+
+GameCornerSomeonesKeysText::
+ text_far _GameCornerSomeonesKeysText
+ text_end