Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GameStart:
- KeyGetLoop:
- ld hl, $F50000 \ ld a, 1
- ld (hl), a ; Set indiscriminate scan mode
- nop \ nop
- Key_WaitLoop
- ld hl, $f50008
- bit 2, (hl) \ jr nz, Key_WaitLoop
- call _kbdscan
- ld a, (kbdScanCode)
- push af
- ld hl, $F50000 \ ld a, 1
- ld (hl), a ; Set indiscriminate scan mode
- nop \ nop
- Key_WaitRelease:
- ld hl, $f50008
- bit 2, (hl) \ jr z, Key_WaitRelease
- pop af
- ; keypad reading
- ld hl, playsAllowedFlags
- bit playRoll, (hl)
- jr z, noRolls
- cp sk2nd
- jp z, RollDie
- cp skYequ \ jp z, holdDie
- cp skWindow \ jp z, holdDie
- cp skZoom \ jp z, holdDie
- cp skTrace \ jp z, holdDie
- cp skGraph \ jp z, holdDie
- bit playScore, (hl)
- jr z, noScores
- noRolls:
- ; Scoring
- bit playScore, (hl)
- jr z, noScores
- cp skDown
- jp z, SwapRow
- cp skUp
- jp z, SwapRow
- cp skRight
- jp z, MoveRight
- cp skLeft
- jp z, MoveLeft
- cp skEnter
- jp z, ScoreCombo
- noScores:
- cp skClear
- jp z, Quit
- jp KeyGetLoop
- GameLoop_End:
- call CalcCurrentScore
- ld hl, comboFlags1 \ ld a, (hl)
- cp %00111111 \ jp nz, GameStart
- ld hl, comboFlags2 \ ld a, (hl)
- cp %01111111 \ jp nz, GameStart
- jr GameOver
- ; exit game conditions
- jp GameStart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement