Dynamite Dan | Routines |
Prev: D123 | Up: Map | Next: D1B2 |
Used by the routine at CFD9.
|
||||
D16F | LD A,($C87B) | Get the lift flags. (C87B) | ||
D172 | BIT 0,A | Is the lift moving upwards? | ||
D174 | JR Z,$D17B | Jump forward if it is. | ||
Move Dan on the lift downwards.
|
||||
D176 | CALL $D607 | Drop Dan down one frame. | ||
D179 | JR $D17E | |||
Move Dan on the lift upwards.
|
||||
D17B | CALL $D567 | Move Dan upwards. | ||
Now update the lift.
|
||||
D17E | LD A,($C87C) | Get the Y co-ordinate. (C87C) | ||
D181 | CALL $CD24 | Redraw the lift at this position. | ||
D184 | CALL $D1CE | Redraw Dan and do any collision detection. | ||
D187 | LD DE,($C872) | Put Dan's X co-ordinate (C872) in D and his Y co-ordinate (C873) in E. | ||
D18B | LD A,E | Add 1A to the Y co-ordinate. | ||
D18C | ADD A,$1A | |||
D18E | LD E,A | |||
D18F | LD ($C87C),A | Make this the lift's Y co-ordinate. | ||
D192 | LD A,($CFCA) | Get the current room. (CFCA) | ||
D195 | LD ($C87D),A | Make this the lift's current room. | ||
D198 | CALL $CD2B | Redraw the lift. | ||
D19B | LD DE,($C87C) | Put the lift's room (C87C) in D and its Y co-ordinate in E. | ||
D19F | LD BC,($C87A) | Put the time before the lift moves (C87A) in C and the flags (C87B) in B. | ||
D1A3 | CALL $CD5C | Update the lift's attributes. | ||
D1A6 | CALL $D1B2 | Check to see if the lift is at the top or bottom. | ||
D1A9 | LD ($C87C),DE | Set the room and Y co-ordinate. | ||
D1AD | LD ($C87A),BC | Set the wait time and flags. | ||
D1B1 | RET | Return. |
Prev: D123 | Up: Map | Next: D1B2 |