2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-06 16:52:35 +00:00

Initial commit of BSP compilation

This commit is contained in:
LJW-Dev
2025-07-07 23:04:08 +08:00
committed by Jan Laupetin
parent fb3a59b7b5
commit 264139fb4e
13 changed files with 3404 additions and 2 deletions
+48
View File
@@ -77,6 +77,8 @@ namespace T6
ASSET_TYPE_FOOTSTEPFX_TABLE,
ASSET_TYPE_ZBARRIER,
ASSET_TYPE_CUSTOM_MAP,
ASSET_TYPE_COUNT
};
@@ -238,6 +240,50 @@ namespace T6
AUFT_NUM_FIELD_TYPES,
};
struct customMapVertex
{
vec3_t pos;
float binormalSign;
float color[4];
float texCoord[2];
vec3_t normal;
vec3_t tangent;
unsigned int packedLmapCoord;
};
struct worldSurface
{
char flags;
char lightmapIndex;
std::string materialName;
char primaryLightIndex;
char reflectionProbeIndex;
int triCount;
int firstVertexIndex;
int firstIndex_Index;
};
struct customMapGfx
{
int vertexCount;
customMapVertex* vertices;
int indexCount;
uint16_t* indices;
int surfaceCount;
worldSurface* surfaces;
};
struct customMapInfo
{
std::string name;
std::string bspName;
customMapGfx gfxInfo;
};
using AssetPhysPreset = Asset<ASSET_TYPE_PHYSPRESET, PhysPreset>;
using AssetPhysConstraints = Asset<ASSET_TYPE_PHYSCONSTRAINTS, PhysConstraints>;
using AssetDestructibleDef = Asset<ASSET_TYPE_DESTRUCTIBLEDEF, DestructibleDef>;
@@ -292,6 +338,8 @@ namespace T6
using SubAssetVertexDecl = SubAsset<SUB_ASSET_TYPE_VERTEX_DECL, MaterialVertexDeclaration>;
using SubAssetVertexShader = SubAsset<SUB_ASSET_TYPE_VERTEX_SHADER, MaterialVertexShader>;
using SubAssetPixelShader = SubAsset<SUB_ASSET_TYPE_PIXEL_SHADER, MaterialPixelShader>;
using AssetCustomMap = Asset<ASSET_TYPE_CUSTOM_MAP, customMapInfo>;
} // namespace T6
DEFINE_ASSET_NAME_ACCESSOR(T6::AssetPhysPreset, name);
+18 -2
View File
@@ -1201,13 +1201,13 @@ namespace T6
struct GfxWorldVertexData0
{
byte128* data;
byte128* data; // GfxPackedWorldVertex
void /*ID3D11Buffer*/* vb;
};
struct GfxWorldVertexData1
{
byte128* data;
byte128* data; // GfxPackedWorldVertex
void /*ID3D11Buffer*/* vb;
};
@@ -5726,6 +5726,11 @@ namespace T6
unsigned int packed;
};
union PackedLmapCoords
{
unsigned int packed;
};
struct type_align(16) GfxPackedVertex
{
vec3_t xyz;
@@ -5736,6 +5741,17 @@ namespace T6
PackedUnitVec tangent;
};
struct GfxPackedWorldVertex
{
vec3_t xyz;
float binormalSign;
GfxColor color;
PackedTexCoords texCoord;
PackedUnitVec normal;
PackedUnitVec tangent;
PackedLmapCoords lmapCoord;
};
struct XRigidVertList
{
uint16_t boneOffset;