diff options
author | Alejandro Marzini | 2010-07-13 04:31:15 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-13 04:31:15 +0000 |
commit | 609e08d5dbae3179eddf981abe73d69009432de4 (patch) | |
tree | cddbd0a0e69eaa53b85f98f96dc410a307773f08 /engines/kyra | |
parent | 8b6a670391f1b5103e3761d78eef8f41d64cf8cd (diff) | |
parent | 03c0faa5d76f547603ee6389cdf958e2a6f0f43d (diff) | |
download | scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.tar.gz scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.tar.bz2 scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.zip |
Merged from trunk, from Rev 49499 to HEAD
svn-id: r50840
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/detection.cpp | 1175 | ||||
-rw-r--r-- | engines/kyra/detection_tables.h | 1192 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 17 | ||||
-rw-r--r-- | engines/kyra/sound_intern.h | 4 | ||||
-rw-r--r-- | engines/kyra/sound_towns.cpp | 251 |
5 files changed, 1413 insertions, 1226 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 6e9359e7fc..f3e6c7c8cc 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -41,1172 +41,7 @@ struct KYRAGameDescription { Kyra::GameFlags flags; }; -namespace { - -#define FLAGS(x, y, z, a, b, c, d, id) { Common::UNK_LANG, Common::UNK_LANG, Common::UNK_LANG, Common::kPlatformUnknown, x, y, z, a, b, c, d, id } -#define FLAGS_FAN(fanLang, repLang, x, y, z, a, b, c, d, id) { Common::UNK_LANG, fanLang, repLang, Common::kPlatformUnknown, x, y, z, a, b, c, d, id } - -#define KYRA1_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_KYRA1) -#define KYRA1_AMIGA_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_TOWNS_FLAGS FLAGS(false, true, false, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_TOWNS_SJIS_FLAGS FLAGS(false, true, false, true, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_CD_FLAGS FLAGS(false, true, true, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_DEMO_CD_FLAGS FLAGS(true, true, true, false, false, false, false, Kyra::GI_KYRA1) - -#define KYRA2_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_KYRA2) -#define KYRA2_CD_FLAGS FLAGS(false, false, true, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_CD_FAN_FLAGS(x, y) FLAGS_FAN(x, y, false, false, true, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_CD_DEMO_FLAGS FLAGS(true, false, true, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_TOWNS_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_TOWNS_SJIS_FLAGS FLAGS(false, false, false, true, false, false, false, Kyra::GI_KYRA2) - -#define KYRA3_CD_FLAGS FLAGS(false, false, true, false, false, true, true, Kyra::GI_KYRA3) -#define KYRA3_CD_INS_FLAGS FLAGS(false, false, true, false, false, true, false, Kyra::GI_KYRA3) -#define KYRA3_CD_FAN_FLAGS(x, y) FLAGS_FAN(x, y, false, false, true, false, false, true, false, Kyra::GI_KYRA3) - -#define LOL_CD_FLAGS FLAGS(false, false, true, false, false, false, false, Kyra::GI_LOL) -#define LOL_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_LOL) -#define LOL_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_LOL) -#define LOL_PC98_SJIS_FLAGS FLAGS(false, false, false, true, true, false, false, Kyra::GI_LOL) -#define LOL_DEMO_FLAGS FLAGS(true, true, false, false, false, false, false, Kyra::GI_LOL) -#define LOL_KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA2) - -const KYRAGameDescription adGameDescs[] = { - /* disable these targets until they get supported - { - { - "kyra1", - 0, - AD_ENTRY1("DISK1.EXE", "c8641d0414d6c966d0a3dad79db07bf4"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_CMP_FLAGS - }, - - { - { - "kyra1", - 0, - AD_ENTRY1("DISK1.EXE", "5d5cee4c3d0b68d586788b74243d254a"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_CMP_FLAGS - }, - */ - - { - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "3c244298395520bb62b5edfe41688879"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "796e44863dd22fa635b042df1bf16673"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "abf8eb360e79a6c2a837751fbd4d3d24"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "6018e1dfeaca7fe83f8d0b00eb0dd049"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { // from Arne.F - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "f0b276781f47c130f423ec9679fe9ed9"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { // from VooD - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "8909b41596913b3f5deaf3c9f1017b01"), - Common::ES_ESP, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { // floppy 1.8 from clemmy - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "747861d2a9c643c59fdab570df5b9093"), - Common::ES_ESP, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - { // from gourry - { - "kyra1", - "Extracted", - AD_ENTRY1("GEMCUT.EMC", "ef08c8c237ee1473fd52578303fc36df"), - Common::IT_ITA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - - { - { - "kyra1", - 0, - { - { "GEMCUT.PAK", 0, "2bd1da653eaefd691e050e4a9eb68a64", -1 }, - { "GEMCUT.EMC", 0, "2a3f44e179f1e9f7643e90083c747571", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::EN_ANY, - Common::kPlatformAmiga, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_AMIGA_FLAGS - }, - - { - { - "kyra1", - 0, - { - { "GEMCUT.PAK", 0, "2bd1da653eaefd691e050e4a9eb68a64", -1 }, - { "GEMCUT.EMC", 0, "74f99e9ed99abf8d0429826d78485a2a", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::DE_DEU, - Common::kPlatformAmiga, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_AMIGA_FLAGS - }, - - { - { - "kyra1", - 0, - { - { "GEMCUT.EMC", 0, "796e44863dd22fa635b042df1bf16673", -1 }, - { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::EN_ANY, - Common::kPlatformMacintosh, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_FLOPPY_FLAGS - }, - - { // FM-TOWNS version - { - "kyra1", - 0, - { - { "EMC.PAK", 0, "a046bb0b422061aab8e4c4689400343a", -1 }, - { "TWMUSIC.PAK", 0, "e53bca3a3e3fb49107d59463ec387a59", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::EN_ANY, - Common::kPlatformFMTowns, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_TOWNS_FLAGS - }, - { - { - "kyra1", - 0, - { - { "JMC.PAK", 0, "9c5707a2a478e8167e44283246612d2c", -1 }, - { "TWMUSIC.PAK", 0, "e53bca3a3e3fb49107d59463ec387a59", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::JA_JPN, - Common::kPlatformFMTowns, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_TOWNS_SJIS_FLAGS - }, - - // PC-9801 floppy + CD / PC-9821 floppy version are all using the same data files, - // thus we will mark it as non CD game. - { - { - "kyra1", - "", - { - { "JMC.PAK", 0, "9c5707a2a478e8167e44283246612d2c", -1 }, - { "MUSIC98.PAK", 0, "02fc212f799331b769b274e33d87b37f", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::JA_JPN, - Common::kPlatformPC98, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA1_TOWNS_SJIS_FLAGS - }, - - { - { - "kyra1", - "CD", - AD_ENTRY1("GEMCUT.PAK", "fac399fe62f98671e56a005c5e94e39f"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - { - { - "kyra1", - "CD", - AD_ENTRY1("GEMCUT.PAK", "230f54e6afc007ab4117159181a1c722"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - { - { - "kyra1", - "CD", - AD_ENTRY1("GEMCUT.PAK", "b037c41768b652a040360ffa3556fd2a"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - - { // italian fan translation see fr#1727941 "KYRA: add Italian CD Version to kyra.dat" - { - "kyra1", - "CD", - AD_ENTRY1("GEMCUT.PAK", "d8327fc4b7a72b23c900fa13aef4093a"), - Common::IT_ITA, - Common::kPlatformPC, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - - { // Kyra 1 Mac CD as mentioned in fr #2766454 "KYRA1: Add support for Macintosh CD" by nnooiissee - { - "kyra1", - "CD", - { - { "GEMCUT.PAK", 0, "d3d4b281cd357230aabcec46843d04bd", -1 }, - { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::EN_ANY, - Common::kPlatformMacintosh, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - { - { - "kyra1", - "CD", - { - { "GEMCUT.PAK", 0, "4a0cb720e824295bcbccbd1407652110", -1 }, - { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::DE_DEU, - Common::kPlatformMacintosh, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - { - { - "kyra1", - "CD", - { - { "GEMCUT.PAK", 0, "b71ee090aa12e80ed2ba068826d92bed", -1 }, - { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, - { NULL, 0, NULL, 0 } - }, - Common::FR_FRA, - Common::kPlatformMacintosh, - ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_CD_FLAGS - }, - - { - { - "kyra1", - "Demo", - AD_ENTRY1("DEMO1.WSA", "fb722947d94897512b13b50cc84fd648"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - Common::GUIO_NOSPEECH - }, - KYRA1_DEMO_FLAGS - }, - - { // Special Kyrandia 1 CD demo - { - "kyra1", - "Demo/CD", - AD_ENTRY1("INTRO.VRM", "e3045fb69b8c29db84b8fda3ccbdac54"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO | ADGF_CD, - Common::GUIO_NONE - }, - KYRA1_DEMO_CD_FLAGS - }, - - { // Floppy version - { - "kyra2", - 0, - AD_ENTRY1("WESTWOOD.001", "3f52dda68c4f7696c8309038be9f4151"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_FLOPPY_CMP_FLAGS - }, - - { // Floppy version - { - "kyra2", - 0, - AD_ENTRY1("WESTWOOD.001", "d787b9559afddfe058b84c0b3a787224"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_FLOPPY_CMP_FLAGS - }, - - { // Floppy version extracted - { - "kyra2", - "Extracted", - AD_ENTRY1("FATE.PAK", "1ba18be685ad8e5a0ab5d46a0ce4d345"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_FLOPPY_FLAGS - }, - - { // Floppy version extracted - { - "kyra2", - "Extracted", - AD_ENTRY1("FATE.PAK", "262fb69dd8e52e596c7aefc6456f7c1b"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_FLOPPY_FLAGS - }, - - { // Floppy version extracted - { - "kyra2", - "Extracted", - AD_ENTRY1("FATE.PAK", "f7de11506b4c8fdf64bc763206c3e4e7"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_FLOPPY_FLAGS - }, - - { // Floppy version extracted - { - "kyra2", - "Extracted", - AD_ENTRY1("FATE.PAK", "e0a70c31b022cb4bb3061890020fc27c"), - Common::IT_ITA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_FLOPPY_FLAGS - }, - - { // CD version - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FLAGS - }, - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FLAGS - }, - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FLAGS - }, - - // Italian fan translation, see fr#2003504 "KYRA: add support for Italian version of Kyrandia 2&3" - { // CD version - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"), - Common::IT_ITA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) - }, - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) - }, - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) - }, - - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"), - Common::IT_ITA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) - }, - - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) - }, - - { - { - "kyra2", - "CD", - AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) - }, - - { // Interactive Demo - { - "kyra2", - "CD/Demo", - AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO, - Common::GUIO_NONE - }, - KYRA2_CD_DEMO_FLAGS - }, - - { // Interactive Demo - { - "kyra2", - "CD/Demo", - AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO, - Common::GUIO_NONE - }, - KYRA2_CD_DEMO_FLAGS - }, - - { // Interactive Demo - { - "kyra2", - "CD/Demo", - AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"), - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO, - Common::GUIO_NONE - }, - KYRA2_CD_DEMO_FLAGS - }, - - { // Non-Interactive Demos - { - "kyra2", - "Demo", - AD_ENTRY1("VOC.PAK", "ecb3561b63749158172bf21528cf5f45"), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - Common::GUIO_NONE - }, - KYRA2_DEMO_FLAGS - }, - - { // FM-TOWNS - { - "kyra2", - 0, - AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), - Common::EN_ANY, - Common::kPlatformFMTowns, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_TOWNS_FLAGS - }, - { - { - "kyra2", - 0, - AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), - Common::JA_JPN, - Common::kPlatformFMTowns, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - KYRA2_TOWNS_SJIS_FLAGS - }, - { // PC-9821 - { - "kyra2", - "CD", - AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), - Common::EN_ANY, - Common::kPlatformPC98, - ADGF_CD, - Common::GUIO_NOSPEECH - }, - KYRA2_TOWNS_FLAGS - }, - { - { - "kyra2", - "CD", - AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), - Common::JA_JPN, - Common::kPlatformPC98, - ADGF_CD, - Common::GUIO_NOSPEECH - }, - KYRA2_TOWNS_SJIS_FLAGS - }, - - // Kyra3 - - // non installed version - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "WESTWOOD.001", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FLAGS - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "WESTWOOD.001", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FLAGS - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "WESTWOOD.001", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FLAGS - }, - - // installed version - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_INS_FLAGS - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_INS_FLAGS - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_INS_FLAGS - }, - - // Mac version - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformMacintosh, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_INS_FLAGS - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformMacintosh, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_INS_FLAGS - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::FR_FRA, - Common::kPlatformMacintosh, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_INS_FLAGS - }, - - // Spanish fan translation, see fr#1994040 "KYRA3: Add support for Spanish fan translation" - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "9aaca21d2a205ca02ec53132f2911794", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::ES_ESP, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY) - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "9aaca21d2a205ca02ec53132f2911794", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY) - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "9aaca21d2a205ca02ec53132f2911794", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY) - }, - - // Italian fan translation, see fr#2003504 "KYRA: add support for Italian version of Kyrandia 2&3" - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "ee2d4d056a5de5333a3c6bda055b3cb4", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA) - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "ee2d4d056a5de5333a3c6bda055b3cb4", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA) - }, - { - { - "kyra3", - 0, - { - { "ONETIME.PAK", 0, "ee2d4d056a5de5333a3c6bda055b3cb4", -1 }, - { "AUD.PAK", 0, 0, -1 }, - { 0, 0, 0, 0 } - }, - Common::IT_ITA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - Common::GUIO_NOMIDI - }, - KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA) - }, - -#ifdef ENABLE_LOL - // Lands of Lore CD - { - { - "lol", - "CD", - { - { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 }, - { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - LOL_CD_FLAGS - }, - - { - { - "lol", - "CD", - { - { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 }, - { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - LOL_CD_FLAGS - }, - - { - { - "lol", - "CD", - { - { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 }, - { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, - { 0, 0, 0, 0 } - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - LOL_CD_FLAGS - }, - - { - { - "lol", - "CD", - { - { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 }, - { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - LOL_CD_FLAGS - }, - - { - { - "lol", - "CD", - { - { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 }, - { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - LOL_CD_FLAGS - }, - - { - { - "lol", - "CD", - { - { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 }, - { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, - { 0, 0, 0, 0 } - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, - Common::GUIO_NONE - }, - LOL_CD_FLAGS - }, - - { - { - "lol", - 0, - { - { "WESTWOOD.1", 0, "c656aa9a2b4032d341e3dc8e3525b917", -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - LOL_FLOPPY_CMP_FLAGS - }, - - { - { - "lol", - 0, - { - { "WESTWOOD.1", 0, "3c61cb7de5b2ec452f5851f5075207ee", -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - LOL_FLOPPY_CMP_FLAGS - }, - - { - { - "lol", - "Extracted", - { - { "GENERAL.PAK", 0, "2aaa30e120c08af87196820e9dd4bf73", -1 }, - { "CHAPTER7.PAK", 0, "eb92bf7ebb4e890add1233a6b0c810ff", -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - LOL_FLOPPY_FLAGS - }, - - { - { - "lol", - "Extracted", - { - { "GENERAL.PAK", 0, "996e66e81054d36249907a1d8158da3d", -1 }, - { "CHAPTER7.PAK", 0, "cabee57f00d6d84b65a732b6868a4959", -1 }, - { 0, 0, 0, 0 } - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - LOL_FLOPPY_FLAGS - }, - - { - { - "lol", - 0, - { - { "GENERAL.PAK", 0, "3fe6539b9b09084c0984eaf7170464e9", -1 }, - { "MUS.PAK", 0, "008dc69d8cbcdb6bae30e270fab26e76", -1 }, - { 0, 0, 0, 0 } - }, - Common::JA_JPN, - Common::kPlatformPC98, - ADGF_NO_FLAGS, - Common::GUIO_NOSPEECH - }, - LOL_PC98_SJIS_FLAGS - }, - - { - { - "lol", - "Demo", - { - { "INTRO.PAK", 0, "4bc22a3b57f19a49212c5de58ab014d6", -1 }, - { "INTROVOC.PAK", 0, "7e578e4f1da31c1f294e14a8e8f3cc44", -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - Common::GUIO_NONE - }, - LOL_DEMO_FLAGS - }, - - { - { - "lol", - "Demo", - { - { "GENERAL.PAK", 0, "e94863d86c4597a2d581d05481c152ba", -1 }, - { 0, 0, 0, 0 } - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - Common::GUIO_NOSPEECH - }, - LOL_KYRA2_DEMO_FLAGS - }, -#endif // ENABLE_LOL - - { AD_TABLE_END_MARKER, FLAGS(0, 0, 0, 0, 0, 0, 0, 0) } -}; - -const PlainGameDescriptor gameList[] = { - { "kyra1", "The Legend of Kyrandia" }, - { "kyra2", "The Legend of Kyrandia: The Hand of Fate" }, - { "kyra3", "The Legend of Kyrandia: Malcolm's Revenge" }, -#ifdef ENABLE_LOL - { "lol", "Lands of Lore: The Throne of Chaos" }, -#endif // ENABLE_LOL - { 0, 0 } -}; +#include "kyra/detection_tables.h" const ADParams detectionParams = { // Pointer to ADGameDescription or its superset structure @@ -1226,11 +61,13 @@ const ADParams detectionParams = { // Flags 0, // Additional GUI options (for every game} - Common::GUIO_NONE + Common::GUIO_NONE, + // Maximum directory depth + 1, + // List of directory globs + 0 }; -} // End of anonymous namespace - class KyraMetaEngine : public AdvancedMetaEngine { public: KyraMetaEngine() : AdvancedMetaEngine(detectionParams) {} diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h new file mode 100644 index 0000000000..390281c356 --- /dev/null +++ b/engines/kyra/detection_tables.h @@ -0,0 +1,1192 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +namespace { + +#define FLAGS(x, y, z, a, b, c, d, id) { Common::UNK_LANG, Common::UNK_LANG, Common::UNK_LANG, Common::kPlatformUnknown, x, y, z, a, b, c, d, id } +#define FLAGS_FAN(fanLang, repLang, x, y, z, a, b, c, d, id) { Common::UNK_LANG, fanLang, repLang, Common::kPlatformUnknown, x, y, z, a, b, c, d, id } + +#define KYRA1_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_KYRA1) +#define KYRA1_AMIGA_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_TOWNS_FLAGS FLAGS(false, true, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_TOWNS_SJIS_FLAGS FLAGS(false, true, false, true, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_CD_FLAGS FLAGS(false, true, true, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_DEMO_CD_FLAGS FLAGS(true, true, true, false, false, false, false, Kyra::GI_KYRA1) + +#define KYRA2_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_KYRA2) +#define KYRA2_CD_FLAGS FLAGS(false, false, true, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_CD_FAN_FLAGS(x, y) FLAGS_FAN(x, y, false, false, true, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_CD_DEMO_FLAGS FLAGS(true, false, true, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_TOWNS_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_TOWNS_SJIS_FLAGS FLAGS(false, false, false, true, false, false, false, Kyra::GI_KYRA2) + +#define KYRA3_CD_FLAGS FLAGS(false, false, true, false, false, true, true, Kyra::GI_KYRA3) +#define KYRA3_CD_INS_FLAGS FLAGS(false, false, true, false, false, true, false, Kyra::GI_KYRA3) +#define KYRA3_CD_FAN_FLAGS(x, y) FLAGS_FAN(x, y, false, false, true, false, false, true, false, Kyra::GI_KYRA3) + +#define LOL_CD_FLAGS FLAGS(false, false, true, false, false, false, false, Kyra::GI_LOL) +#define LOL_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_LOL) +#define LOL_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_LOL) +#define LOL_PC98_SJIS_FLAGS FLAGS(false, false, false, true, true, false, false, Kyra::GI_LOL) +#define LOL_DEMO_FLAGS FLAGS(true, true, false, false, false, false, false, Kyra::GI_LOL) +#define LOL_KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA2) + +const KYRAGameDescription adGameDescs[] = { + /* disable these targets until they get supported + { + { + "kyra1", + 0, + AD_ENTRY1("DISK1.EXE", "c8641d0414d6c966d0a3dad79db07bf4"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_CMP_FLAGS + }, + + { + { + "kyra1", + 0, + AD_ENTRY1("DISK1.EXE", "5d5cee4c3d0b68d586788b74243d254a"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_CMP_FLAGS + }, + */ + + { + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "3c244298395520bb62b5edfe41688879"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "796e44863dd22fa635b042df1bf16673"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "abf8eb360e79a6c2a837751fbd4d3d24"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "6018e1dfeaca7fe83f8d0b00eb0dd049"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { // from Arne.F + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "f0b276781f47c130f423ec9679fe9ed9"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { // from VooD + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "8909b41596913b3f5deaf3c9f1017b01"), + Common::ES_ESP, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { // floppy 1.8 from clemmy + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "747861d2a9c643c59fdab570df5b9093"), + Common::ES_ESP, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + { // from gourry + { + "kyra1", + "Extracted", + AD_ENTRY1("GEMCUT.EMC", "ef08c8c237ee1473fd52578303fc36df"), + Common::IT_ITA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_FLOPPY_FLAGS + }, + + { + { + "kyra1", + 0, + { + { "GEMCUT.PAK", 0, "2bd1da653eaefd691e050e4a9eb68a64", -1 }, + { "GEMCUT.EMC", 0, "2a3f44e179f1e9f7643e90083c747571", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::EN_ANY, + Common::kPlatformAmiga, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH + }, + KYRA1_AMIGA_FLAGS + }, + + { + { + "kyra1", + 0, + { + { "GEMCUT.PAK", 0, "2bd1da653eaefd691e050e4a9eb68a64", -1 }, + { "GEMCUT.EMC", 0, "74f99e9ed99abf8d0429826d78485a2a", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::DE_DEU, + Common::kPlatformAmiga, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH + }, + KYRA1_AMIGA_FLAGS + }, + + { + { + "kyra1", + 0, + { + { "GEMCUT.EMC", 0, "796e44863dd22fa635b042df1bf16673", -1 }, + { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH + }, + KYRA1_FLOPPY_FLAGS + }, + + { // FM-TOWNS version + { + "kyra1", + 0, + { + { "EMC.PAK", 0, "a046bb0b422061aab8e4c4689400343a", -1 }, + { "TWMUSIC.PAK", 0, "e53bca3a3e3fb49107d59463ec387a59", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::EN_ANY, + Common::kPlatformFMTowns, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDITOWNS + }, + KYRA1_TOWNS_FLAGS + }, + { + { + "kyra1", + 0, + { + { "JMC.PAK", 0, "9c5707a2a478e8167e44283246612d2c", -1 }, + { "TWMUSIC.PAK", 0, "e53bca3a3e3fb49107d59463ec387a59", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::JA_JPN, + Common::kPlatformFMTowns, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDITOWNS + }, + KYRA1_TOWNS_SJIS_FLAGS + }, + + // PC-9801 floppy + CD / PC-9821 floppy version are all using the same data files, + // thus we will mark it as non CD game. + { + { + "kyra1", + "", + { + { "JMC.PAK", 0, "9c5707a2a478e8167e44283246612d2c", -1 }, + { "MUSIC98.PAK", 0, "02fc212f799331b769b274e33d87b37f", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::JA_JPN, + Common::kPlatformPC98, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIPC98 + }, + KYRA1_TOWNS_SJIS_FLAGS + }, + + { + { + "kyra1", + "CD", + AD_ENTRY1("GEMCUT.PAK", "fac399fe62f98671e56a005c5e94e39f"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_CD_FLAGS + }, + { + { + "kyra1", + "CD", + AD_ENTRY1("GEMCUT.PAK", "230f54e6afc007ab4117159181a1c722"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_CD_FLAGS + }, + { + { + "kyra1", + "CD", + AD_ENTRY1("GEMCUT.PAK", "b037c41768b652a040360ffa3556fd2a"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_CD_FLAGS + }, + + { // italian fan translation see fr#1727941 "KYRA: add Italian CD Version to kyra.dat" + { + "kyra1", + "CD", + AD_ENTRY1("GEMCUT.PAK", "d8327fc4b7a72b23c900fa13aef4093a"), + Common::IT_ITA, + Common::kPlatformPC, + ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_CD_FLAGS + }, + + { // Kyra 1 Mac CD as mentioned in fr #2766454 "KYRA1: Add support for Macintosh CD" by nnooiissee + { + "kyra1", + "CD", + { + { "GEMCUT.PAK", 0, "d3d4b281cd357230aabcec46843d04bd", -1 }, + { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_CD, + Common::GUIO_NONE + }, + KYRA1_CD_FLAGS + }, + { + { + "kyra1", + "CD", + { + { "GEMCUT.PAK", 0, "4a0cb720e824295bcbccbd1407652110", -1 }, + { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::DE_DEU, + Common::kPlatformMacintosh, + ADGF_CD, + Common::GUIO_NONE + }, + KYRA1_CD_FLAGS + }, + { + { + "kyra1", + "CD", + { + { "GEMCUT.PAK", 0, "b71ee090aa12e80ed2ba068826d92bed", -1 }, + { "BEAD.CPS", 0, "3038466f65b7751451844707187aa401", -1 }, + { NULL, 0, NULL, 0 } + }, + Common::FR_FRA, + Common::kPlatformMacintosh, + ADGF_CD, + Common::GUIO_NONE + }, + KYRA1_CD_FLAGS + }, + + { + { + "kyra1", + "Demo", + AD_ENTRY1("DEMO1.WSA", "fb722947d94897512b13b50cc84fd648"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_DEMO_FLAGS + }, + + { // Special Kyrandia 1 CD demo + { + "kyra1", + "Demo/CD", + AD_ENTRY1("INTRO.VRM", "e3045fb69b8c29db84b8fda3ccbdac54"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK + }, + KYRA1_DEMO_CD_FLAGS + }, + + { // Floppy version + { + "kyra2", + 0, + AD_ENTRY1("WESTWOOD.001", "3f52dda68c4f7696c8309038be9f4151"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_FLOPPY_CMP_FLAGS + }, + + { // Floppy version + { + "kyra2", + 0, + AD_ENTRY1("WESTWOOD.001", "d787b9559afddfe058b84c0b3a787224"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_FLOPPY_CMP_FLAGS + }, + + { // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "1ba18be685ad8e5a0ab5d46a0ce4d345"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_FLOPPY_FLAGS + }, + + { // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "262fb69dd8e52e596c7aefc6456f7c1b"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_FLOPPY_FLAGS + }, + + { // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "f7de11506b4c8fdf64bc763206c3e4e7"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_FLOPPY_FLAGS + }, + + { // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "e0a70c31b022cb4bb3061890020fc27c"), + Common::IT_ITA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_FLOPPY_FLAGS + }, + + { // CD version + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FLAGS + }, + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FLAGS + }, + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FLAGS + }, + + // Italian fan translation, see fr#2003504 "KYRA: add support for Italian version of Kyrandia 2&3" + { // CD version + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"), + Common::IT_ITA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) + }, + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) + }, + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) + }, + + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"), + Common::IT_ITA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) + }, + + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) + }, + + { + { + "kyra2", + "CD", + AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY) + }, + + { // Interactive Demo + { + "kyra2", + "CD/Demo", + AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_DEMO_FLAGS + }, + + { // Interactive Demo + { + "kyra2", + "CD/Demo", + AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_DEMO_FLAGS + }, + + { // Interactive Demo + { + "kyra2", + "CD/Demo", + AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"), + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_CD_DEMO_FLAGS + }, + + { // Non-Interactive Demos + { + "kyra2", + "Demo", + AD_ENTRY1("VOC.PAK", "ecb3561b63749158172bf21528cf5f45"), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + KYRA2_DEMO_FLAGS + }, + + { // FM-TOWNS + { + "kyra2", + 0, + AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), + Common::EN_ANY, + Common::kPlatformFMTowns, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDITOWNS + }, + KYRA2_TOWNS_FLAGS + }, + { + { + "kyra2", + 0, + AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), + Common::JA_JPN, + Common::kPlatformFMTowns, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDITOWNS + }, + KYRA2_TOWNS_SJIS_FLAGS + }, + { // PC-9821 + { + "kyra2", + "CD", + AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), + Common::EN_ANY, + Common::kPlatformPC98, + ADGF_CD, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIPC98 + }, + KYRA2_TOWNS_FLAGS + }, + { + { + "kyra2", + "CD", + AD_ENTRY1("WSCORE.PAK", "c44de1302b67f27d4707409987b7a685"), + Common::JA_JPN, + Common::kPlatformPC98, + ADGF_CD, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIPC98 + }, + KYRA2_TOWNS_SJIS_FLAGS + }, + + // Kyra3 + + // non installed version + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "WESTWOOD.001", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "WESTWOOD.001", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "WESTWOOD.001", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FLAGS + }, + + // installed version + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_INS_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_INS_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_INS_FLAGS + }, + + // Mac version + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_INS_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformMacintosh, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_INS_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformMacintosh, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_INS_FLAGS + }, + + // Spanish fan translation, see fr#1994040 "KYRA3: Add support for Spanish fan translation" + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "9aaca21d2a205ca02ec53132f2911794", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::ES_ESP, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY) + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "9aaca21d2a205ca02ec53132f2911794", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY) + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "9aaca21d2a205ca02ec53132f2911794", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FAN_FLAGS(Common::ES_ESP, Common::EN_ANY) + }, + + // Italian fan translation, see fr#2003504 "KYRA: add support for Italian version of Kyrandia 2&3" + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "ee2d4d056a5de5333a3c6bda055b3cb4", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA) + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "ee2d4d056a5de5333a3c6bda055b3cb4", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA) + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "ee2d4d056a5de5333a3c6bda055b3cb4", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::IT_ITA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + Common::GUIO_NOMIDI + }, + KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA) + }, + +#ifdef ENABLE_LOL + // Lands of Lore CD + { + { + "lol", + "CD", + { + { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 }, + { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_CD_FLAGS + }, + + { + { + "lol", + "CD", + { + { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 }, + { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_CD_FLAGS + }, + + { + { + "lol", + "CD", + { + { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 }, + { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_CD_FLAGS + }, + + { + { + "lol", + "CD", + { + { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 }, + { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_CD_FLAGS + }, + + { + { + "lol", + "CD", + { + { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 }, + { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_CD_FLAGS + }, + + { + { + "lol", + "CD", + { + { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 }, + { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE | ADGF_CD, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_CD_FLAGS + }, + + { + { + "lol", + 0, + { + { "WESTWOOD.1", 0, "c656aa9a2b4032d341e3dc8e3525b917", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_FLOPPY_CMP_FLAGS + }, + + { + { + "lol", + 0, + { + { "WESTWOOD.1", 0, "3c61cb7de5b2ec452f5851f5075207ee", -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_FLOPPY_CMP_FLAGS + }, + + { + { + "lol", + "Extracted", + { + { "GENERAL.PAK", 0, "2aaa30e120c08af87196820e9dd4bf73", -1 }, + { "CHAPTER7.PAK", 0, "eb92bf7ebb4e890add1233a6b0c810ff", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_FLOPPY_FLAGS + }, + + { + { + "lol", + "Extracted", + { + { "GENERAL.PAK", 0, "996e66e81054d36249907a1d8158da3d", -1 }, + { "CHAPTER7.PAK", 0, "cabee57f00d6d84b65a732b6868a4959", -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_FLOPPY_FLAGS + }, + + { + { + "lol", + 0, + { + { "GENERAL.PAK", 0, "3fe6539b9b09084c0984eaf7170464e9", -1 }, + { "MUS.PAK", 0, "008dc69d8cbcdb6bae30e270fab26e76", -1 }, + { 0, 0, 0, 0 } + }, + Common::JA_JPN, + Common::kPlatformPC98, + ADGF_NO_FLAGS, + Common::GUIO_NOSPEECH | Common::GUIO_MIDIPC98 + }, + LOL_PC98_SJIS_FLAGS + }, + + { + { + "lol", + "Demo", + { + { "INTRO.PAK", 0, "4bc22a3b57f19a49212c5de58ab014d6", -1 }, + { "INTROVOC.PAK", 0, "7e578e4f1da31c1f294e14a8e8f3cc44", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_DEMO_FLAGS + }, + + { + { + "lol", + "Demo", + { + { "GENERAL.PAK", 0, "e94863d86c4597a2d581d05481c152ba", -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK + }, + LOL_KYRA2_DEMO_FLAGS + }, +#endif // ENABLE_LOL + + { AD_TABLE_END_MARKER, FLAGS(0, 0, 0, 0, 0, 0, 0, 0) } +}; + +const PlainGameDescriptor gameList[] = { + { "kyra1", "The Legend of Kyrandia" }, + { "kyra2", "The Legend of Kyrandia: The Hand of Fate" }, + { "kyra3", "The Legend of Kyrandia: Malcolm's Revenge" }, +#ifdef ENABLE_LOL + { "lol", "Lands of Lore: The Throne of Chaos" }, +#endif // ENABLE_LOL + { 0, 0 } +}; + +} // End of anonymous namespace diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 00b32425c2..abe13cec2b 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -105,8 +105,11 @@ Common::Error KyraEngine_v1::init() { _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); if (!_flags.useDigSound) { - // We prefer AdLib over MIDI, since generally AdLib is better supported - MidiDriverType midiDriver = MidiDriver::detectMusicDriver(MDT_PCSPK | MDT_MIDI | MDT_ADLIB); + // We prefer AdLib over MIDI in Kyra 1, since it offers MT-32 support only, most users don't have a real + // MT-32/LAPC1/CM32L/CM64 device and AdLib sounds better than our incomplete MT-32 emulator and also better than + // MT-32/GM mapping. For Kyra 2 and LoL which have real GM tracks which sound better than AdLib tracks we prefer GM + // since most users have a GM compatible device. + MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB | ((_flags.gameID == GI_KYRA2 || _flags.gameID == GI_LOL) ? MDT_PREFER_GM : 0)); if (_flags.platform == Common::kPlatformFMTowns) { if (_flags.gameID == GI_KYRA1) @@ -120,24 +123,24 @@ Common::Error KyraEngine_v1::init() { _sound = new SoundTownsPC98_v2(this, _mixer); } else if (_flags.platform == Common::kPlatformAmiga) { _sound = new SoundAmiga(this, _mixer); - } else if (midiDriver == MD_ADLIB) { + } else if (MidiDriver::getMusicType(dev) == MT_ADLIB) { _sound = new SoundAdLibPC(this, _mixer); } else { Sound::kType type; - if (midiDriver == MD_PCSPK) + if (MidiDriver::getMusicType(dev) == MT_PCSPK) type = Sound::kPCSpkr; - else if (midiDriver == MD_MT32 || ConfMan.getBool("native_mt32")) + else if (MidiDriver::getMusicType(dev) == MT_MT32 || ConfMan.getBool("native_mt32")) type = Sound::kMidiMT32; else type = Sound::kMidiGM; MidiDriver *driver = 0; - if (midiDriver == MD_PCSPK) { + if (MidiDriver::getMusicType(dev) == MT_PCSPK) { driver = new MidiDriver_PCSpeaker(_mixer); } else { - driver = MidiDriver::createMidi(midiDriver); + driver = MidiDriver::createMidi(dev); if (type == Sound::kMidiMT32) driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); } diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h index f4aab4db29..a229dc310d 100644 --- a/engines/kyra/sound_intern.h +++ b/engines/kyra/sound_intern.h @@ -180,6 +180,8 @@ public: int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) { return -1; } void playSoundEffect(uint8); + void updateVolumeSettings(); + protected: int _lastTrack; uint8 *_musicTrackData; @@ -207,6 +209,8 @@ public: int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx); void playSoundEffect(uint8 track); + void updateVolumeSettings(); + protected: Audio::AudioStream *_currentSFX; int _lastTrack; diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index b2c8c5fb4b..7a570b3100 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -23,7 +23,9 @@ * */ +#include "common/config-manager.h" #include "common/system.h" + #include "kyra/resource.h" #include "kyra/sound_intern.h" #include "kyra/screen.h" @@ -1355,7 +1357,7 @@ public: void setOutputLevel(); virtual void fadeStep(); - void reset(); + virtual void reset(); const uint8 _idFlag; @@ -1432,13 +1434,14 @@ public: void protect(); void restore(); + virtual void reset(); void fadeStep(); protected: void setOutputLevel(uint8 lvl); - bool control_f0_setInstr(uint8 para); + bool control_f0_setPatch(uint8 para); bool control_f1_setTotalLevel(uint8 para); bool control_f4_setAlgorithm(uint8 para); bool control_f9_loadCustomPatch(uint8 para); @@ -1458,6 +1461,7 @@ public: ~TownsPC98_OpnSfxChannel() {} void loadData(uint8 *data); + void reset(); }; class TownsPC98_OpnChannelPCM : public TownsPC98_OpnChannel { @@ -1490,9 +1494,12 @@ public: void nextTick(int32 *buffer, uint32 bufferSize); + void setVolumeIntern(int volA, int volB) { _volumeA = volA; _volumeB = volB; } + void setVolumeChannelMasks(int channelMaskA, int channelMaskB) { _volMaskA = channelMaskA; _volMaskB = channelMaskB; } + uint8 chanEnable() const { return _chanEnable; } private: - void updatesRegs(); + void updateRegs(); uint8 _updateRequestBuf[64]; int _updateRequest; @@ -1529,6 +1536,11 @@ private: uint8 **_reg; + uint16 _volumeA; + uint16 _volumeB; + int _volMaskA; + int _volMaskB; + bool _ready; }; @@ -1543,6 +1555,9 @@ public: void nextTick(int32 *buffer, uint32 bufferSize); + void setVolumeIntern(int volA, int volB) { _volumeA = volA; _volumeB = volB; } + void setVolumeChannelMasks(int channelMaskA, int channelMaskB) { _volMaskA = channelMaskA; _volMaskB = channelMaskB; } + private: struct RhtChannel { const uint8 *data; @@ -1578,6 +1593,11 @@ private: uint8 **_reg; + uint16 _volumeA; + uint16 _volumeB; + int _volMaskA; + int _volMaskB; + bool _ready; }; @@ -1604,20 +1624,27 @@ public: int getRate() const { return _mixer->getOutputRate(); } protected: - void generateTables(); - void toggleRegProtection(bool prot) { _regProtectionFlag = prot; } uint8 readSSGStatus() { return _ssg->chanEnable(); } virtual void timerCallbackA() = 0; virtual void timerCallbackB() = 0; + // The audio driver can store and apply two different audio settings + // (usually for music and sound effects). The channel mask will determine + // which channels get effected by the setting. The first bits will be + // the normal opn channels, the next bits the ssg channels and the final + // bit the rhythm channel. + void setVolumeIntern(int volA, int volB); + void setVolumeChannelMasks(int channelMaskA, int channelMaskB); + const int _numChan; const int _numSSG; const bool _hasPercussion; Common::Mutex _mutex; private: + void generateTables(); void nextTick(int32 *buffer, uint32 bufferSize); void generateOutput(int32 &leftSample, int32 &rightSample, int32 *del, int32 *feed); @@ -1670,6 +1697,9 @@ private: OpnTimer _timers[2]; + int _volMaskA, _volMaskB; + uint16 _volumeA, _volumeB; + const float _baserate; uint32 _timerbase; @@ -1709,6 +1739,9 @@ public: bool looping() { return _looping == _updateChannelsFlag ? true : false; } bool musicPlaying() { return _musicPlaying; } + void setMusicVolume(int volume) { _musicVolume = volume; setVolumeIntern(_musicVolume, _sfxVolume); } + void setSoundEffectVolume(int volume) { _sfxVolume = volume; setVolumeIntern(_musicVolume, _sfxVolume); } + protected: void startSoundEffect(); @@ -1751,6 +1784,9 @@ protected: uint8 *_sfxData; uint16 _sfxOffsets[2]; + uint16 _musicVolume; + uint16 _sfxVolume; + static const uint8 _drvTables[]; bool _ready; @@ -1823,33 +1859,23 @@ void TownsPC98_OpnChannel::loadData(uint8 *data) { _dataPtr = data; _totalLevel = 0x7F; - uint8 *src_b = _dataPtr; - int loop = 1; - uint8 cmd = 0; - while (loop) { - if (loop == 1) { - cmd = *src_b++; - if (cmd < 0xf0) { - src_b++; - loop = 1; - } else { - if (cmd == 0xff) { - loop = *src_b ? 2 : 0; - if (READ_LE_UINT16(src_b)) - _drv->_looping |= _idFlag; - } else if (cmd == 0xf6) { - loop = 3; - } else { - loop = 2; - } - } - } else if (loop == 2) { - src_b += _drv->_opnFxCmdLen[cmd - 240]; - loop = 1; - } else if (loop == 3) { - src_b[0] = src_b[1]; - src_b += 4; - loop = 1; + uint8 *tmp = _dataPtr; + for (bool loop = true; loop; ) { + uint8 cmd = *tmp++; + if (cmd < 0xf0) { + tmp++; + } else if (cmd == 0xff) { + if (READ_LE_UINT16(tmp)) { + _drv->_looping |= _idFlag; + tmp += _drv->_opnFxCmdLen[cmd - 240]; + } else + loop = false; + } else if (cmd == 0xf6) { + // reset repeat section countdown + tmp[0] = tmp[1]; + tmp += 4; + } else { + tmp += _drv->_opnFxCmdLen[cmd - 240]; } } } @@ -2178,7 +2204,7 @@ void TownsPC98_OpnChannelSSG::init() { #define Control(x) &TownsPC98_OpnChannelSSG::control_##x static const ControlEventFunc ctrlEventsSSG[] = { - Control(f0_setInstr), + Control(f0_setPatch), Control(f1_setTotalLevel), Control(f2_setKeyOffTime), Control(f3_setFreqLSB), @@ -2372,6 +2398,23 @@ void TownsPC98_OpnChannelSSG::setOutputLevel(uint8 lvl) { _drv->writeReg(_part, 8 + _regOffset, _ssgTl); } +void TownsPC98_OpnChannelSSG::reset() { + TownsPC98_OpnChannel::reset(); + + // Unlike the original we restore the default patch data. This fixes a bug + // where certain sound effects would bring each other out of tune (e.g. the + // dragon's fire in Darm's house in Kyra 1 would sound different each time + // you triggered another sfx by dropping an item etc.) + uint8 i = (10 + _regOffset) << 4; + const uint8 *src = &_drv->_drvTables[156]; + _drv->_ssgPatches[i] = src[i]; + _drv->_ssgPatches[i + 3] = src[i + 3]; + _drv->_ssgPatches[i + 4] = src[i + 4]; + _drv->_ssgPatches[i + 6] = src[i + 6]; + _drv->_ssgPatches[i + 8] = src[i + 8]; + _drv->_ssgPatches[i + 12] = src[i + 12]; +} + void TownsPC98_OpnChannelSSG::fadeStep() { _totalLevel--; if ((int8)_totalLevel < 0) @@ -2379,7 +2422,7 @@ void TownsPC98_OpnChannelSSG::fadeStep() { setOutputLevel(_ssgStartLvl); } -bool TownsPC98_OpnChannelSSG::control_f0_setInstr(uint8 para) { +bool TownsPC98_OpnChannelSSG::control_f0_setPatch(uint8 para) { _instr = para << 4; para = (para >> 3) & 0x1e; if (para) @@ -2463,6 +2506,39 @@ void TownsPC98_OpnSfxChannel::loadData(uint8 *data) { _dataPtr = data; _ssgTl = 0xff; _algorithm = 0x80; + + uint8 *tmp = _dataPtr; + for (bool loop = true; loop; ) { + uint8 cmd = *tmp++; + if (cmd < 0xf0) { + tmp++; + } else if (cmd == 0xff) { + loop = false; + } else if (cmd == 0xf6) { + // reset repeat section countdown + tmp[0] = tmp[1]; + tmp += 4; + } else { + tmp += _drv->_opnFxCmdLen[cmd - 240]; + } + } +} + +void TownsPC98_OpnSfxChannel::reset() { + TownsPC98_OpnChannel::reset(); + + // Unlike the original we restore the default patch data. This fixes a bug + // where certain sound effects would bring each other out of tune (e.g. the + // dragon's fire in Darm's house in Kyra 1 would sound different each time + // you triggered another sfx by dropping an item etc.) + uint8 i = (13 + _regOffset) << 4; + const uint8 *src = &_drv->_drvTables[156]; + _drv->_ssgPatches[i] = src[i]; + _drv->_ssgPatches[i + 3] = src[i + 3]; + _drv->_ssgPatches[i + 4] = src[i + 4]; + _drv->_ssgPatches[i + 6] = src[i + 6]; + _drv->_ssgPatches[i + 8] = src[i + 8]; + _drv->_ssgPatches[i + 12] = src[i + 12]; } TownsPC98_OpnChannelPCM::TownsPC98_OpnChannelPCM(TownsPC98_OpnDriver *driver, uint8 regOffs, @@ -2557,7 +2633,8 @@ bool TownsPC98_OpnChannelPCM::control_ff_endOfTrack(uint8 para) { TownsPC98_OpnSquareSineSource::TownsPC98_OpnSquareSineSource(const uint32 timerbase) : _tlTable(0), _tleTable(0), _updateRequest(-1), _tickLength(timerbase * 27), _ready(0), _reg(0), _rand(1), _outN(1), _nTick(0), _evpUpdateCnt(0), _evpTimer(0x1f), _pReslt(0x1f), _attack(0), _cont(false), _evpUpdate(true), - _timer(0), _noiseGenerator(0), _chanEnable(0) { + _timer(0), _noiseGenerator(0), _chanEnable(0), + _volMaskA(0), _volMaskB(0), _volumeA(Audio::Mixer::kMaxMixerVolume), _volumeB(Audio::Mixer::kMaxMixerVolume) { memset(_channels, 0, sizeof(_channels)); memset(_updateRequestBuf, 0, sizeof(_updateRequestBuf)); @@ -2705,24 +2782,30 @@ void TownsPC98_OpnSquareSineSource::nextTick(int32 *buffer, uint32 bufferSize) { } } _pReslt = _evpTimer ^ _attack; - updatesRegs(); + updateRegs(); } int32 finOut = 0; for (int ii = 0; ii < 3; ii++) { - if ((_channels[ii].vol >> 4) & 1) - finOut += _tleTable[_channels[ii].out ? _pReslt : 0]; - else - finOut += _tlTable[_channels[ii].out ? (_channels[ii].vol & 0x0f) : 0]; + int32 finOutTemp = ((_channels[ii].vol >> 4) & 1) ? _tleTable[_channels[ii].out ? _pReslt : 0] : _tlTable[_channels[ii].out ? (_channels[ii].vol & 0x0f) : 0]; + + if ((1 << ii) & _volMaskA) + finOutTemp = (finOutTemp * _volumeA) / Audio::Mixer::kMaxMixerVolume; + + if ((1 << ii) & _volMaskB) + finOutTemp = (finOutTemp * _volumeB) / Audio::Mixer::kMaxMixerVolume; + + finOut += finOutTemp; } - finOut /= 3; + finOut /= 3; + buffer[i << 1] += finOut; buffer[(i << 1) + 1] += finOut; } } -void TownsPC98_OpnSquareSineSource::updatesRegs() { +void TownsPC98_OpnSquareSineSource::updateRegs() { for (int i = 0; i < _updateRequest;) { uint8 b = _updateRequestBuf[i++]; uint8 a = _updateRequestBuf[i++]; @@ -2732,7 +2815,7 @@ void TownsPC98_OpnSquareSineSource::updatesRegs() { } TownsPC98_OpnPercussionSource::TownsPC98_OpnPercussionSource(const uint32 timerbase) : - _tickLength(timerbase * 2), _timer(0), _ready(false) { + _tickLength(timerbase * 2), _timer(0), _ready(false), _volMaskA(0), _volMaskB(0), _volumeA(Audio::Mixer::kMaxMixerVolume), _volumeB(Audio::Mixer::kMaxMixerVolume) { memset(_rhChan, 0, sizeof(RhtChannel) * 6); _reg = new uint8 *[40]; @@ -2891,6 +2974,12 @@ void TownsPC98_OpnPercussionSource::nextTick(int32 *buffer, uint32 bufferSize) { finOut <<= 1; + if (1 & _volMaskA) + finOut = (finOut * _volumeA) / Audio::Mixer::kMaxMixerVolume; + + if (1 & _volMaskB) + finOut = (finOut * _volumeB) / Audio::Mixer::kMaxMixerVolume; + buffer[i << 1] += finOut; buffer[(i << 1) + 1] += finOut; } @@ -2927,6 +3016,7 @@ TownsPC98_OpnCore::TownsPC98_OpnCore(Audio::Mixer *mixer, OpnType type) : _numChan(type == OD_TYPE26 ? 3 : 6), _numSSG(type == OD_TOWNS ? 0 : 3), _hasPercussion(type == OD_TYPE86 ? true : false), _oprRates(0), _oprRateshift(0), _oprAttackDecay(0), _oprFrq(0), _oprSinTbl(0), _oprLevelOut(0), _oprDetune(0), _baserate(55125.0f / (float)mixer->getOutputRate()), + _volMaskA(0), _volMaskB(0), _volumeA(255), _volumeB(255), _regProtectionFlag(false), _ready(false) { memset(&_timers[0], 0, sizeof(OpnTimer)); @@ -2977,7 +3067,7 @@ bool TownsPC98_OpnCore::init() { _prc->init(_percussionData); } - _mixer->playStream(Audio::Mixer::kMusicSoundType, + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); _ready = true; @@ -2989,7 +3079,7 @@ void TownsPC98_OpnCore::reset() { for (int i = 0; i < _numChan; i++) { for (int ii = 0; ii < 4; ii++) _chanInternal[i].opr[ii]->reset(); - memset(&_chanInternal[i].feedbuf, 0, 3); + memset(_chanInternal[i].feedbuf, 0, 3); _chanInternal[i].algorithm = 0; _chanInternal[i].frqTemp = 0; _chanInternal[i].enableLeft = _chanInternal[i].enableRight = true; @@ -3228,6 +3318,26 @@ int TownsPC98_OpnCore::readBuffer(int16 *buffer, const int numSamples) { return numSamples; } +void TownsPC98_OpnCore::setVolumeIntern(int volA, int volB) { + Common::StackLock lock(_mutex); + _volumeA = volA; + _volumeB = volB; + if (_ssg) + _ssg->setVolumeIntern(volA, volB); + if (_prc) + _prc->setVolumeIntern(volA, volB); +} + +void TownsPC98_OpnCore::setVolumeChannelMasks(int channelMaskA, int channelMaskB) { + Common::StackLock lock(_mutex); + _volMaskA = channelMaskA; + _volMaskB = channelMaskB; + if (_ssg) + _ssg->setVolumeChannelMasks(_volMaskA >> _numChan, _volMaskB >> _numChan); + if (_prc) + _prc->setVolumeChannelMasks(_volMaskA >> (_numChan + _numSSG), _volMaskB >> (_numChan + _numSSG)); +} + void TownsPC98_OpnCore::generateTables() { delete[] _oprRates; _oprRates = new uint8[128]; @@ -3388,6 +3498,12 @@ void TownsPC98_OpnCore::nextTick(int32 *buffer, uint32 bufferSize) { int32 finOut = (output << 2) / ((_numChan + _numSSG - 3) / 3); + if ((1 << i) & _volMaskA) + finOut = (finOut * _volumeA) / Audio::Mixer::kMaxMixerVolume; + + if ((1 << i) & _volMaskB) + finOut = (finOut * _volumeB) / Audio::Mixer::kMaxMixerVolume; + if (_chanInternal[i].enableLeft) *leftSample += finOut; @@ -3408,11 +3524,14 @@ TownsPC98_OpnDriver::TownsPC98_OpnDriver(Audio::Mixer *mixer, OpnType type) : To _updateChannelsFlag(type == OD_TYPE26 ? 0x07 : 0x3F), _finishedChannelsFlag(0), _updateSSGFlag(type == OD_TOWNS ? 0x00 : 0x07), _finishedSSGFlag(0), _updateRhythmFlag(type == OD_TYPE86 ? 0x01 : 0x00), _finishedRhythmFlag(0), - _updateSfxFlag(type == OD_TOWNS ? 0x00 : 0x06), _finishedSfxFlag(0), + _updateSfxFlag(0), _finishedSfxFlag(0), _musicTickCounter(0), + _musicVolume(255), _sfxVolume(255), + _musicPlaying(false), _sfxPlaying(false), _fading(false), _looping(0), _ready(false) { + _sfxOffsets[0] = _sfxOffsets[1] = 0; } @@ -3450,6 +3569,8 @@ bool TownsPC98_OpnDriver::init() { TownsPC98_OpnCore::init(); + setVolumeChannelMasks(-1, 0); + _channels = new TownsPC98_OpnChannel *[_numChan]; for (int i = 0; i < _numChan; i++) { int ii = i * 6; @@ -3664,8 +3785,11 @@ void TownsPC98_OpnDriver::timerCallbackA() { _trackPtr = _musicBuffer; } - if (_finishedSfxFlag == _updateSfxFlag) + if (_updateSfxFlag && _finishedSfxFlag == _updateSfxFlag) { _sfxPlaying = false; + _updateSfxFlag = 0; + setVolumeChannelMasks(-1, 0); + } } void TownsPC98_OpnDriver::setMusicTempo(uint8 tempo) { @@ -3680,14 +3804,22 @@ void TownsPC98_OpnDriver::setSfxTempo(uint16 tempo) { } void TownsPC98_OpnDriver::startSoundEffect() { + int volFlags = 0; + for (int i = 0; i < 2; i++) { if (_sfxOffsets[i]) { _ssgChannels[i + 1]->protect(); _sfxChannels[i]->reset(); _sfxChannels[i]->loadData(_sfxData + _sfxOffsets[i]); + _updateSfxFlag |= _sfxChannels[i]->_idFlag; + volFlags |= (_sfxChannels[i]->_idFlag << _numChan); + } else { + _ssgChannels[i + 1]->restore(); + _updateSfxFlag &= ~_sfxChannels[i]->_idFlag; } } - + + setVolumeChannelMasks(~volFlags, volFlags); _sfxData = 0; } @@ -4048,7 +4180,9 @@ SoundPC98::~SoundPC98() { bool SoundPC98::init() { _driver = new TownsPC98_OpnDriver(_mixer, TownsPC98_OpnDriver::OD_TYPE26); - return _driver->init(); + bool reslt = _driver->init(); + updateVolumeSettings(); + return reslt; } void SoundPC98::loadSoundFile(uint file) { @@ -4121,6 +4255,13 @@ void SoundPC98::playSoundEffect(uint8 track) { _driver->loadSoundEffectData(_sfxTrackData, track); } +void SoundPC98::updateVolumeSettings() { + if (!_driver) + return; + + _driver->setMusicVolume(ConfMan.getInt("music_volume")); + _driver->setSoundEffectVolume(ConfMan.getInt("sfx_volume")); +} // KYRA 2 @@ -4159,7 +4300,9 @@ bool SoundTownsPC98_v2::init() { _useFmSfx = true; } - return _driver->init(); + bool reslt = _driver->init(); + updateVolumeSettings(); + return reslt; } void SoundTownsPC98_v2::loadSoundFile(Common::String file) { @@ -4314,6 +4457,14 @@ void SoundTownsPC98_v2::playSoundEffect(uint8 track) { _driver->loadSoundEffectData(_sfxTrackData, track); } +void SoundTownsPC98_v2::updateVolumeSettings() { + if (!_driver) + return; + + _driver->setMusicVolume(ConfMan.getInt("music_volume")); + _driver->setSoundEffectVolume(ConfMan.getInt("sfx_volume")); +} + // static resources const uint32 TownsPC98_OpnCore::_adtStat[] = { |