![]() |
Routines |
| Prev: 60153 | Up: Map | Next: 60217 |
|
Used by the routines at Handle_Plain_Decoration and Handle_Coloured_Decoration.
Copies the five bytes that describe the size of the obstacle that a decoration makes (see Check_Object_Contact) from the table at Decoration_Size_Table to the bytes 10 to 14 of its object record. The entry is chosen by the type of the decoration, which is 116 for the first entry.
|
||||||||
| Set_Decoration_Size | 60184 | LD A,(IX+0) | Fetch the type of the decoration. | |||||
| 60187 | SUB 116 | Subtract 116 to make the number of the entry. | ||||||
| 60189 | LD C,A | Store the number in C. | ||||||
| 60190 | SLA A | Multiply the number by four. | ||||||
| 60192 | SLA A | |||||||
| 60194 | ADD A,C | Add the number to make it five times the number. | ||||||
| 60195 | LD E,A | Store the offset of the entry in E. | ||||||
| 60196 | LD D,0 | Clear the high byte of the offset. | ||||||
| 60198 | LD HL,60286 | Point HL at Decoration_Size_Table. | ||||||
| 60201 | ADD HL,DE | Make HL point at the entry. | ||||||
| 60202 | EX DE,HL | Swap, so that DE points at the entry. | ||||||
| 60203 | PUSH IX | Copy the address of the object record into HL. | ||||||
| 60205 | POP HL | |||||||
| 60206 | LD BC,10 | Set the offset of byte 10 in BC. | ||||||
| 60209 | ADD HL,BC | Make HL point at byte 10 of the object record. | ||||||
| 60210 | EX DE,HL | Swap, so that HL points at the entry and DE at the record. | ||||||
| 60211 | LD BC,5 | Set the number of bytes to copy to 5. | ||||||
| 60214 | LDIR | Copy the size to the object record. | ||||||
| 60216 | RET | Return. | ||||||
| Prev: 60153 | Up: Map | Next: 60217 |