NGI: MDREAM: Read GameProject

This commit is contained in:
Eugene Sandulenko 2020-10-05 01:25:35 +02:00
parent 55b2d57d47
commit 7aff24cfc6
2 changed files with 6 additions and 5 deletions

View File

@ -114,7 +114,7 @@ bool GameLoader::load(MfcArchive &file) {
g_nmi->_gameProject = _gameProject.get();
if (g_nmi->_gameProjectVersion < 12) {
error("Old gameProjectVersion: %d", g_nmi->_gameProjectVersion);
error("GameLoader::load(): old gameProjectVersion: %d", g_nmi->_gameProjectVersion);
}
_gameName = file.readPascalString();

View File

@ -366,7 +366,11 @@ bool GameProject::load(MfcArchive &file) {
_field_4 = 0;
_field_10 = 12;
g_nmi->_gameProjectVersion = file.readUint32LE();
if (g_nmi->getGameGID() == GID_MDREAM)
g_nmi->_gameProjectVersion = 1;
else
g_nmi->_gameProjectVersion = file.readUint32LE();
g_nmi->_pictureScale = file.readUint16LE();
g_nmi->_scrollSpeed = file.readUint32LE();
@ -377,9 +381,6 @@ bool GameProject::load(MfcArchive &file) {
debugC(1, kDebugLoading, "_scrollSpeed = %d", g_nmi->_scrollSpeed);
debugC(1, kDebugLoading, "_headerFilename = %s", _headerFilename.c_str());
if (g_nmi->getGameGID() == GID_MDREAM)
return false;
_sceneTagList.reset(new SceneTagList());
_sceneTagList->load(file);