![]() |
Routines |
| Prev: 9883 | Up: Map | Next: 98B1 |
|
Sprite $A1. Standing on it is not fatal at once -- it takes a unit of life force per pass and loops, so the drain continues for as long as the player stays on it and stops the moment they step off. Reaching zero there kills as surely as anything else.
When nobody is on it, it cycles its colour rather than its shape: the low two bits of a counter index four attribute bytes at MUSHROOM_COLOURS, and only the drawing mode in +$05 changes. The sprite itself never moves.
|
||||||||
| MUSHROOM | 988B | CALL ACTOR_TO_WORKSPACE | Is the player standing on it? | |||||
| 988E | CALL NEAR_PLAYER | |||||||
| 9891 | JR C,MUSHROOM_DRAIN | Yes -- start draining. | ||||||
|
This entry point is used by the routine at MUSHROOM_DRAIN.
|
||||||||
| MUSHROOM_COLOUR_STEP | 9893 | LD A,($5E12) | Otherwise advance the colour, every fourth frame. | |||||
| 9896 | CPL | |||||||
| 9897 | AND $03 | |||||||
| 9899 | JR NZ,MUSHROOM_0 | |||||||
| 989B | INC (IX+$06) | |||||||
| MUSHROOM_0 | 989E | LD A,(IX+$06) | Four colours, cycled by the low two bits. | |||||
| 98A1 | AND $03 | |||||||
| 98A3 | LD C,A | |||||||
| 98A4 | LD B,$00 | |||||||
| 98A6 | LD HL,MUSHROOM_COLOURS | |||||||
| 98A9 | ADD HL,BC | |||||||
| 98AA | LD A,(HL) | |||||||
| 98AB | LD (IX+$05),A | Only the drawing mode changes; the shape is the same every time. | ||||||
| 98AE | JP DRAW_AT_POSITION | |||||||
| Prev: 9883 | Up: Map | Next: 98B1 |