Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/slots/game_corner_slots.asm
1271 views
1
StartSlotMachine:
2
ld a, [wHiddenObjectFunctionArgument]
3
cp SLOTS_OUTOFORDER
4
jr z, .printOutOfOrder
5
cp SLOTS_OUTTOLUNCH
6
jr z, .printOutToLunch
7
cp SLOTS_SOMEONESKEYS
8
jr z, .printSomeonesKeys
9
farcall AbleToPlaySlotsCheck
10
ld a, [wCanPlaySlots]
11
and a
12
ret z
13
ld a, [wLuckySlotHiddenObjectIndex]
14
ld b, a
15
ld a, [wHiddenObjectIndex]
16
inc a
17
cp b
18
jr z, .match
19
ld a, 253
20
jr .next
21
.match
22
ld a, 250
23
.next
24
ld [wSlotMachineSevenAndBarModeChance], a
25
ldh a, [hLoadedROMBank]
26
ld [wSlotMachineSavedROMBank], a
27
call PromptUserToPlaySlots
28
ret
29
.printOutOfOrder
30
tx_pre_id GameCornerOutOfOrderText
31
jr .printText
32
.printOutToLunch
33
tx_pre_id GameCornerOutToLunchText
34
jr .printText
35
.printSomeonesKeys
36
tx_pre_id GameCornerSomeonesKeysText
37
.printText
38
push af
39
call EnableAutoTextBoxDrawing
40
pop af
41
call PrintPredefTextID
42
ret
43
44
GameCornerOutOfOrderText::
45
text_far _GameCornerOutOfOrderText
46
text_end
47
48
GameCornerOutToLunchText::
49
text_far _GameCornerOutToLunchText
50
text_end
51
52
GameCornerSomeonesKeysText::
53
text_far _GameCornerSomeonesKeysText
54
text_end
55
56