Skip to content

Commit

Permalink
Remove support for 1.00 EXE
Browse files Browse the repository at this point in the history
  • Loading branch information
petfriendamy committed Jun 7, 2024
1 parent 7775204 commit 7a2cc94
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions src/ExeEditor/ExeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private const long
HEXT_OFFSET_1 = 0x400C00,
HEXT_OFFSET_2 = 0x401600,

TEST_BYTE_POS = 0x94,
AP_MULTIPLIER_POS = 0x31F14F,
AP_MASTER_OFFSET = 0x4F,
CONFIG_MENU_TEXT_POS = 0x5188A8,
Expand Down Expand Up @@ -136,21 +137,6 @@ private long GetStatusOffset()
}
}

private long GetEquipOffset()
{
switch (Language)
{
case Language.Spanish:
return 0x777C0;
case Language.French:
return 0x77788;
case Language.German:
return 0x76EF0;
default:
return 0;
}
}

private long GetLimitOffset()
{
switch (Language)
Expand Down Expand Up @@ -331,6 +317,13 @@ public static bool ValidateEXE(string path, bool unedited)
return false;
}
}

//test a certain byte (this is different in 1.00)
stream.Seek(TEST_BYTE_POS, SeekOrigin.Begin);
if (reader.ReadByte() != 5)
{
return false;
}
return true;
}
}
Expand All @@ -351,10 +344,6 @@ private static bool HashCheck(string path)
}
else //1998 version
{
//1.00
hash = Convert.FromHexString("4EECAF14F30E8B0CC87B88C943F1119B567452D7");
if (hash.SequenceEqual(compare)) { return true; }

//1.02
hash = Convert.FromHexString("684A0E87840138B4E02FC8EDB9AE2E2591CE4982");
if (hash.SequenceEqual(compare)) { return true; }
Expand Down

0 comments on commit 7a2cc94

Please sign in to comment.