LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

SPFUNC/BGFUNC

Root / Programming Questions / [.]

Gaelstrom_ValenceCreated:
Who what when where why what is dis

SPFUNC takes a number (a sprite number) and either a label or a procedure name (one that is elsewhere defined with DEF). You can do this many times with many different numbers, and the label/procedure can be the same or different. If you use the same number more than once, only the latest counts. If you later do CALL with a number (a sprite number), that number gets copied to CALLIDX, then the subroutine or procedure is called. BGFUNC is the same, except there is no number, and it is called with CALL BG.