![]() |
Routines |
| Prev: 8605 | Up: Map | Next: 8652 |
|
Used by the routine at menu.
Called by the menu (menu) after the title tune. Each pass: a new random number (random), the pass counter (in object_records) up by one, the two players' control-method pointers moved (move_method_arrow), the one-or-two-player lines coloured (colour_player_line, which flashes the chosen one), a pause of $18 x 255 loops (delay), and then key 0 ends it; otherwise the menu's keys are read (menu_keys) and round again.
Like every keyboard read in the game, the port is selected with OUT ($FD) first.
|
||||
| menu_loop | 8615 | CALL random | A random number | |
| 8618 | LD HL,(pass_counter) | Count the pass | ||
| 861B | INC HL | |||
| 861C | LD (pass_counter),HL | |||
| 861F | LD IX,player1_pointer | Move player 1's pointer, then player 2's | ||
| 8623 | LD DE,pointer_p1_graphic | |||
| 8626 | CALL move_method_arrow | |||
| 8629 | LD IX,player2_pointer | |||
| 862D | LD DE,pointer_p2_graphic | |||
| 8630 | CALL move_method_arrow | |||
| 8633 | LD HL,$2F70 | Colour the two lines | ||
| 8636 | CALL colour_player_line | |||
| 8639 | LD HL,$3F70 | |||
| 863C | CALL colour_player_line | |||
| 863F | LD D,$18 | Pause | ||
| 8641 | CALL delay | |||
| 8644 | LD A,$EF | Key 0 (row $EF, bit 0) ends the menu | ||
| 8646 | OUT ($FD),A | |||
| 8648 | IN A,($FE) | |||
| 864A | AND $01 | |||
| 864C | RET Z | |||
| 864D | CALL menu_keys | Otherwise read the other keys and loop | ||
| 8650 | JR menu_loop | |||
| Prev: 8605 | Up: Map | Next: 8652 |