![]() |
Routines |
| Prev: 46314 | Up: Map | Next: 46341 |
|
Used by the routines at ThemeMusic and Play_ThemeMusic.
|
||||||||||||||||||||
| Handler_GameMenuInput | 46315 | PUSH AF | Stash AF, BC and DE on the stack. | |||||||||||||||||
| 46316 | PUSH BC | |||||||||||||||||||
| 46317 | PUSH DE | |||||||||||||||||||
| Handler_GameMenuInput_Pause | 46318 | DEC BC | Decrease BC by one. | |||||||||||||||||
| 46319 | LD A,B | Jump to Handler_GameMenuInput_Pause until BC is 0000. | ||||||||||||||||||
| 46320 | OR C | |||||||||||||||||||
| 46321 | JR NZ,Handler_GameMenuInput_Pause | |||||||||||||||||||
|
Collect the user input.
|
||||||||||||||||||||
| 46323 | LD A,247 | Read from the keyboard;
|
||||||||||||||||||
| 46325 | IN A,(254) | |||||||||||||||||||
|
Pad out the bits we're not interested in (only keys 1, 2, 3 and 4).
|
||||||||||||||||||||
| 46327 | OR %11110000 | Set bits 4-7. | ||||||||||||||||||
| 46329 | LD E,A | Store the result in E. | ||||||||||||||||||
| 46330 | LD A,(46313) | A=*TempStore_GameOptions. | ||||||||||||||||||
| 46333 | AND E | Merge in the bits from E. | ||||||||||||||||||
| 46334 | LD (46313),A | Write A to *TempStore_GameOptions. | ||||||||||||||||||
| 46337 | POP DE | Restore DE, BC and AF from the stack. | ||||||||||||||||||
| 46338 | POP BC | |||||||||||||||||||
| 46339 | POP AF | |||||||||||||||||||
| 46340 | RET | Return. | ||||||||||||||||||
| Prev: 46314 | Up: Map | Next: 46341 |