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
| Name | Order | Description |
|---|---|---|
BANK | 8 | Writable resource bank. |
FRAMES | 9 | Number of sprite frames. |
BASIC example
MODE 1:HIMEM=&2400
PROCeginit
PROCegbegin
PROCegcall(16)
PROCegpresent
ENDAssembly example
JSR init_egfx
JSR begin_frame
LDA #16 : JSR eg_call
JSR present_frame
RTS