C++ library to read/write CS3 .tbl files. The pun is just a happy little accident.
warning: this is a work in progress, and the build system is bad.
it can read and write every table in the
text folder except
dat_fr/t_quest.tbl, with-identical output.
however, many tables entries are still unstructured.
linux only for now.
$ git clone --recursive https://git.sr.ht/~quf/libcs3tio $ cd libcs3tio $ sh compile.sh
This will compile the library, producing
To use the library, include
src/cs3tio.h and add this archive to the linker input list.
The main functions are:
Tbl load_tbl(std::istream &) to load a table.
void store_tbl(const Tbl&, std::ostream&) to store a table.
Tbl is a struct containing a vector of header names, and a
TableEntry is a large
std::variant with different table entry types; for their definitions, see
This is only necessary for development of this library (i.e. to adapt it to new table schemata), not to simply use it in a depending program.
Make sure that kaitai struct compiler is installed.
To use the expected versions, run:
$ git submodule update
$ git submodule foreach git pull --ff-only
To regenerate the kaitai struct parser code, run:
$ cd ksp-src $ sh make.sh
compile.sh and any source code as necessary, and do a normal build as described above.