mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 18:59:12 +00:00
Implemented TFlags for easy, type-safe bitflags
This commit is contained in:
@@ -141,7 +141,7 @@ void CMaterialCooker::WriteMaterialPrime(IOutputStream& Out)
|
||||
else
|
||||
Flags = 0x4002;
|
||||
|
||||
Flags |= (HasKonst << 3) | mpMat->Options() | (TexFlags << 16);
|
||||
Flags |= (HasKonst ? 0x8 : 0x0) | mpMat->Options() | (TexFlags << 16);
|
||||
|
||||
Out.WriteLong(Flags);
|
||||
|
||||
@@ -151,10 +151,10 @@ void CMaterialCooker::WriteMaterialPrime(IOutputStream& Out)
|
||||
Out.WriteLong(TexIndices[iTex]);
|
||||
|
||||
// Vertex description
|
||||
EVertexDescription Desc = mpMat->VtxDesc();
|
||||
FVertexDescription Desc = mpMat->VtxDesc();
|
||||
|
||||
if (mVersion < eEchoes)
|
||||
Desc = (EVertexDescription) (Desc & 0x00FFFFFF);
|
||||
Desc &= 0x00FFFFFF;
|
||||
|
||||
Out.WriteLong(Desc);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void CModelCooker::WriteModelPrime(IOutputStream& Out)
|
||||
Out.WriteToBoundary(32, 0);
|
||||
|
||||
u32 PrimTableStart = Out.Tell();
|
||||
EVertexDescription MatAttribs = mpModel->GetMaterialBySurface(0, iSurf)->VtxDesc();
|
||||
FVertexDescription MatAttribs = mpModel->GetMaterialBySurface(0, iSurf)->VtxDesc();
|
||||
|
||||
for (u32 iPrim = 0; iPrim < pSurface->Primitives.size(); iPrim++)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class CModelCooker
|
||||
u32 mNumVertices;
|
||||
u8 mVertexFormat;
|
||||
std::vector<CVertex> mVertices;
|
||||
EVertexDescription mVtxAttribs;
|
||||
FVertexDescription mVtxAttribs;
|
||||
|
||||
CModelCooker();
|
||||
void GenerateSurfaceData();
|
||||
|
||||
Reference in New Issue
Block a user