Routines |
Prev: F491 | Up: Map | Next: F4D2 |
|
||||
F49D | LD A,$06 | Touching a moving object drops endurance by 6. | ||
F49F | LD ($F26E),A | |||
F4A2 | LD IX,$F491 | Point IX at the movement table. (F491) | ||
F4A6 | LD B,$03 | 3 objects to draw. | ||
F4A8 | PUSH BC | Store the count in BC. | ||
F4A9 | LD BC,$F2F7 | Point BC at the bounds table. (F2F7) | ||
F4AC | CALL $EF35 | Update moving objects. | ||
F4AF | LD A,D | Get the Y co-ordinate. | ||
F4B0 | CP $FE | Is it FE ie: off screen? | ||
F4B2 | JR NZ,$F4C6 | Jump forward if it isn't. | ||
A hammer has moved off screen, so recreate it.
|
||||
F4B4 | LD (IX-$01),$02 | Set the direction in y to +2. | ||
F4B8 | LD (IX-$03),$40 | Set the y co-ordinate to 40 ie: top of screen. | ||
F4BC | LD A,R | Set the x co-ordinate to a random location between 38 and B6 rounded to the nearest even number. | ||
F4BE | AND $3F | |||
F4C0 | ADD A,A | |||
F4C1 | ADD A,$38 | |||
F4C3 | LD (IX-$04),A | |||
F4C6 | LD A,$34 | Use object ID #$34 (hammer) (89F8) | ||
F4C8 | CALL $A8A0 | Draw the object. | ||
F4CB | CALL $E329 | Check for collision detection. | ||
F4CE | POP BC | Restore BC. | ||
F4CF | DJNZ $F4A8 | Loop while there are more objects to draw. | ||
F4D1 | RET | Otherwise return. |
Prev: F491 | Up: Map | Next: F4D2 |