← EGFX function index

EGFX · FUNCTION 16ALPHA · USE AT YOUR OWN RISK

RESOURCE_INIT

Initialise sprite resources.

Selects the writable resource bank and number of sprite frames.

Frames receive image IDs in order. If you initialise 8 frames, the first frame is image 0 and the eighth is image 7. Upload the matching sprite and mask bytes before calling RESOURCE_READY.

Parameters

NameOrderDescription
BANK8Writable resource bank.
FRAMES9Number of sprite frames.

BASIC example

MODE 1:HIMEM=&2400
PROCeginit
PROCegbegin
PROCegcall(16)
PROCegpresent
END

Assembly example

        JSR init_egfx
        JSR begin_frame
        LDA #16 : JSR eg_call
        JSR present_frame
        RTS

← Function index