Prev: 49858 Up: Map Next: 49965
49912: Set up RIGHT vertical wall/floor connector graphics
Used by the routine at 49858.
The left wall/floor connector has been set up already at 49600
right side wall-floor connector right side wall-floor connector
49912 LD A,7 Graphic type = 7 (RIGHT corner wall section)
49914 LD (60227),A
49917 LD A,48 Graphic vertical position within current room, in pixels, from top of room playing area (fixed value for all rooms).
49919 LD (60234),A
49922 LD A,5 Item properties byte. Default = 5 - bit 0 set means item is visible, bit 2 set means item will need erasing (e.g. before re-drawing again)
49924 LD (60238),A
Calculate horizontal position of graphic within room - this will depend on the size of the room.
The room's first data byte (from the set at 25001) indicates the room size, and is used to calculate the horizontal position of the right corner section.
49927 LD A,(60284) Get the 1st data byte for the room (at 25001)
49930 DEC A The value is in half-character (4 pixel) steps; to calculate this, decrement the value twice
49931 DEC A
49932 RLA ...and multiply by 8
49933 RLA
49934 RLA
49935 AND 248 Filter off any carry bits (it will be a multiple of 8 so we don't need bits 0-2)
49937 LD (60232),A ...and store.
49940 LD A,1 Graphics frame offset (= no offset)
49942 LD (60240),A
49945 LD C,18 Graphic number in graphics address pointer table at 38851, this offset points to graphic address 38885
49947 LD A,(60279) Level type graphics pointer offset (for 0 for 'brick' levels, 12 for 'cavern levels')
49950 ADD A,C Add to graphic address pointer offset
49951 CALL 57538 Set up graphics
49954 CALL 57520 Copy the 16 bytes of calculated data from 60227 to a bank in the room item data sets at 31744
49957 LD HL,(60094) Retrieve address pointer after the above 16 bytes have been copied
49960 LD (HL),255 Set the first byte of the next data bank to 255 (end-of-data)
49962 LD HL,(56046) Retrieve address pointer to the room item data sets at 31744
Prev: 49858 Up: Map Next: 49965