Prev: 53287 Up: Map Next: 53433
53391: Draw Aligned Columns
Unrolled code that draws the columns of a sprite that is on a byte boundary. Each column of a line takes a pair of bytes off the stack, which are the mask and the data, clears the bits of the mask in the byte of the buffer and sets the bits of the data. The code is entered at the column that gives the number of columns that the sprite has, and the last column carries on at DrawLines_Next.
Draw the five unrolled columns.
DrawAlignedColumns 53391 POP DE Draw the first column of a sprite that has five.
53392 LD A,(BC)
53393 CPL
53394 OR E
53395 CPL
53396 OR D
53397 LD (BC),A
53398 INC BC
53399 POP DE Draw the second column of a sprite that has four or five.
53400 LD A,(BC)
53401 CPL
53402 OR E
53403 CPL
53404 OR D
53405 LD (BC),A
53406 INC BC
53407 POP DE Draw the third column of a sprite that has three or more.
53408 LD A,(BC)
53409 CPL
53410 OR E
53411 CPL
53412 OR D
53413 LD (BC),A
53414 INC BC
53415 POP DE Draw the fourth column of a sprite that has two or more.
53416 LD A,(BC)
53417 CPL
53418 OR E
53419 CPL
53420 OR D
53421 LD (BC),A
53422 INC BC
53423 POP DE Draw the last column.
53424 LD A,(BC)
53425 CPL
53426 OR E
53427 CPL
53428 OR D
53429 LD (BC),A
53430 JP DrawLines_Next Jump to DrawLines_Next.
View the equivalent code in;
Prev: 53287 Up: Map Next: 53433