summaryrefslogtreecommitdiff
path: root/engine/slot_machine.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/slot_machine.asm')
-rwxr-xr-xengine/slot_machine.asm110
1 files changed, 55 insertions, 55 deletions
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index eb1cf3c3..733cc29c 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -1,4 +1,4 @@
-PromptUserToPlaySlots: ; 3730e (d:730e)
+PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2
ld a, BANK(DisplayTextIDInit)
ld [wAutoTextBoxDrawingControl], a
@@ -52,11 +52,11 @@ PromptUserToPlaySlots: ; 3730e (d:730e)
push af
jp CloseTextDisplay
-PlaySlotMachineText: ; 37390 (d:7390)
+PlaySlotMachineText:
TX_FAR _PlaySlotMachineText
db "@"
-MainSlotMachineLoop: ; 37395 (d:7395)
+MainSlotMachineLoop:
call SlotMachine_PrintCreditCoins
xor a
ld hl, wPayoutCoins
@@ -146,32 +146,32 @@ MainSlotMachineLoop: ; 37395 (d:7395)
call SlotMachine_PutOutLitBalls
jp MainSlotMachineLoop
-CoinMultiplierSlotMachineText: ; 3745e (d:745e)
+CoinMultiplierSlotMachineText:
db "×3"
next "×2"
next "×1@"
-OutOfCoinsSlotMachineText: ; 37467 (d:7467)
+OutOfCoinsSlotMachineText:
TX_FAR _OutOfCoinsSlotMachineText
db "@"
-BetHowManySlotMachineText: ; 3746c (d:746c)
+BetHowManySlotMachineText:
TX_FAR _BetHowManySlotMachineText
db "@"
-StartSlotMachineText: ; 37471 (d:7471)
+StartSlotMachineText:
TX_FAR _StartSlotMachineText
db "@"
-NotEnoughCoinsSlotMachineText: ; 37476 (d:7476)
+NotEnoughCoinsSlotMachineText:
TX_FAR _NotEnoughCoinsSlotMachineText
db "@"
-OneMoreGoSlotMachineText: ; 3747b (d:747b)
+OneMoreGoSlotMachineText:
TX_FAR _OneMoreGoSlotMachineText
db "@"
-SlotMachine_SetFlags: ; 37480 (d:7480)
+SlotMachine_SetFlags:
ld hl, wSlotMachineFlags
bit 7, [hl]
ret nz
@@ -201,7 +201,7 @@ SlotMachine_SetFlags: ; 37480 (d:7480)
set 7, [hl]
ret
-SlotMachine_SpinWheels: ; 374ad (d:74ad)
+SlotMachine_SpinWheels:
ld c, 20
.loop1
push bc
@@ -233,7 +233,7 @@ SlotMachine_SpinWheels: ; 374ad (d:74ad)
; visible. The 3 functions below ensure this by checking if the wheel offset
; is even before stopping the wheel.
-SlotMachine_StopOrAnimWheel1: ; 374df (d:74df)
+SlotMachine_StopOrAnimWheel1:
ld a, [wStoppingWhichSlotMachineWheel]
cp 1
jr c, .animWheel
@@ -251,7 +251,7 @@ SlotMachine_StopOrAnimWheel1: ; 374df (d:74df)
.animWheel
jp SlotMachine_AnimWheel1
-SlotMachine_StopOrAnimWheel2: ; 374fb (d:74fb)
+SlotMachine_StopOrAnimWheel2:
ld a, [wStoppingWhichSlotMachineWheel]
cp 2
jr c, .animWheel
@@ -269,7 +269,7 @@ SlotMachine_StopOrAnimWheel2: ; 374fb (d:74fb)
.animWheel
jp SlotMachine_AnimWheel2
-SlotMachine_StopOrAnimWheel3: ; 37517 (d:7517)
+SlotMachine_StopOrAnimWheel3:
ld a, [wStoppingWhichSlotMachineWheel]
cp 3
jr c, .animWheel
@@ -285,7 +285,7 @@ SlotMachine_StopOrAnimWheel3: ; 37517 (d:7517)
and a
ret
-SlotMachine_StopWheel1Early: ; 3752c (d:752c)
+SlotMachine_StopWheel1Early:
call SlotMachine_GetWheel1Tiles
ld hl, wSlotMachineWheel1BottomTile
ld a, [wSlotMachineFlags]
@@ -314,7 +314,7 @@ SlotMachine_StopWheel1Early: ; 3752c (d:752c)
ld [hl], 0
ret
-SlotMachine_StopWheel2Early: ; 37552 (d:7552)
+SlotMachine_StopWheel2Early:
call SlotMachine_GetWheel2Tiles
ld a, [wSlotMachineFlags]
and $80
@@ -337,7 +337,7 @@ SlotMachine_StopWheel2Early: ; 37552 (d:7552)
ld [wSlotMachineWheel2SlipCounter], a
ret
-SlotMachine_FindWheel1Wheel2Matches: ; 3756e (d:756e)
+SlotMachine_FindWheel1Wheel2Matches:
; return whether wheel 1 and wheel 2's current positions allow a match (given
; that wheel 3 stops in a good position) in Z
ld hl, wSlotMachineWheel1BottomTile
@@ -363,7 +363,7 @@ SlotMachine_FindWheel1Wheel2Matches: ; 3756e (d:756e)
dec de
ret
-SlotMachine_CheckForMatches: ; 37588 (d:7588)
+SlotMachine_CheckForMatches:
call SlotMachine_GetWheel3Tiles
ld a, [wSlotMachineBet]
cp 2
@@ -475,7 +475,7 @@ SlotMachine_CheckForMatches: ; 37588 (d:7588)
ld [rOBP0], a
jp .done
-SymbolLinedUpSlotMachineText: ; 37665 (d:7665)
+SymbolLinedUpSlotMachineText:
TX_ASM
push bc
call SlotMachine_PrintWinningSymbol
@@ -487,11 +487,11 @@ SymbolLinedUpSlotMachineText: ; 37665 (d:7665)
inc bc
ret
-LinedUpText: ; 37673 (d:7673)
+LinedUpText:
TX_FAR _LinedUpText
db "@"
-SlotRewardPointers: ; 37678 (d:7678)
+SlotRewardPointers:
dw SlotReward300Func
dw SlotReward300Text
dw SlotReward100Func
@@ -505,24 +505,24 @@ SlotRewardPointers: ; 37678 (d:7678)
dw SlotReward15Func
dw SlotReward15Text
-SlotReward300Text: ; 37690 (d:7690)
+SlotReward300Text:
db "300@"
-SlotReward100Text: ; 37694 (d:7694)
+SlotReward100Text:
db "100@"
-SlotReward8Text: ; 37698 (d:7698)
+SlotReward8Text:
db "8@"
-SlotReward15Text: ; 3769a (d:769a)
+SlotReward15Text:
db "15@"
-NotThisTimeText: ; 3769d (d:769d)
+NotThisTimeText:
TX_FAR _NotThisTimeText
db "@"
; compares the slot machine tiles at bc, de, and hl
-SlotMachine_CheckForMatch: ; 376a2 (d:76a2)
+SlotMachine_CheckForMatch:
ld a, [de]
cp [hl]
ret nz
@@ -530,24 +530,24 @@ SlotMachine_CheckForMatch: ; 376a2 (d:76a2)
cp [hl]
ret
-SlotMachine_GetWheel3Tiles: ; 376a8 (d:76a8)
+SlotMachine_GetWheel3Tiles:
ld de, wSlotMachineWheel3BottomTile
ld hl, SlotMachineWheel3
ld a, [wSlotMachineWheel3Offset]
call SlotMachine_GetWheelTiles
-SlotMachine_GetWheel2Tiles: ; 376b4 (d:76b4)
+SlotMachine_GetWheel2Tiles:
ld de, wSlotMachineWheel2BottomTile
ld hl, SlotMachineWheel2
ld a, [wSlotMachineWheel2Offset]
call SlotMachine_GetWheelTiles
-SlotMachine_GetWheel1Tiles: ; 376c0 (d:76c0)
+SlotMachine_GetWheel1Tiles:
ld de, wSlotMachineWheel1BottomTile
ld hl, SlotMachineWheel1
ld a, [wSlotMachineWheel1Offset]
-SlotMachine_GetWheelTiles: ; 376c9 (d:76c9)
+SlotMachine_GetWheelTiles:
ld c, a
ld b, 0
add hl, bc
@@ -561,7 +561,7 @@ SlotMachine_GetWheelTiles: ; 376c9 (d:76c9)
jr nz, .loop
ret
-SlotReward8Func: ; 376d7 (d:76d7)
+SlotReward8Func:
ld hl, wSlotMachineAllowMatchesCounter
ld a, [hl]
and a
@@ -572,7 +572,7 @@ SlotReward8Func: ; 376d7 (d:76d7)
ld de, 8
ret
-SlotReward15Func: ; 376e5 (d:76e5)
+SlotReward15Func:
ld hl, wSlotMachineAllowMatchesCounter
ld a, [hl]
and a
@@ -583,7 +583,7 @@ SlotReward15Func: ; 376e5 (d:76e5)
ld de, 15
ret
-SlotReward100Func: ; 376f3 (d:76f3)
+SlotReward100Func:
ld a, SFX_GET_KEY_ITEM
call PlaySound
xor a
@@ -592,7 +592,7 @@ SlotReward100Func: ; 376f3 (d:76f3)
ld de, 100
ret
-SlotReward300Func: ; 37702 (d:7702)
+SlotReward300Func:
ld hl, YeahText
call PrintText
ld a, SFX_GET_ITEM_2
@@ -608,11 +608,11 @@ SlotReward300Func: ; 37702 (d:7702)
ld de, 300
ret
-YeahText: ; 37722 (d:7722)
+YeahText:
TX_FAR _YeahText
db $0a, "@"
-SlotMachine_PrintWinningSymbol: ; 37728 (d:7728)
+SlotMachine_PrintWinningSymbol:
; prints winning symbol and down arrow in text box
coord hl, 2, 14
ld a, [wSlotMachineWinningSymbol]
@@ -630,7 +630,7 @@ SlotMachine_PrintWinningSymbol: ; 37728 (d:7728)
ld [hl], $ee ; down arrow
ret
-SlotMachine_SubtractBetFromPlayerCoins: ; 37741 (d:7741)
+SlotMachine_SubtractBetFromPlayerCoins:
ld hl, wTempCoins2 + 1
ld a, [wSlotMachineBet]
ld [hld], a
@@ -640,19 +640,19 @@ SlotMachine_SubtractBetFromPlayerCoins: ; 37741 (d:7741)
ld c, $2
predef SubBCDPredef
-SlotMachine_PrintCreditCoins: ; 37754 (d:7754)
+SlotMachine_PrintCreditCoins:
coord hl, 5, 1
ld de, wPlayerCoins
ld c, $2
jp PrintBCDNumber
-SlotMachine_PrintPayoutCoins: ; 3775f (d:775f)
+SlotMachine_PrintPayoutCoins:
coord hl, 11, 1
ld de, wPayoutCoins
lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits
jp PrintNumber
-SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
+SlotMachine_PayCoinsToPlayer:
ld a, $1
ld [wMuteAudioAndPauseMusic], a
call WaitForSoundToFinish
@@ -709,12 +709,12 @@ SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
call DelayFrames
jr .loop
-SlotMachine_PutOutLitBalls: ; 377ce (d:77ce)
+SlotMachine_PutOutLitBalls:
ld a, $23
ld [wNewSlotMachineBallTile], a
jr SlotMachine_UpdateThreeCoinBallTiles
-SlotMachine_LightBalls: ; 377d5 (d:77d5)
+SlotMachine_LightBalls:
ld a, $14
ld [wNewSlotMachineBallTile], a
ld a, [wSlotMachineBet]
@@ -723,22 +723,22 @@ SlotMachine_LightBalls: ; 377d5 (d:77d5)
dec a
jr z, SlotMachine_UpdateTwoCoinBallTiles
-SlotMachine_UpdateThreeCoinBallTiles: ; 377e3 (d:77e3)
+SlotMachine_UpdateThreeCoinBallTiles:
coord hl, 3, 2
call SlotMachine_UpdateBallTiles
coord hl, 3, 10
call SlotMachine_UpdateBallTiles
-SlotMachine_UpdateTwoCoinBallTiles: ; 377ef (d:77ef)
+SlotMachine_UpdateTwoCoinBallTiles:
coord hl, 3, 4
call SlotMachine_UpdateBallTiles
coord hl, 3, 8
call SlotMachine_UpdateBallTiles
-SlotMachine_UpdateOneCoinBallTiles: ; 377fb (d:77fb)
+SlotMachine_UpdateOneCoinBallTiles:
coord hl, 3, 6
-SlotMachine_UpdateBallTiles: ; 377fe (d:77fe)
+SlotMachine_UpdateBallTiles:
ld a, [wNewSlotMachineBallTile]
ld [hl], a
ld bc, 13
@@ -753,7 +753,7 @@ SlotMachine_UpdateBallTiles: ; 377fe (d:77fe)
ld [hl], a
ret
-SlotMachine_AnimWheel1: ; 37813 (d:7813)
+SlotMachine_AnimWheel1:
ld bc, SlotMachineWheel1
ld de, wSlotMachineWheel1Offset
ld hl, wOAMBuffer
@@ -761,7 +761,7 @@ SlotMachine_AnimWheel1: ; 37813 (d:7813)
ld [wBaseCoordX], a
jr SlotMachine_AnimWheel
-SlotMachine_AnimWheel2: ; 37823 (d:7823)
+SlotMachine_AnimWheel2:
ld bc, SlotMachineWheel2
ld de, wSlotMachineWheel2Offset
ld hl, wOAMBuffer + $30
@@ -769,14 +769,14 @@ SlotMachine_AnimWheel2: ; 37823 (d:7823)
ld [wBaseCoordX], a
jr SlotMachine_AnimWheel
-SlotMachine_AnimWheel3: ; 37833 (d:7833)
+SlotMachine_AnimWheel3:
ld bc, SlotMachineWheel3
ld de, wSlotMachineWheel3Offset
ld hl, wOAMBuffer + $60
ld a, $70
ld [wBaseCoordX], a
-SlotMachine_AnimWheel: ; 37841 (d:7841)
+SlotMachine_AnimWheel:
ld a, $58
ld [wBaseCoordY], a
push de
@@ -821,7 +821,7 @@ SlotMachine_AnimWheel: ; 37841 (d:7841)
ld [de], a
ret
-SlotMachine_HandleInputWhileWheelsSpin: ; 37882 (d:7882)
+SlotMachine_HandleInputWhileWheelsSpin:
call DelayFrame
call JoypadLowSensitivity
ld a, [hJoy5]
@@ -845,7 +845,7 @@ SlotMachine_HandleInputWhileWheelsSpin: ; 37882 (d:7882)
ret nz
jr .loop
-LoadSlotMachineTiles: ; 378a8 (d:78a8)
+LoadSlotMachineTiles:
call DisableLCD
ld hl, SlotMachineTiles2
ld de, vChars0
@@ -876,12 +876,12 @@ LoadSlotMachineTiles: ; 378a8 (d:78a8)
call SlotMachine_AnimWheel2
jp SlotMachine_AnimWheel3
-SlotMachineMap: ; 378f5 (d:78f5)
+SlotMachineMap:
INCBIN "gfx/tilemaps/slotmachine.map"
INCLUDE "data/slot_machine_wheels.asm"
-SlotMachineTiles1: ; 37a51 (d:7a51)
+SlotMachineTiles1:
IF DEF(_RED)
INCBIN "gfx/red/slotmachine1.2bpp"
ENDC