Routines |
Prev: 43066 | Up: Map | Next: 43140 |
Used by the routine at Player_Name.
|
||||
Controller_Yes_No | 43097 | CALL Handler_Debounce_Controls | Call Handler_Debounce_Controls. | |
Produce a short pause.
|
||||
Controller_Yes_No_Loop | 43100 | LD B,10 | B=10. | |
Controller_Yes_No_Pause | 43102 | HALT | Halt operation (suspend CPU until the next interrupt). | |
43103 | DJNZ Controller_Yes_No_Pause | Decrease counter by one and loop back to Controller_Yes_No_Pause until counter is zero. | ||
Fetch player input.
|
||||
43105 | CALL Handler_Controls | Call Handler_Controls. | ||
43108 | LD A,E | A=E. | ||
Was "up" pressed?
|
||||
43109 | CP 24 | Jump to Controller_Yes_No_Action if A is 24. | ||
43111 | JR Z,Controller_Yes_No_Action | |||
Was "down" pressed?
|
||||
43113 | CP 8 | Jump to Controller_Yes_No_Action if A is 8. | ||
43115 | JR Z,Controller_Yes_No_Action | |||
Was "fire" not pressed?
|
||||
43117 | CP 128 | Jump to Controller_Yes_No_Loop if A is not 128. | ||
43119 | JR NZ,Controller_Yes_No_Loop | |||
Pressing "fire" exits/ sets the value.
|
||||
43121 | RET | Return. | ||
Flip bit 5 of A (32) using XOR with *Game_Flags.
|
||||
Controller_Yes_No_Action | 43122 | LD HL,43914 | Flip bit 5 of Game_Flags. | |
43125 | LD A,%00100000 | |||
43127 | XOR (HL) | |||
43128 | LD (HL),A | |||
Update the text on the screen to reflect the players choice.
|
||||
43129 | CALL Handler_Yes_No | Call Handler_Yes_No. | ||
43132 | LD BC,128 | BC=0128. | ||
43135 | CALL PressAnyKey_1 | Call PressAnyKey_1. | ||
43138 | JR Controller_Yes_No | Jump to Controller_Yes_No. |
Prev: 43066 | Up: Map | Next: 43140 |