![]() |
Routines |
| Prev: B2EB | Up: Map | Next: B3B9 |
|
Used by the routine at DrawItems.
Adds the entity in IX to the table of overlapping items that is being built by DrawItems. Four bytes are stored: the screen position from fields 0E and 0F the width from field 16 (times eight) and the height from field 17.
|
||||||||||||||||
| CollectOverlappingItem | B399 | EXX | Keep the table pointer aside. | |||||||||||||
| B39A | LD E,(IX+$0E) | The column and the row. | ||||||||||||||
| B39D | LD D,(IX+$0F) | |||||||||||||||
| B3A0 | LD A,(IX+$16) | The width, times eight. | ||||||||||||||
| B3A3 | LD B,(IX+$17) | |||||||||||||||
| B3A6 | AND $0F | |||||||||||||||
| B3A8 | ADD A,A | |||||||||||||||
| B3A9 | ADD A,A | |||||||||||||||
| B3AA | ADD A,A | |||||||||||||||
| B3AB | LD (HL),E | Write the column, the row and the width. | ||||||||||||||
| B3AC | INC HL | |||||||||||||||
| B3AD | LD (HL),D | |||||||||||||||
| B3AE | INC HL | |||||||||||||||
| B3AF | LD (HL),A | |||||||||||||||
| B3B0 | INC HL | |||||||||||||||
| B3B1 | LD A,B | The height, without the shape flags. | ||||||||||||||
| B3B2 | AND $3F | |||||||||||||||
| B3B4 | LD (HL),A | |||||||||||||||
| B3B5 | INC HL | |||||||||||||||
| B3B6 | INC C | Count this item. | ||||||||||||||
| B3B7 | EXX | Bring the table pointer back. | ||||||||||||||
| B3B8 | RET | Return. | ||||||||||||||
| Prev: B2EB | Up: Map | Next: B3B9 |