opengametools icon indicating copy to clipboard operation
opengametools copied to clipboard

ogt_vox: ogt_vox_layer color loaded from file flag

Open dougbinks opened this issue 1 month ago • 0 comments

Older versions of MV appear not to save out layer colours, so when loading I would like to detect if it exists and if not set the layer color from a predefined set, similar to how MV behaves.

There are a few ways to do this. One would be add a variable to the ogt_vox_layer to show if it's loaded or not and initialize to white as per the current code. Another would be to initialize the color variable from a predefined array. Finally I could just use the version number and not alter the current ogt_vox code (which is what I'm doing at the moment).

For reference the current layer struct is:

    typedef struct ogt_vox_layer
    {
        const char*  name;               // name of this layer if there is one, will be NULL otherwise.
        ogt_vox_rgba color;              // color of the layer.
        bool         hidden;             // whether this layer is hidden or not.
    } ogt_vox_layer;

Thoughts?

dougbinks avatar Nov 10 '25 13:11 dougbinks