TWINE: added detection for gog lba1 classic release

This commit is contained in:
Martin Gerhardy 2022-06-01 17:29:21 +02:00 committed by Eugene Sandulenko
parent 6bcd7320cb
commit 50cb1551ed
5 changed files with 72 additions and 3 deletions

View File

@ -170,7 +170,7 @@ bool Music::playTrackMusicCd(int32 track) {
}
AudioCDManager *cdrom = g_system->getAudioCDManager();
if (_engine->isDotEmuEnhanced()) {
if (_engine->isDotEmuEnhanced() || _engine->isLba1Classic()) {
track += 1;
}
return cdrom->play(track, 1, 0, 0);
@ -244,7 +244,7 @@ bool Music::playMidiMusic(int32 midiIdx, int32 loop) {
stopMidiMusic();
}
if (_engine->isDotEmuEnhanced()) {
if (_engine->isDotEmuEnhanced() || _engine->isLba1Classic()) {
const Common::String &trackName = Common::String::format("lba1-%02i", midiIdx + 1);
Audio::SeekableAudioStream *stream = Audio::SeekableAudioStream::openStreamFile(trackName);
if (stream != nullptr) {

View File

@ -510,6 +510,55 @@ static const ADGameDescription twineGameDescriptions[] = {
GUIO1(GUIO_NONE)
},
// Little Big Adventure - GOG Version
// LBA.GOG
// 11 October 2011 at 17:30
{
"lba",
"GOG Classic Version",
AD_ENTRY1s("TLBA1C.exe", "e377d036e997acbf543bc3023ce72be6", 4404224),
Common::EN_ANY,
Common::kPlatformWindows,
TwinE::TF_LBA1_CLASSIC,
GUIO1(GUIO_NONE)
},
{
"lba",
"GOG Classic Version",
AD_ENTRY1s("TLBA1C.exe", "e377d036e997acbf543bc3023ce72be6", 4404224),
Common::FR_FRA,
Common::kPlatformWindows,
TwinE::TF_LBA1_CLASSIC,
GUIO1(GUIO_NONE)
},
{
"lba",
"GOG Classic Version",
AD_ENTRY1s("TLBA1C.exe", "e377d036e997acbf543bc3023ce72be6", 4404224),
Common::DE_DEU,
Common::kPlatformWindows,
TwinE::TF_LBA1_CLASSIC,
GUIO1(GUIO_NONE)
},
{
"lba",
"GOG Classic Version",
AD_ENTRY1s("TLBA1C.exe", "e377d036e997acbf543bc3023ce72be6", 4404224),
Common::IT_ITA,
Common::kPlatformWindows,
TwinE::TF_LBA1_CLASSIC,
GUIO1(GUIO_NONE)
},
{
"lba",
"GOG Classic Version",
AD_ENTRY1s("TLBA1C.exe", "e377d036e997acbf543bc3023ce72be6", 4404224),
Common::ES_ESP,
Common::kPlatformWindows,
TwinE::TF_LBA1_CLASSIC,
GUIO1(GUIO_NONE)
},
// FAN Translations - http://lba.fishos.net/bit/index.html
// Portuguese by xesf (alexfont)

View File

@ -37,7 +37,8 @@ enum TwineFeatureFlags {
TF_VERSION_CUSTOM = (1 << 2),
TF_USE_GIF = (1 << 3),
TF_DOTEMU_ENHANCED = (1 << 4),
TF_MOD = (1 << 5)
TF_LBA1_CLASSIC = (1 << 5),
TF_MOD = (1 << 6)
};
} // End of namespace TwinE

View File

@ -133,6 +133,24 @@ TwinEEngine::TwinEEngine(OSystem *system, Common::Language language, uint32 flag
SearchMan.addSubDirectoryMatching(gameDataDir, "video");
SearchMan.addSubDirectoryMatching(gameDataDir, "music");
}
if (isLba1Classic()) {
SearchMan.addSubDirectoryMatching(gameDataDir, "common");
SearchMan.addSubDirectoryMatching(gameDataDir, "commonclassic");
SearchMan.addSubDirectoryMatching(gameDataDir, "common/fla");
SearchMan.addSubDirectoryMatching(gameDataDir, "common/vox");
SearchMan.addSubDirectoryMatching(gameDataDir, "common/music");
SearchMan.addSubDirectoryMatching(gameDataDir, "common/midi");
SearchMan.addSubDirectoryMatching(gameDataDir, "commonclassic/images");
if (_gameLang == Common::Language::DE_DEU) {
SearchMan.addSubDirectoryMatching(gameDataDir, "commonclassic/voices/de_voice");
} else if (_gameLang == Common::Language::EN_ANY || _gameLang == Common::Language::EN_GRB || _gameLang == Common::Language::EN_USA) {
SearchMan.addSubDirectoryMatching(gameDataDir, "commonclassic/voices/en_voice");
} else if (_gameLang == Common::Language::FR_FRA) {
SearchMan.addSubDirectoryMatching(gameDataDir, "commonclassic/voices/fr_voice");
}
}
if (isDotEmuEnhanced()) {
SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/hqr");
SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/fla");

View File

@ -251,6 +251,7 @@ public:
bool isLBASlideShow() const { return _gameType == TwineGameType::GType_LBASHOW; }
bool isMod() const { return (_gameFlags & TwinE::TF_MOD) != 0; }
bool isDotEmuEnhanced() const { return (_gameFlags & TwinE::TF_DOTEMU_ENHANCED) != 0; }
bool isLba1Classic() const { return (_gameFlags & TwinE::TF_LBA1_CLASSIC) != 0; }
bool isDemo() const { return (_gameFlags & ADGF_DEMO) != 0; };
const char *getGameId() const;
Common::Language getGameLang() const;