XPlor/definitions/cod/loaded_sound.xscript
njohnson 7b1f5d34a1 Consolidate XScript definitions with byte order inheritance
- Volition VPP: Unified BE/LE types using inheritance pattern
- THQA PAK: Child types now inherit byte order from parent
- Various XScript definition updates and fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:08:46 -05:00

27 lines
575 B
Plaintext

type loaded_sound ui("Loaded Sound")
{
const PTR_INLINE = -1;
i32 name_ptr ui("Name Ptr");
// snd_info_t structure
i32 rate ui("Sample Rate");
i32 bits ui("Bits");
i32 channels ui("Channels");
i32 samples ui("Samples");
i32 block_size ui("Block Size");
i32 format ui("Format");
i32 data_len ui("Data Length");
i32 data_ptr ui("Data Ptr");
// Inline data
if (name_ptr == PTR_INLINE) {
name = cstring() ui("Name");
set_name(name);
}
if (data_ptr == PTR_INLINE && data_len > 0) {
audio_data = read(data_len) ui("Audio Data");
}
}