|
inkcpp
|
C bindings for inkcpp. More...
Classes | |
| struct | InkListIter |
| Iterater used to iterate flags of a HInkList. More... | |
| struct | InkValue |
| Repserentation of a ink variable. More... | |
| class | HInkSnapshot |
| Handler for a ink snapshot. More... | |
| class | HInkChoice |
| Handler for a ink choice. More... | |
| class | HInkList |
| Handler for a ink list. More... | |
| class | HInkRunner |
| A handle for an ink runner. More... | |
| class | HInkGlobals |
| Handle for the global variable store shared among ink runners. More... | |
| class | HInkStory |
| Handle for a loaded ink story. More... | |
Functions | |
| ink_hash_t | ink_hash_string (const char *str) |
| Hash a string, this hash is used inside inkcpp instead of the string actual value. | |
| void | ink_compile_json (const char *input_filename, const char *output_filename, const char **error) |
| Compiles a .ink.json file to an inkCPP .bin file. | |
C bindings for inkcpp.
There are two different ways to get the C bindings.
Please note that the included header is different between this two installation methods.
To setup an example for option 1. and 2. if you use cmake checkout CMAKE usage and replace target_link_libraries with target_link_libraries(main inkcpp_c) The story and source file can be used as noted down
For setup an example for option 2. without cmake create a directory with the files below:
And extract <os>-clib.zip from the release page to /MY/INKCPP/EXAMPLE_INSTALL/PATH.
To run the example do the following:
As a sideproduct a file named test.bin should be created coaining the binary format used by inkCPP.
| void ink_compile_json | ( | const char * | input_filename, |
| const char * | output_filename, | ||
| const char ** | error ) |
Compiles a .ink.json file to an inkCPP .bin file.
| input_filename | path to file contaning input data (.ink.json) |
| output_filename | path to file output data will be written (.bin) |
| error | if not NULL will contain a error message if an error occures (else will be set to NULL) |
| ink_hash_t ink_hash_string | ( | const char * | str | ) |
Hash a string, this hash is used inside inkcpp instead of the string actual value.
| str | string to hash |