[Zone🅱️uilder]: Delete 'uncompressed' file (#620)

This commit is contained in:
Edo 2022-12-02 19:18:04 +00:00 committed by GitHub
parent 865aa8d9ec
commit 5eec7687be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 6 deletions

View File

@ -151,11 +151,11 @@ namespace Assets
void IGameWorldSp::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) void IGameWorldSp::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
{ {
AssertSize(Game::GameWorldMp, 8); AssertSize(Game::GameWorldSp, 0x38);
Utils::Stream* buffer = builder->getBuffer(); Utils::Stream* buffer = builder->getBuffer();
Game::GameWorldSp* asset = header.gameWorldSp; auto* asset = header.gameWorldSp;
Game::GameWorldSp* dest = buffer->dest<Game::GameWorldSp>(); auto* dest = buffer->dest<Game::GameWorldSp>();
buffer->save(asset); buffer->save(asset);
buffer->pushBlock(Game::XFILE_BLOCK_VIRTUAL); buffer->pushBlock(Game::XFILE_BLOCK_VIRTUAL);

View File

@ -487,7 +487,7 @@ namespace Assets
void ImenuDef_t::save_itemDef_s(Game::itemDef_s *asset, Components::ZoneBuilder::Zone* builder) void ImenuDef_t::save_itemDef_s(Game::itemDef_s *asset, Components::ZoneBuilder::Zone* builder)
{ {
AssertSize(Game::itemDef_s, 380); AssertSize(Game::itemDef_s, 0x17C);
Utils::Stream* buffer = builder->getBuffer(); Utils::Stream* buffer = builder->getBuffer();
auto* dest = buffer->dest<Game::itemDef_s>(); auto* dest = buffer->dest<Game::itemDef_s>();
@ -608,6 +608,7 @@ namespace Assets
void ImenuDef_t::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) void ImenuDef_t::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
{ {
AssertSize(Game::menuDef_t, 400); AssertSize(Game::menuDef_t, 400);
AssertSize(Game::windowDef_t, 0xA4);
#ifdef WRITE_LOGS #ifdef WRITE_LOGS
buffer->enterStruct("ImenuDef_t"); buffer->enterStruct("ImenuDef_t");

View File

@ -205,7 +205,8 @@ namespace Components
{ {
Game::PC_ReadTokenHandle(handle, &token); Game::PC_ReadTokenHandle(handle, &token);
Utils::Merge(&menus, Menus::LoadMenu(Utils::String::VA("ui_mp\\%s.menu", token.string))); auto* filename = Utils::String::VA("ui_mp\\%s.menu", token.string);
Utils::Merge(&menus, Menus::LoadMenu(filename));
} }
if (!_stricmp(token.string, "menudef")) if (!_stricmp(token.string, "menudef"))

View File

@ -419,6 +419,10 @@ namespace Components
#endif #endif
Utils::IO::WriteFile("uncompressed", zoneBuffer); Utils::IO::WriteFile("uncompressed", zoneBuffer);
const auto _0 = gsl::finally([]
{
Utils::IO::RemoveFile("uncompressed");
});
zoneBuffer = Utils::Compression::ZLib::Compress(zoneBuffer); zoneBuffer = Utils::Compression::ZLib::Compress(zoneBuffer);
outBuffer.append(zoneBuffer); outBuffer.append(zoneBuffer);

View File

@ -3534,7 +3534,7 @@ namespace Game
Glyph* glyphs; Glyph* glyphs;
}; };
struct __declspec(align(4)) rectDef_s struct rectDef_s
{ {
float x; float x;
float y; float y;
@ -3544,6 +3544,8 @@ namespace Game
char vertAlign; char vertAlign;
}; };
static_assert(sizeof(rectDef_s) == 0x14);
struct windowDef_t struct windowDef_t
{ {
const char* name; const char* name;
@ -3566,6 +3568,8 @@ namespace Game
Material* background; Material* background;
}; };
static_assert(sizeof(windowDef_t) == 0xA4);
enum expDataType enum expDataType
{ {
VAL_INT = 0x0, VAL_INT = 0x0,