|
else if (tileset.tilesLength > 0) // If the tileset is a "collection of images" with explicit tiles. |
I use a mix of terrain tilemaps from a single image, and several "collection of images" types.
Had problems with an object being in the object-array but not rendering, and also causing heap corruption when unloading.
Patched it to:
else if (tileset.tilesLength > 0)
{
uint32_t greatestID = 0;
for (uint32_t j = 0; j < tileset.tilesLength; j++)
{
if (greatestID < tileset.tiles[j].id)
greatestID = tileset.tiles[j].id;
}
tileset.lastGid = tileset.firstGid + greatestID;
}
That seemingly fixed the problem. The object started rendering again and the crash on exit went away.
Tiled: Version 1.12.2
Raylib: 5.5
raytmx/raytmx.h
Line 784 in e4679f2
I use a mix of terrain tilemaps from a single image, and several "collection of images" types.
Had problems with an object being in the object-array but not rendering, and also causing heap corruption when unloading.
Patched it to:
That seemingly fixed the problem. The object started rendering again and the crash on exit went away.
Tiled: Version 1.12.2
Raylib: 5.5