Prev: D19D Up: Map Next: D22D
D1FA: Draw Strips Left To Right
Used by the routine at DrawCell.
Draws a list of sixteen strips along the edge of a cell from left to right: eight strips going up and to the right, and then eight going down and to the right, which are mirrored.
Input
A The number of the list in the table at StripListTable
Find the address of the list.
DrawStripsLeftToRight D1FA LD BC,$62A4 Point BC at StripListTable.
D1FD CALL GetTableEntry Call GetTableEntry.
D200 PUSH HL Copy the list address to IY (using the stack).
D201 POP IY
Draw tiles as they are.
D203 XOR A Write 00 to *MirrorFlag.
D204 LD ($BBF2),A
D207 LD BC,$0800 Set a count of eight tiles, without swapping any.
Draw eight tiles going up and to the right.
DrawStripsLeftToRight_Up D20A CALL DrawStrip Call DrawStrip.
D20D CALL StepUpRightInList Call StepUpRightInList.
D210 DJNZ DrawStripsLeftToRight_Up Jump to DrawStripsLeftToRight_Up if there are any left.
Move down by eight pixels to start the second run.
D212 LD HL,($BBB8) Move the position of the strips down one step.
D215 LD DE,$0008
D218 ADD HL,DE
D219 LD ($BBB8),HL
Draw the rest of the tiles flipped.
D21C LD A,$01 Write 01 to *MirrorFlag.
D21E LD ($BBF2),A
D221 LD BC,$0800 Set a count of eight tiles, without swapping any.
Draw eight tiles going down and to the right.
DrawStripsLeftToRight_Down D224 CALL DrawStrip Call DrawStrip.
D227 CALL StepDownRightInList Call StepDownRightInList.
D22A DJNZ DrawStripsLeftToRight_Down Jump to DrawStripsLeftToRight_Down if there are any left.
D22C RET Return.
View the equivalent code in;
Prev: D19D Up: Map Next: D22D