![]() |
Routines |
| Prev: 26981 | Up: Map | Next: 27071 |
|
Used by the routines at MoveToRoom, MoveToObject, GetObject, DropObject, Saved, RemoveObject, SwapObjects, SetObjectLocation, DropEverything and RedrawLocation.
Sets the room-changed flag and walks the per-room records at RoomRecords so an illustration that depended on an object is redrawn. Verbs 67, 138, 139, 133 and 142 skip that walk.
|
||||
| RoomHasChanged | 26988 | LD A,1 | The room has changed. | |
| 26990 | LD (23445),A | |||
| 26993 | PUSH HL | Keep the line pointer. The last-matched verb may skip the picture walk. | ||
| 26994 | LD A,(23503) | |||
| 26997 | CP 67 | Verb 67 skips it. | ||
| 26999 | JR Z,RoomHasChanged_Redraw | |||
| 27001 | CP 138 | Verb 138 skips it. | ||
| 27003 | JR Z,RoomHasChanged_Redraw | |||
| 27005 | CP 139 | Verb 139 skips it. | ||
| 27007 | JR Z,RoomHasChanged_Redraw | |||
| 27009 | CP 133 | Verb 133 skips it. | ||
| 27011 | JR Z,RoomHasChanged_Redraw | |||
| 27013 | CP 142 | Verb 142 skips it. | ||
| 27015 | JR Z,RoomHasChanged_Redraw | |||
| 27017 | POP HL | The records live at RoomRecords, one per room. | ||
| 27018 | LD HL,47000 | |||
| 27021 | LD A,(23943) | |||
| 27024 | LD B,A | |||
| 27025 | LD A,255 | A record ends at 255. | ||
| RoomHasChanged_Sep | 27027 | CP (HL) | Skip to the next separator. | |
| 27028 | INC HL | |||
| 27029 | JR NZ,RoomHasChanged_Sep | |||
| 27031 | DJNZ RoomHasChanged_Sep | Count one separator per room until this room's record. | ||
| RoomHasChanged_Record | 27033 | LD A,(HL) | 255 ends this room's record. | |
| 27034 | CP 255 | |||
| 27036 | RET Z | |||
| 27037 | INC HL | Only an 248 record names an object. | ||
| 27038 | CP 248 | |||
| 27040 | JR NZ,RoomHasChanged_Record | |||
| 27042 | PUSH HL | Compare the record with PicturedObject, which nothing writes, so it matches a zero. | ||
| 27043 | LD A,(24341) | |||
| 27046 | CP (HL) | |||
| 27047 | JR NZ,RoomHasChanged_Redraw | |||
| 27049 | LD C,A | Point at that object's location. | ||
| 27050 | LD B,0 | |||
| 27052 | LD HL,24010 | |||
| 27055 | ADD HL,BC | |||
| 27056 | LD A,(23943) | The picture is left alone when the object is in this room. | ||
| 27059 | CP (HL) | |||
| 27060 | JR Z,RoomHasChanged_Keep | |||
| RoomHasChanged_Redraw | 27062 | XOR A | Forget the drawn picture, restore the picture record pointer from the stack. | |
| 27063 | LD (24965),A | |||
| 27066 | POP HL | |||
| 27067 | RET | Return. | ||
| RoomHasChanged_Keep | 27068 | POP HL | Restore the picture record pointer from the stack. | |
| 27069 | JR RoomHasChanged_Record | The next byte of the record. | ||
| Prev: 26981 | Up: Map | Next: 27071 |