Prev: BCB4 Up: Map Next: BD31
BCE5: Draw Frame
Used by the routine at RunGame.
Draws the frame around the room into the buffer, from the pieces whose data starts at FramePieces. The frame is made of runs of the same piece, drawn one after another, each a fixed distance from the last. The temporary object at TemporaryObject is used to draw them.
Before After DrawFrame and UpdateScreen
draw-frame-before draw-frame-after
DrawFrame BCE5 LD IX,$BACA Use the temporary object, TemporaryObject.
BCE9 LD HL,$BD31 Take the data of the pieces, FramePieces.
Draw the sloping edge on the left, which runs down to the right.
BCEC CALL SetSpriteDetails Call SetSpriteDetails to set up the first piece.
BCEF LD DE,$F810 Set the distance between pieces, which is 10 to the right and 08 down.
BCF2 LD B,$05 Set a counter in B of five pieces.
BCF4 CALL PrintSprites Call PrintSprites to draw them.
Draw the sloping edge on the right, which runs down to the left.
BCF7 CALL SetSpriteDetails Call SetSpriteDetails to set up the next piece.
BCFA LD DE,$F8F0 Set the distance between pieces, which is 10 to the left and 08 down.
BCFD LD B,$05 Set a counter in B of five pieces.
BCFF CALL PrintSprites Call PrintSprites to draw them.
Draw the two upright edges at the sides, which are each made of two runs that go up and are drawn one above the other.
BD02 CALL SetSpriteDetails Call SetSpriteDetails to set up the next piece.
BD05 LD DE,$2000 Set the distance between pieces, which is 20 up.
BD08 LD B,$02 Set a counter in B of two pieces.
BD0A CALL PrintSprites Call PrintSprites to draw them.
BD0D CALL SetSpriteDetails Call SetSpriteDetails to set up the next piece.
BD10 LD B,$02 Set a counter in B of two pieces.
BD12 CALL PrintSprites Call PrintSprites to draw them.
BD15 CALL SetSpriteDetails Call SetSpriteDetails to set up the next piece.
BD18 LD B,$02 Set a counter in B of two pieces.
BD1A CALL PrintSprites Call PrintSprites to draw them.
BD1D CALL SetSpriteDetails Call SetSpriteDetails to set up the next piece.
BD20 LD B,$02 Set a counter in B of two pieces.
BD22 CALL PrintSprites Call PrintSprites to draw them.
Draw the two pieces in the middle of the bottom, and the cap at the top of each upright edge.
BD25 CALL PrintTableSprite Call PrintTableSprite to draw each of the first three of those pieces.
BD28 CALL PrintTableSprite
BD2B CALL PrintTableSprite
BD2E JP PrintTableSprite Jump to PrintTableSprite.
Prev: BCB4 Up: Map Next: BD31