add finding player tile by name

This commit is contained in:
2026-11-05 20:19:56 +03:00
parent 6c1d4ae76e
commit 759ef2a903
2 changed files with 24 additions and 3 deletions

View File

@@ -53,7 +53,9 @@
(var player-width float (tmx-object-width map "FIH" 0))
(var player-height float (tmx-object-height map "FIH" 0))
(= (. state fih) NULL)
(var player (* TmxObject)
(tmx-find-object-by-name (. state map handle) "FIH" "Player"))
(= (. state fih) player)
(TraceLog LOG-INFO
"FIH[0]: \"%s\" type \"%s\" at %.1f, %.1f (%.1f x %.1f)"