![]() |
Routines |
| Prev: 25789 | Up: Map | Next: 25944 |
|
Used by the routine at 25789. Returns to the caller if Sam can roll or somersault from his current location; otherwise returns to the main loop.
|
||||
| 25918 | LD H,230 | 230=Sam | ||
| 25920 | CALL 60152 | Is Sam on the sidewalk or the road? | ||
| 25923 | JR C,25941 | Jump if not | ||
| 25925 | LD L,0 | Point HL at byte 0 of Sam's buffer | ||
| 25927 | BIT 7,(HL) | Reset the zero flag if Sam is facing right | ||
| 25929 | INC HL | Point HL at byte 1 of Sam's buffer | ||
| 25930 | LD A,(HL) | A=Sam's x-coordinate | ||
| 25931 | JR NZ,25938 | Jump if Sam is facing right | ||
| 25933 | CP 4 | Return if Sam is facing left and his x-coordinate is >= 4 | ||
| 25935 | RET NC | |||
| 25936 | JR C,25941 | Jump if Sam is facing left and his x-coordinate is < 4 | ||
| 25938 | CP 250 | Return if Sam is facing right and his x-coordinate is < 250 | ||
| 25940 | RET C | |||
| 25941 | POP BC | Drop the return address from the stack | ||
| 25942 | POP BC | Drop the address of the animation phase table from the stack | ||
| 25943 | RET | Return to the main loop at 61549 | ||
| Prev: 25789 | Up: Map | Next: 25944 |