![]() |
Routines |
Prev: 61618 | Up: Map | Next: 61689 |
Used by the routine at 30989. Ends the cutscene by entering demo mode or resuming the game in the next mode.
|
||
61630 | CALL 60121 | Check the keyboard (to flush any recent keypress) |
61633 | LD HL,(32670) | 32670 holds the number of bucks Sam has left |
61636 | LD A,H | Has Sam's cash supply run out? |
61637 | OR L | |
61638 | JR Z,61651 | Jump if so |
61640 | LD HL,32607 | Set every bit of the screen refresh buffer so that the entire display will be updated |
61643 | LD (HL),255 | |
61645 | DEC L | |
61646 | JR NZ,61643 | |
61648 | JP 60032 | Update the display |
Sam is out of money, so it must be the end of the game. Time to check for a new high score and enter demo mode.
|
||
61651 | LD HL,(65516) | Collect the old high score from 65516 |
61654 | LD DE,(32668) | Collect the score from 32668 |
61658 | SBC HL,DE | Do we have a new high score? |
61660 | JR NC,61671 | Jump if not |
61662 | LD (65516),DE | Otherwise set the new high score |
61666 | JR 61671 | Jump forward to enter demo mode |
61668 | CALL 56576 | This startup routine prepares the bottom 4 lines of the screen just after the game has loaded |
61671 | XOR A | A=0 (demo mode) |
61672 | JR 61676 | |
This entry point is used by the routine at 31126 to start a new game.
|
||
61674 | LD A,1 | A=1 (new game) |
61676 | LD (65518),A | Store the game mode (0 or 1) at 65518, from where it will be copied to 32750 |
61679 | LD SP,23898 | Reset the stack pointer |
61682 | NOP | |
61683 | CALL 63662 | Prepare for demo mode or a new game |
61686 | JP 61503 | Enter the main loop |
Prev: 61618 | Up: Map | Next: 61689 |