![]() |
Routines |
| Prev: DAC5 | Up: Map | Next: DB24 |
|
Used by the routine at Dispatch_Handlers.
Room 09 chooses a frame from the player column. Rooms 0A and 0B animate at Handler_Pendulum.
|
||||||
|
Return unless this is a pendulum room.
|
||||||
| Handler_PendulumRooms | DB05 | LD A,($64A2) | Return if the room is 0C or higher. | |||
| DB08 | CP $0C | |||||
| DB0A | RET NC | |||||
| DB0B | CP $09 | Return if the room is lower than 09. | ||||
| DB0D | RET C | |||||
|
Animate rooms 0A and 0B.
|
||||||
| DB0E | CP $0A | Jump to Handler_Pendulum if the room is 0A or 0B. | ||||
| DB10 | JR NC,Handler_Pendulum | |||||
|
Choose a frame from the player column.
|
||||||
| DB12 | LD A,($64A4) | Start from the player column minus 04. | ||||
| DB15 | SUB $04 | |||||
|
||||||
| DB17 | LD B,$E0 | Set the sprite ID to E0. | ||||
|
Step the sprite ID back for each six columns.
|
||||||
| Handler_Pendulum_FrameLoop | DB19 | SUB $06 | Subtract 06 until A is negative, decreasing the sprite ID by two each pass. | |||
| DB1B | BIT 7,A | |||||
| DB1D | JR NZ,Handler_Pendulum_DrawPair | |||||
| DB1F | DEC B | |||||
| DB20 | DEC B | |||||
| DB21 | JR Handler_Pendulum_FrameLoop | |||||
|
Use the same frame for both sprites.
|
||||||
| Handler_Pendulum_DrawPair | DB23 | LD C,B | Copy the sprite ID into C. | |||
|
Continue on to Draw_Pendulum.
|
||||||
| Prev: DAC5 | Up: Map | Next: DB24 |