Compile¶
C++ Library¶
To compile ztalib as a shared C++ library, go to the root of the repository and run:
This will install the library in a /dist folder. Copy the contents of /dist to your project and link against the library.
Python Bindings¶
For Python projects that want to use ztalib, bindings are also supported. First, make sure you have a virtual environment activated if you do not want to install the ztalib bindings system-wide:
Then, in the root of the repository, run:
This will install the Python bindings to the currently-active Python environment. You can then import the pyzta module in your Python code:
Setup¶
Copy the contents of /dist to your project and link against the library.
For example, a possible project structure could be:
MyProject/
├── include/
│ └── ztalib/
│ ├── PalF.h
│ └── AniF.h
├── lib/
│ └── libzta.lib
├── bin/
│ └── libzta.dll
├── src/
│ └── main.cpp
Then, in your C++ code, you can include the headers as so:
#include "ztalib/ZtaF.h"
int main()
{
ZtaF zta;
auto animation = zta.load("path/to/animation");
auto buffer = zta.getFrameBuffer();
std::cout << "Animation loaded with " << buffer.size() << " frames!" << std::endl;
}
See the example project to see it in action.