![]() |
Routines |
| Prev: D46C | Up: Map | Next: D4EA |
|
A type's template list can hold more than one template, ended by a 0, so one location can build several records -- each the next template placed at the same cell.
|
||||
| zero_fg_obj_tail | D4CD | LD (IY+$00),$00 | zero bytes 9 to 31, leaving IY on the next record | |
| D4D1 | INC IY | |||
| D4D3 | DJNZ zero_fg_obj_tail | |||
| D4D5 | POP BC | more templates for this location until a 0 | ||
| D4D6 | LD A,(HL) | |||
| D4D7 | AND A | |||
| D4D8 | JR NZ,next_fg_obj_sprite | |||
| D4DA | POP DE | DE = the start of the template list; HL on the room record | ||
| D4DB | POP HL | |||
| D4DC | DEC B | each location counts off B; at zero the room record is used up | ||
| D4DD | JR Z,end_of_fg_objs | |||
| D4DF | DEC C | all the locations of this type placed: read the next type byte | ||
| D4E0 | JP Z,next_fg_obj | |||
| D4E3 | LD A,(HL) | another location of the same type: D = its byte, and HL back on the template list | ||
| D4E4 | INC HL | |||
| D4E5 | PUSH HL | |||
| D4E6 | EX DE,HL | |||
| D4E7 | LD D,A | |||
| D4E8 | JR next_fg_obj_in_count | |||
| Prev: D46C | Up: Map | Next: D4EA |