Routines |
Prev: BBB0 | Up: Map | Next: BBE7 |
Used by the routines at CAST_S, examine_board, select_spell, display_spell_info, routine13, disbelieve_spell, lightning_spell, routine21, COUNTL, routine24, routine25, routine35, display_object_info, routine72, routine73 and routine78.
|
||||
wait_no_key_seed | BBCC | PUSH HL | preserve HL, DE, BC | |
BBCD | PUSH DE | |||
BBCE | PUSH BC | |||
BBCF | LD A,(computer_player_flag) | skip to end of routine if current player is not human | ||
BBD2 | OR A | |||
BBD3 | JR NZ,wait_no_key_seed_1 | |||
wait_no_key_seed_0 | BBD5 | PUSH BC | preserve BC | |
BBD6 | CALL $028E | call KEY-SCAN in ROM to see if a key was pressed. | ||
BBD9 | POP BC | restore BC | ||
BBDA | INC C | increment counter (used to set SEED later) | ||
BBDB | LD A,E | loop back to wait_no_key_seed_0 if a key was pressed | ||
BBDC | INC A | |||
BBDD | JR NZ,wait_no_key_seed_0 | |||
BBDF | LD A,C | set SEED to the value of the counter | ||
BBE0 | LD ($5C76),A | |||
wait_no_key_seed_1 | BBE3 | POP BC | restore BC, DE, HL | |
BBE4 | POP DE | |||
BBE5 | POP HL | |||
BBE6 | RET | return |
Prev: BBB0 | Up: Map | Next: BBE7 |