![]() |
Routines |
Prev: B296 | Up: Map | Next: B3B8 |
Used by the routine at B384.
|
||||
B37F | LD SP,($A22E) | Recover SP | ||
B383 | RET | |||
Copy tile graphic into room graphic data. Used by the routines at 9470 and A939.
|
||||
B384 | LD ($A22E),SP | Save SP to temporal variable A095 | ||
B388 | LD SP,$D962 | Set SP to point to base address for mapping table of tile graphics and room graphic buffer | ||
B38B | POP HL | Point HL to the address in the room graphic buffer for the tile | ||
B38C | POP DE | Point DE to the tile graphics address | ||
B38D | LD A,L | Jump back and return from routine if LSB of HL is $FF (end marker) | ||
B38E | INC A | |||
B38F | JP Z,$B37F | |||
B392 | LD BC,$0020 | Set BC to the increment in room graphics buffer of every byte copied Copy the eight bytes of the tile graphics data to the corresponent room graphic buffer location | ||
B395 | LD A,(DE) | Copy byte 1, increment tile graphics address and room graphics address | ||
B396 | LD (HL),A | |||
B397 | INC DE | |||
B398 | ADD HL,BC | |||
B399 | LD A,(DE) | Copy byte 2, increment tile graphics address and room graphics address | ||
B39A | LD (HL),A | |||
B39B | INC DE | |||
B39C | ADD HL,BC | |||
B39D | LD A,(DE) | Copy byte 3, increment tile graphics address and room graphics address | ||
B39E | LD (HL),A | |||
B39F | INC DE | |||
B3A0 | ADD HL,BC | |||
B3A1 | LD A,(DE) | Copy byte 4, increment tile graphics address and room graphics address | ||
B3A2 | LD (HL),A | |||
B3A3 | INC DE | |||
B3A4 | ADD HL,BC | |||
B3A5 | LD A,(DE) | Copy byte 5, increment tile graphics address and room graphics address | ||
B3A6 | LD (HL),A | |||
B3A7 | INC DE | |||
B3A8 | ADD HL,BC | |||
B3A9 | LD A,(DE) | Copy byte 6, increment tile graphics address and room graphics address | ||
B3AA | LD (HL),A | |||
B3AB | INC DE | |||
B3AC | ADD HL,BC | |||
B3AD | LD A,(DE) | Copy byte 7, increment tile graphics address and room graphics address | ||
B3AE | LD (HL),A | |||
B3AF | INC DE | |||
B3B0 | ADD HL,BC | |||
B3B1 | LD A,(DE) | Copy byte 8, increment tile graphics address and room graphics address | ||
B3B2 | LD (HL),A | |||
B3B3 | INC DE | |||
B3B4 | ADD HL,BC | |||
B3B5 | JP $B38B | Jump back and copy the next tile |
Prev: B296 | Up: Map | Next: B3B8 |