Skip to content

RobLoach/raylib-tiled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raylib-tiled

Tiled map editor integration for raylib, using cute_tiled.

Screenshot

Usage

#include "raylib.h"

#define RAYLIB_TILED_IMPLEMENTATION
#include "raylib-tiled.h"

int main() {
    InitWindow(800, 450, "raylib-tiled");

    // Load the map
    Map map = LoadMap("resources/desert.json");

    while (!WindowShouldClose()) {
        BeginDrawing();
        ClearBackground(RAYWHITE);

        // Draw the map
        DrawMap(map, 0, 0, WHITE);

        EndDrawing();
    }

    // Unload the map
    UnloadMap(map);
    CloseWindow();
    return 0;
}

API

Map LoadMap(const char* fileName);
Map LoadMapFromMemory(const unsigned char *fileData, int dataSize, const char* baseDir);
bool IsMapReady(Map map);
void UnloadMap(Map map);
void DrawMap(Map map, int posX, int posY, Color tint);

Development

mkdir build
cd build
cmake ..
make
cd example
./raylib-tiled-example

Alternatives

License

raylib-tiled is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors