![]() |
Routines |
| Prev: 55250 | Up: Map | Next: 55415 |
|
Used by the routine at Dispatch_Handlers.
Marks the game complete when all four CollectionSlots slots are 9 then ticks ActionTimer.
|
||||
| Handler_Housekeeping | 55295 | LD HL,25793 | Test the four collection slots for 9. | |
| 55298 | LD B,4 | |||
| 55300 | LD A,9 | |||
| Handler_Housekeeping_SlotLoop | 55302 | CP (HL) | Jump to Handler_Housekeeping_Timer if any slot differs. | |
| 55303 | JR NZ,Handler_Housekeeping_Timer | |||
| 55305 | INC HL | |||
| 55306 | DJNZ Handler_Housekeeping_SlotLoop | Jump to Handler_Housekeeping_Timer unless *CollectedCount is 16. | ||
| 55308 | LD A,(25761) | |||
| 55311 | CP 16 | |||
| 55313 | JR NZ,Handler_Housekeeping_Timer | Write 255 to *GameCompleteFlag. | ||
| 55315 | LD A,255 | |||
| 55317 | LD (25725),A | |||
| Handler_Housekeeping_Timer | 55320 | LD A,(25737) | Return if *ActionTimer is zero. | |
| 55323 | OR A | |||
| 55324 | RET Z | Decrease *ActionTimer by one. | ||
| 55325 | DEC A | |||
| 55326 | LD (25737),A | |||
| 55329 | OR A | Return if the timer is still running. | ||
| 55330 | RET NZ | Jump to Lose_Life. | ||
| 55331 | JP Lose_Life | |||
|
This entry point is used by the routines at Initialise_Game and Game_Loop.
Read the Kempston port twice and return if the two reads match (the port is stable).
|
||||
| Read_Kempston | 55334 | IN A,(31) | Read from the Kempston joystick port twice. | |
| 55336 | LD E,A | |||
| 55337 | IN A,(31) | |||
| 55339 | CP E | Return if the two reads differ. | ||
| 55340 | RET | Return. | ||
|
This entry point is used by the routine at Handler_Player.
Demo / Kempston movement for the player.
|
||||
| Controls_Kempston | 55341 | LD HL,(25734) | HL=*KempstonMasks. | |
| 55344 | CALL Read_Kempston | Call Player_MoveLeft if left matches the stored mask. | ||
| 55347 | JR NZ,Controls_Kempston_Right | |||
| 55349 | CP L | |||
| 55350 | CALL Z,Player_MoveLeft | |||
| Controls_Kempston_Right | 55353 | CALL Read_Kempston | Call Player_MoveRight if right matches the stored mask. | |
| 55356 | JR NZ,Controls_Kempston_Up | |||
| 55358 | CP H | |||
| 55359 | CALL Z,Player_MoveRight | |||
| Controls_Kempston_Up | 55362 | CALL Read_Kempston | Call Player_ClimbUp if up (bit 3) is pressed. | |
| 55365 | JR NZ,Controls_Kempston_Down | |||
| 55367 | CP 8 | |||
| 55369 | CALL Z,Player_ClimbUp | |||
| Controls_Kempston_Down | 55372 | CALL Read_Kempston | Call Player_ClimbDown if down (bit 2) is pressed. | |
| 55375 | JR NZ,Controls_Kempston_Action | |||
| 55377 | CP 4 | |||
| 55379 | CALL Z,Player_ClimbDown | |||
| Controls_Kempston_Action | 55382 | CALL Read_Kempston | Jump to Handler_Player_Resolve if the port is unstable. | |
| 55385 | JP NZ,Handler_Player_Resolve | Call Player_Action if fire (bit 4) is pressed. | ||
| 55388 | CP 16 | |||
| 55390 | CALL Z,Player_Action | Jump to Handler_Player_Resolve. | ||
| 55393 | JP Handler_Player_Resolve | |||
|
This entry point is used by the routine at Handler_Combination.
Kempston climbing controls.
|
||||
| Controls_Kempston_Climb | 55396 | CALL Read_Kempston | Jump to Handler_Player_Commit if the port is unstable. | |
| 55399 | JP NZ,Handler_Player_Commit | Jump to Player_ClimbUp_Anim if up is pressed. | ||
| 55402 | CP 8 | |||
| 55404 | JP Z,Player_ClimbUp_Anim | Jump to Player_ClimbDown_Anim if down is pressed. | ||
| 55407 | CP 4 | |||
| 55409 | JP Z,Player_ClimbDown_Anim | Jump to Handler_Player_Commit. | ||
| 55412 | JP Handler_Player_Commit | |||
| Prev: 55250 | Up: Map | Next: 55415 |