Add MECH sav segment hack.

This commit is contained in:
lzwdgc 2019-03-22 00:28:58 +03:00
parent de7fd7742f
commit 57c6947172
2 changed files with 15 additions and 5 deletions

View file

@ -396,12 +396,22 @@ void mech_segment::mech::load(const buffer &b)
// if ((uint32_t)g_unk3 == 0) // if ((uint32_t)g_unk3 == 0)
// if (unk13[0] == 5) // if (unk13[0] == 5)
//if (g_unk6[26][0] != 0 && strcmp((const char *)b.getPtr(), "GROUPS") != 0) //if (g_unk6[26][0] != 0 && strcmp((const char *)b.getPtr(), "GROUPS") != 0)
//if (f == 1)
{ {
float g_unk7 = 0; float g_unk7 = 0;
float g_unk8 = 0; float g_unk8 = 0;
uint32_t g_unk9 = 0; uint32_t g_unk9 = 0;
uint8_t g_unk10 = 0; uint8_t g_unk10 = 0;
// hack on
if (b.eof())
return;
READ(b, g_unk10);
b.skip(-1);
if (g_unk10 == 3)
return;
// hack off
READ(b, g_unk7); READ(b, g_unk7);
/*if (g_unk7 != 0) /*if (g_unk7 != 0)
{ {
@ -413,7 +423,7 @@ void mech_segment::mech::load(const buffer &b)
READ(b, g_unk10); READ(b, g_unk10);
if (g_unk10 > 1) if (g_unk10 > 1)
std::cerr << "g_unk10 > 1" << "\n"; std::cerr << "g_unk10 (" << (int)g_unk10 << ") > 1" << "\n";
if (g_unk10) if (g_unk10)
gl.load(b); gl.load(b);
@ -750,7 +760,7 @@ void segment_desc::load(const buffer &b)
CASE("ENV", env_segment); CASE("ENV", env_segment);
CASE("ORGREL", orgrel_segment); CASE("ORGREL", orgrel_segment);
CASE("OTHERS", others_segment); CASE("OTHERS", others_segment);
//CASE("MECH", mech_segment); CASE("MECH", mech_segment);
// CASE("GROUPS", groups_segment); // CASE("GROUPS", groups_segment);
CASE("ORGDATA", orgdata_segment); CASE("ORGDATA", orgdata_segment);
CASE("BUILDS", builds_segment); CASE("BUILDS", builds_segment);

View file

@ -384,9 +384,9 @@ struct mech_segment : public segment
enum class MechFlags : uint32_t enum class MechFlags : uint32_t
{ {
unk0 = 0x1, unk0 = 0x00000001,
unk1 = 0x0100, unk1 = 0x00000100,
Dead = 0x010000, Dead = 0x00010000,
Dead2 = 0x01000000, Dead2 = 0x01000000,
}; };