https://github.com/levelz-file/c-bindings
C Parser & API for the LevelZ File Format
https://github.com/levelz-file/c-bindings
c cmake cpp levelz
Last synced: 4 months ago
JSON representation
C Parser & API for the LevelZ File Format
- Host: GitHub
- URL: https://github.com/levelz-file/c-bindings
- Owner: LevelZ-File
- License: mit
- Created: 2024-09-24T13:37:37.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-04T05:20:08.000Z (6 months ago)
- Last Synced: 2025-01-15T08:01:56.732Z (5 months ago)
- Topics: c, cmake, cpp, levelz
- Language: C
- Homepage: https://levelz-file.github.io/c-bindings/
- Size: 345 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# levelz-c
> Header-only C Parser & API For LevelZ File Format

## Overview
Provides C bindings for the LevelZ file format. This library is header-only and does not require any additional dependencies.
## Installation
Ensure you have [CMake](https://cmake.org/) installed on your system, then run the following commands:
```bash
# Clone Repo
git clone https://github.com/LevelZ-File/c-bindings
cd cpp-bindings# Build Project, Install with CMake
cmake --build . --config Release --target install## may require sudo
sudo cmake --build . --config Release --target install
```## Usage
```c
#includeint main() {
Coordinate2D* coord = createCoordinate2D(0, 0);
Coordinate3D* coord2 = createCoordinate3D(0, 0, 0);printf("Coordinate 2D: (%d, %d)\n", coord->x, coord->y);
printf("Coordinate 3D: (%d, %d, %d)\n", coord2->x, coord2->y, coord2->z);
return 0;
}
``````c
#includeint main() {
Level2D* l = parseFile2D("path/to/file-2d.lvlz")
Level3D* l2 = parseFile3D("path/to/file-3d.lvlz")
return 0;
}
```