feat: add T4 menu dumping and loading (#986)

* feat: add T4 menu dumping

* chore: align with latest changes

* feat: add T4 menu loading

Load T4 menulists and menu files through the shared menu parser.

Preserve T4-specific menu and listbox fields and cover loading, dumping, linking, and round-trip behaviour.

* chore: make flag fields unsigned

* chore: rename `expOperationEnum` -> `operationEnum`

* chore: use default enum numeration for T4 operationEnum

* chore: remove unused members of operationEnum

* chore: remove redundant op from operationEnum

* refactor: align T4 expression operand names with IW3

* chore: small adjustment to iw3,t4 types

---------

Co-authored-by: Jan Laupetin <[email protected]>
This commit is contained in:
mo
2026-09-03 23:19:03 +02:00
committed by GitHub
co-authored by Jan Laupetin
parent 7d027e8f89
commit 4da55a351a
36 changed files with 3366 additions and 29 deletions
+110
View File
@@ -0,0 +1,110 @@
#pragma once
#include "Game/T4/T4.h"
#include <type_traits>
namespace T4
{
inline constexpr const char* g_expFunctionNames[]{
"NOOP",
")",
"*",
"/",
"%",
"+",
"-",
"!",
"<",
"<=",
">",
">=",
"==",
"!=",
"&&",
"||",
"(",
",",
"&",
"|",
"~",
"<<",
">>",
"sin",
"cos",
"min",
"max",
"milliseconds",
"dvarint",
"dvarbool",
"dvarfloat",
"dvarstring",
"stat",
"ui_active",
"flashbanged",
"scoped",
"scoreboard_visible",
"inkillcam",
"player",
"selecting_location",
"team",
"otherteam",
"marinesfield",
"opforfield",
"menuisopen",
"writingdata",
"inlobby",
"inprivateparty",
"privatepartyhost",
"privatepartyhostinlobby",
"aloneinparty",
"adsjavelin",
"weaplockblink",
"weapattacktop",
"weapattackdirect",
"secondsastime",
"tablelookup",
"locstring",
"localvarint",
"localvarbool",
"localvarfloat",
"localvarstring",
"timeleft",
"secondsascountdown",
"gamemsgwndactive",
"int",
"string",
"float",
"gametypename",
"gametype",
"gametypedescription",
"scoreatrank",
"friendsonline",
"spectatingclient",
"statrangeanybitsset",
"keybinding",
"actionslotusable",
"hudfade",
"maxrecommendedplayers",
"acceptinginvite",
"gamehost",
"issplitscreen",
"issplitscreenhost",
"splitscreennum",
"iscinematicfinished",
"issquadleader",
"getsquadid",
"isartillery",
"getplayersquadid",
"hasfriends",
"haspendingfriends",
"hasinvites",
"squadinvitesent",
"isintermission",
"partyismissingmappack",
"partymissingmappackerror",
"anynewmappacks",
};
static_assert(std::extent_v<decltype(g_expFunctionNames)> == static_cast<unsigned>(NUM_OPERATORS));
} // namespace T4