pokered/engine/game_corner_slots.asm

55 lines
994 B
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
StartSlotMachine:
2015-07-13 20:35:35 +00:00
ld a, [wHiddenObjectFunctionArgument]
2014-05-22 22:13:20 +00:00
cp $fd
jr z, .printOutOfOrder
cp $fe
jr z, .printOutToLunch
cp $ff
jr z, .printSomeonesKeys
callba AbleToPlaySlotsCheck
2015-07-19 03:49:52 +00:00
ld a, [wCanPlaySlots]
2014-05-22 22:13:20 +00:00
and a
ret z
2015-07-13 20:35:35 +00:00
ld a, [wLuckySlotHiddenObjectIndex]
2014-05-22 22:13:20 +00:00
ld b, a
2015-07-13 20:35:35 +00:00
ld a, [wHiddenObjectIndex]
2014-05-22 22:13:20 +00:00
inc a
cp b
2015-07-13 20:35:35 +00:00
jr z, .match
ld a, 253
jr .next
.match
ld a, 250
.next
ld [wSlotMachineSevenAndBarModeChance], a
2014-05-22 22:13:20 +00:00
ld a, [H_LOADEDROMBANK]
2015-07-13 20:35:35 +00:00
ld [wSlotMachineSavedROMBank], a
2014-05-22 22:13:20 +00:00
call PromptUserToPlaySlots
ret
.printOutOfOrder
tx_pre_id GameCornerOutOfOrderText
2014-05-22 22:13:20 +00:00
jr .printText
.printOutToLunch
tx_pre_id GameCornerOutToLunchText
2014-05-22 22:13:20 +00:00
jr .printText
.printSomeonesKeys
tx_pre_id GameCornerSomeonesKeysText
2014-05-22 22:13:20 +00:00
.printText
push af
call EnableAutoTextBoxDrawing
pop af
call PrintPredefTextID
ret
2016-06-12 00:24:04 +00:00
GameCornerOutOfOrderText:
2014-05-22 22:13:20 +00:00
TX_FAR _GameCornerOutOfOrderText
db "@"
2016-06-12 00:24:04 +00:00
GameCornerOutToLunchText:
2014-05-22 22:13:20 +00:00
TX_FAR _GameCornerOutToLunchText
db "@"
2016-06-12 00:24:04 +00:00
GameCornerSomeonesKeysText:
2014-05-22 22:13:20 +00:00
TX_FAR _GameCornerSomeonesKeysText
db "@"