25#ifdef ES_ENABLE_TILEMAP
36void tilemap_initLayer(
u32 entity,
u32 width,
u32 height,
f32 tileWidth,
f32 tileHeight);
37void tilemap_initInfinite(
u32 entity,
f32 tileWidth,
f32 tileHeight);
38void tilemap_initInfiniteLayer(
u32 entity,
f32 tileWidth,
f32 tileHeight);
39void tilemap_destroyLayer(
u32 entity);
40bool tilemap_hasLayer(
u32 entity);
41u32 tilemap_getEditRevision(
u32 entity);
42u32 tilemap_getGeneration(
u32 entity);
45u32 tilemap_readChunkIndex(
u32 entity, uintptr_t rowsPtr,
u32 capacity);
46bool tilemap_readChunkTiles(
u32 entity,
i32 chunkX,
i32 chunkY, uintptr_t tilesPtr,
u32 capacity);
50void tilemap_setTile(
u32 entity,
i32 x,
i32 y,
u32 tileId);
53void tilemap_setTiles(
u32 entity, uintptr_t tilesPtr,
u32 count);
54void tilemap_setChunkTiles(
u32 entity,
i32 chunkX,
i32 chunkY,
55 uintptr_t tilesPtr,
u32 width,
u32 height);
57void tilemap_removeChunk(
u32 entity,
i32 chunkX,
i32 chunkY);
58void tilemap_flipTile(
u32 entity,
i32 x,
i32 y,
bool flipH,
bool flipV,
bool flipD);
59void tilemap_rotateTile(
u32 entity,
i32 x,
i32 y,
i32 degrees);
63void tilemap_setTilesets(
u32 entity, uintptr_t dataPtr,
u32 count);
64void tilemap_setRenderProps(
u32 entity,
u32 textureHandle,
u32 tilesetColumns,
67 f32 parallaxX,
f32 parallaxY);
69void tilemap_setVisible(
u32 entity,
bool visible);
70void tilemap_setOriginEntity(
u32 layerKey,
u32 originEntity);
74void tilemap_setGridType(
u32 entity,
u32 type);
75void tilemap_setHexParams(
u32 entity,
f32 sideLength,
u32 staggerAxisX,
u32 staggerIndexEven);
80uintptr_t tilemap_tileToWorld(
u32 entity,
i32 tx,
i32 ty,
f32 originX,
f32 originY);
82uintptr_t tilemap_worldToTile(
u32 entity,
f32 wx,
f32 wy,
f32 originX,
f32 originY);
86void tilemap_setTileAnimation(
u32 entity,
u32 tileId, uintptr_t framesPtr,
u32 frameCount);
87void tilemap_clearTileAnimations(
u32 entity);
88void tilemap_advanceAnimations(
u32 entity,
f32 dtMs);
92void tilemap_setTileProperty(
u32 entity,
u32 tileId,
93 const std::string& key,
const std::string& value);
94std::string tilemap_getTileProperty(
u32 entity,
i32 x,
i32 y,
const std::string& key);
95std::string tilemap_exportChunks(
u32 entity);
96bool tilemap_importChunks(
u32 entity,
const std::string& encoded);
Core type definitions and utilities for ESEngine.
std::int32_t i32
Signed 32-bit integer.
std::uint32_t u32
Unsigned 32-bit integer.
float f32
32-bit floating point