Prev: 50066 Up: Map Next: 50210
50159: Draw Strips Left To Right
Used by the routine at DrawCell.
Draws a list of sixteen tiles for the bottom edges of a cell, going down and to the right for the first eight and up and to the right for the second eight. The second eight are drawn flipped.
Input
A The number of the list in the table at TileListPointers
Find the address of the list.
DrawStripsLeftToRight 50159 LD BC,25196 Point BC at TileListPointers.
50162 CALL GetTableEntry Call GetTableEntry.
50165 PUSH HL Copy the list address to IY (using the stack).
50166 POP IY
Draw tiles as they are.
50168 XOR A Write 0 to *FlipFlag.
50169 LD (41554),A
50172 LD BC,2048 Set a count of eight tiles, without swapping any.
Draw eight tiles going down and to the right.
DrawStripsLeftToRight_Down 50175 CALL DrawStrip Call DrawStrip.
50178 CALL StepDownRight Call StepDownRight.
50181 DJNZ DrawStripsLeftToRight_Down Jump to DrawStripsLeftToRight_Down if there are any left.
Move up by eight pixels to start the second run.
50183 LD HL,(41552) Move ScreenVerticalPosition up by eight pixels.
50186 LD DE,8
50189 ADD HL,DE
50190 LD (41552),HL
Draw the rest of the tiles flipped.
50193 LD A,1 Write 1 to *FlipFlag.
50195 LD (41554),A
50198 LD BC,2048 Set a count of eight tiles, without swapping any.
Draw eight tiles going up and to the right.
DrawStripsLeftToRight_Up 50201 CALL DrawStrip Call DrawStrip.
50204 CALL StepUpRight Call StepUpRight.
50207 DJNZ DrawStripsLeftToRight_Up Jump to DrawStripsLeftToRight_Up if there are any left.
50209 RET Return.
View the equivalent code in;
Prev: 50066 Up: Map Next: 50210