Prev: 33153 Up: Map Next: 33223
33178: SetRoomOrigin
Loads the current room's (row, column) pair from RoomOriginTable and sets RoomCellCursor (grid buffer + 20*row + col) and RoomAttrCursor (attribute file + 32*row + col) for the door drawing pass.
33178 LD A,(31242) A = current room
33181 AND 63
33183 ADD A,A
33184 LD D,0
33186 LD E,A
33187 LD HL,26501
33190 ADD HL,DE
33191 LD B,(HL)
33192 INC HL
33193 LD C,(HL)
33194 PUSH BC
33195 LD DE,20
33198 LD HL,26121
33201 ADD HL,DE
33202 DJNZ 33201
33204 ADD HL,BC
33205 LD (31259),HL
33208 POP BC
33209 LD HL,22528
33212 LD DE,32
33215 ADD HL,DE
33216 DJNZ 33215
33218 ADD HL,BC
33219 LD (31255),HL
33222 RET
Prev: 33153 Up: Map Next: 33223