Bugfixes
This commit is contained in:
parent
5fca3fb20f
commit
64593aa079
@ -16,6 +16,7 @@ endlocal
|
||||
exit /B 1
|
||||
|
||||
:build
|
||||
call generate.bat
|
||||
set PLATFORM=Win32
|
||||
set CONFIGURATION=ReleaseStatic
|
||||
msbuild /nologo /m /v:m %* build\iw4x.sln
|
||||
|
@ -93,7 +93,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::GfxImage* asset = header.image;
|
||||
Game::GfxImage* dest = buffer->Dest<Game::GfxImage>();
|
||||
buffer->Save(asset, sizeof(Game::GfxImage));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::LocalizedEntry* asset = header.localize;
|
||||
Game::LocalizedEntry* dest = buffer->Dest<Game::LocalizedEntry>();
|
||||
buffer->Save(asset, sizeof(Game::LocalizedEntry));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::MapEnts* asset = header.mapEnts;
|
||||
Game::MapEnts* dest = buffer->Dest<Game::MapEnts>();
|
||||
buffer->Save(asset, sizeof(Game::MapEnts));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -200,7 +200,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::Material* asset = header.material;
|
||||
Game::Material* dest = buffer->Dest<Game::Material>();
|
||||
buffer->Save(asset, sizeof(Game::Material));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::MaterialPixelShader* asset = header.pixelShader;
|
||||
Game::MaterialPixelShader* dest = buffer->Dest<Game::MaterialPixelShader>();
|
||||
buffer->Save(asset, sizeof(Game::MaterialPixelShader));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::MaterialTechniqueSet* asset = header.materialTechset;
|
||||
Game::MaterialTechniqueSet* dest = buffer->Dest<Game::MaterialTechniqueSet>();
|
||||
buffer->Save(asset, sizeof(Game::MaterialTechniqueSet));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::MaterialVertexDeclaration* asset = header.vertexDecl;
|
||||
Game::MaterialVertexDeclaration* dest = buffer->Dest<Game::MaterialVertexDeclaration>();
|
||||
buffer->Save(asset, sizeof(Game::MaterialVertexDeclaration));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::MaterialVertexShader* asset = header.vertexShader;
|
||||
Game::MaterialVertexShader* dest = buffer->Dest<Game::MaterialVertexShader>();
|
||||
buffer->Save(asset, sizeof(Game::MaterialVertexShader));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
|
||||
Game::BrushWrapper* destBrush = buffer->Dest<Game::BrushWrapper>();
|
||||
buffer->Save(brush, sizeof(Game::BrushWrapper));
|
||||
buffer->Save(brush);
|
||||
|
||||
// Save_cbrushWrapper_t
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::PhysPreset* asset = header.physPreset;
|
||||
Game::PhysPreset* dest = buffer->Dest<Game::PhysPreset>();
|
||||
buffer->Save(asset, sizeof(Game::PhysPreset));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::RawFile* asset = header.rawfile;
|
||||
Game::RawFile* dest = buffer->Dest<Game::RawFile>();
|
||||
buffer->Save(asset, sizeof(Game::RawFile));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -83,7 +83,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::StructuredDataDefSet* asset = header.structuredData;
|
||||
Game::StructuredDataDefSet* dest = buffer->Dest<Game::StructuredDataDefSet>();
|
||||
buffer->Save(asset, sizeof(Game::StructuredDataDefSet));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -117,7 +117,7 @@ namespace Assets
|
||||
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::XAnimDeltaPart* destDelta = buffer->Dest<Game::XAnimDeltaPart>();
|
||||
buffer->Save(delta, sizeof(Game::XAnimDeltaPart));
|
||||
buffer->Save(delta);
|
||||
|
||||
if (delta->trans)
|
||||
{
|
||||
@ -284,7 +284,7 @@ namespace Assets
|
||||
if (asset->dataByte)
|
||||
{
|
||||
buffer->SaveArray(asset->dataByte, asset->dataByteCount);
|
||||
Utils::Stream::ClearPointer(&dest->delta);
|
||||
Utils::Stream::ClearPointer(&dest->dataByte);
|
||||
}
|
||||
|
||||
if (asset->dataShort)
|
||||
|
@ -198,7 +198,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::XModel* asset = header.model;
|
||||
Game::XModel* dest = buffer->Dest<Game::XModel>();
|
||||
buffer->Save(asset, sizeof(Game::XModel));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
|
||||
Game::XSurfaceCollisionTree* destEntry = buffer->Dest<Game::XSurfaceCollisionTree>();
|
||||
buffer->Save(entry, sizeof(Game::XSurfaceCollisionTree));
|
||||
buffer->Save(entry);
|
||||
|
||||
if (entry->node)
|
||||
{
|
||||
@ -95,7 +95,7 @@ namespace Assets
|
||||
Utils::Stream* buffer = builder->GetBuffer();
|
||||
Game::XModelSurfs* asset = header.surfaces;
|
||||
Game::XModelSurfs* dest = buffer->Dest<Game::XModelSurfs>();
|
||||
buffer->Save(asset, sizeof(Game::XModelSurfs));
|
||||
buffer->Save(asset);
|
||||
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_VIRTUAL);
|
||||
|
||||
|
@ -278,7 +278,7 @@ namespace Components
|
||||
// AssetTable
|
||||
for (auto asset : ZoneBuilder::Zone::LoadedAssets)
|
||||
{
|
||||
Game::XAsset entry = { entry.type, 0 };
|
||||
Game::XAsset entry = { asset.type, 0 };
|
||||
Utils::Stream::ClearPointer(&entry.header.data);
|
||||
|
||||
ZoneBuilder::Zone::Buffer.Save(&entry);
|
||||
@ -309,7 +309,7 @@ namespace Components
|
||||
// Write stream sizes
|
||||
for (int i = 0; i < Game::MAX_XFILE_COUNT; ++i)
|
||||
{
|
||||
header->blockSize[i] = ZoneBuilder::Zone::Buffer.GetBlockSize((Game::XFILE_BLOCK_TYPES)i);
|
||||
header->blockSize[i] = ZoneBuilder::Zone::Buffer.GetBlockSize(static_cast<Game::XFILE_BLOCK_TYPES>(i));
|
||||
}
|
||||
|
||||
ZoneBuilder::Zone::Buffer.LeaveCriticalSection();
|
||||
|
Loading…
Reference in New Issue
Block a user