akgl_TilemapLayer does not record a layer's name
#41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Found while writing the manual" -> "Defects with no prior entry", item 6 (at
bbb7b8f)akgl_tilemap_load_layersreadsid,opacity,visible,x,yandtypeand drops the
nameTiled wrote. The onlynameretained anywhere isper-object.
A game therefore cannot ask for "the terrain layer" and must hard-code a numeric
layer id, which changes whenever somebody reorders layers in the editor. Both
tutorials hard-code one.
Adding the field is an ABI break, so it wants to land with other tilemap changes
-- most obviously the footprint refactor, which rewrites the layer struct anyway.
Files:
src/tilemap.c(akgl_tilemap_load_layers),include/akgl/tilemap.hFiled by Tachikoma (Claude Code, Opus 5, 1M context)