diff options
| author | davidovski <david@davidovski.xyz> | 2023-07-10 17:29:00 +0100 |
|---|---|---|
| committer | davidovski <david@davidovski.xyz> | 2023-07-10 17:29:00 +0100 |
| commit | a65880a11878a9b8e08174b7c897894b2a81a226 (patch) | |
| tree | c6f8b4ca477a90bdac425f2b811deebd1ba8e3ce /src/tiled.c | |
| parent | 9c8b526991b68439284bee0936b90079943b249b (diff) | |
exit when map load fails
Diffstat (limited to 'src/tiled.c')
| -rw-r--r-- | src/tiled.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tiled.c b/src/tiled.c index b679e3c..95d3950 100644 --- a/src/tiled.c +++ b/src/tiled.c @@ -6,7 +6,6 @@ #define SCREEN_W 1280 #define SCREEN_H 720 - int main() { InitWindow(SCREEN_W, SCREEN_H, "tiled"); @@ -14,7 +13,10 @@ int main() { int atlasSize[2] = {0, 0}; Texture2D tilemap, atlas; - loadTileMap("map.tiles", &tilemap, &atlas, atlasSize); + + if (loadTileMap("map.tiles", &tilemap, &atlas, atlasSize)) { + return 1; + } RenderTexture2D target = LoadRenderTexture(SCREEN_W, SCREEN_H); |
