render3d: the bake and tile magics are "LBAK" and "LTT2" (they were "LAAK" and "LDT2")

Both constants were worked out by hand and a byte off each: the tiles' bake wrote "LAAK" and "LDT2", which
ludic bake --check refuses, and r3d_baked_read, holding the same wrong constant, would have refused
ludic.base's correct files (the sun's shadow among them) while accepting its own. Now 0x4B41424C and
0x3254544C, checked against the strings; the unused LTT1 constant is gone. A re-bake is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 18:28:11 +03:00
parent 31df4dba9f
commit d2e1f804ce
3 changed files with 2 additions and 3 deletions

View file

@ -112,7 +112,7 @@ function sky_ibl_from_bytes(render3d_st: mut Render3dState, data: []byte) -> boo
# ---- reading a bake's file (ludic.base's format; render3d cannot import ludic.base) ----
# "LBAK" | u32 format 1 | u32 version | u32 payload offset | u64 inputs hash | u64 payload length | key
const BAKE_MAGIC: int = 1262567756 # "LBAK", little-endian
const BAKE_MAGIC: int = 1262568012 # "LBAK" read as a little-endian u32: 0x4B41424C
# the payload of the bake at `path` when its key and version are these, else null (missing, stale, torn)
@alloc_ok("a bake read once at load")