![]() |
Routines |
| Prev: F10A | Up: Map | Next: F158 |
|
Used by the routine at 81AE.
|
||||
| F10E | LD A,$04 | Touching the jumping jack drops endurance by 4. | ||
| F110 | LD ($F26E),A | |||
| F113 | LD IX,$F104 | Point IX at the movement table. | ||
| F117 | LD BC,$F10A | Point BC at the bounds. | ||
| F11A | CALL $EF35 | Update the object positions. | ||
| F11D | LD A,(IX-$04) | Get the x co-ordinate. | ||
| F120 | OR A | Is it zero? | ||
| F121 | JR NZ,$F13F | Jump forward if it isn't. | ||
| F123 | DEC (IX+$01) | Decrement the tick counter. | ||
| F126 | JR NZ,$F13F | Jump forward if it's not zero. | ||
|
The tick counter has reached 0, need to update.
|
||||
| F128 | LD (IX+$01),$02 | Set the tick counter back to 2. | ||
| F12C | LD (IX-$04),$00 | Set the x co-ordinate to 0. | ||
| F130 | LD (IX-$03),$A8 | Set the y co-ordinate to A8. | ||
| F134 | LD (IX-$01),$FE | Set the direction to -2. (ie: 2 updwards) | ||
| F138 | CALL $AF01 | Set the next room for the jumping jack to appear in. and return. | ||
| F13B | LD (IX+$00),A | |||
| F13E | RET | |||
|
Now draw the jumping jack if it's visible.
|
||||
| F13F | LD A,(IX+$00) | Get the jumping jack's current room. | ||
| F142 | CP (IY+$0F) | Is it the same room the player is in? | ||
| F145 | RET NZ | Return if not. | ||
|
The jumping jack is in the same room as the player, so draw it.
|
||||
| F146 | LD A,(IX-$03) | Get the Y co-ordinate. | ||
| F149 | CP $A8 | If it's A8 set A to the first jumping jack graphic. (8C78) Otherwise, set A to the second jumping jack graphic | ||
| F14B | LD A,$48 | |||
| F14D | JR NZ,$F151 | |||
| F14F | LD A,$4A | |||
| F151 | CALL $A8A0 | Put the object in the sprite buffer. | ||
| F154 | CALL $E329 | Check for collision detection. | ||
| F157 | RET | Return. | ||
| Prev: F10A | Up: Map | Next: F158 |