- 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>
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
type materialpass ui("Material Pass")
|
|
{
|
|
const PTR_INLINE = -1;
|
|
|
|
// Pointers first (header)
|
|
i32 vertex_decl_ptr ui("Vertex Decl Ptr");
|
|
i32 vertex_shader_ptr ui("Vertex Shader Ptr");
|
|
i32 pixel_shader_ptr ui("Pixel Shader Ptr");
|
|
|
|
// Arg counts (COD4 uses u8)
|
|
u8 per_prim_arg_count ui("Per Prim Arg Count");
|
|
u8 per_obj_arg_count ui("Per Obj Arg Count");
|
|
u8 stable_arg_count ui("Stable Arg Count");
|
|
u8 custom_sampler_flags ui("Custom Sampler Flags");
|
|
|
|
i32 args_ptr ui("Args Ptr");
|
|
|
|
// Inline data
|
|
if (vertex_decl_ptr == PTR_INLINE) {
|
|
vertex_decl = parse_here("materialvertexdeclaration");
|
|
}
|
|
if (vertex_shader_ptr == PTR_INLINE) {
|
|
vertex_shader = parse_here("materialvertexshader");
|
|
}
|
|
if (pixel_shader_ptr == PTR_INLINE) {
|
|
pixel_shader = parse_here("pixelshader");
|
|
}
|
|
|
|
// Parse args if ptr is -1 (inline) - uses calculated count
|
|
_arg_count = stable_arg_count + per_obj_arg_count + per_prim_arg_count;
|
|
if (args_ptr == PTR_INLINE && _arg_count > 0) {
|
|
array[_arg_count] arguments: materialshaderargument;
|
|
}
|
|
}
|