aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorTravis Howell2009-08-11 02:04:17 +0000
committerTravis Howell2009-08-11 02:04:17 +0000
commit1b47344cc173ae424e84d8b0eea6e4d0c84f506c (patch)
treee35bc14e03f954917182af94240a655783dc4732 /engines/sci
parent773c1a270b682ddc845907a605085f2f7d505d1f (diff)
parent40c58d4ed06b5f6bfa348be34d879c2180c516ec (diff)
downloadscummvm-rg350-1b47344cc173ae424e84d8b0eea6e4d0c84f506c.tar.gz
scummvm-rg350-1b47344cc173ae424e84d8b0eea6e4d0c84f506c.tar.bz2
scummvm-rg350-1b47344cc173ae424e84d8b0eea6e4d0c84f506c.zip
Merged revisions 43066,43068,43088,43093,43095,43097,43101-43102,43107,43112,43114,43117,43119-43120,43122-43123,43126,43131,43139,43143,43145,43147,43150,43152,43155-43156,43163,43165,43167,43171-43172,43178-43179,43183,43186-43200,43202,43205-43223,43227-43235,43237-43241 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r43066 | dreammaster | 2009-08-05 20:44:37 +1000 (Wed, 05 Aug 2009) | 1 line Bugfix for music not being stopped when music volume is set to zero ........ r43068 | scott_t | 2009-08-05 23:57:40 +1000 (Wed, 05 Aug 2009) | 1 line T7G: Fix bug #2831041 by implementing opcode responsible for starting music partway through a video ........ r43088 | knakos | 2009-08-07 04:05:50 +1000 (Fri, 07 Aug 2009) | 1 line overload showMouse to kill mouse shadows in kyra ........ r43093 | dreammaster | 2009-08-07 19:25:06 +1000 (Fri, 07 Aug 2009) | 1 line Bugfix for #2831159 - Palace guards saying !!HIGH STRING!! ........ r43095 | knakos | 2009-08-07 20:44:34 +1000 (Fri, 07 Aug 2009) | 1 line hint backend about virtual keyboard on save, in LoK ........ r43097 | knakos | 2009-08-07 21:05:58 +1000 (Fri, 07 Aug 2009) | 1 line show VK in gui_v2 games of kyra ........ r43101 | dhewg | 2009-08-08 04:16:58 +1000 (Sat, 08 Aug 2009) | 3 lines Merge creation of Info.plist into update-version.pl. This fixes the static version info after branching (#2820503). ........ r43102 | knakos | 2009-08-08 05:33:39 +1000 (Sat, 08 Aug 2009) | 1 line mouse up events need the same lovin' as mouse down events do. don't underestimate 'em. fixes bug #2833549 ........ r43107 | drmccoy | 2009-08-08 12:23:04 +1000 (Sat, 08 Aug 2009) | 1 line When opening a data stream, don't read the whole file into memory if not necessary. This vastly improves the loading times of Gob3 on small devices ........ r43112 | dreammaster | 2009-08-08 19:34:23 +1000 (Sat, 08 Aug 2009) | 1 line Commit of dhewg's patch to fix screen refreshes on the Wii ........ r43114 | knakos | 2009-08-08 19:38:12 +1000 (Sat, 08 Aug 2009) | 1 line forward port of wince 3.0 fix for paths from branch 0.13.0, r39978 ........ r43117 | dhewg | 2009-08-08 21:30:56 +1000 (Sat, 08 Aug 2009) | 1 line tweaked the mapped keys to reintroduce SHIFT for mass adding games ........ r43119 | lordhoto | 2009-08-08 21:42:29 +1000 (Sat, 08 Aug 2009) | 1 line Add workaround for bug #2820054 "DW1: No intro music at first start on Wii", which actually happened on all systems, when using the multilanguage version. ........ r43120 | lordhoto | 2009-08-08 21:51:15 +1000 (Sat, 08 Aug 2009) | 1 line Fix for bug #2412336 "DW2: Voices cut off" (commit on behalf of dreammaster) ........ r43122 | lordhoto | 2009-08-08 22:00:34 +1000 (Sat, 08 Aug 2009) | 1 line Formatting fix. ........ r43123 | lordhoto | 2009-08-08 22:22:34 +1000 (Sat, 08 Aug 2009) | 1 line Change workaround for bug #2820054 to apply for all GRA versions. ........ r43126 | lordhoto | 2009-08-08 23:57:21 +1000 (Sat, 08 Aug 2009) | 1 line Fix XMIDI looping implementation. Now for example the music in the ferret village of ITE plays fine. ........ r43131 | sev | 2009-08-09 04:01:44 +1000 (Sun, 09 Aug 2009) | 2 lines Implement FR#2821534: "GUI: Mute All disable volume sliders" ........ r43139 | sev | 2009-08-09 06:08:22 +1000 (Sun, 09 Aug 2009) | 2 lines Add DS version of Atari MM from Bug #2834054 ........ r43143 | sev | 2009-08-09 06:16:58 +1000 (Sun, 09 Aug 2009) | 2 lines Patch #2832247: "GMM: Enable loading & deleting of unnamed savegames" ........ r43145 | sev | 2009-08-09 06:49:13 +1000 (Sun, 09 Aug 2009) | 2 lines Fix bug #2825565: "Unable to select subtitles in Atlantis and Simon 1" ........ r43147 | drmccoy | 2009-08-09 07:43:07 +1000 (Sun, 09 Aug 2009) | 1 line Changed the scroll-handling to be more like the original. This fixes bug #2832362 ("GOB3: Scrolling locked after cutscene") ........ r43150 | dreammaster | 2009-08-09 11:05:47 +1000 (Sun, 09 Aug 2009) | 1 line Changed subtitles display speed to also include the time taken to say voice samples (if voices are turned on). This means subtitles will display for the same time irrespective of whether voices are on or not ........ r43152 | Kirben | 2009-08-09 11:20:08 +1000 (Sun, 09 Aug 2009) | 1 line Fix bug #2834254 - ELVIRA: Buggy scroll arrows when mixing spells. ........ r43155 | dreammaster | 2009-08-09 11:45:39 +1000 (Sun, 09 Aug 2009) | 1 line Slight adjustment to Spanish font lookup table, based on mac_es's description of character lookup problems ........ r43156 | Kirben | 2009-08-09 11:55:34 +1000 (Sun, 09 Aug 2009) | 1 line Fix bug #2834252 - ELVIRA1 Problem with 8-character-long save names. ........ r43163 | Kirben | 2009-08-09 17:16:08 +1000 (Sun, 09 Aug 2009) | 1 line Fix bug #2834260 - ELVIRA1: Graphic glitch when bird takes off. ........ r43165 | Kirben | 2009-08-09 20:28:11 +1000 (Sun, 09 Aug 2009) | 1 line Fix glitch when removing arrows from spell book in Elvira 1. ........ r43167 | djwillis | 2009-08-09 22:12:24 +1000 (Sun, 09 Aug 2009) | 1 line GP2X: Commit local version of backend, contains a 'fix' to work around a GP2X SDL 'feature' that was removing the ability to disable aspect ratio correction. Also misc cleanup and changes to default volume levels to cut down on sample clipping. ........ r43171 | dreammaster | 2009-08-09 22:23:01 +1000 (Sun, 09 Aug 2009) | 1 line Removed redundant code related to Midi handling ........ r43172 | lordhoto | 2009-08-10 01:37:00 +1000 (Mon, 10 Aug 2009) | 1 line Fix for bug #2834250 "GUI: Incorrect behavior of sliders". ........ r43178 | knakos | 2009-08-10 04:34:08 +1000 (Mon, 10 Aug 2009) | 1 line removing support for flac (good riddance) and mpeg2 ........ r43179 | knakos | 2009-08-10 04:37:29 +1000 (Mon, 10 Aug 2009) | 1 line update news files for 1.0.0rc1 release ........ r43183 | lordhoto | 2009-08-10 05:11:10 +1000 (Mon, 10 Aug 2009) | 1 line Cleanup AMIGA graphics conversion. ........ r43186 | lordhoto | 2009-08-10 08:46:25 +1000 (Mon, 10 Aug 2009) | 1 line Create a "Font" interface and create a "DOSFont" implementation for handling DOS version fonts. ........ r43187 | lordhoto | 2009-08-10 08:46:43 +1000 (Mon, 10 Aug 2009) | 1 line Add support for the font format used in Kyrandia 1 Amiga. (font colors are wrong though) ........ r43188 | lordhoto | 2009-08-10 09:23:48 +1000 (Mon, 10 Aug 2009) | 1 line Unbreak basic Kyra1 amiga in game support, by disabling some palette code for the amiga version. ........ r43189 | lordhoto | 2009-08-10 09:32:52 +1000 (Mon, 10 Aug 2009) | 1 line Clear the destination page for bitmap loading, this fixes graphics artifacts in Kyra1 amiga. ........ r43190 | waltervn | 2009-08-10 11:08:20 +1000 (Mon, 10 Aug 2009) | 3 lines SCI: Added detection entries for French versions of Eco Quest 1/2 (reported by Strangerke). ........ r43191 | lordhoto | 2009-08-10 11:32:22 +1000 (Mon, 10 Aug 2009) | 1 line Disable menu text fading in kyra1 amiga for now. ........ r43192 | lordhoto | 2009-08-10 11:32:39 +1000 (Mon, 10 Aug 2009) | 1 line Initial support for correct colors in the interface of Kyra1 AMIGA. ........ r43193 | lordhoto | 2009-08-10 11:32:59 +1000 (Mon, 10 Aug 2009) | 1 line Fix inventory background color. ........ r43194 | lordhoto | 2009-08-10 11:33:18 +1000 (Mon, 10 Aug 2009) | 1 line Fix text color in character speeches in Kyra1 amiga. ........ r43195 | lordhoto | 2009-08-10 11:33:36 +1000 (Mon, 10 Aug 2009) | 1 line Fix interface text color. ........ r43196 | lordhoto | 2009-08-10 11:33:56 +1000 (Mon, 10 Aug 2009) | 1 line Enable interface text fading in Kyra1 amiga again. ........ r43197 | lordhoto | 2009-08-10 11:34:14 +1000 (Mon, 10 Aug 2009) | 1 line Use interface palette for mouse cursor in Kyra1 amiga, when it's enabled. ........ r43198 | lordhoto | 2009-08-10 11:34:29 +1000 (Mon, 10 Aug 2009) | 1 line Cleanup. ........ r43199 | lordhoto | 2009-08-10 11:34:46 +1000 (Mon, 10 Aug 2009) | 1 line Remove dead code. ........ r43200 | lordhoto | 2009-08-10 12:32:19 +1000 (Mon, 10 Aug 2009) | 1 line Fix bug when setting up mouse cursor with inventory palette. ........ r43202 | athrxx | 2009-08-10 20:25:53 +1000 (Mon, 10 Aug 2009) | 1 line LOL: fix main menu in floppy version ........ r43205 | lordhoto | 2009-08-10 23:46:17 +1000 (Mon, 10 Aug 2009) | 1 line Made font color configuration independend from font style configuration. ........ r43206 | lordhoto | 2009-08-11 00:05:14 +1000 (Tue, 11 Aug 2009) | 1 line Rename 'font_color' attribute for 'text' draw step to 'text_color'. ........ r43207 | lordhoto | 2009-08-11 00:35:28 +1000 (Tue, 11 Aug 2009) | 1 line Fix copyright string displaying in Kyra1 amiga. Unlike the DOS version it does not use a second print for creating a shadow look. ........ r43208 | lordhoto | 2009-08-11 02:42:39 +1000 (Tue, 11 Aug 2009) | 4 lines - Fix extraction of Kyra 1 amiga string tables in kyra.dat - Fix "taken" string offsets in kyra.dat - Add temporary workaround for only one "taken" string being present in Kyra 1 amiga. - Update kyra.dat ........ r43209 | lordhoto | 2009-08-11 03:14:03 +1000 (Tue, 11 Aug 2009) | 1 line Fix GUI strings in Kyrandia 1 Amiga. ........ r43210 | lordhoto | 2009-08-11 03:14:22 +1000 (Tue, 11 Aug 2009) | 1 line Implement item to item name list index mapping for Kyrandia 1 Amiga. ........ r43211 | lordhoto | 2009-08-11 03:17:19 +1000 (Tue, 11 Aug 2009) | 1 line Typo. ........ r43212 | lordhoto | 2009-08-11 04:01:28 +1000 (Tue, 11 Aug 2009) | 1 line Fix GUI font colors and text drawing in Kyrandia 1 Amiga. ........ r43213 | lordhoto | 2009-08-11 04:03:37 +1000 (Tue, 11 Aug 2009) | 1 line Fix GUI button outline colors in Kyra1 Amiga. ........ r43214 | tramboi | 2009-08-11 04:03:54 +1000 (Tue, 11 Aug 2009) | 2 lines Option "desired_screen_aspect_ratio" for fullscreen mode in the SDL backend Shortcoming: the picture is not centered ........ r43215 | lordhoto | 2009-08-11 04:04:53 +1000 (Tue, 11 Aug 2009) | 1 line Fix GUI menu colors for Kyrandia 1 Amiga. ........ r43216 | lordhoto | 2009-08-11 04:13:01 +1000 (Tue, 11 Aug 2009) | 1 line Remove unused variables. ........ r43217 | waltervn | 2009-08-11 04:37:47 +1000 (Tue, 11 Aug 2009) | 2 lines SCI: Improved multilanguage support for SCI1 and SCI1.1. ........ r43218 | waltervn | 2009-08-11 04:43:15 +1000 (Tue, 11 Aug 2009) | 2 lines SCI: Fix warnings. ........ r43219 | waltervn | 2009-08-11 04:59:59 +1000 (Tue, 11 Aug 2009) | 2 lines SCI: Fix vmvars debug command. ........ r43220 | lordhoto | 2009-08-11 05:08:00 +1000 (Tue, 11 Aug 2009) | 2 lines - Fix AMIGA to DOS palette conversion - Amiga version uses 13 instead of 12 palette buffers ........ r43221 | lordhoto | 2009-08-11 05:09:13 +1000 (Tue, 11 Aug 2009) | 1 line Fix incorrect converted colors in Kyra1 Amiga speech text color setup. ........ r43222 | lordhoto | 2009-08-11 05:10:11 +1000 (Tue, 11 Aug 2009) | 1 line Implement differences for Kyrandia 1 Amiga in o1_setCustomPaletteRange. ........ r43223 | sev | 2009-08-11 05:31:08 +1000 (Tue, 11 Aug 2009) | 2 lines Add support for Italian MM NES ........ r43227 | strangerke | 2009-08-11 06:57:26 +1000 (Tue, 11 Aug 2009) | 1 line gob - Add a workaround for files (at least in Playtoons) that are tested on CD only, with the '@' symbol ........ r43228 | strangerke | 2009-08-11 06:58:13 +1000 (Tue, 11 Aug 2009) | 1 line gob - Add 2 files tested and used by Playtoons and Playtoons CK ........ r43229 | waltervn | 2009-08-11 07:30:16 +1000 (Tue, 11 Aug 2009) | 2 lines SCI: Added several debug command aliases. ........ r43230 | lordhoto | 2009-08-11 08:18:18 +1000 (Tue, 11 Aug 2009) | 1 line Cleanup. ........ r43231 | lordhoto | 2009-08-11 08:18:33 +1000 (Tue, 11 Aug 2009) | 1 line Fix o1_makeAmuletAppear for Kyrandia 1 Amiga. ........ r43232 | lordhoto | 2009-08-11 08:18:47 +1000 (Tue, 11 Aug 2009) | 1 line Fix WSA movies for final sequence of Kyrandia 1 Amiga. (this is just a theoretical fix, the game isn't yet playable till then) ........ r43233 | lordhoto | 2009-08-11 08:54:25 +1000 (Tue, 11 Aug 2009) | 1 line Proper implementation of o1_fadeSpecialPalette for Kyrandia 1 Amiga. ........ r43234 | lordhoto | 2009-08-11 08:54:45 +1000 (Tue, 11 Aug 2009) | 1 line Fix cauldron water color in Zanthia's home in Kyrandia 1 Amiga. ........ r43235 | mthreepwood | 2009-08-11 09:01:11 +1000 (Tue, 11 Aug 2009) | 1 line Provide a better detection method for Indy3 Mac sound effects. This fixes sounds such as the music that plays when Indy uses the whip on the hook in the giant cork. This also is a proper fix for bug #1852635 -- Sound 54 is actually not a sound effect. ........ r43237 | lordhoto | 2009-08-11 09:34:35 +1000 (Tue, 11 Aug 2009) | 1 line Implement different in Kyrandia 1 Amiga in o1_setFireberryGlowPalette. ........ r43238 | lordhoto | 2009-08-11 09:35:16 +1000 (Tue, 11 Aug 2009) | 1 line Fix yet another inventory background color glitch in Kyrandia 1 Amiga. ........ r43239 | lordhoto | 2009-08-11 10:14:24 +1000 (Tue, 11 Aug 2009) | 1 line Fix a little graphics bug in Kyrandia 1 Amiga, when jewels are enabled. ........ r43240 | lordhoto | 2009-08-11 10:14:40 +1000 (Tue, 11 Aug 2009) | 1 line Disable Kyragem fading for Kyrandia 1 Amiga. ........ r43241 | lordhoto | 2009-08-11 10:14:54 +1000 (Tue, 11 Aug 2009) | 1 line Fix regression introduced with r41081. ........ svn-id: r43250
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/console.cpp27
-rw-r--r--engines/sci/detection.cpp25
-rw-r--r--engines/sci/engine/game.cpp3
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kmisc.cpp2
-rw-r--r--engines/sci/engine/kstring.cpp17
-rw-r--r--engines/sci/engine/message.cpp18
-rw-r--r--engines/sci/engine/state.cpp57
-rw-r--r--engines/sci/engine/state.h1
-rw-r--r--engines/sci/engine/vm.cpp4
11 files changed, 131 insertions, 26 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 2ddc6979c9..eacae8e697 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -120,8 +120,11 @@ Console::Console(SciEngine *vm) : GUI::Debugger() {
#endif
// Segments
DCmd_Register("segment_table", WRAP_METHOD(Console, cmdPrintSegmentTable));
+ DCmd_Register("segtable", WRAP_METHOD(Console, cmdPrintSegmentTable)); // alias
DCmd_Register("segment_info", WRAP_METHOD(Console, cmdSegmentInfo));
+ DCmd_Register("seginfo", WRAP_METHOD(Console, cmdSegmentInfo)); // alias
DCmd_Register("segment_kill", WRAP_METHOD(Console, cmdKillSegment));
+ DCmd_Register("segkill", WRAP_METHOD(Console, cmdKillSegment)); // alias
// Garbage collection
DCmd_Register("gc", WRAP_METHOD(Console, cmdGCInvoke));
DCmd_Register("gc_objects", WRAP_METHOD(Console, cmdGCObjects));
@@ -157,7 +160,9 @@ Console::Console(SciEngine *vm) : GUI::Debugger() {
DCmd_Register("go", WRAP_METHOD(Console, cmdGo));
// Breakpoints
DCmd_Register("bp_list", WRAP_METHOD(Console, cmdBreakpointList));
+ DCmd_Register("bplist", WRAP_METHOD(Console, cmdBreakpointList)); // alias
DCmd_Register("bp_del", WRAP_METHOD(Console, cmdBreakpointDelete));
+ DCmd_Register("bpdel", WRAP_METHOD(Console, cmdBreakpointDelete)); // alias
DCmd_Register("bp_exec_method", WRAP_METHOD(Console, cmdBreakpointExecMethod));
DCmd_Register("bpx", WRAP_METHOD(Console, cmdBreakpointExecMethod)); // alias
DCmd_Register("bp_exec_function", WRAP_METHOD(Console, cmdBreakpointExecFunction));
@@ -165,7 +170,9 @@ Console::Console(SciEngine *vm) : GUI::Debugger() {
// VM
DCmd_Register("script_steps", WRAP_METHOD(Console, cmdScriptSteps));
DCmd_Register("vm_varlist", WRAP_METHOD(Console, cmdVMVarlist));
+ DCmd_Register("vmvarlist", WRAP_METHOD(Console, cmdVMVarlist)); // alias
DCmd_Register("vm_vars", WRAP_METHOD(Console, cmdVMVars));
+ DCmd_Register("vmvars", WRAP_METHOD(Console, cmdVMVars)); // alias
DCmd_Register("stack", WRAP_METHOD(Console, cmdStack));
DCmd_Register("value_type", WRAP_METHOD(Console, cmdValueType));
DCmd_Register("view_listnode", WRAP_METHOD(Console, cmdViewListNode));
@@ -300,9 +307,9 @@ bool Console::cmdHelp(int argc, const char **argv) {
#endif
DebugPrintf("\n");
DebugPrintf("Segments:\n");
- DebugPrintf(" segment_table - Lists all segments\n");
- DebugPrintf(" segment_info - Provides information on the specified segment\n");
- DebugPrintf(" segment_kill - Deletes the specified segment\n");
+ DebugPrintf(" segment_table / segtable - Lists all segments\n");
+ DebugPrintf(" segment_info / seginfo - Provides information on the specified segment\n");
+ DebugPrintf(" segment_kill / segkill - Deletes the specified segment\n");
DebugPrintf("\n");
DebugPrintf("Garbage collection:\n");
DebugPrintf(" gc - Invokes the garbage collector\n");
@@ -335,15 +342,15 @@ bool Console::cmdHelp(int argc, const char **argv) {
DebugPrintf(" go - Executes the script\n");
DebugPrintf("\n");
DebugPrintf("Breakpoints:\n");
- DebugPrintf(" bp_list - Lists the current breakpoints\n");
- DebugPrintf(" bp_del - Deletes a breakpoint with the specified index\n");
+ DebugPrintf(" bp_list / bplist - Lists the current breakpoints\n");
+ DebugPrintf(" bp_del / bpdel - Deletes a breakpoint with the specified index\n");
DebugPrintf(" bp_exec_method / bpx - Sets a breakpoint on the execution of the specified method\n");
DebugPrintf(" bp_exec_function / bpe - Sets a breakpoint on the execution of the specified exported function\n");
DebugPrintf("\n");
DebugPrintf("VM:\n");
DebugPrintf(" script_steps - Shows the number of executed SCI operations\n");
- DebugPrintf(" vm_varlist - Shows the addresses of variables in the VM\n");
- DebugPrintf(" vm_vars - Displays or changes variables in the VM\n");
+ DebugPrintf(" vm_varlist / vmvarlist - Shows the addresses of variables in the VM\n");
+ DebugPrintf(" vm_vars / vmvars - Displays or changes variables in the VM\n");
DebugPrintf(" stack - Lists the specified number of stack elements\n");
DebugPrintf(" value_type - Determines the type of a value\n");
DebugPrintf(" view_listnode - Examines the list node at the given address\n");
@@ -1713,7 +1720,7 @@ bool Console::cmdVMVarlist(int argc, const char **argv) {
}
bool Console::cmdVMVars(int argc, const char **argv) {
- if (argc < 2) {
+ if (argc < 3) {
DebugPrintf("Displays or changes variables in the VM\n");
DebugPrintf("Usage: %s <type> <varnum> [<value>]\n", argv[0]);
DebugPrintf("First parameter is either g(lobal), l(ocal), t(emp) or p(aram).\n");
@@ -1747,10 +1754,10 @@ bool Console::cmdVMVars(int argc, const char **argv) {
}
switch (argc) {
- case 2:
+ case 3:
DebugPrintf("%s var %d == %04x:%04x\n", varnames[vartype], idx, PRINT_REG(scriptState.variables[vartype][idx]));
break;
- case 3:
+ case 4:
if (parse_reg_t(_vm->_gamestate, argv[3], &scriptState.variables[vartype][idx])) {
DebugPrintf("Invalid address passed.\n");
DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 7118eb682d..d0b3919c60 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -569,6 +569,20 @@ static const struct SciGameDescription SciGameDescriptions[] = {
SCI_VERSION_1
},
+ // Eco Quest - French DOS Floppy (from Strangerke)
+ // SCI interpreter version 1.ECO.013
+ {{"ecoquest", "Floppy", {
+ {"resource.map", 0, "67742945cd59b896d9f22a549f605217", 4407},
+ {"resource.000", 0, "0b12a91c935e385308af8d17811deded", 973723},
+ {"resource.001", 0, "fc7fba54b6bb88fd7e9c229636599aa9", 1205841},
+ {"resource.002", 0, "b836c6ee9de67d814ac5d1b05f5b9858", 1173872},
+ {"resource.003", 0, "f8f767f9d6351432621c6e54c1b2ba8c", 1141520},
+ {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
+ 0,
+ SCI_VERSION_AUTODETECT,
+ SCI_VERSION_1
+ },
+
// Eco Quest 2 - English DOS Non-Interactive Demo
// SCI interpreter version 1.001.055
{{"ecoquest2", "Demo", {
@@ -591,6 +605,17 @@ static const struct SciGameDescription SciGameDescriptions[] = {
SCI_VERSION_1_1
},
+ // Eco Quest 2 - French DOS Floppy (from Strangerke)
+ // SCI interpreter version 1.001.081
+ {{"ecoquest2", "Floppy", {
+ {"resource.map", 0, "c22ab8b33c339c138b6b1697b77b9e79", 5588},
+ {"resource.000", 0, "1c4093f7248240329121fdf8c0d59152", 4231946},
+ {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
+ 0,
+ SCI_VERSION_AUTODETECT,
+ SCI_VERSION_1_1
+ },
+
// Freddy Pharkas - English DOS demo (from FRG)
// SCI interpreter version 1.001.069
{{"freddypharkas", "Demo", {
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 0a74ac32e4..fa64957bec 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -497,6 +497,9 @@ int game_init(EngineState *s) {
if (s->sfx_init_flags & SFX_STATE_FLAG_NOSOUND)
game_init_sound(s, 0);
+ // Load game language into printLang property of game object
+ s->getLanguage();
+
return 0;
}
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 4133f4cb3b..2ccd88b709 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -320,6 +320,7 @@ SciKernelFunction kfunct_mappers[] = {
/*(?)*/ DEFUN("Lock", kLock, "iii*"),
/*(?)*/ DEFUN("Palette", kPalette, "i.*"),
/*(?)*/ DEFUN("IsItSkip", kIsItSkip, "iiiii"),
+ /*7b*/ DEFUN("StrSplit", kStrSplit, "rrZr"),
// Non-experimental Functions without a fixed ID
DEFUN("CosMult", kTimesCos, "ii"),
@@ -345,7 +346,6 @@ SciKernelFunction kfunct_mappers[] = {
DEFUN("MemorySegment", kStub, ".*"),
DEFUN("ListOps", kStub, ".*"),
DEFUN("ATan", kStub, ".*"),
- DEFUN("StrSplit", kStub, ".*"),
DEFUN("MergePoly", kStub, ".*"),
DEFUN("AssertPalette", kStub, ".*"),
DEFUN("TextColors", kStub, ".*"),
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 15f7c9fcf3..83b43542d4 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -540,6 +540,7 @@ reg_t kResCheck(EngineState *s, int funct_nr, int argc, reg_t *argv);
reg_t kSetQuitStr(EngineState *s, int funct_nr, int argc, reg_t *argv);
reg_t kShowMovie(EngineState *s, int funct_nr, int argc, reg_t *argv);
reg_t kSetVideoMode(EngineState *s, int funct_nr, int argc, reg_t *argv);
+reg_t kStrSplit(EngineState *s, int funct_nr, int argc, reg_t *argv);
reg_t k_Unknown(EngineState *s, int funct_nr, int argc, reg_t *argv);
// The Unknown/Unnamed kernel function
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index c693009b35..2f0072ec67 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -251,7 +251,7 @@ reg_t kStub(EngineState *s, int funct_nr, int argc, reg_t *argv) {
}
strcat(tmpbuf, ")");
- warning(tmpbuf);
+ warning("%s", tmpbuf);
return NULL_REG;
}
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index b6bb404d5b..6e5a19bba9 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -812,4 +812,21 @@ reg_t kSetQuitStr(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kStrSplit(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+ const char *format = kernel_dereference_char_pointer(s, argv[1], 0);
+ const char *sep = !argv[2].isNull() ? kernel_dereference_char_pointer(s, argv[2], 0) : NULL;
+ Common::String str = s->strSplit(format, sep);
+
+ // Make sure target buffer is large enough
+ char *buf = kernel_dereference_char_pointer(s, argv[0], str.size() + 1);
+
+ if (buf) {
+ strcpy(buf, str.c_str());
+ return argv[0];
+ } else {
+ warning("StrSplit: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(argv[0]), str.size() + 1, str.c_str());
+ return NULL_REG;
+ }
+}
+
} // End of namespace Sci
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index c019f7a3bc..a55d692afe 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -33,7 +33,7 @@ MessageTuple MessageState::getTuple() {
t.noun = *(_engineCursor.index_record + 0);
t.verb = *(_engineCursor.index_record + 1);
- if (_version == 2101) {
+ if (_version == 2) {
t.cond = 0;
t.seq = 1;
} else {
@@ -47,7 +47,7 @@ MessageTuple MessageState::getTuple() {
MessageTuple MessageState::getRefTuple() {
MessageTuple t;
- if (_version == 2101) {
+ if (_version == 2) {
t.noun = 0;
t.verb = 0;
t.cond = 0;
@@ -68,7 +68,7 @@ void MessageState::initCursor() {
}
void MessageState::advanceCursor(bool increaseSeq) {
- _engineCursor.index_record += ((_version == 2101) ? 4 : 11);
+ _engineCursor.index_record += ((_version == 2) ? 4 : 11);
_engineCursor.index++;
if (increaseSeq)
@@ -142,7 +142,7 @@ int MessageState::getMessage() {
}
int MessageState::getTalker() {
- return (_version == 2101) ? -1 : *(_engineCursor.index_record + 4);
+ return (_version == 2) ? -1 : *(_engineCursor.index_record + 4);
}
MessageTuple &MessageState::getLastTuple() {
@@ -154,7 +154,7 @@ int MessageState::getLastModule() {
}
Common::String MessageState::getText() {
- char *str = (char *)_currentResource->data + READ_LE_UINT16(_engineCursor.index_record + ((_version == 2101) ? 2 : 5));
+ char *str = (char *)_currentResource->data + READ_LE_UINT16(_engineCursor.index_record + ((_version == 2) ? 2 : 5));
Common::String strippedStr;
Common::String skippedSubstr;
@@ -215,7 +215,7 @@ void MessageState::gotoNext() {
}
int MessageState::getLength() {
- int offset = READ_LE_UINT16(_engineCursor.index_record + ((_version == 2101) ? 2 : 5));
+ int offset = READ_LE_UINT16(_engineCursor.index_record + ((_version == 2) ? 2 : 5));
char *stringptr = (char *)_currentResource->data + offset;
return strlen(stringptr);
}
@@ -244,8 +244,12 @@ int MessageState::loadRes(ResourceManager *resmgr, int module, bool lock) {
_locked = lock;
_version = READ_LE_UINT16(_currentResource->data);
+ debug(5, "Message: reading resource %d.msg, version %d.%03d", _module, _version / 1000, _version % 1000);
- int offs = (_version == 2101) ? 0 : 4;
+ // We assume for now that storing the major version is sufficient
+ _version /= 1000;
+
+ int offs = (_version == 2) ? 0 : 4;
_recordCount = READ_LE_UINT16(_currentResource->data + 4 + offs);
_indexRecords = _currentResource->data + 6 + offs;
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 38320c29cc..405c9ec66f 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -172,15 +172,62 @@ Common::String EngineState::getLanguageString(const char *str, kLanguage lang) c
return Common::String(str);
}
+kLanguage EngineState::getLanguage() {
+ kLanguage lang = K_LANG_ENGLISH;
+
+ if (((SciEngine*)g_engine)->getKernel()->_selectorMap.printLang != -1) {
+ EngineState *s = this;
+
+ lang = (kLanguage)GET_SEL32V(s->game_obj, printLang);
+
+ if ((_version == SCI_VERSION_1_1) || (lang == K_LANG_NONE)) {
+ // If language is set to none, we use the language from the game detector.
+ // SSCI reads this from resource.cfg (early games do not have a language
+ // setting in resource.cfg, but instead have the secondary language number
+ // hardcoded in the game script).
+ // SCI1.1 games always use the language setting from the config file
+ // (essentially disabling runtime language switching).
+ // Note: only a limited number of multilanguage games have been tested
+ // so far, so this information may not be 100% accurate.
+ switch (((Sci::SciEngine*)g_engine)->getLanguage()) {
+ case Common::FR_FRA:
+ lang = K_LANG_FRENCH;
+ break;
+ case Common::ES_ESP:
+ lang = K_LANG_SPANISH;
+ break;
+ case Common::IT_ITA:
+ lang = K_LANG_ITALIAN;
+ break;
+ case Common::DE_DEU:
+ lang = K_LANG_GERMAN;
+ break;
+ case Common::JA_JPN:
+ lang = K_LANG_JAPANESE;
+ break;
+ case Common::PT_BRA:
+ lang = K_LANG_PORTUGUESE;
+ break;
+ default:
+ lang = K_LANG_ENGLISH;
+ }
+
+ // Store language in printLang selector
+ PUT_SEL32V(s->game_obj, printLang, lang);
+ }
+ }
+
+ return lang;
+}
+
Common::String EngineState::strSplit(const char *str, const char *sep) {
EngineState *s = this;
- kLanguage lang = (kLanguage)GET_SEL32V(s->game_obj, printLang);
- kLanguage subLang = (kLanguage)GET_SEL32V(s->game_obj, subtitleLang);
+ kLanguage lang = getLanguage();
+ kLanguage subLang = K_LANG_NONE;
- // Use English when no language settings are present in the game
- if (lang == K_LANG_NONE)
- lang = K_LANG_ENGLISH;
+ if (((SciEngine*)g_engine)->getKernel()->_selectorMap.subtitleLang != -1)
+ subLang = (kLanguage)GET_SEL32V(s->game_obj, subtitleLang);
Common::String retval = getLanguageString(str, lang);
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index b41e9e383a..3db926ab3d 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -125,6 +125,7 @@ public:
virtual ~EngineState();
virtual void saveLoadWithSerializer(Common::Serializer &ser);
+ kLanguage getLanguage();
public:
int widget_serial_counter; /**< Used for savegames */
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 0f8fee0876..02c287a99a 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -126,9 +126,9 @@ static int validate_variable(reg_t *r, reg_t *stack_base, int type, int max, int
}
if (g_debug_weak_validations)
- warning(txt);
+ warning("%s", txt);
else
- error(txt);
+ error("%s", txt);
#ifdef STRICT_READ
return 1;