Routines |
Prev: 8D6B | Up: Map | Next: 8DD3 |
Used by the routine at 8D6B. On entry, A holds a room layout byte, rotated such that the bit-pair corresponding to the tile of interest is in bits 0 and 1.
|
||||||||||
8DC0 | AND $03 | Keep only bits 0 and 1; A=0 (background), 1 (floor), 2 (wall) or 3 (nasty) | ||||||||
8DC2 | LD C,A | Multiply by 9 and add 0xA0; now A=0xA0 (background), 0xA9 (floor), 0xB2 (wall) or 0xBB (nasty) | ||||||||
8DC3 | RLCA | |||||||||
8DC4 | RLCA | |||||||||
8DC5 | RLCA | |||||||||
8DC6 | ADD A,C | |||||||||
8DC7 | ADD A,$A0 | |||||||||
8DC9 | LD E,A | Point DE at the attribute byte for the background, floor, wall or nasty tile (see 80A0) | ||||||||
8DCA | LD D,$80 | |||||||||
8DCC | LD A,(DE) | Copy the attribute byte into the buffer at 5E00 | ||||||||
8DCD | LD (IX+$00),A | |||||||||
8DD0 | INC IX | Move IX along to the next byte in the attribute buffer | ||||||||
8DD2 | RET |
Prev: 8D6B | Up: Map | Next: 8DD3 |