Menu Asset (BO1): Difference between revisions
Aerosoul94 (talk | contribs) Created page with "__NOTOC__ Category:Assets Category:BO1 <source lang="cpp"> enum expDataType { VAL_INT = 0x0, VAL_FLOAT = 0x1, VAL_STRING = 0x2, }; union operandInternalDataUnion {..." |
Aerosoul94 (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
VAL_STRING = 0x2, | VAL_STRING = 0x2, | ||
}; | }; | ||
union operandInternalDataUnion | union operandInternalDataUnion | ||
{ | { | ||
| Line 16: | Line 16: | ||
const char *string; | const char *string; | ||
}; | }; | ||
struct Operand | struct Operand | ||
{ | { | ||
| Line 22: | Line 22: | ||
operandInternalDataUnion internals; | operandInternalDataUnion internals; | ||
}; | }; | ||
union | union expressionRpnDataUnion | ||
{ | { | ||
Operand operand; | Operand operand; | ||
void *cmd; | |||
int cmdIdx; | |||
}; | }; | ||
struct expressionRpn | struct expressionRpn | ||
{ | { | ||
int type; | int type; | ||
expressionRpnDataUnion data; | |||
}; | }; | ||
struct ExpressionStatement // size = 0x10 | struct ExpressionStatement // size = 0x10 | ||
{ | { | ||
char * | char *filename; | ||
int | int line; | ||
int | int numRpn; | ||
expressionRpn *rpn; // count = unk1Count; | expressionRpn *rpn; // count = unk1Count; | ||
}; | }; | ||
struct | struct rectData_t // size = 0x40 | ||
{ | { | ||
ExpressionStatement rectXExp; | ExpressionStatement rectXExp; | ||
| Line 52: | Line 51: | ||
ExpressionStatement rectHExp; | ExpressionStatement rectHExp; | ||
}; | }; | ||
struct | struct gameMsgDef_s // 8 | ||
{ | { | ||
int | int gameMsgWindowIndex; | ||
int | int gameMsgWindowMode; | ||
}; | }; | ||
struct focusItemDef_t; | struct focusItemDef_t; | ||
union textData_t | union textData_t | ||
{ | { | ||
focusItemDef_t *focusItemDef; // 3,4,5,7,8,9,10,11,12,13,14,16,20,21,22,30 | focusItemDef_t *focusItemDef; // 3,4,5,7,8,9,10,11,12,13,14,16,20,21,22,30 | ||
gameMsgDef_t *gameMsgDef; // 15 | gameMsgDef_t *gameMsgDef; // 15 | ||
void *data; | |||
}; | }; | ||
struct | struct textExp_s | ||
{ | |||
ExpressionStatement textExp; | |||
}; | |||
struct textDef_s // 0xD4 | |||
{ | { | ||
rectDef_s textRect[4]; | rectDef_s textRect[4]; | ||
int alignment; | int alignment; | ||
int fontEnum; | int fontEnum; | ||
int | int itemFlags; | ||
int textAlignMode; | int textAlignMode; | ||
float textalignx; | float textalignx; | ||
| Line 87: | Line 92: | ||
float shadowOffset; | float shadowOffset; | ||
int unknown; | int unknown; | ||
char *text; | const char *text; | ||
textExp_s *textExpData; | |||
textDefData_t textData; | |||
}; | }; | ||
struct MenuCell // 0xC | struct MenuCell // 0xC | ||
{ | { | ||
int | int type; | ||
int | int maxChars; | ||
char *stringValue; // size = | char *stringValue; // size = maxChars | ||
}; | }; | ||
struct MenuRow // 0x18 | struct MenuRow // 0x18 | ||
{ | { | ||
MenuCell *cells; // count = listBoxDef_s.count1 | MenuCell *cells; // count = listBoxDef_s.count1 | ||
char *eventName; | |||
char *onFocusEventName; | |||
bool disableArg; | |||
int status; | |||
int name; | |||
}; | }; | ||
struct columnInfo_s | |||
{ | |||
int elementStyle; | |||
int maxChars; | |||
rectDef_s rect; | |||
}; | |||
struct listBoxDef_t // 0x2BC | struct listBoxDef_t // 0x2BC | ||
{ | { | ||
int mousePos; | |||
#ifdef PC | |||
int cursorPos; | |||
int startPos; | |||
int endPos; | |||
#else | |||
int cursorPos[4]; | |||
int startPos[4]; | |||
int endPos[4]; | |||
#endif | |||
int drawPadding; | |||
float elementwidth; | float elementwidth; | ||
float elementheight; | float elementheight; | ||
int numColumns; | |||
float special; | |||
columnInfo_s columnInfo[16]; | |||
int notselectable; | int notselectable; | ||
int noScrollBars; | int noScrollBars; | ||
| Line 126: | Line 150: | ||
Material *backgroundItemListBox; | Material *backgroundItemListBox; | ||
Material *highlightTexture; | Material *highlightTexture; | ||
int | int noBlinkingHighlight; | ||
MenuRow *rows; // count = numRows | MenuRow *rows; // count = numRows | ||
int | int maxRows; | ||
int | int rowCount; | ||
}; | }; | ||
struct | struct multiDef_s // 0x18C | ||
{ | { | ||
char *dvarList[32]; | const char *dvarList[32]; | ||
char *dvarStr[32]; | const char *dvarStr[32]; | ||
float dvarValue[32]; | float dvarValue[32]; | ||
int count; | |||
int actionOnEnterPressOnly; | |||
int strDef; | |||
}; | }; | ||
struct | struct editFieldDef_s // 0x30 | ||
{ | { | ||
#ifdef PC | |||
int cursorPos[1]; | |||
#else | |||
int cursorPos[4]; | |||
#endif | |||
float minVal; | |||
float maxVal; | |||
float defVal; | |||
float range; | |||
int maxChars; | int maxChars; | ||
int maxCharsGotoNext; | int maxCharsGotoNext; | ||
int maxPaintChars; | int maxPaintChars; | ||
int paintOffset; | |||
}; | }; | ||
struct | struct enumDvarDef_s | ||
{ | { | ||
char *enumDvarName; | char *enumDvarName; | ||
}; | }; | ||
union | union focusDefData_t | ||
{ | { | ||
listBoxDef_s *listBox; // 4 | |||
multiDef_s *multiDef; // 10 | |||
editFieldDef_s *editField; // 5,7,8,9,12,13,14,16,22,30 | |||
enumDvarDef_s *enumDvarDef; // 11 | |||
void *data; | void *data; | ||
}; | }; | ||
struct ScriptCondition // 0x10 | struct ScriptCondition // 0x10 | ||
{ | { | ||
bool fireOnTrue; | |||
int constructId; | |||
int blockId; | |||
ScriptCondition *next; | ScriptCondition *next; | ||
}; | }; | ||
struct GenericEventScript // 0x2C | struct GenericEventScript // 0x2C | ||
{ | { | ||
ScriptCondition *prerequisites; | ScriptCondition *prerequisites; | ||
ExpressionStatement condition; | |||
char * | int type; | ||
bool fireOnTrue; | |||
const char *action; | |||
int blockId; | |||
int constructId; | |||
GenericEventScript *next; | GenericEventScript *next; | ||
}; | }; | ||
struct GenericEventHandler // 0xC | struct GenericEventHandler // 0xC | ||
{ | { | ||
const char *name; | |||
GenericEventScript *eventScript; | GenericEventScript *eventScript; | ||
GenericEventHandler *next; | GenericEventHandler *next; | ||
}; | }; | ||
struct focusItemDef_t // 0x18 | struct focusItemDef_t // 0x18 | ||
{ | { | ||
char * | const char *mouseEnterText; | ||
char * | const char *mouseExitText; | ||
char * | const char *mouseEnter; | ||
char * | const char *mouseExit; | ||
GenericEventHandler *onKey; | GenericEventHandler *onKey; | ||
focusDefData_t typeData; | |||
}; | |||
struct imageDef_s | |||
{ | |||
ExpressionStatement materialExp; | |||
}; | }; | ||
union | struct ownerDrawDef_s | ||
{ | |||
ExpressionStatement dataExp; | |||
}; | |||
union itemDefData_t | |||
{ | { | ||
textDef_s *textData; // 1,3,4,5,7,8,9,10,11,12,13,14,15,16,18,20,22 | |||
imageDef_s *imageDef; // 2 | |||
focusItemDef_s *blankButtonDef; // 19, 21 | |||
ownerDrawDef_s *ownerDrawDef; // 6 | |||
void *data; | void *data; | ||
}; | }; | ||
struct ItemKeyHandler // size = 0xC | struct ItemKeyHandler // size = 0xC | ||
{ | { | ||
| Line 219: | Line 260: | ||
ItemKeyHandler *next; | ItemKeyHandler *next; | ||
}; | }; | ||
struct animParamsDef_t // size = 0x6C | struct animParamsDef_t // size = 0x6C | ||
{ | { | ||
const char * | const char *name; | ||
rectDef_s rectClient; | |||
float borderSize; | |||
float foreColor[4]; | |||
float backColor[4]; | |||
float borderColor[4]; | |||
float outlineColor[4]; | |||
float textScale; | |||
float rotation; | |||
ItemKeyHandler *onEvent; | ItemKeyHandler *onEvent; | ||
}; | }; | ||
struct UIAnimInfo // 0xEC | struct UIAnimInfo // 0xEC | ||
{ | { | ||
int count; | int count; | ||
animParamsDef_t *animStates; | animParamsDef_t *animStates; | ||
animParamsDef_t currentAnimState; | |||
animParamsDef_t nextAnimState; | |||
int animating; | |||
int animStartTime; | |||
int animDuration; | |||
}; | }; | ||
/* dynamicFlags */ | /* dynamicFlags */ | ||
#define WINDOWDYNAMIC_VISIBLE 0x00000004 | #define WINDOWDYNAMIC_VISIBLE 0x00000004 | ||
#define WINDOWDYNAMIC_CHECKMASK 0x000FFFFF | #define WINDOWDYNAMIC_CHECKMASK 0x000FFFFF | ||
/* staticFlags */ | /* staticFlags */ | ||
#define WINDOWSTATIC_DECORATION 0x00100000 | #define WINDOWSTATIC_DECORATION 0x00100000 | ||
| Line 250: | Line 302: | ||
#define WINDOWSTATIC_HIDDENDURINGUI 0x40000000 | #define WINDOWSTATIC_HIDDENDURINGUI 0x40000000 | ||
#define WINDOWSTATIC_CHECKMASK 0xFFF00000 | #define WINDOWSTATIC_CHECKMASK 0xFFF00000 | ||
struct rectDef_s | struct rectDef_s | ||
{ | { | ||
| Line 260: | Line 312: | ||
int vertAlign; | int vertAlign; | ||
}; | }; | ||
struct windowDef_t // 0xB0 | struct windowDef_t // 0xB0 | ||
{ | { | ||
| Line 270: | Line 322: | ||
char border; | char border; | ||
char modal; | char modal; | ||
char | char frameSides; | ||
float | float frameTexSize; | ||
float frameSize; | |||
int ownerDraw; | int ownerDraw; | ||
int ownerDrawFlag; | int ownerDrawFlag; | ||
float borderSize; | float borderSize; | ||
int staticFlags; | int staticFlags; | ||
#ifdef PC | |||
int dynamicFlags[1]; | |||
#else | |||
int dynamicFlags[4]; | int dynamicFlags[4]; | ||
#endif | |||
int nextTime; | int nextTime; | ||
float foreColor[4]; | float foreColor[4]; | ||
| Line 285: | Line 342: | ||
Material *background; | Material *background; | ||
}; | }; | ||
struct itemDef_t // size = 0x118 | struct itemDef_t // size = 0x118 | ||
{ | { | ||
| Line 291: | Line 348: | ||
int type; | int type; | ||
int dataType; | int dataType; | ||
int | int imageTrack; | ||
const char *dvar; | const char *dvar; | ||
const char *dvarTest; | const char *dvarTest; | ||
int | const char *enableDvar; | ||
int dvarFlags; // (1=enableDvar,2=disableDvar,4=showDvar,8=hideDvar,16=focusDvar) | |||
itemDefData_t typeData; | |||
menuDef_t *parent; | menuDef_t *parent; | ||
rectData_s *rectExpData; | |||
ExpressionStatement visibleExp; | ExpressionStatement visibleExp; | ||
unsigned __int64 showBits; | |||
unsigned __int64 hideBits; | |||
ExpressionStatement foreColorExp; | ExpressionStatement foreColorExp; | ||
int ui3dWindowId; | int ui3dWindowId; | ||
| Line 308: | Line 366: | ||
}; | }; | ||
#pragma pack(push, 8) | |||
struct menuDef_t // size = 0x1A8 | struct menuDef_t // size = 0x1A8 | ||
{ | { | ||
| Line 316: | Line 375: | ||
int itemCount; | int itemCount; | ||
int fontIndex; | int fontIndex; | ||
#ifdef | |||
int cursorItem[1]; | |||
#else | |||
int cursorItem[4]; | int cursorItem[4]; | ||
#endif | |||
int fadeCycle; | int fadeCycle; | ||
int priority; | int priority; | ||
| Line 327: | Line 390: | ||
int openSlideDirection; | int openSlideDirection; | ||
int closeSlideDirection; | int closeSlideDirection; | ||
rectDef_s | rectDef_s initalRectInfo; | ||
int openFadingTime; | |||
int closeFadingTime; | int closeFadingTime; | ||
int | int fadeTimeCounter; | ||
int slideTimeCounter; | |||
GenericEventHandler *onEvent; | |||
ItemKeyHandler *onKey; | ItemKeyHandler *onKey; | ||
ExpressionStatement visibleExp; | ExpressionStatement visibleExp; | ||
// 4 byte padding | |||
unsigned __int64 showBits; | |||
unsigned __int64 hideBits; | |||
const char *allowedBinding; | const char *allowedBinding; | ||
const char *soundLoop; | const char *soundLoop; | ||
int | int imageTrack; | ||
int control; | int control; | ||
float focusColor[4]; | float focusColor[4]; | ||
| Line 345: | Line 410: | ||
ExpressionStatement rectXExp; | ExpressionStatement rectXExp; | ||
itemDef_t **items; | itemDef_t **items; | ||
// 4 byte padding | |||
}; | }; | ||
#pragma pack(pop) | |||
</source> | </source> | ||
Latest revision as of 13:57, 25 December 2014
enum expDataType
{
VAL_INT = 0x0,
VAL_FLOAT = 0x1,
VAL_STRING = 0x2,
};
union operandInternalDataUnion
{
int intVal;
float floatVal;
const char *string;
};
struct Operand
{
expDataType dataType;
operandInternalDataUnion internals;
};
union expressionRpnDataUnion
{
Operand operand;
void *cmd;
int cmdIdx;
};
struct expressionRpn
{
int type;
expressionRpnDataUnion data;
};
struct ExpressionStatement // size = 0x10
{
char *filename;
int line;
int numRpn;
expressionRpn *rpn; // count = unk1Count;
};
struct rectData_t // size = 0x40
{
ExpressionStatement rectXExp;
ExpressionStatement rectYExp;
ExpressionStatement rectWExp;
ExpressionStatement rectHExp;
};
struct gameMsgDef_s // 8
{
int gameMsgWindowIndex;
int gameMsgWindowMode;
};
struct focusItemDef_t;
union textData_t
{
focusItemDef_t *focusItemDef; // 3,4,5,7,8,9,10,11,12,13,14,16,20,21,22,30
gameMsgDef_t *gameMsgDef; // 15
void *data;
};
struct textExp_s
{
ExpressionStatement textExp;
};
struct textDef_s // 0xD4
{
rectDef_s textRect[4];
int alignment;
int fontEnum;
int itemFlags;
int textAlignMode;
float textalignx;
float textaligny;
float textscale;
int textpadding;
int textstyle;
float fontColor[4];
float glowColor[4];
float shadowColor[4];
float fontBlur;
float glowRadius;
float shadowSize;
float shadowOffset;
int unknown;
const char *text;
textExp_s *textExpData;
textDefData_t textData;
};
struct MenuCell // 0xC
{
int type;
int maxChars;
char *stringValue; // size = maxChars
};
struct MenuRow // 0x18
{
MenuCell *cells; // count = listBoxDef_s.count1
char *eventName;
char *onFocusEventName;
bool disableArg;
int status;
int name;
};
struct columnInfo_s
{
int elementStyle;
int maxChars;
rectDef_s rect;
};
struct listBoxDef_t // 0x2BC
{
int mousePos;
#ifdef PC
int cursorPos;
int startPos;
int endPos;
#else
int cursorPos[4];
int startPos[4];
int endPos[4];
#endif
int drawPadding;
float elementwidth;
float elementheight;
int numColumns;
float special;
columnInfo_s columnInfo[16];
int notselectable;
int noScrollBars;
int usePaging;
float selectBorder[4];
float disableColor[4];
float focusColor[4];
float elementHighlightColor[4];
float elementBackgroundColor[4];
Material *selectIcon;
Material *backgroundItemListBox;
Material *highlightTexture;
int noBlinkingHighlight;
MenuRow *rows; // count = numRows
int maxRows;
int rowCount;
};
struct multiDef_s // 0x18C
{
const char *dvarList[32];
const char *dvarStr[32];
float dvarValue[32];
int count;
int actionOnEnterPressOnly;
int strDef;
};
struct editFieldDef_s // 0x30
{
#ifdef PC
int cursorPos[1];
#else
int cursorPos[4];
#endif
float minVal;
float maxVal;
float defVal;
float range;
int maxChars;
int maxCharsGotoNext;
int maxPaintChars;
int paintOffset;
};
struct enumDvarDef_s
{
char *enumDvarName;
};
union focusDefData_t
{
listBoxDef_s *listBox; // 4
multiDef_s *multiDef; // 10
editFieldDef_s *editField; // 5,7,8,9,12,13,14,16,22,30
enumDvarDef_s *enumDvarDef; // 11
void *data;
};
struct ScriptCondition // 0x10
{
bool fireOnTrue;
int constructId;
int blockId;
ScriptCondition *next;
};
struct GenericEventScript // 0x2C
{
ScriptCondition *prerequisites;
ExpressionStatement condition;
int type;
bool fireOnTrue;
const char *action;
int blockId;
int constructId;
GenericEventScript *next;
};
struct GenericEventHandler // 0xC
{
const char *name;
GenericEventScript *eventScript;
GenericEventHandler *next;
};
struct focusItemDef_t // 0x18
{
const char *mouseEnterText;
const char *mouseExitText;
const char *mouseEnter;
const char *mouseExit;
GenericEventHandler *onKey;
focusDefData_t typeData;
};
struct imageDef_s
{
ExpressionStatement materialExp;
};
struct ownerDrawDef_s
{
ExpressionStatement dataExp;
};
union itemDefData_t
{
textDef_s *textData; // 1,3,4,5,7,8,9,10,11,12,13,14,15,16,18,20,22
imageDef_s *imageDef; // 2
focusItemDef_s *blankButtonDef; // 19, 21
ownerDrawDef_s *ownerDrawDef; // 6
void *data;
};
struct ItemKeyHandler // size = 0xC
{
const char *keyName;
GenericEventScript *keyScript;
ItemKeyHandler *next;
};
struct animParamsDef_t // size = 0x6C
{
const char *name;
rectDef_s rectClient;
float borderSize;
float foreColor[4];
float backColor[4];
float borderColor[4];
float outlineColor[4];
float textScale;
float rotation;
ItemKeyHandler *onEvent;
};
struct UIAnimInfo // 0xEC
{
int count;
animParamsDef_t *animStates;
animParamsDef_t currentAnimState;
animParamsDef_t nextAnimState;
int animating;
int animStartTime;
int animDuration;
};
/* dynamicFlags */
#define WINDOWDYNAMIC_VISIBLE 0x00000004
#define WINDOWDYNAMIC_CHECKMASK 0x000FFFFF
/* staticFlags */
#define WINDOWSTATIC_DECORATION 0x00100000
#define WINDOWSTATIC_HORIZONTALSCROLL 0x00200000
#define WINDOWSTATIC_AUTOWRAPPED 0x00800000
#define WINDOWSTATIC_POPUP 0x01000000
#define WINDOWSTATIC_OUTOFBOUNDSCLICK 0x02000000
#define WINDOWSTATIC_LEGACYSPLITSCREENSCALE 0x04000000
#define WINDOWSTATIC_ALLOWSIGNIN 0x08000000
#define WINDOWSTATIC_HIDDENDURINGFLASHBANG 0x10000000
#define WINDOWSTATIC_HIDDENDURINGSCOPE 0x20000000
#define WINDOWSTATIC_HIDDENDURINGUI 0x40000000
#define WINDOWSTATIC_CHECKMASK 0xFFF00000
struct rectDef_s
{
float x;
float y;
float w;
float h;
int horzAlign;
int vertAlign;
};
struct windowDef_t // 0xB0
{
const char *name;
rectDef_s rect;
rectDef_s rectClient;
const char *group;
char style;
char border;
char modal;
char frameSides;
float frameTexSize;
float frameSize;
int ownerDraw;
int ownerDrawFlag;
float borderSize;
int staticFlags;
#ifdef PC
int dynamicFlags[1];
#else
int dynamicFlags[4];
#endif
int nextTime;
float foreColor[4];
float backColor[4];
float borderColor[4];
float outlineColor[4];
float rotation;
Material *background;
};
struct itemDef_t // size = 0x118
{
windowDef_t window;
int type;
int dataType;
int imageTrack;
const char *dvar;
const char *dvarTest;
const char *enableDvar;
int dvarFlags; // (1=enableDvar,2=disableDvar,4=showDvar,8=hideDvar,16=focusDvar)
itemDefData_t typeData;
menuDef_t *parent;
rectData_s *rectExpData;
ExpressionStatement visibleExp;
unsigned __int64 showBits;
unsigned __int64 hideBits;
ExpressionStatement foreColorExp;
int ui3dWindowId;
ItemKeyHandler *onEvent;
UIAnimInfo *animInfo;
int unknown2;
};
#pragma pack(push, 8)
struct menuDef_t // size = 0x1A8
{
windowDef_t window;
const char *font;
int fullscreen;
int ui3dWindowId;
int itemCount;
int fontIndex;
#ifdef
int cursorItem[1];
#else
int cursorItem[4];
#endif
int fadeCycle;
int priority;
float fadeClamp;
float fadeAmount;
float fadeInAmount;
float blurRadius;
int openSlideSpeed;
int closeSlideSpeed;
int openSlideDirection;
int closeSlideDirection;
rectDef_s initalRectInfo;
int openFadingTime;
int closeFadingTime;
int fadeTimeCounter;
int slideTimeCounter;
GenericEventHandler *onEvent;
ItemKeyHandler *onKey;
ExpressionStatement visibleExp;
// 4 byte padding
unsigned __int64 showBits;
unsigned __int64 hideBits;
const char *allowedBinding;
const char *soundLoop;
int imageTrack;
int control;
float focusColor[4];
float disableColor[4];
ExpressionStatement rectYExp;
ExpressionStatement rectXExp;
itemDef_t **items;
// 4 byte padding
};
#pragma pack(pop)