Light and fog files
Each stage can have a light file and one or more fog files. The stage module names them as strings (for example stg13_light.bin and stg13_fog.bin in stg13D.rel, or stg24_fogA.bin in stg24D.rel),
and a named file need not exist on the disc: stg13_fog.bin is named but absent, so City Escape has no fog file. Observed stgNN_light_gc.bin files exist for 18 stages but are named in no module; they
are found by name convention. Observed 104 light and fog files are present in all. Observed Counts come from a recorded census of the USA disc GSNE8P; they cannot be re-checked now. Observed
Layouts
Section titled “Layouts”Big-endian, from SA Tools’ SA2LightFogEditor. Sourced · SA Tools
Big-endian. Twelve slots; dir is the direction the light travels ((0, −1, 0) = from above).
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 12 | f32[3] | dir | Sourced | |
| 0xC | 4 | f32 | color multiplier | Sourced | |
| 0x10 | 4 | f32 | ambient multiplier | Sourced | |
| 0x14 | 12 | f32[3] | color | Sourced |
Big-endian. Twelve slots.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 12 | f32[3] | dir | Sourced | |
| 0xC | 12 | f32[3] | color | Sourced | |
| 0x18 | 12 | f32[3] | ambient | Sourced | |
| 0x24 | 4 | s32 | override | Sourced | |
| 0x28 | 4 | s32 | unknown | Unknown | |
| 0x2C | 4 | s32 | unknown | Unknown |
Big-endian. A 0x210-byte variant adds a 128-entry f32 table, which is not decoded.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 2 | s16 | type | Sourced | |
| 0x2 | 2 | s16 | unknown | Unknown | |
| 0x4 | 4 | u8[4] | colour | Sourced | A, R, G, B |
| 0x8 | 4 | f32 | max distance | Sourced | |
| 0xC | 4 | f32 | min distance | Sourced |
What is engine code
Section titled “What is engine code”Which light slot lights the landtable, how _light and _light_gc combine, which fog variant (A, B, C) is active where, and the 128-entry fog table are not in the files. Unknown Sky models are drawn
by stage code and are not in the landtable. Observed
All slots are present in the files; the selection is engine code. The first slot of _light.bin is probably the daylight slot, with its ambient multiplier as the world ambient (inferred).