Prev: 6A11 Up: Map Next: 6A2F
6A16: Action: Set Object Location
Writes a new location for the object. A value of 1 for an object numbered 46 or higher is stored as zero. If the new location is the current room, the room is marked changed.
Input
A New location
B Object number
SetObjectLocation 6A16 CALL ObjectAddress Point at the object's location. C is the new one.
6A19 LD C,A
6A1A LD A,B An index below 46 is stored as given.
6A1B CP $46
6A1D JR C,SetObject_Write
6A1F LD A,C Location 1 on an object numbered 46 or above is stored as 0.
6A20 CP $01
6A22 JR Z,SetObject_Write
6A24 LD C,$00
SetObject_Write 6A26 LD (HL),C Write the location.
This entry point is used by the routine at CopyObjectLocation.
SetObject_Here 6A27 LD HL,$5D87 The current room means the picture and the description change.
6A2A CP (HL)
6A2B JP Z,RoomHasChanged
6A2E RET Return.
Prev: 6A11 Up: Map Next: 6A2F