Prev: 27153 Up: Map Next: 27183
27158: Action: Set Object Location
Writes a new location for the object. A value of 1 for an object numbered 70 or higher is stored as zero. If the new location is the current room, the room is marked changed.
SetObjectLocation 27158 CALL ObjectAddress Point at the object's location. C is the new one.
27161 LD C,A
27162 LD A,B An index below 70 is stored as given.
27163 CP 70
27165 JR C,SetObject_Write
27167 LD A,C Location 1 on an object numbered 70 or above is stored as 0.
27168 CP 1
27170 JR Z,SetObject_Write
27172 LD C,0
SetObject_Write 27174 LD (HL),C Write the location.
This entry point is used by the routine at CopyObjectLocation.
SetObject_Here 27175 LD HL,23943 The current room means the picture and the description change.
27178 CP (HL)
27179 JP Z,RoomHasChanged
27182 RET Return.
Prev: 27153 Up: Map Next: 27183