Prev: 9F9F Up: Map Next: 9FFB
9FCA: Redraw a thing that may have moved
Used by the routine at UPDATE_KNIGHT.
The end of most handlers (through REDRAW_ACTOR). Sets up the draw at the record's position through SETUP_SPRITE_DRAW, and in the other register bank the erase at the position saved in the workspace through SETUP_ERASE; then ALIGN_ROWS compares the two y positions, erases (or draws) the rows the old and new pictures do not share, and hands the rest to ERASE_DRAW_ROWS, so each screen row is rubbed out and redrawn close together.
REDRAW_MOVED 9FCA CALL SETUP_SPRITE_DRAW
9FCD EXX
9FCE CALL SETUP_ERASE
This entry point is used by the routine at SETUP_BOTH_BANKS.
ALIGN_ROWS 9FD1 LD A,($5E17)
9FD4 SUB (IX+$04)
9FD7 JP Z,ROWS_TOGETHER
9FDA JP M,REDRAW_MOVED_0
9FDD LD C,A
9FDE LD A,($5E18)
9FE1 CP C
9FE2 JP C,ROWS_TOGETHER
9FE5 SUB C
9FE6 LD ($5E18),A
9FE9 JP ERASE_DRAW_ROWS
REDRAW_MOVED_0 9FEC EXX
9FED NEG
9FEF LD C,A
9FF0 LD A,($5E19)
9FF3 CP C
9FF4 JP C,ROWS_TOGETHER_SWAP
9FF7 SUB C
9FF8 JP ROWS_DRAW_ONLY
Prev: 9F9F Up: Map Next: 9FFB