Fully
This commit is contained in:
parent
f637670e52
commit
18f4bb0a44
@ -62,14 +62,13 @@ namespace Assets
|
||||
{
|
||||
if (builder->HasPointer(technique))
|
||||
{
|
||||
OutputDebugStringA(asset->name);
|
||||
dest->techniques[i] = builder->GetPointer(technique);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Size-check is obsolete, as the structure is dynamic
|
||||
buffer->Align(Utils::Stream::ALIGN_4);
|
||||
//builder->StorePointer(technique);
|
||||
builder->StorePointer(technique);
|
||||
|
||||
Game::MaterialTechnique* destTechnique = buffer->Dest<Game::MaterialTechnique>();
|
||||
buffer->Save(technique, 8);
|
||||
|
@ -145,11 +145,16 @@ namespace Assets
|
||||
{
|
||||
if (asset->lods[i].surfaces)
|
||||
{
|
||||
// Requiring this asset is not possible, as it has to be loaded as part of the model
|
||||
buffer->PushBlock(Game::XFILE_BLOCK_TEMP);
|
||||
buffer->Align(Utils::Stream::ALIGN_4);
|
||||
|
||||
// Requiring this asset is not possible, it has to be loaded as part of the model
|
||||
//dest->lods[i].surfaces = builder->RequireAsset(Game::XAssetType::ASSET_TYPE_XMODELSURFS, asset->lods[i].surfaces->name).surfaces;
|
||||
|
||||
IXModelSurfs().Save({ asset->lods[i].surfaces }, builder);
|
||||
dest->lods[i].surfaces = reinterpret_cast<Game::XModelSurfs*>(-1);
|
||||
|
||||
buffer->PopBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ namespace Assets
|
||||
if (surf->blendInfo)
|
||||
{
|
||||
buffer->Align(Utils::Stream::ALIGN_2);
|
||||
|
||||
buffer->Save(surf->blendInfo, sizeof(short), surf->blendNum1 + (surf->blendNum2 * 3) + (surf->blendNum3 * 5) + (surf->blendNum4 * 7));
|
||||
destSurf->blendInfo = reinterpret_cast<char*>(-1);
|
||||
}
|
||||
|
@ -1318,9 +1318,11 @@ namespace Game
|
||||
|
||||
struct XModelLodInfo
|
||||
{
|
||||
char pad[8];
|
||||
XModelSurfs* surfaces;
|
||||
char pad2[32];
|
||||
char pad[4]; // +0
|
||||
short numSurfs; // +4
|
||||
short pad2;// +6
|
||||
XModelSurfs* surfaces; // +8
|
||||
char pad3[32]; // +12
|
||||
};
|
||||
|
||||
struct cplane_t
|
||||
|
@ -41,7 +41,7 @@ namespace Utils
|
||||
{
|
||||
//if (stream == XFILE_BLOCK_TEMP || stream == XFILE_BLOCK_VIRTUAL || stream == XFILE_BLOCK_PHYSICAL) // Only those seem to actually write data.
|
||||
// As I'm not sure though, I'll still write the data
|
||||
// Use IncreaseStreamSize to fill virtual streams
|
||||
// Use IncreaseBlockSize to fill virtual streams
|
||||
auto data = Stream::Data();
|
||||
|
||||
if (Stream::IsCriticalSection() && Stream::Length() + (size * count) > Stream::Capacity())
|
||||
@ -58,7 +58,7 @@ namespace Utils
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
Stream::IncreaseBlockSize(stream, size * count); // stay up to date on those streams
|
||||
Stream::IncreaseBlockSize(stream, size * count);
|
||||
|
||||
return Stream::At() - (size * count);
|
||||
}
|
||||
@ -177,7 +177,7 @@ namespace Utils
|
||||
{
|
||||
if (!Stream::StreamStack.empty())
|
||||
{
|
||||
return Stream::StreamStack[Stream::StreamStack.size() - 1];
|
||||
return Stream::StreamStack.back();
|
||||
}
|
||||
|
||||
return Game::XFILE_BLOCK_INVALID;
|
||||
|
Loading…
Reference in New Issue
Block a user