Prev: 32967 Up: Map Next: 33178
33153: RoomLayoutExpand
Decompresses the RLE room layout at HL into the 20x19 grid buffer: byte < 30 = that many zero cells, 30-254 = literal tile code, 255 = end.
Input
Used by the corridor-view builder at 33610 and the room renderer.
33153 LD DE,26121 DE = grid buffer; HL = RLE source
33156 LD A,(HL)
33157 CP 30
33159 JR C,33169
33161 CP 255
33163 RET Z
33164 LD (DE),A
33165 INC HL
33166 INC DE
33167 JR 33156
33169 LD B,A
33170 XOR A
33171 LD (DE),A
33172 INC DE
33173 DJNZ 33171
33175 INC HL
33176 JR 33156
Prev: 32967 Up: Map Next: 33178