aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README56
-rw-r--r--common/math.h17
-rw-r--r--devtools/create_kyradat/create_kyradat.cpp4
-rw-r--r--devtools/create_kyradat/games.cpp4
-rw-r--r--devtools/create_kyradat/tables.cpp13
-rw-r--r--dists/engine-data/kyra.datbin356433 -> 364594 bytes
-rw-r--r--engines/kyra/detection_tables.h101
-rw-r--r--engines/kyra/gui_lol.cpp4
-rw-r--r--engines/kyra/lol.cpp57
-rw-r--r--engines/kyra/lol.h4
-rw-r--r--engines/kyra/sequences_lol.cpp3
-rw-r--r--engines/kyra/staticres.cpp2
-rw-r--r--engines/kyra/staticres_lol.cpp22
-rw-r--r--engines/tsage/sound.cpp53
-rw-r--r--engines/tsage/sound.h5
-rw-r--r--video/bink_decoder.cpp19
16 files changed, 256 insertions, 108 deletions
diff --git a/README b/README
index 48929816fd..d938ff26bb 100644
--- a/README
+++ b/README
@@ -153,7 +153,7 @@ support an unsupported game -- read the FAQ on our web site first.
---- ---------------
To report a bug, please create a SourceForge account and follow the
"Bug Tracker" link from our homepage. Please make sure the bug is
-reproducible, and still occurs in the latest SVN/Daily build version.
+reproducible, and still occurs in the latest git/Daily build version.
Also check the known problems list (below) and the compatibility list
on our website for that game, to ensure the issue is not already known:
@@ -164,7 +164,7 @@ completeable in the 'Supported Games' section, or compatibility list. We
-know- those games have bugs.
Please include the following information:
- - ScummVM version (PLEASE test the latest SVN/Daily build)
+ - ScummVM version (PLEASE test the latest git/Daily build)
- Bug details, including instructions on reproducing
- Language of game (English, German, ...)
- Version of game (talkie, floppy, ...)
@@ -303,12 +303,12 @@ SCUMM Games by Humongous Entertainment:
From Your Head to Your Feet [pajama3]
Pajama Sam's Lost & Found [lost]
Pajama Sam's Sock Works [socks]
- Putt-Putt Enters the Race [puttrace]
- Putt-Putt Goes to the Moon [puttmoon]
- Putt-Putt Joins the Circus [puttcircus]
Putt-Putt Joins the Parade [puttputt]
+ Putt-Putt Goes to the Moon [puttmoon]
Putt-Putt Saves the Zoo [puttzoo]
Putt-Putt Travels Through Time [putttime]
+ Putt-Putt Enters the Race [puttrace]
+ Putt-Putt Joins the Circus [puttcircus]
Putt-Putt and Pep's Balloon-O-Rama [balloon]
Putt-Putt and Pep's Dog on a Stick [dog]
Putt-Putt & Fatty Bear's Activity Pack [activity]
@@ -770,11 +770,12 @@ to be able to play the game under ScummVM.
3.19) Dragon History notes:
----- ---------------------
-There are 3 language variants of the game: Czech, English, and Polish.
-Each of them is distributed in a separate archive. The only official
-version is the Czech one, and the English and Polish ports have always
-been work in progress and never officially released. Although all texts
-are fully translated, it is known that some of them contain typos.
+There are 4 language variants of the game: Czech, English, Polish and
+German. Each of them is distributed in a separate archive. The only
+official version is the Czech one, and the English, Polish and German
+ports have always been work in progress and never officially released.
+Although all texts are fully translated, it is known that some of them
+contain typos.
There exists an optional Czech dubbing for the game. For bandwidth
reasons, you can download it separately and then unpack it to the
@@ -846,8 +847,8 @@ site, please see the section on reporting bugs.
Simon the Sorcerer's Puzzle Pack:
- No support for displaying, entering, loading or saving high scores.
- - No support for displaying explanation, when clicking on items in
- Swampy Adventures.
+ - No support for displaying names of items, when hovering over them
+ in Swampy Adventures.
The Feeble Files:
- Subtitles are often incomplete, they were always disabled in the
@@ -868,7 +869,7 @@ site, please see the section on reporting bugs.
ScummVM has been ported to run on many platforms and operating systems.
Links to these ports can be found either on the ScummVM web page or by a
Google search. Many thanks to our porters for their efforts. If you have
-a port of ScummVM and wish to commit it into the main SVN, feel free to
+a port of ScummVM and wish to commit it into the master git, feel free to
contact us!
Supported platforms include (but are not limited to):
@@ -955,7 +956,7 @@ arguments -- see the next section.
--themepath=PATH Path to where GUI themes are stored
--list-themes Display list of all usable GUI themes
-e, --music-driver=MODE Select music driver (see also section 7.0)
- -q, --language=LANG Select language (see also section 5.2)
+ -q, --language=LANG Select game's language (see also section 5.2)
-m, --music-volume=NUM Set the music volume, 0-255 (default: 192)
-s, --sfx-volume=NUM Set the sfx volume, 0-255 (default: 192)
-r, --speech-volume=NUM Set the voice volume, 0-255 (default: 192)
@@ -1026,8 +1027,8 @@ Examples:
5.2) Language options:
---- -----------------
ScummVM includes a language option for Maniac Mansion, Zak McKracken,
-The Dig, The Curse of Monkey Island, Beneath a Steel Sky, Broken Sword
-and Simon the Sorcerer 1 and 2.
+The Dig, The Curse of Monkey Island, Beneath a Steel Sky and
+Broken Sword.
Note that with the exception of Beneath a Steel Sky, Broken Sword,
multilanguage versions of Goblins games and Nippon Safes Inc., using
@@ -1081,16 +1082,6 @@ Broken Sword
pt - Portuguese
cz - Czech
-Simon the Sorcerer 1 and 2
- en - English (default)
- de - German
- fr - French
- it - Italian
- es - Spanish
- he - Hebrew
- pl - Polish
- ru - Russian
-
5.3) Graphics filters:
---- -----------------
@@ -1284,10 +1275,14 @@ other games.
b - Background sounds on/off
[Simon the Sorcerer 2 only]
Pause - Pauses
- t - Switch between speech and subtitles
+ t - Switch between speech only and
+ combined speech and subtitles
+ [Talkies of Simon the Sorcerer other than
+ English and German and Simon the
+ Sorcerer 2 (all languages)]
v - Switch between subtitles only and
combined speech and subtitles
- [Simon the Sorcerer 2 only]
+ [the same as above]
Simon the Sorcerer's Puzzle Pack
Ctrl-d - Starts the debugger
@@ -1305,7 +1300,8 @@ other games.
F9 - Hitbox names on/off
s - Sound effects on/off
Pause - Pauses
- t - Switch between speech and subtitles
+ t - Switch between speech only and
+ combined speech and subtitles
v - Switch between subtitles only and
combined speech and subtitles
@@ -2140,7 +2136,7 @@ debug messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).
Maemo:
* Get Scratchbox environment with Maemo 2.2 rootstrap (2.2 is for 770 and up)
* Install libmad, Tremor, FLAC from source
- * patch scummvm source (some stuff is currently too dirty to be in svn directly)
+ * patch scummvm source (some stuff is currently too dirty to be in git directly)
patch -p1 < backends/platform/maemo/scummvm-[currentversion]-maemo.patch
* update debian/changelog
* run 'fakeroot dpkg-buildpackage -b -d'
diff --git a/common/math.h b/common/math.h
index ebe01fbaf5..56ab171bd3 100644
--- a/common/math.h
+++ b/common/math.h
@@ -50,6 +50,20 @@ struct Complex {
float re, im;
};
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+inline int intLog2(uint32 v) {
+ // This is a slightly optimized implementation of log2 for natural numbers
+ // targeting gcc. It also saves some binary size over our fallback
+ // implementation, since it does not need any table.
+ if (v == 0)
+ return -1;
+ else
+ // This is really "sizeof(unsigned int) * CHAR_BIT - 1" but using 8
+ // instead of CHAR_BIT is sane enough and it saves us from including
+ // limits.h
+ return (sizeof(unsigned int) * 8 - 1) - __builtin_clz(v);
+}
+#else
// See http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup
static const char LogTable256[256] = {
#define LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n
@@ -58,7 +72,7 @@ static const char LogTable256[256] = {
LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7)
};
-inline uint32 intLog2(uint32 v) {
+inline int intLog2(uint32 v) {
register uint32 t, tt;
if ((tt = v >> 16))
@@ -66,6 +80,7 @@ inline uint32 intLog2(uint32 v) {
else
return (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v];
}
+#endif
inline float rad2deg(float rad) {
return rad * 180.0 / M_PI;
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp
index e4686cc66c..085baec05d 100644
--- a/devtools/create_kyradat/create_kyradat.cpp
+++ b/devtools/create_kyradat/create_kyradat.cpp
@@ -45,7 +45,7 @@
#include <map>
enum {
- kKyraDatVersion = 74
+ kKyraDatVersion = 76
};
const ExtractFilename extractFilenames[] = {
@@ -219,7 +219,7 @@ const ExtractFilename extractFilenames[] = {
// Ingame
{ kLolIngamePakFiles, kTypeStringList, false },
- { kLolCharacterDefs, kLolTypeCharData, false },
+ { kLolCharacterDefs, kLolTypeCharData, true },
{ kLolIngameSfxFiles, k2TypeSfxList, false },
{ kLolIngameSfxIndex, kTypeRawData, false },
{ kLolMusicTrackMap, kTypeRawData, false },
diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp
index 76d5d70186..da49b2fbff 100644
--- a/devtools/create_kyradat/games.cpp
+++ b/devtools/create_kyradat/games.cpp
@@ -98,8 +98,9 @@ const Game lolGames[] = {
// DOS demo
{ kLol, { EN_ANY, -1, -1 }, kPlatformPC, kDemoVersion, { "30bb5af87d38adb47d3e6ce06b1cb042", 0 } },
- // DOS floppy (no language specifc strings)
+ // DOS floppy (no language specifc strings except character presets)
{ kLol, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "0cc764a204f7ba8cefe1a5f14c479619", 0 } },
+ { kLol, { RU_RUS, -1, -1 }, kPlatformPC, kNoSpecial, { "80a9f9bf243bc6ed36d98584fc6988c4", 0 } },
{ kLol, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } },
// PC98 (no language specifc strings)
@@ -108,6 +109,7 @@ const Game lolGames[] = {
// DOS CD (multi language version, with no language specific strings)
{ kLol, { EN_ANY, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "263998ec600afca1cc7b935c473df670" } },
{ kLol, { IT_ITA, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "f2af366e00f79dbf832fa19701d71ed9" } }, // Italian fan translation
+ { kLol, { EN_ANY, FR_FRA, RU_RUS }, kPlatformPC, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "5b33478718968676343803911dd5e3e4" } }, // Russian fan translation
GAME_DUMMY_ENTRY
};
diff --git a/devtools/create_kyradat/tables.cpp b/devtools/create_kyradat/tables.cpp
index 090b32debc..cc164e926b 100644
--- a/devtools/create_kyradat/tables.cpp
+++ b/devtools/create_kyradat/tables.cpp
@@ -1281,10 +1281,15 @@ const ExtractEntrySearchData kLolIngamePakFilesProvider[] = {
};
const ExtractEntrySearchData kLolCharacterDefsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000492, 0x000046B0, { { 0x7A, 0x94, 0x8B, 0xC6, 0xF7, 0xF1, 0x2F, 0xF3, 0xBC, 0x1B, 0x0B, 0x4E, 0x00, 0xC9, 0x44, 0x58 } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
- { UNK_LANG, kPlatformPC98, { 0x00000492, 0x00005893, { { 0x7C, 0x7E, 0xFB, 0x80, 0xD9, 0xB6, 0x16, 0x87, 0x80, 0xB7, 0x46, 0x9B, 0x96, 0x1A, 0x6A, 0xBE } } } },
+ { RU_RUS, kPlatformPC, { 0x00000492, 0x000052BA, { { 0x52, 0x29, 0x0D, 0x49, 0xFD, 0x17, 0xD7, 0x70, 0x6D, 0xCA, 0xEB, 0xB6, 0x7E, 0xFA, 0xBE, 0x08 } } } }, // floppy
+ { EN_ANY, kPlatformPC, { 0x00000492, 0x000046B0, { { 0x7A, 0x94, 0x8B, 0xC6, 0xF7, 0xF1, 0x2F, 0xF3, 0xBC, 0x1B, 0x0B, 0x4E, 0x00, 0xC9, 0x44, 0x58 } } } }, // floppy
+ { DE_DEU, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy
+ { EN_ANY, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { DE_DEU, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { FR_FRA, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { RU_RUS, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { IT_ITA, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { JA_JPN, kPlatformPC98, { 0x00000492, 0x00005893, { { 0x7C, 0x7E, 0xFB, 0x80, 0xD9, 0xB6, 0x16, 0x87, 0x80, 0xB7, 0x46, 0x9B, 0x96, 0x1A, 0x6A, 0xBE } } } },
EXTRACT_END_ENTRY
};
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index 1d79ceddfd..31163c19e5 100644
--- a/dists/engine-data/kyra.dat
+++ b/dists/engine-data/kyra.dat
Binary files differ
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 165eddf599..468e82cd5b 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -49,6 +49,7 @@ namespace {
#define LOL_CD_FLAGS FLAGS(false, false, true, false, false, false, false, Kyra::GI_LOL)
#define LOL_CD_FAN_FLAGS(x, y) FLAGS_FAN(x, y, 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_FAN_FLAGS(x, y) FLAGS_FAN(x, y, 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)
@@ -95,12 +96,13 @@ const KYRAGameDescription adGameDescs[] = {
},
KYRA1_FLOPPY_FLAGS
},
+
{
{
"kyra1",
"Extracted",
- AD_ENTRY1("GEMCUT.EMC", "689b62b7519215c1b2571d466c95624c"),
- Common::RU_RUS,
+ 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
@@ -111,8 +113,8 @@ const KYRAGameDescription adGameDescs[] = {
{
"kyra1",
"Extracted",
- AD_ENTRY1("GEMCUT.EMC", "796e44863dd22fa635b042df1bf16673"),
- Common::EN_ANY,
+ 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
@@ -123,19 +125,19 @@ const KYRAGameDescription adGameDescs[] = {
{
"kyra1",
"Extracted",
- AD_ENTRY1("GEMCUT.EMC", "abf8eb360e79a6c2a837751fbd4d3d24"),
- Common::FR_FRA,
+ 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", "6018e1dfeaca7fe83f8d0b00eb0dd049"),
+ AD_ENTRY1("GEMCUT.EMC", "f0b276781f47c130f423ec9679fe9ed9"),
Common::DE_DEU,
Common::kPlatformPC,
ADGF_NO_FLAGS,
@@ -143,12 +145,12 @@ const KYRAGameDescription adGameDescs[] = {
},
KYRA1_FLOPPY_FLAGS
},
- { // from Arne.F
+ {
{
"kyra1",
"Extracted",
- AD_ENTRY1("GEMCUT.EMC", "f0b276781f47c130f423ec9679fe9ed9"),
- Common::DE_DEU,
+ AD_ENTRY1("GEMCUT.EMC", "689b62b7519215c1b2571d466c95624c"),
+ Common::RU_RUS,
Common::kPlatformPC,
ADGF_NO_FLAGS,
Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK
@@ -989,12 +991,11 @@ const KYRAGameDescription adGameDescs[] = {
"lol",
"CD",
{
- { "GENERAL.PAK", 0, "19354b0f464295c38c801d30588df062", -1 },
- { "L01.PAK", 0, "174d37f21e0336c5d91020f8c58717ef", -1 },
- { "VOC.PAK", 0, "eb398f09ba3321d872b6174a68a987d9", -1 },
+ { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 },
+ { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
{ 0, 0, 0, 0 }
},
- Common::RU_RUS,
+ Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
@@ -1011,7 +1012,7 @@ const KYRAGameDescription adGameDescs[] = {
{ "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
{ 0, 0, 0, 0 }
},
- Common::DE_DEU,
+ Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
@@ -1024,11 +1025,11 @@ const KYRAGameDescription adGameDescs[] = {
"lol",
"CD",
{
- { "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 },
+ { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 },
{ "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
{ 0, 0, 0, 0 }
},
- Common::FR_FRA,
+ Common::EN_ANY,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
@@ -1045,7 +1046,7 @@ const KYRAGameDescription adGameDescs[] = {
{ "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
{ 0, 0, 0, 0 }
},
- Common::EN_ANY,
+ Common::DE_DEU,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
@@ -1062,7 +1063,7 @@ const KYRAGameDescription adGameDescs[] = {
{ "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
{ 0, 0, 0, 0 }
},
- Common::DE_DEU,
+ Common::FR_FRA,
Common::kPlatformPC,
ADGF_DROPLANGUAGE | ADGF_CD,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
@@ -1070,13 +1071,32 @@ const KYRAGameDescription adGameDescs[] = {
LOL_CD_FLAGS
},
+ // Russian fan translation
{
{
"lol",
"CD",
{
- { "GENERAL.PAK", 0, "9e4bab499b7ea9337b91ac29fcba6d13", -1 },
- { "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
+ { "GENERAL.PAK", 0, "19354b0f464295c38c801d30588df062", -1 },
+ { "L01.PAK", 0, "174d37f21e0336c5d91020f8c58717ef", -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_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
+ },
+
+ {
+ {
+ "lol",
+ "CD",
+ {
+
+ { "GENERAL.PAK", 0, "19354b0f464295c38c801d30588df062", -1 },
+ { "L01.PAK", 0, "174d37f21e0336c5d91020f8c58717ef", -1 },
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
@@ -1084,7 +1104,24 @@ const KYRAGameDescription adGameDescs[] = {
ADGF_DROPLANGUAGE | ADGF_CD,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
},
- LOL_CD_FLAGS
+ LOL_CD_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
+ },
+
+ {
+ {
+ "lol",
+ "CD",
+ {
+ { "GENERAL.PAK", 0, "19354b0f464295c38c801d30588df062", -1 },
+ { "L01.PAK", 0, "174d37f21e0336c5d91020f8c58717ef", -1 },
+ { 0, 0, 0, 0 }
+ },
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ ADGF_DROPLANGUAGE | ADGF_CD,
+ Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
+ },
+ LOL_CD_FAN_FLAGS(Common::RU_RUS, Common::DE_DEU)
},
// Italian fan translation
@@ -1306,6 +1343,24 @@ const KYRAGameDescription adGameDescs[] = {
LOL_FLOPPY_FLAGS
},
+ // Russian fan translation
+ {
+ {
+ "lol",
+ "Extracted",
+ {
+ { "GENERAL.PAK", 0, "d8f4c1153aed2418f41f886c3fb27543", -1 },
+ { "CHAPTER7.PAK", 0, "f0b8a2fdff951738834fadc12248ac1f", -1 },
+ { 0, 0, 0, 0 }
+ },
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
+ },
+ LOL_FLOPPY_FAN_FLAGS(Common::RU_RUS, Common::EN_ANY)
+ },
+
{
{
"lol",
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index c64d3e7723..9b70e536b8 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -395,8 +395,8 @@ void LoLEngine::gui_drawCharPortraitWithStats(int charNum) {
} else {
gui_drawLiveMagicBar(33, 32, _characters[charNum].magicPointsCur, 0, _characters[charNum].magicPointsMax, 5, 32, 162, 1, 0);
gui_drawLiveMagicBar(39, 32, _characters[charNum].hitPointsCur, 0, _characters[charNum].hitPointsMax, 5, 32, 154, 1, 1);
- _screen->printText(getLangString(0x4253), 33, 1, 160, 0);
- _screen->printText(getLangString(0x4254), 39, 1, 152, 0);
+ _screen->printText((_flags.platform == Common::kPlatformPC && !_flags.isTalkie) ? "M" : getLangString(0x4253), 33, 1, 160, 0);
+ _screen->printText((_flags.platform == Common::kPlatformPC && !_flags.isTalkie) ? "H" : getLangString(0x4254), 39, 1, 152, 0);
}
int spellLevels = 0;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 2cca4fd4e3..7d7bb0ed4a 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1038,11 +1038,14 @@ char *LoLEngine::getLangString(uint16 id) {
char *string = (char *)getTableEntry(buffer, realId);
char *srcBuffer = _stringBuffer[_lastUsedStringBuffer];
- if (_flags.lang != Common::JA_JPN) {
- Util::decodeString1(string, srcBuffer);
+ if (_flags.lang == Common::JA_JPN) {
+ decodeSjis(string, srcBuffer);
+ } else if (_flags.lang == Common::RU_RUS && !_flags.isTalkie) {
+ decodeCyrillic(string, srcBuffer);
Util::decodeString2(srcBuffer, srcBuffer);
} else {
- decodeSjis(string, srcBuffer);
+ Util::decodeString1(string, srcBuffer);
+ Util::decodeString2(srcBuffer, srcBuffer);
}
++_lastUsedStringBuffer;
@@ -1081,6 +1084,54 @@ void LoLEngine::decodeSjis(const char *src, char *dst) {
*dst = 0;
}
+int LoLEngine::decodeCyrillic(const char *src, char *dst) {
+ static const uint8 decodeTable1[] = {
+ 0x20, 0xAE, 0xA5, 0xA0, 0xE2, 0xAD, 0xA8, 0xE0, 0xE1, 0xAB, 0xA2,
+ 0xA4, 0xAC, 0xAA, 0xE3, 0x2E
+ };
+
+ static const uint8 decodeTable2[] = {
+ 0xAD, 0xAF, 0xA2, 0xE1, 0xAC, 0xAA, 0x20, 0xA4, 0xAB, 0x20,
+ 0xE0, 0xE2, 0xA4, 0xA2, 0xA6, 0xAA, 0x20, 0xAD, 0xE2, 0xE0,
+ 0xAB, 0xAC, 0xE1, 0xA1, 0x20, 0xAC, 0xE1, 0xAA, 0xAB, 0xE0,
+ 0xE2, 0xAD, 0xAE, 0xEC, 0xA8, 0xA5, 0xA0, 0x20, 0xE0, 0xEB,
+ 0xAE, 0xA0, 0xA8, 0xA5, 0xEB, 0xEF, 0x20, 0xE3, 0xE2, 0x20,
+ 0xAD, 0xE7, 0xAB, 0xAC, 0xA5, 0xE0, 0xAE, 0xA0, 0xA5, 0xA8,
+ 0xE3, 0xEB, 0xEF, 0xAA, 0xE2, 0xEF, 0xA5, 0xEC, 0xAB, 0xAE,
+ 0xAA, 0xAF, 0xA8, 0xA0, 0xA5, 0xEF, 0xAE, 0xEE, 0xEC, 0xE3,
+ 0xA0, 0xAE, 0xA5, 0xA8, 0xEB, 0x20, 0xE0, 0xE3, 0xA0, 0xA5,
+ 0xAE, 0xA8, 0xE3, 0xE1, 0xAD, 0xAB, 0x20, 0xAE, 0xA5, 0xA0,
+ 0xA8, 0xAD, 0x2E, 0xE3, 0xAE, 0xA0, 0xA8, 0x20, 0xE0, 0xE3,
+ 0xAB, 0xE1, 0x20, 0xA4, 0xAD, 0xE2, 0xA1, 0xA6, 0xAC, 0xE1,
+ 0x0D, 0x20, 0x2E, 0x09, 0xA0, 0xA1, 0x9D, 0xA5
+ };
+
+ int size = 0;
+ uint cChar = 0;
+ while ((cChar = *src++) != 0) {
+ if (cChar & 0x80) {
+ cChar &= 0x7F;
+ int index = (cChar & 0x78) >> 3;
+ *dst++ = decodeTable1[index];
+ ++size;
+ assert(cChar < sizeof(decodeTable2));
+ cChar = decodeTable2[cChar];
+ } else if (cChar >= 0x70) {
+ cChar = *src++;
+ } else if (cChar >= 0x30) {
+ if (cChar < 0x60)
+ cChar -= 0x30;
+ cChar |= 0x80;
+ }
+
+ *dst++ = cChar;
+ ++size;
+ }
+
+ *dst++ = 0;
+ return size;
+}
+
bool LoLEngine::addCharacter(int id) {
const uint16 *cdf[] = { _charDefsMan, _charDefsMan, _charDefsMan, _charDefsWoman,
_charDefsMan, _charDefsMan, _charDefsWoman, _charDefsKieran, _charDefsAkshel };
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 06a4f29f63..3b887c2a86 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -363,12 +363,13 @@ private:
void showIntro();
struct CharacterPrev {
- const char *name;
int x, y;
int attrib[3];
};
static const CharacterPrev _charPreviews[];
+ static const char *const _charPreviewNamesDefault[];
+ static const char *const _charPreviewNamesRussianFloppy[];
// PC98 specific data
static const uint16 _charPosXPC98[];
@@ -875,6 +876,7 @@ private:
char *getLangString(uint16 id);
uint8 *getTableEntry(uint8 *buffer, uint16 id);
void decodeSjis(const char *src, char *dst);
+ int decodeCyrillic(const char *src, char *dst);
static const char * const _languageExt[];
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 27f3951faf..d887133b70 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -316,8 +316,9 @@ int LoLEngine::chooseCharacter() {
_screen->printText(_tim->getCTableEntry(53), 72, 184, 0x81, 0x00);
_screen->printText(_tim->getCTableEntry(55), 72, 192, 0x81, 0x00);
} else {
+ const char *const *previewNames = (_flags.lang == Common::RU_RUS && !_flags.isTalkie) ? _charPreviewNamesRussianFloppy : _charPreviewNamesDefault;
for (int i = 0; i < 4; ++i) {
- _screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, _charPreviews[i].name);
+ _screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, previewNames[i]);
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 48, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[0]);
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 56, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[1]);
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 64, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[2]);
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index d56abc5d47..6e2f8b8e76 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -38,7 +38,7 @@
namespace Kyra {
-#define RESFILE_VERSION 74
+#define RESFILE_VERSION 76
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index cf75a317e1..e4029505bf 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -687,11 +687,25 @@ const char * const LoLEngine::_languageExt[] = {
"GER"
};
+const char *const LoLEngine::_charPreviewNamesDefault[] = {
+ "Ak\'shel",
+ "Michael",
+ "Kieran",
+ "Conrad"
+};
+
+const char *const LoLEngine::_charPreviewNamesRussianFloppy[] = {
+ "\x80\xAA\xE8\xA5\xAB\0",
+ "\x8C\xA0\xA9\xAA\xAB\0",
+ "\x8A\xA8\xE0\xA0\xAD\0",
+ "\x8A\xAE\xAD\xE0\xA0\xA4\0"
+};
+
const LoLEngine::CharacterPrev LoLEngine::_charPreviews[] = {
- { "Ak\'shel", 0x060, 0x7F, { 0x0F, 0x08, 0x05 } },
- { "Michael", 0x09A, 0x7F, { 0x06, 0x0A, 0x0F } },
- { "Kieran", 0x0D4, 0x7F, { 0x08, 0x06, 0x08 } },
- { "Conrad", 0x10F, 0x7F, { 0x0A, 0x0C, 0x0A } }
+ { 0x060, 0x7F, { 0x0F, 0x08, 0x05 } },
+ { 0x09A, 0x7F, { 0x06, 0x0A, 0x0F } },
+ { 0x0D4, 0x7F, { 0x08, 0x06, 0x08 } },
+ { 0x10F, 0x7F, { 0x0A, 0x0C, 0x0A } }
};
const uint16 LoLEngine::_charPosXPC98[] = {
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index e26b3d1544..f5c59a709c 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -66,7 +66,7 @@ SoundManager::~SoundManager() {
}
_sfTerminate();
- g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback);
+// g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback);
}
_soundManager = NULL;
@@ -78,9 +78,12 @@ void SoundManager::postInit() {
_saver->addLoadNotifier(&SoundManager::loadNotifier);
_saver->addListener(this);
- // Install a timer for handling sound manager updates at 60Hz
- g_system->getTimerManager()->installTimerProc(_sfUpdateCallback, 1000000 / GAME_FRAME_RATE, NULL);
+// I originally separated the sound manager update method into a separate thread, since
+// it handles updates for both music and Fx. However, since Adlib updates also get done in a
+// thread, and doesn't get too far ahead, I've left it to the AdlibSoundDriver class to
+// call the update method, rather than having it be called separately
+// g_system->getTimerManager()->installTimerProc(_sfUpdateCallback, 1000000 / SOUND_FREQUENCY, NULL);
__sndmgrReady = true;
}
}
@@ -2488,7 +2491,12 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() {
_opl = OPL::Config::create();
assert(_opl);
_opl->init(_sampleRate);
-
+
+ _samplesTillCallback = 0;
+ _samplesTillCallbackRemainder = 0;
+ _samplesPerCallback = getRate() / CALLBACKS_PER_SECOND;
+ _samplesPerCallbackRemainder = getRate() % CALLBACKS_PER_SECOND;
+
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
Common::set_to(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false);
@@ -2750,26 +2758,29 @@ void AdlibSoundDriver::setFrequency(int channel) {
}
int AdlibSoundDriver::readBuffer(int16 *buffer, const int numSamples) {
- update(buffer, numSamples);
- return numSamples;
-}
-
-void AdlibSoundDriver::update(int16 *buf, int len) {
- static int samplesLeft = 0;
- while (len != 0) {
- int count = samplesLeft;
- if (count > len) {
- count = len;
- }
- samplesLeft -= count;
- len -= count;
- _opl->readBuffer(buf, count);
- if (samplesLeft == 0) {
+ int32 samplesLeft = numSamples;
+ memset(buffer, 0, sizeof(int16) * numSamples);
+ while (samplesLeft) {
+ if (!_samplesTillCallback) {
+ SoundManager::_sfUpdateCallback(NULL);
flush();
- samplesLeft = _sampleRate / 50;
+
+ _samplesTillCallback = _samplesPerCallback;
+ _samplesTillCallbackRemainder += _samplesPerCallbackRemainder;
+ if (_samplesTillCallbackRemainder >= CALLBACKS_PER_SECOND) {
+ _samplesTillCallback++;
+ _samplesTillCallbackRemainder -= CALLBACKS_PER_SECOND;
+ }
}
- buf += count;
+
+ int32 render = MIN(samplesLeft, _samplesTillCallback);
+ samplesLeft -= render;
+ _samplesTillCallback -= render;
+
+ _opl->readBuffer(buffer, render);
+ buffer += render;
}
+ return numSamples;
}
/*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 6a47a1aaf5..f954a65610 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -41,6 +41,7 @@ class Sound;
#define ROLAND_DRIVER_NUM 2
#define ADLIB_DRIVER_NUM 3
#define SBLASTER_DRIVER_NUM 4
+#define CALLBACKS_PER_SECOND 60
struct trackInfoStruct {
int _numTracks;
@@ -411,6 +412,10 @@ private:
const byte *_patchData;
int _masterVolume;
Common::Queue<RegisterValue> _queue;
+ int _samplesTillCallback;
+ int _samplesTillCallbackRemainder;
+ int _samplesPerCallback;
+ int _samplesPerCallbackRemainder;
bool _channelVoiced[ADLIB_CHANNEL_COUNT];
int _channelVolume[ADLIB_CHANNEL_COUNT];
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index de716269c9..c60dbc29be 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -1418,10 +1418,6 @@ void BinkDecoder::audioBlock(AudioTrack &audio, int16 *out) {
else if (audio.codec == kAudioCodecRDFT)
audioBlockRDFT(audio);
- for (uint32 i = 0; i < audio.channels; i++)
- for (uint32 j = 0; j < audio.frameLen; j++)
- audio.coeffsPtr[i][j] = 385.0 + audio.coeffsPtr[i][j] * (1.0 / 32767.0);
-
floatToInt16Interleave(out, const_cast<const float **>(audio.coeffsPtr), audio.frameLen, audio.channels);
if (!audio.first) {
@@ -1535,25 +1531,20 @@ void BinkDecoder::readAudioCoeffs(AudioTrack &audio, float *coeffs) {
}
-static inline int floatToInt16One(const float *src) {
- int32 tmp = *(const int32 *) src;
-
- if (tmp & 0xF0000)
- tmp = (0x43C0FFFF - tmp) >> 31;
-
- return tmp - 0x8000;
+static inline int floatToInt16One(float src) {
+ return (int16) CLIP<int>((int) floor(src + 0.5), -32768, 32767);
}
void BinkDecoder::floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels) {
if (channels == 2) {
for (uint32 i = 0; i < length; i++) {
- dst[2 * i ] = TO_LE_16(floatToInt16One(src[0] + i));
- dst[2 * i + 1] = TO_LE_16(floatToInt16One(src[1] + i));
+ dst[2 * i ] = TO_LE_16(floatToInt16One(src[0][i]));
+ dst[2 * i + 1] = TO_LE_16(floatToInt16One(src[1][i]));
}
} else {
for(uint8 c = 0; c < channels; c++)
for(uint32 i = 0, j = c; i < length; i++, j += channels)
- dst[j] = TO_LE_16(floatToInt16One(src[c] + i));
+ dst[j] = TO_LE_16(floatToInt16One(src[c][i]));
}
}