![]() |
Routines |
| Prev: C525 | Up: Map | Next: C572 |
|
Used by the routine at next_spec_obj_slot.
If the entry is still in play and in this room, copy it into the next special-object record: type; x, y and z from where it is now; size 5 by 5 by 12 and flags $14 (drawn, and can be pushed); the room; nothing moving; and at +$10 the address of the table entry, so the record can be written back to it by update_special_objs when the room is left.
|
||||
| find_spec_obj_loop | C530 | LD A,(IY+$00) | collected: skip | |
| C533 | AND A | |||
| C534 | JR Z,next_spec_obj_slot | |||
| C536 | LD A,(IY+$08) | in another room: skip | ||
| C539 | CP B | |||
| C53A | JR NZ,next_spec_obj_slot | |||
| C53C | PUSH IY | HL = the entry; its address is kept on the stack | ||
| C53E | EXX | |||
| C53F | POP HL | |||
| C540 | PUSH HL | |||
| C541 | LD A,(HL) | the type | ||
| C542 | INC HL | |||
| C543 | LD (DE),A | |||
| C544 | INC DE | |||
| C545 | INC HL | x, y and z from +5..+7, where it is now | ||
| C546 | INC HL | |||
| C547 | INC HL | |||
| C548 | INC HL | |||
| C549 | LD BC,$0003 | |||
| C54C | LDIR | |||
| C54E | EX DE,HL | 5 by 5 by 12, flags $14 | ||
| C54F | LD (HL),$05 | |||
| C551 | INC HL | |||
| C552 | LD (HL),$05 | |||
| C554 | INC HL | |||
| C555 | LD (HL),$0C | |||
| C557 | INC HL | |||
| C558 | LD (HL),$14 | |||
| C55A | INC HL | |||
| C55B | EX DE,HL | |||
| C55C | LD A,(HL) | the room | ||
| C55D | INC HL | |||
| C55E | LD (DE),A | |||
| C55F | INC DE | |||
| C560 | LD B,$07 | +$09..+$0F: no velocity or status | ||
| C562 | CALL zero_DE | |||
| C565 | POP BC | +$10: the address of the table entry | ||
| C566 | LD A,C | |||
| C567 | LD (DE),A | |||
| C568 | INC DE | |||
| C569 | LD A,B | |||
| C56A | LD (DE),A | |||
| C56B | INC DE | |||
| C56C | LD B,$0E | +$12..+$1F cleared | ||
| C56E | CALL zero_DE | |||
| C571 | EXX | back to the scan's registers | ||
| Prev: C525 | Up: Map | Next: C572 |