[Scummvm-git-logs] scummvm master -> 5ce3e79cbb1f11aa2dbfcbb39eb729581c79723c
sev-
sev at scummvm.org
Thu Sep 17 20:09:58 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d33683558e SAGA: Added support for ITE GOG Mac CD v1.1
5ce3e79cbb NEWS: Mention ITE new version support
Commit: d33683558e5d3318f9fb22227d67864d74ab62d4
https://github.com/scummvm/scummvm/commit/d33683558e5d3318f9fb22227d67864d74ab62d4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-09-17T22:08:25+02:00
Commit Message:
SAGA: Added support for ITE GOG Mac CD v1.1
Changed paths:
engines/saga/detection_tables.h
engines/saga/music.cpp
engines/saga/resource.cpp
engines/saga/saga.h
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index afae9fdc4c..a2b8bf5d72 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -361,6 +361,30 @@ static const SAGAGameDescription gameDescriptions[] = {
ITEMacPatch_Files,
},
+ // Inherit the earth - MAC CD GOG version 1.1
+ {
+ {
+ "ite",
+ "GOG CD Mac v1.1",
+ {
+ {"ite_i.rsc", GAME_RESOURCEFILE, "a6433e34b97b15e64fe8214651012db9", 8927165},
+ {"scripts_i.rsc", GAME_SCRIPTFILE, "a891405405edefc69c9d6c420c868b84", 335927},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformUnknown, // Most of the resources are Little Endian
+ ADGF_CD,
+ GUIO0()
+ },
+ GID_ITE,
+ GF_SOME_MAC_RESOURCES,
+ ITE_DEFAULT_SCENE,
+ &ITE_Resources,
+ ARRAYSIZE(ITE_GameFonts),
+ ITE_GameFonts,
+ NULL,
+ },
+
// ITE PC CD versions //////////////////////////////////////////////////////////////////////////////////////
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index a384e59ffc..9a7d91b084 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -290,7 +290,7 @@ void Music::setVolume(int volume, int time) {
}
bool Music::isPlaying() {
-
+
return _mixer->isSoundHandleActive(_musicHandle) || (_player ? _player->isPlaying() : false) || (_playerPC98 ? _playerPC98->musicPlaying() : false);
}
@@ -314,7 +314,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
_player->stop();
if (_playerPC98)
_playerPC98->reset();
-
+
int realTrackNumber = 0;
if (_vm->getGameId() == GID_ITE) {
@@ -364,7 +364,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
byte musicFlags = Audio::FLAG_STEREO |
Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN;
- if (_vm->isBigEndian())
+ if (_vm->isBigEndian() || (_vm->getFeatures() & GF_SOME_MAC_RESOURCES))
musicFlags &= ~Audio::FLAG_LITTLE_ENDIAN;
// The newer ITE Mac demo version contains a music file, but it has mono music.
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 1fb9ac1c04..55e4b53138 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -46,12 +46,14 @@ bool ResourceContext::loadResV1(uint32 contextOffset, uint32 contextSize) {
ResourceData *resourceData;
if (contextSize < RSC_MIN_FILESIZE) {
+ warning("ResourceContext::loadResV1(): Incorrect contextSize: %d < %d", contextSize, RSC_MIN_FILESIZE);
return false;
}
_file.seek(contextOffset + contextSize - RSC_TABLEINFO_SIZE);
if (_file.read(tableInfo, RSC_TABLEINFO_SIZE) != RSC_TABLEINFO_SIZE) {
+ warning("ResourceContext::loadResV1(): Incorrect table size: %d for %s", RSC_TABLEINFO_SIZE, _fileName);
return false;
}
@@ -62,6 +64,9 @@ bool ResourceContext::loadResV1(uint32 contextOffset, uint32 contextSize) {
// Check for sane table offset
if (resourceTableOffset != contextSize - RSC_TABLEINFO_SIZE - RSC_TABLEENTRY_SIZE * count) {
+ warning("ResourceContext::loadResV1(): Incorrect tables offset: %d != %d for %s, endian is %d",
+ resourceTableOffset, contextSize - RSC_TABLEINFO_SIZE - RSC_TABLEENTRY_SIZE * count,
+ _fileName, _isBigEndian);
return false;
}
@@ -193,7 +198,11 @@ bool Resource::createContexts() {
if (curSoundFile->gameId != _vm->getGameId()) continue;
if (!Common::File::exists(curSoundFile->fileName)) continue;
strcpy(_soundFileName, curSoundFile->fileName);
- addContext(_soundFileName, GAME_SOUNDFILE, curSoundFile->isCompressed);
+ uint32 flags = GAME_SOUNDFILE;
+
+ if (_vm->getFeatures() & GF_SOME_MAC_RESOURCES)
+ flags |= GAME_SWAPENDIAN;
+ addContext(_soundFileName, flags, curSoundFile->isCompressed);
break;
}
}
@@ -282,12 +291,17 @@ bool Resource::createContexts() {
if (curSoundFile->gameId != _vm->getGameId()) continue;
if (!Common::File::exists(curSoundFile->fileName)) continue;
strcpy(_musicFileName, curSoundFile->fileName);
- addContext(_musicFileName, GAME_DIGITALMUSICFILE, curSoundFile->isCompressed);
+ uint32 flags = GAME_DIGITALMUSICFILE;
+
+ if (_vm->getFeatures() & GF_SOME_MAC_RESOURCES)
+ flags |= GAME_SWAPENDIAN;
+ addContext(_musicFileName, flags, curSoundFile->isCompressed);
break;
}
for (ResourceContextList::iterator i = _contexts.begin(); i != _contexts.end(); ++i) {
if (!(*i)->load(_vm, this)) {
+ warning("Cannot load context %s", (*i)->_fileName);
return false;
}
}
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index be6325cbed..a76fb00c58 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -140,7 +140,8 @@ enum GameFeatures {
GF_ITE_DOS_DEMO = 1 << 1,
GF_EXTRA_ITE_CREDITS = 1 << 2,
GF_8BIT_UNSIGNED_PCM = 1 << 3,
- GF_IHNM_COLOR_FIX = 1 << 4
+ GF_IHNM_COLOR_FIX = 1 << 4,
+ GF_SOME_MAC_RESOURCES= 1 << 5
};
enum VerbTypeIds {
Commit: 5ce3e79cbb1f11aa2dbfcbb39eb729581c79723c
https://github.com/scummvm/scummvm/commit/5ce3e79cbb1f11aa2dbfcbb39eb729581c79723c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-09-17T22:09:34+02:00
Commit Message:
NEWS: Mention ITE new version support
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 6c3d645161..b885b5175d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -6,6 +6,9 @@ For a more comprehensive changelog of the latest experimental code, see:
General:
- Switched ScummVM GUI output to UTF-32.
+ SAGA:
+ - Adde support for ITE GOG Mac CD v1.1.
+
Supernova:
- Added Italian translation for part 1.
More information about the Scummvm-git-logs
mailing list