Skip to content

Commit

Permalink
Merge pull request #3095 from Ghabry/engine-detection
Browse files Browse the repository at this point in the history
Detect the engine version for "Ahriman's Prophecy" correctly
  • Loading branch information
fdelapena authored Sep 23, 2023
2 parents a32e965 + 61db60f commit a5f6f69
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/exe_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,14 @@ int EXEReader::FileInfo::GetEngineType(bool& is_maniac_patch) const {
// VALUE! or Rpg2k3 < 1.0.2.1
// Check CODE segment size to be sure
if (code_size > 0xB0000) {
return Player::EngineRpg2k3;
if (code_size >= 0xC7400) {
// Code segment size for >= 1.0.5.0
// In theory this check is unnecessary because this version has a VERSIONINFO.
// However the modified exe shipped with Ahriman's Prophecy is a 1.0.8.0 without a VERSIONINFO.
return Player::EngineRpg2k3 | Player::EngineMajorUpdated;
} else {
return Player::EngineRpg2k3;
}
}

return Player::EngineRpg2k | Player::EngineMajorUpdated;
Expand Down

0 comments on commit a5f6f69

Please sign in to comment.