RPGHacker / tmx

C tmx map loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TMX C Loader


About

A portable C library to load tiled maps in your games.

Dependencies

This project depends on Zlib, Jansson and LibXml2.

Compiling

This project uses cmake as a build system builder. You can either use cmake, ccmake or cmake-gui.

You can disable XML support by setting WANT_XML to off, the same way with WANT_JSON you can disable JSON support.

Example :

mkdir build
cd build
cmake ..
make && make install

Usage

#include <tmx.h>

int main(void) {
  tmx_map map = tmx_load("path/map.tmx");
  if (!map) {
    tmx_perror("tmx_load");
    return 1;
  }
  /* ... */
  tmx_free(map);
  return 0;
}

Help

See the Wiki.

About

C tmx map loader

License:BSD 2-Clause "Simplified" License


Languages

Language:C 96.9%Language:CMake 3.1%