From 040a896cb98963c74916c0b833efa9df2ef965e3 Mon Sep 17 00:00:00 2001 From: tech kaczynski Date: Sun, 25 Oct 2026 14:17:39 +1000 Subject: committing the fgsf_spec in case it hasn't been properly committed to the repo. --- fgsf_spec.txt | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/fgsf_spec.txt b/fgsf_spec.txt index ce302ce..3e4395d 100644 --- a/fgsf_spec.txt +++ b/fgsf_spec.txt @@ -1,4 +1,4 @@ -FUN GAME SAVE FILE FORMAT VERSION 0.1 +FUN GAME SAVE FILE FORMAT VERSION 0.3 - little endian - 32-bit IEEE-754 floats - UTF-8 strings which are *not* null terminated @@ -6,16 +6,32 @@ FUN GAME SAVE FILE FORMAT VERSION 0.1 - quaternions are xyzw and need normalization - pids start at 1 and are monotonic, 0 is reserved for null parent +VERSION CHANGES + 0.3: + Added root_body to identify which body drives the entity pose. + Stored after body_cnt; adds 4 bytes per physics component. + Zero-based body index. Empty rigs store 0. + + 0.2: + Replaced axis_a/axis_b with frame_rot_a/frame_rot_b. + Joint records increased from 85 to 93 bytes. + CHUNK LABELS + - ENVR - ENTT - TRFM - MODL + - MTEX + - MSHD - PHYS DATA RECORDS + - environment record - entity record - transform component record - model component record + - texture override record + - shader override record - physics component record - physics body record - physics shape record @@ -37,6 +53,10 @@ CHUNK u32 size u8[size] data +ENVR + f32 day_start + f32 day_len + ENTT u64 next_pid u32 entity_cnt @@ -65,12 +85,31 @@ MODL char[key_len] key bool(u8) draw +MTEX + u32 texture_override_cnt + + repeat texture_override_cnt: + u64 entity_pid + u32 material_idx + u32 key_len + char[key_len] texture_key + +MSHD + u32 shader_override_cnt + + repeat shader_override_cnt: + u64 entity_pid + u32 material_idx + u32 key_len + char[key_len] shader_key + PHYS u32 physics_cnt repeat physics_cnt: u64 pid u32 body_cnt + u32 root_body body[body_cnt] u32 joint_cnt joint[joint_cnt] @@ -124,8 +163,8 @@ PHYSICS JOINT u32 flags f32[3] anchor_a f32[3] anchor_b - f32[3] axis_a - f32[3] axis_b + f32[4] axis_a + f32[4] axis_b f32 lower f32 upper f32 spring_hz -- cgit v1.2.3