Prev: 68EC Up: Map Next: 6910
68F6: Draw Sprite
Used by the routines at DrawSpriteObject and DrawLargeSprite.
Input
BC Sprite data pointer
HL Screen buffer address
HL' Sprite background buffer
DrawSprite 68F6 LD A,(HL) Read the current screen data (row 01).
68F7 EXX Switch to the shadow registers.
68F8 LD (HL),A Save row 01 background data to the sprite background buffer.
68F9 INC HL Move to the next position in the background buffer.
68FA EXX Switch back to the normal registers.
68FB LD A,(BC) Write sprite pixel data to row 01 of the screen buffer.
68FC LD (HL),A
68FD INC BC Move to the next sprite data byte.
68FE INC H Move to row 02 in the screen buffer.
68FF LD A,(BC) Write sprite pixel data to row 02 of the screen buffer.
6900 LD (HL),A
6901 INC BC Move to the next sprite data byte.
6902 INC H Move to row 03 in the screen buffer.
6903 LD A,(HL) Read the current screen data (row 03).
6904 EXX Switch to the shadow registers.
6905 LD (HL),A Save row 03 background data to the sprite background buffer.
6906 INC HL Move to the next position in the background buffer.
6907 EXX Switch back to the normal registers.
6908 LD A,(BC) Write sprite pixel data to row 03 of the screen buffer.
6909 LD (HL),A
690A INC BC Move to the next sprite data byte.
690B INC H Move to row 04 in the screen buffer.
690C LD A,(BC) Write sprite pixel data to row 04 of the screen buffer.
690D LD (HL),A
690E INC BC Move to the next sprite data byte.
690F RET Return.
Prev: 68EC Up: Map Next: 6910