Protofall / Crayon-Savefile

A savefile system designed to take up little space and support version control. Works on PC and Dreamcast
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Create the "c-globals" project #34

Open Protofall opened 4 years ago

Protofall commented 4 years ago

As seen in the demos, the my_sf_vars.c/h files contain the global pointers for your vars, with the unfortunate side effect of having the vars in two paces. Wouldn't it be great if the user entered everything in one place?

I present the idea of the "c-globals" project. We have a custom file (name.global_vars). The program would read it and then auto-generate name.c and name.h with the correct hdr guards, vars, types, initialised values (Since we can do that with a .c file) and also comments. The user would never look at name.c and name.h directly so the comments are for the name.global_vars file.

Then build scripts (Scons in my case) would see this file, execute the program on the file and make the right files.