Sorry, Nailhead. Note that I said MOST. When I started writing AGIL I was better with Pascal than C, but Pascal has irritating limitations, like no type casting. Also (mine) objects to pointer arithmetic. Also no portable. Also nobody else would even look at the code.
Nick, AGIL has a simple savegame thing, but it's not good at all. Just dumps everything I could think of to a file (250k). I also have no idea how the savegames in the original worked, no the script size thing does nothing, and the savegame just saves a list of resources loaded at the time the game is saved, the restore function loads these. I realize that this breaks some things, like when unloading resources all more recently resources loaded are supposed to be freed, but in AGIL they aren't. There really aren't memory limitations like this on modern PC's anyway. I doubt that you could learn anything from my code, the only advantage over NAGI is that it runs in Linux. You can get an generic snprintf() implementation that works on mingw32, but I don't know about the license, that is why I'm not using it. AGIL just uses sprintf in 'doze and DOS. If you define a universal savegame format I will do my best to implement it, but I might need an explanation of the script, and any other stuff left out of the spec.
Chris, when I started writing AGIL I was seriously rusty at C, you don't want to even see some of the code I wrote. Didn't make it into any releases.