Prev: 32981 Up: Map Next: 33178
33153: RleMapExpand
Decompresses the RLE map at HL into the 20x19 grid buffer: byte < 30 = that many zero cells, 30-254 = literal tile code, 255 = end.
Used by PickDuctMap for the three per-deck air-duct maps and by NarcissusBackground for the shuttle cabin layout.
33153 LD DE,26121 DE = grid buffer; HL = RLE source
33156 LD A,(HL) next RLE byte
33157 CP 30 < 30: a run of that many zero cells
33159 JR C,33169
33161 CP 255 255: end of template
33163 RET Z
33164 LD (DE),A 30-254: literal cell code
33165 INC HL
33166 INC DE
33167 JR 33156
33169 LD B,A B = run length
33170 XOR A
33171 LD (DE),A
33172 INC DE
33173 DJNZ 33171
33175 INC HL
33176 JR 33156
Prev: 32981 Up: Map Next: 33178