![]() |
Routines |
| Prev: 957D | Up: Map | Next: 95D7 |
|
Used by the routine at DYING.
Four slots of eight bytes at $EAE8. The first with a zero sprite is taken, given sprite $8F, and the seven bytes after it are copied straight out of the player's own record -- room, flag, position and all -- so the thing appears exactly where the player is. With all four in use the routine simply returns and nothing is dropped.
The copy is what makes it cheap: because an object and an actor share the same eight-byte header, placing one is one LDIR rather than half a dozen assignments.
|
||||
| DROP_GRAVESTONE | 95A9 | LD HL,$EAE8 | Four slots, eight bytes apart. | |
| 95AC | LD DE,$0008 | |||
| 95AF | LD B,$04 | |||
| DROP_GRAVESTONE_0 | 95B1 | LD A,(HL) | A zero sprite means the slot is free. | |
| 95B2 | AND A | |||
| 95B3 | JR Z,DROP_GRAVESTONE_1 | |||
| 95B5 | ADD HL,DE | All four taken, so give up. | ||
| 95B6 | DJNZ DROP_GRAVESTONE_0 | |||
| 95B8 | RET | |||
| DROP_GRAVESTONE_1 | 95B9 | LD A,$45 | ||
| 95BB | LD ($EA95),A | |||
| 95BE | PUSH HL | |||
| 95BF | LD (HL),$8F | The sprite the dropped thing is drawn as. | ||
| 95C1 | EX DE,HL | |||
| 95C2 | INC DE | |||
| 95C3 | LD HL,$EA91 | Room, flag and position, straight from the player's record. | ||
| 95C6 | LD BC,$0007 | |||
| 95C9 | LDIR | |||
| 95CB | POP HL | |||
|
This entry point is used by the routine at SHOW_END_SCREEN.
|
||||
| PLACE_RECORD | 95CC | PUSH IX | ||
| 95CE | PUSH HL | |||
| 95CF | POP IX | |||
| 95D1 | CALL DRAW_THING | |||
| 95D4 | POP IX | |||
| 95D6 | RET | |||
| Prev: 957D | Up: Map | Next: 95D7 |