![]() |
Routines |
| Prev: 92D8 | Up: Map | Next: 92F5 |
|
Sets the attributes of the cells that an item covers with SetEntityAttributes_Moved. The item is 10 lines high (at SetItemAttributes), or the number of lines in A (at SetItemAttributes_Lines), and it is two bytes wide or three if it is not on a multiple of eight pixels across.
|
||||||||
| SetItemAttributes | 92E0 | LD A,$10 | A=10 (the height of the item in lines). | |||||
|
This entry point is used by the routine at HandlerPlayerAppearing.
|
||||||||
| SetItemAttributes_Lines | 92E2 | LD ($5E11),A | Update the sprite height in SpriteHeight. | |||||
| 92E5 | LD A,(IX+$03) | Fetch the X position of the item. | ||||||
| 92E8 | AND %00000111 | Keep only bits 0-2. | ||||||
| 92EA | LD A,$02 | A=02 (the width of the item in bytes). | ||||||
| 92EC | JR Z,SetItemAttributes_Width | Jump to SetItemAttributes_Width if the X position is a multiple of eight. | ||||||
| 92EE | INC A | A=03 (the item is one byte wider, as it straddles another cell). | ||||||
| SetItemAttributes_Width | 92EF | LD ($5E10),A | Update the sprite width in SpriteWidth. | |||||
| 92F2 | JP SetEntityAttributes_Moved | Jump to SetEntityAttributes_Moved to set the attributes of the item. | ||||||
| Prev: 92D8 | Up: Map | Next: 92F5 |