Prev: 48818 Up: Map Next: 48864
48842: Unused: Apply Sprite Attributes
Unused routine to apply colour attributes for a sprite. Handles both the overlay buffer attributes and the screen attributes.
Input
D Bit 0: 1 = two columns wide, 0 = one column wide
E Sprite X position
HL Screen buffer address
Unused_Apply_Attributes 48842 LD C,88 Set C to 88 (overlay attribute buffer base high byte).
48844 LD A,(IX+0) Load the sprite X position from *IX+0.
48847 CP 255 Jump to Unused_Apply_Screen_Attributes if the X position is 255 (sprite offscreen).
48849 JR Z,48856
48851 PUSH HL Stash the screen address on the stack.
48852 CALL 48864 Call Unused_Write_Attribute_Cells to apply the overlay buffer attributes.
48855 POP HL Restore the screen address from the stack.
Unused_Apply_Screen_Attributes 48856 LD C,248 Set C to 248 (screen attribute buffer base high byte).
48858 LD E,2 Set E to 2 (attribute INK colour).
48860 CALL 48864 Call Unused_Write_Attribute_Cells to apply the screen attributes.
48863 RET Return.
Prev: 48818 Up: Map Next: 48864