![]() |
Routines |
| Prev: 45803 | Up: Map | Next: 46009 |
|
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 14 and 15 the width from field 22 (times eight) and the height from field 23.
|
||||||||||||||||
| CollectOverlappingItem | 45977 | EXX | Keep the table pointer aside. | |||||||||||||
| 45978 | LD E,(IX+14) | The column and the row. | ||||||||||||||
| 45981 | LD D,(IX+15) | |||||||||||||||
| 45984 | LD A,(IX+22) | The width, times eight. | ||||||||||||||
| 45987 | LD B,(IX+23) | |||||||||||||||
| 45990 | AND 15 | |||||||||||||||
| 45992 | ADD A,A | |||||||||||||||
| 45993 | ADD A,A | |||||||||||||||
| 45994 | ADD A,A | |||||||||||||||
| 45995 | LD (HL),E | Write the column, the row and the width. | ||||||||||||||
| 45996 | INC HL | |||||||||||||||
| 45997 | LD (HL),D | |||||||||||||||
| 45998 | INC HL | |||||||||||||||
| 45999 | LD (HL),A | |||||||||||||||
| 46000 | INC HL | |||||||||||||||
| 46001 | LD A,B | The height, without the shape flags. | ||||||||||||||
| 46002 | AND 63 | |||||||||||||||
| 46004 | LD (HL),A | |||||||||||||||
| 46005 | INC HL | |||||||||||||||
| 46006 | INC C | Count this item. | ||||||||||||||
| 46007 | EXX | Bring the table pointer back. | ||||||||||||||
| 46008 | RET | Return. | ||||||||||||||
| Prev: 45803 | Up: Map | Next: 46009 |