Input/Output of Structure Binaries?
Posted: Thu Sep 07, 2006 7:09 am
1. Does the C-Script library support "sizeof" for structures, to determine their length in bytes?
2. Can we output a structure to disk as a binary using the file commands, input it later in the same way and expect it will be byte-aligned and consistent on all export platforms?
3. Can we then import structures from byte-aligned editors using our structure format, also as an entire binary chunk?
I know I can find out all this myself by building tests, Makslane, but I guess I am being lazy and hoping you can answer all these questions for me in one go.
I can throw together editors of all sorts very quickly with binary outputs of structures as big arrays. This would help speed up item and creature editing for my Game Editor isometric game a lot. I can do it as INI style files as well, but this will entail building a little INI parser for Game Editor. It saves a lot of time if I can have a couple of binary files travel with the executable on all platforms and expect the byte aligned structs to import at the same length on all of them. I know the "&" address pointer is supported in Game Editor C-Script.
Thanks for your help in advance.
2. Can we output a structure to disk as a binary using the file commands, input it later in the same way and expect it will be byte-aligned and consistent on all export platforms?
3. Can we then import structures from byte-aligned editors using our structure format, also as an entire binary chunk?
I know I can find out all this myself by building tests, Makslane, but I guess I am being lazy and hoping you can answer all these questions for me in one go.
I can throw together editors of all sorts very quickly with binary outputs of structures as big arrays. This would help speed up item and creature editing for my Game Editor isometric game a lot. I can do it as INI style files as well, but this will entail building a little INI parser for Game Editor. It saves a lot of time if I can have a couple of binary files travel with the executable on all platforms and expect the byte aligned structs to import at the same length on all of them. I know the "&" address pointer is supported in Game Editor C-Script.
Thanks for your help in advance.