mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 01:42:29 +00:00
feat(profile): CMapObj CMapObjGroup structs
This commit is contained in:
parent
d32b775248
commit
82bcea21c8
3 changed files with 404 additions and 0 deletions
|
|
@ -78,6 +78,9 @@
|
|||
#include "m2/shared.h"
|
||||
#include "m2/types.h"
|
||||
|
||||
#include "map/WMOchunks.h"
|
||||
#include "map/CMapObj.h"
|
||||
|
||||
#include "net/message.h"
|
||||
|
||||
#include "nvapi/nvapi.h"
|
||||
|
|
|
|||
180
profile/3.3.5a-windows-386/include/map/CMapObj.h
Normal file
180
profile/3.3.5a-windows-386/include/map/CMapObj.h
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
#ifndef CMAPOBJ_H
|
||||
#define CMAPOBJ_H
|
||||
|
||||
#include "tempest/box.h"
|
||||
#include "async/object.h"
|
||||
#include "WMOchunks.h"
|
||||
#include "tempest/vector.h"
|
||||
|
||||
DECLARE_STRUCT(CMapObj);
|
||||
DECLARE_STRUCT(CMapObjGroup);
|
||||
|
||||
struct CMapObjGroup;
|
||||
|
||||
struct CMapObj
|
||||
{
|
||||
int objectIndex;
|
||||
int unk_04;
|
||||
int unk_08;
|
||||
int unk_0C;
|
||||
int unk_10;
|
||||
int unk_14;
|
||||
int unk_18;
|
||||
char m_wmoName[260];
|
||||
SMOHeader *header;
|
||||
char* textureNameList;
|
||||
char* groupNameList;
|
||||
char* skybox;
|
||||
SMOGroupInfo* groupInfo;
|
||||
C3Vector* portalVertexList;
|
||||
SMOPortal* portalList;
|
||||
SMOPortalRef* portalRefList;
|
||||
C3Vector* visBlockVertList;
|
||||
SMOVisibleBlock* visBlockList;
|
||||
SMOLight* lightList;
|
||||
SMODoodadSet* doodadSetList;
|
||||
char* doodadNameList;
|
||||
SMODoodadDef* doodadDefList;
|
||||
SMOFog* fogList;
|
||||
C4Plane* convexVolumePlanes;
|
||||
SMOMaterial* materialList;
|
||||
int texturesSize;
|
||||
int groupNameSize;
|
||||
int groupInfoCount;
|
||||
int planeVertCount;
|
||||
int portalsCount;
|
||||
int portalRefCount;
|
||||
int visBlockVertCount;
|
||||
int visBlockCount;
|
||||
int ligtsCount;
|
||||
int doodadSetCount;
|
||||
int doodadNameSize;
|
||||
int doodadDefCount;
|
||||
int fogsCount;
|
||||
int convexVolumePlaneCount;
|
||||
int materialsCount;
|
||||
uint32_t argb_color;
|
||||
int unk_1A4;
|
||||
CAaBox bbox;
|
||||
float distToCamera;
|
||||
int unk_1C4;
|
||||
int unk_1C8;
|
||||
void* pWmoData;
|
||||
int wmoFileSize;
|
||||
int refCount;
|
||||
float flushTimer;
|
||||
CAsyncObject* asyncObject;
|
||||
int isGroupLoaded;
|
||||
int unk_1E4;
|
||||
int TSExplicitList__m_linkOffset;
|
||||
void* TSExplicitList__ptr1;
|
||||
void* TSExplicitList__ptr2;
|
||||
int mapObjGroupCount;
|
||||
CMapObjGroup* mapObjGroupArray[512];
|
||||
};
|
||||
|
||||
struct CMapObjGroup
|
||||
{
|
||||
int objectIndex;
|
||||
int unk_04;
|
||||
int unk_08;
|
||||
int unk_0C;
|
||||
int unk_10;
|
||||
int unk_14;
|
||||
float timer;
|
||||
int unk_1C;
|
||||
int unk_20;
|
||||
int unk_24;
|
||||
int unk_28;
|
||||
int unk_2C;
|
||||
int flags;
|
||||
CAaBox bbox;
|
||||
float distToCamera;
|
||||
int portalStart;
|
||||
int portalCount;
|
||||
int fogs;
|
||||
uint16_t transparencyBatchesCount;
|
||||
uint16_t intBatchCount;
|
||||
int extBatchCount;
|
||||
void* CAaBspNodePtr;
|
||||
void* CAaBspNodePtr;
|
||||
uint16_t* nodeFaceIndices;
|
||||
int bspNodesCount;
|
||||
int nodeFaceIndicesCount;
|
||||
int unk_7C;
|
||||
int unk_80;
|
||||
int unk_84;
|
||||
int unk_88;
|
||||
int unk_8C;
|
||||
int unk_90;
|
||||
int unk_94;
|
||||
int unk_98;
|
||||
int unk_9C;
|
||||
int unk_A0;
|
||||
int unk_A4;
|
||||
int unk_A8;
|
||||
int unk_AC;
|
||||
int unk_B0;
|
||||
CAaBox bbox2;
|
||||
int unk_CC;
|
||||
int unkFlags;
|
||||
int unk_D4;
|
||||
int unk_D8;
|
||||
char* groupName;
|
||||
SMOPoly* polyList;
|
||||
uint16_t* indices;
|
||||
int unk_E8;
|
||||
C3Vector* vertexList;
|
||||
C3Vector* normalList;
|
||||
C2Vector* textureVertexList;
|
||||
int unk_F8;
|
||||
SMOBatch* batchList;
|
||||
int unk_100;
|
||||
int unk_104;
|
||||
uint16_t* doodadRefList;
|
||||
CImVector* colorVertexList;
|
||||
CImVector* colorVertexListExtra;
|
||||
int unk_114;
|
||||
C2iVector liquidVerts;
|
||||
C2iVector liquidTiles;
|
||||
C3Vector liquidCorner;
|
||||
int luquidMaterialId;
|
||||
SMOLiquidVert* liquidVertexList;
|
||||
SMOLTile* liquidTileList;
|
||||
float liquidHeight;
|
||||
int unk_144;
|
||||
int unk_148;
|
||||
int unkFlag;
|
||||
int unk_150;
|
||||
int polyListSize;
|
||||
int indicesCount;
|
||||
int unk_15C;
|
||||
int vertexListCount;
|
||||
int normalListCount;
|
||||
int textureVertexListCount;
|
||||
int unk_16C;
|
||||
int batchListCount;
|
||||
int unk_174;
|
||||
int doodadRefListCount;
|
||||
int colorVertexListSize;
|
||||
int colorVertexListExtraSize;
|
||||
|
||||
int wmoGroupId;
|
||||
void* filePtr;
|
||||
int fileSize;
|
||||
CMapObj* parent;
|
||||
int unk_194;
|
||||
CAsyncObject* asyncObjPtr;
|
||||
int unkLoadedFlag;
|
||||
int unkIndexMin1;
|
||||
int unkIndexMax1;
|
||||
uint16_t unkIndexMin2;
|
||||
uint16_t unkIndexMax2;
|
||||
int TSExplicitList__m_linkoffset;
|
||||
void* TSExplicitList__ptr;
|
||||
void* TSExplicitList__ptr2;
|
||||
CMapObjGroup* perv;
|
||||
CMapObjGroup* next;
|
||||
};
|
||||
|
||||
#endif
|
||||
221
profile/3.3.5a-windows-386/include/map/WMOchunks.h
Normal file
221
profile/3.3.5a-windows-386/include/map/WMOchunks.h
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
#ifndef WMOCHUNKS_H
|
||||
#define WMOCHUNKS_H
|
||||
|
||||
#include "tempest/box.h"
|
||||
#include "tempest/plane.h"
|
||||
#include "tempest/quaternion.h"
|
||||
|
||||
DECLARE_STRUCT(SMOHeader);
|
||||
DECLARE_STRUCT(SMOGroupInfo);
|
||||
DECLARE_STRUCT(SMOPortal);
|
||||
DECLARE_STRUCT(SMOPortalRef);
|
||||
DECLARE_STRUCT(SMOVisibleBlock);
|
||||
DECLARE_STRUCT(SMOLight);
|
||||
DECLARE_STRUCT(SMODoodadSet);
|
||||
DECLARE_STRUCT(SMODoodadDef);
|
||||
DECLARE_STRUCT(SMOFog);
|
||||
DECLARE_STRUCT(SMOMaterial);
|
||||
DECLARE_STRUCT(SMOPoly);
|
||||
DECLARE_STRUCT(SMOBatch);
|
||||
DECLARE_STRUCT(SMOLiquidVert);
|
||||
DECLARE_STRUCT(SMOLTile);
|
||||
|
||||
struct SMOHeader
|
||||
{
|
||||
uint32_t nTextures;
|
||||
uint32_t nGroups;
|
||||
uint32_t nPortals;
|
||||
uint32_t nLights;
|
||||
uint32_t nDoodadNames;
|
||||
uint32_t nDoodadDefs;
|
||||
uint32_t nDoodadSets;
|
||||
uint32_t ambColor;
|
||||
uint32_t wmoID;
|
||||
CAaBox bounding_box;
|
||||
uint16_t flag_do_not_attenuate_vertices_based_on_distance_to_portal : 1;
|
||||
uint16_t flag_use_unified_render_path : 1;
|
||||
uint16_t flag_use_liquid_type_dbc_id : 1;
|
||||
uint16_t flag_do_not_fix_vertex_color_alpha: 1;
|
||||
uint16_t flag_lod : 1;
|
||||
uint16_t flag_default_max_lod : 1;
|
||||
uint16_t : 10;
|
||||
uint16_t numLod;
|
||||
};
|
||||
|
||||
struct SMOGroupInfo
|
||||
{
|
||||
uint32_t flags;
|
||||
CAaBox bbox;
|
||||
uint32_t nameOffset;
|
||||
};
|
||||
|
||||
struct SMOPortal
|
||||
{
|
||||
uint16_t startVertex;
|
||||
uint16_t count;
|
||||
C4Plane plane;
|
||||
};
|
||||
|
||||
struct SMOPortalRef
|
||||
{
|
||||
uint16_t portalIndex;
|
||||
uint16_t groupIndex;
|
||||
int16_t side;
|
||||
uint16_t filler;
|
||||
};
|
||||
|
||||
struct SMOVisibleBlock
|
||||
{
|
||||
uint16_t firstVertex;
|
||||
uint16_t count;
|
||||
};
|
||||
|
||||
struct SMOLight
|
||||
{
|
||||
uint8_t type;
|
||||
uint8_t atten;
|
||||
uint8_t pad[2];
|
||||
|
||||
CImVector color;
|
||||
C3Vector position;
|
||||
float intensity;
|
||||
|
||||
C4Quaternion rotation;
|
||||
|
||||
float attenStart;
|
||||
float attenEnd;
|
||||
};
|
||||
|
||||
struct SMODoodadSet
|
||||
{
|
||||
char name[0x14];
|
||||
uint32_t startIdx;
|
||||
uint32_t count;
|
||||
uint32_t pad;
|
||||
};
|
||||
|
||||
struct SMODoodadDef
|
||||
{
|
||||
uint32_t nameIndex : 24;
|
||||
uint32_t flag_AcceptProjTex : 1;
|
||||
uint32_t flag_0x2 : 1;
|
||||
uint32_t flag_0x4 : 1;
|
||||
uint32_t flag_0x8 : 1;
|
||||
uint32_t unk : 4;
|
||||
C3Vector position;
|
||||
C4Quaternion orientation;
|
||||
float scale;
|
||||
CImVector color;
|
||||
};
|
||||
|
||||
struct SMOFog
|
||||
{
|
||||
uint32_t flag_infinite_radius : 1;
|
||||
uint32_t : 3;
|
||||
uint32_t flag_0x10 : 1;
|
||||
uint32_t : 27;
|
||||
|
||||
C3Vector position;
|
||||
float smallerRadius;
|
||||
float largerRadius;
|
||||
|
||||
float fogEnd;
|
||||
float fogStartScalar;
|
||||
CImVector fogColor;
|
||||
|
||||
//under water
|
||||
float uwFogEnd;
|
||||
float uwFogStartScalar;
|
||||
CImVector uwFogColor;
|
||||
};
|
||||
|
||||
struct SMOMaterial
|
||||
{
|
||||
uint32_t F_UNLIT : 1;
|
||||
uint32_t F_UNFOGGED : 1;
|
||||
uint32_t F_UNCULLED : 1;
|
||||
uint32_t F_EXTLIGHT : 1;
|
||||
uint32_t F_SIDN : 1;
|
||||
uint32_t F_WINDOW : 1;
|
||||
uint32_t F_CLAMP_S : 1;
|
||||
uint32_t F_CLAMP_T : 1;
|
||||
uint32_t flag_0x100 : 1;
|
||||
uint32_t : 23;
|
||||
|
||||
uint32_t shader;
|
||||
|
||||
uint32_t blendMode;
|
||||
uint32_t texture1;
|
||||
|
||||
CImVector sidnColor;
|
||||
CImVector frameSidnColor;
|
||||
|
||||
uint32_t texture2;
|
||||
CImVector diffColor;
|
||||
|
||||
uint32_t groundType;
|
||||
|
||||
uint32_t texture3;
|
||||
uint32_t color2;
|
||||
uint32_t flags2;
|
||||
uint32_t runTimeData[4];
|
||||
};
|
||||
|
||||
struct SMOPoly
|
||||
{
|
||||
uint8_t F_UNK_0x01: 1;
|
||||
uint8_t F_NOCAMCOLLIDE : 1;
|
||||
uint8_t F_DETAIL : 1;
|
||||
uint8_t F_COLLISION : 1;
|
||||
uint8_t F_HINT : 1;
|
||||
uint8_t F_RENDER : 1;
|
||||
uint8_t F_CULL_OBJECTS : 1;
|
||||
uint8_t F_COLLIDE_HIT : 1;
|
||||
|
||||
uint8_t materialId;
|
||||
};
|
||||
|
||||
struct SMOBatch
|
||||
{
|
||||
int8_t unused[12];
|
||||
uint32_t indexStart;
|
||||
uint16_t indexCount;
|
||||
uint16_t vertexStart;
|
||||
uint16_t vertexEnd;
|
||||
uint8_t flags;
|
||||
uint8_t texture;
|
||||
};
|
||||
|
||||
struct SMOLiquidVert
|
||||
{
|
||||
union
|
||||
{
|
||||
struct SMOWVert
|
||||
{
|
||||
uint8_t flow1;
|
||||
uint8_t flow2;
|
||||
uint8_t flow1Pct;
|
||||
uint8_t filler;
|
||||
float height;
|
||||
} waterVert;
|
||||
|
||||
struct SMOMVert
|
||||
{
|
||||
int16_t s;
|
||||
int16_t t;
|
||||
float height;
|
||||
} magmaVert;
|
||||
};
|
||||
};
|
||||
|
||||
struct SMOLTile
|
||||
{
|
||||
uint8_t legacyLiquidType : 4;
|
||||
uint8_t unknown1 : 1;
|
||||
uint8_t unknown2 : 1;
|
||||
uint8_t fishable : 1;
|
||||
uint8_t shared : 1;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue