XPlor/definitions/cod/sunlightparseparams.xscript
njohnson f3bca6871e Update COD XScript definitions with new syntax
- Migrate from set_global/get_global to ctx_set/ctx_get
- Replace if-else chains with match() expressions
- Update inline pointer handling patterns
- Improve GfxWorld and asset parsing structures
- Clean up redundant code across 60+ definition files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:09:57 -05:00

40 lines
871 B
Plaintext

type sunlightparseparams [display="Sun Light Parse Params"]
{
// PC version: Fixed 128-byte struct (embedded in GfxWorld header)
// Name is a fixed 64-byte char array, NOT a pointer!
name = read(64);
ui("name", "Name");
// Ambient settings
ambient_scale = read(4);
ui("ambient_scale", "Ambient Scale");
ambient_color = read(12);
ui("ambient_color", "Ambient Color");
// Diffuse/Sun settings
diffuse_fraction = read(4);
ui("diffuse_fraction", "Diffuse Fraction");
sun_light = read(4);
ui("sun_light", "Sun Light");
sun_color = read(12);
ui("sun_color", "Sun Color");
diffuse_color = read(12);
ui("diffuse_color", "Diffuse Color");
// Flags and angles
u8 diffuse_color_has_been_set;
ui("diffuse_color_has_been_set", "Diffuse Color Has Been Set");
skip(3); // padding
angles = read(12);
ui("angles", "Angles");
}