![]() |
Routines |
| Prev: 46368 | Up: Map | Next: 46426 |
|
Go through all 54 objects.
|
||||
| ListObjectsToDraw | 46385 | PUSH IX | Stash IX on the stack. | |
| 46387 | LD B,54 | Set a counter in B of 54 objects. | ||
| 46389 | LD DE,32 | Set DE to the size of an object record. | ||
| 46392 | LD IX,42863 | Start with the first object record, ObjectsTable. | ||
| 46396 | LD HL,46426 | Start the draw list at DrawList. | ||
| 46399 | LD C,0 | Start with object number 0. | ||
| ListObjectsToDraw_Next | 46401 | LD A,(IX+0) | Jump to ListObjectsToDraw_Skip if the object is not in use. | |
| 46404 | AND A | |||
| 46405 | JR Z,ListObjectsToDraw_Skip | |||
| 46407 | BIT 4,(IX+7) | Jump to ListObjectsToDraw_Skip if the object does not need drawing. | ||
| 46411 | JR Z,ListObjectsToDraw_Skip | |||
| 46413 | LD (HL),C | Add the object number to the list. | ||
| 46414 | INC HL | Move on in the list. | ||
| ListObjectsToDraw_Skip | 46415 | INC C | Move on to the next object number. | |
| 46416 | ADD IX,DE | Move IX on to the next object record. | ||
| 46418 | DJNZ ListObjectsToDraw_Next | Decrease the counter and loop until all the objects have been done. | ||
| 46420 | LD A,255 | Take 255 as the end marker of the draw list. | ||
| 46422 | LD (HL),A | Mark the end of the list. | ||
| 46423 | POP IX | Restore IX from the stack. | ||
| 46425 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 46368 | Up: Map | Next: 46426 |