![]() |
Routines |
Prev: C265 | Up: Map | Next: C2C2 |
Used by the routine at C265.
|
||||
C290 | LD A,$01 | Graphics type = 1 (fixed scenery item) | ||
C292 | LD ($EB43),A | |||
C295 | LD A,$11 | Graphic number - address pointer offset for graphic address table at 97C3 - unnecessary because it'll be overwritten in a few more instructions at C2B5 | ||
C297 | LD ($EB50),A | |||
C29A | LD A,($EB78) | Room graphic item's horizontal position within current room, in half-character (4 pixel) steps. Copy into data buffer. | ||
C29D | LD ($EB48),A | |||
C2A0 | LD A,($EB79) | Room graphic item's vertical position within current room, in pixels. Copy into data buffer. | ||
C2A3 | LD ($EB4A),A | |||
Sets up (including mirroring if needed) wall/floor connector graphics, depending on which wall is being dealt with (left, right or back)
![]() ![]() ![]()
Uses the byte at EB7F to identify the graphics address offset (C register) and frame (A register) for the wall/floor connector graphic address:
|
||||
C2A6 | LD A,($EB7F) | |||
C2A9 | CP $00 | Back wall - offset for graphics address 97DF, back wall floor section (see 9DC8) | ||
C2AB | JR Z,$C2B1 | |||
C2AD | LD C,$10 | Right/left wall - offset for: | ||
C2AF | JR $C2B5 | |||
C2B1 | LD C,$0F | |||
C2B3 | LD A,$01 | |||
C2B5 | LD ($EB50),A | |||
Calculate graphics offset based on level offset and the above
|
||||
C2B8 | LD A,($EB77) | Level type offset to scenery graphics (either 0 or 12 depending on whether it's a 'brick' or 'cavern' style level) | ||
C2BB | ADD A,C | Add to calculated value to indicate the correct graphic number based on level type and wall alignment | ||
C2BC | CALL $E0C2 | Set up graphics (copy graphics address pointers and mirror any graphic data) | ||
C2BF | CALL $E0B0 | Copy the item data from the working buffer EB43 into a 16 byte room item data set at 7C00. |
Prev: C265 | Up: Map | Next: C2C2 |