Skip to content

Custom Data for Plugins #14

@thelink2012

Description

@thelink2012

Certain types of plugins (an debugger, an custom-header, etc) needs to store additional data for scripts. There are several ways to do so without the help of CLEO, but that would be too much duplication of work if CLEO could help on its own.

Indeed, even CLEOs own custom data could be stored as a custom data object instead of a derived class!

I've begin some work on this feature on a branch, it's utter clap, especially the data structure I'm on, but well, that's just a mvp.

The front idea is to replicate how RenderWare does plugin data, by registering information at startup and allocating the data together the struct. Taking one of the padding words in CRunningScript and use as an index to the data pool would be ideal, as the access time would be quick

The padding words after the gosub array could work, but do note how they are used by III.VC.CLEO as an is_custom flag. The word that is currently used to store the scm_function_index would be better, doubt anybody has ever touched those from outside CLEO.

Proofing that it works could be by implementing custom-headers+commands-oat as a data plugin in CLEO.asi itself.

Additionally, an debug server (currently WIP in a private repository of mine) would make it even more proofed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions