![]() |
Routines |
| Prev: D41E | Up: Map | Next: D44C |
|
A background template is eight bytes that become bytes 0 to 7 of the record unchanged: graphic, x, y, z, the half-sizes in x and y, the height, and the flags. Byte 8 is the room, and the rest of the record is cleared. A background's templates follow one another and end at a 0 byte, where the next graphic number would be; graphic 0 is never an object.
|
||||
| next_bg_obj_sprite | D432 | LD BC,$0008 | bytes 0 to 7 straight from the template | |
| D435 | LDIR | |||
| D437 | LD A,(IX+$08) | byte 8: the room it belongs to | ||
| D43A | LD (DE),A | |||
| D43B | INC DE | |||
| D43C | LD B,$17 | bytes 9 to 31 cleared | ||
| D43E | CALL zero_DE | |||
| D441 | LD A,(HL) | more templates for this background until a 0 | ||
| D442 | AND A | |||
| D443 | JR NZ,next_bg_obj_sprite | |||
| D445 | POP HL | one byte of the room record used; next background | ||
| D446 | POP BC | |||
| D447 | DJNZ next_bg_obj | |||
| D449 | JP zero_end_of_graphic_objs_tbl | a record with only backgrounds: clear the rest of the table | ||
| Prev: D41E | Up: Map | Next: D44C |