![]() |
Routines |
| Prev: 37592 | Up: Map | Next: 37621 |
|
Sets the attributes of the cells that an item covers with SetEntityAttributes_Moved. The item is 16 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 | 37600 | LD A,16 | A=16 (the height of the item in lines). | |||||
|
This entry point is used by the routine at HandlerPlayerAppearing.
|
||||||||
| SetItemAttributes_Lines | 37602 | LD (24081),A | Update the sprite height in SpriteHeight. | |||||
| 37605 | LD A,(IX+3) | Fetch the X position of the item. | ||||||
| 37608 | AND %00000111 | Keep only bits 0-2. | ||||||
| 37610 | LD A,2 | A=2 (the width of the item in bytes). | ||||||
| 37612 | JR Z,SetItemAttributes_Width | Jump to SetItemAttributes_Width if the X position is a multiple of eight. | ||||||
| 37614 | INC A | A=3 (the item is one byte wider, as it straddles another cell). | ||||||
| SetItemAttributes_Width | 37615 | LD (24080),A | Update the sprite width in SpriteWidth. | |||||
| 37618 | JP SetEntityAttributes_Moved | Jump to SetEntityAttributes_Moved to set the attributes of the item. | ||||||
| Prev: 37592 | Up: Map | Next: 37621 |