- 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>
111 lines
3.1 KiB
Plaintext
111 lines
3.1 KiB
Plaintext
type menudef ui("Menu Definition")
|
|
{
|
|
const PTR_INLINE = -1;
|
|
|
|
// WindowDef_t embedded
|
|
window = parse_here("windowdef") ui("Window");
|
|
|
|
// Menu Properties
|
|
i32 font_ptr ui("Font Ptr");
|
|
i32 full_screen ui("Full Screen");
|
|
i32 item_count ui("Item Count");
|
|
i32 font_index ui("Font Index");
|
|
i32 cursor_item ui("Cursor Item");
|
|
i32 fade_cycle ui("Fade Cycle");
|
|
f32 fade_clamp ui("Fade Clamp");
|
|
f32 fade_amount ui("Fade Amount");
|
|
f32 fade_in_amount ui("Fade In Amount");
|
|
f32 blur_radius ui("Blur Radius");
|
|
i32 on_open_ptr ui("OnOpen Ptr");
|
|
i32 on_close_ptr ui("OnClose Ptr");
|
|
i32 on_esc_ptr ui("OnESC Ptr");
|
|
i32 on_key_ptr ui("OnKey Ptr");
|
|
visible_exp = parse_here("statement") ui("Visible Exp");
|
|
i32 allowed_binding_ptr ui("Allowed Binding Ptr");
|
|
i32 sound_name_ptr ui("Sound Name Ptr");
|
|
i32 image_track ui("Image Track");
|
|
f32 focus_color_r ui("Focus R");
|
|
f32 focus_color_g ui("Focus G");
|
|
f32 focus_color_b ui("Focus B");
|
|
f32 focus_color_a ui("Focus A");
|
|
f32 disable_color_r ui("Disable R");
|
|
f32 disable_color_g ui("Disable G");
|
|
f32 disable_color_b ui("Disable B");
|
|
f32 disable_color_a ui("Disable A");
|
|
rect_x_exp = parse_here("statement") ui("Rect X Exp");
|
|
rect_y_exp = parse_here("statement") ui("Rect Y Exp");
|
|
i32 items_ptr ui("Items Ptr");
|
|
|
|
// ============ INLINE DATA ============
|
|
|
|
// Window inline data
|
|
_win_name_ptr = get(window, "name_ptr");
|
|
if (_win_name_ptr == PTR_INLINE) {
|
|
name = cstring() ui("Name");
|
|
set_name(name);
|
|
}
|
|
|
|
_win_group_ptr = get(window, "group_ptr");
|
|
if (_win_group_ptr == PTR_INLINE) {
|
|
group = cstring() ui("Group");
|
|
}
|
|
|
|
_win_bg_ptr = get(window, "background_ptr");
|
|
if (_win_bg_ptr == PTR_INLINE) {
|
|
background = parse_here("material") ui("Background");
|
|
}
|
|
|
|
// Simple inline strings
|
|
if (font_ptr == PTR_INLINE) {
|
|
font = cstring() ui("Font");
|
|
}
|
|
if (on_open_ptr == PTR_INLINE) {
|
|
on_open = cstring() ui("OnOpen");
|
|
}
|
|
if (on_close_ptr == PTR_INLINE) {
|
|
on_close = cstring() ui("OnClose");
|
|
}
|
|
if (on_esc_ptr == PTR_INLINE) {
|
|
on_esc = cstring() ui("OnESC");
|
|
}
|
|
if (on_key_ptr == PTR_INLINE) {
|
|
on_key = parse_here("itemkeyhandler") ui("OnKey");
|
|
}
|
|
|
|
// Visible expression entries
|
|
_vis_num = get(visible_exp, "num_entries");
|
|
_vis_ptr = get(visible_exp, "entries_ptr");
|
|
if (_vis_ptr == PTR_INLINE && _vis_num > 0) {
|
|
skip _vis_num * 4;
|
|
array[_vis_num] vis_entries: expressionentry;
|
|
}
|
|
|
|
if (allowed_binding_ptr == PTR_INLINE) {
|
|
allowed_binding = cstring() ui("Allowed Binding");
|
|
}
|
|
if (sound_name_ptr == PTR_INLINE) {
|
|
sound_name = cstring() ui("Sound Name");
|
|
}
|
|
|
|
// Rect expression entries
|
|
_rx_num = get(rect_x_exp, "num_entries");
|
|
_rx_ptr = get(rect_x_exp, "entries_ptr");
|
|
if (_rx_ptr == PTR_INLINE && _rx_num > 0) {
|
|
skip _rx_num * 4;
|
|
array[_rx_num] rx_entries: expressionentry;
|
|
}
|
|
|
|
_ry_num = get(rect_y_exp, "num_entries");
|
|
_ry_ptr = get(rect_y_exp, "entries_ptr");
|
|
if (_ry_ptr == PTR_INLINE && _ry_num > 0) {
|
|
skip _ry_num * 4;
|
|
array[_ry_num] ry_entries: expressionentry;
|
|
}
|
|
|
|
// Items array
|
|
if (items_ptr == PTR_INLINE && item_count > 0) {
|
|
skip item_count * 4;
|
|
array[item_count] items: itemdef;
|
|
}
|
|
}
|