← EGFX function index

EGFX · FUNCTION 23ALPHA · USE AT YOUR OWN RISK

XOR_SPRITE

Reserved: draws nothing in EGFX 0.6.

The current ROM implements this entry as an immediate return. The call is still acknowledged, but no pixels change, so do not use it to draw or to erase. For erasing, draw an opaque black frame with COMPACT_SPRITE (37), as the Breakout renderer does. Older notes describing a pre-shifted XOR renderer are out of date. The example below still runs, but its XOR call has no effect.

Parameters

NameOrderDescription
PX/PY8–11Sprite position.
IMAGE12Loaded sprite image.

BASIC example

Tested listing: companion-demo.bas.

10 MODE 1:HIMEM=&2400:PROCeginit:PROCegcompanion(5,&81,255)
20 REPEAT:PROCegbegin
30 PROCegsprite(80,80,1):PROCegsprite(160,112,3):PROCegxor(224,144,5)
40 PROCegtext("COMPANION ROM SPRITES",8,8)
50 PROCegpresent:UNTIL INKEY(0)=81
60 END

Assembly example

        JSR init_egfx
        JSR begin_frame
        LDA #23 : JSR eg_call
        JSR present_frame
        RTS
EGFX 23-xor_sprite
EGFX diagram showing the data flow for this function.

← Function index