scriptvmtypes.h, scriptcompiletypes.h and scriptnode.h each crammed several
unrelated struct definitions into one file, unlike the rest of dusk (see
src/dusk/display or src/dusk/rpg/battle), which always gives a type its own
file named after it, with other types reached by an explicit include or a
forward declaration.
- scriptvmtypes.h: scriptvmfunction_t moves into scriptvmfunction.h (next to
the functions that already work with it), scriptvmname_t into
scriptvmname.h, scriptvmhandler_t into scriptvmtable.h, and scriptvmimage_t
gets a new scriptvmimage.h. scriptvmtypes.h keeps working as a thin
re-include umbrella for the ~45 vm files that reach into several of these
at once, the same role scripttypes.h already plays for the base types.
- scriptcompiletypes.h: scriptlabel_t moves into scriptbuilderlabel.h,
scriptloopcontext_t into scriptcompileloopcontext.h, scriptincluderesolver_t
into scriptcompile.h, and the big scriptbuilder_t gets a new scriptbuilder.h.
Breaking the resulting include cycle needed scriptbuilderlabel.h and
scriptcompileloopcontext.h to forward-declare scriptbuilder_t/scriptlabel_t
rather than pull in full definitions they only ever use by pointer, and
scriptcompile.h to define scriptincluderesolver_t before including
scriptcompiletypes.h instead of after.
- scriptnode.h: scriptfuncnode_t (a function declaration, not a kind of
expression/statement node) moves into a new scriptfuncnode.h.
Also gives scriptbuilder_t and scriptlabel_t proper struct tags (previously
anonymous, which doesn't allow forward declaration) to match the project's
_s tag / _t typedef convention from the previous pass.
Co-Authored-By: Claude Sonnet 5 <[email protected]>