[Scummvm-cvs-logs] SF.net SVN: scummvm: [24592] scummvm/trunk

cyx at users.sourceforge.net cyx at users.sourceforge.net
Fri Nov 3 22:23:35 CET 2006


Revision: 24592
          http://svn.sourceforge.net/scummvm/?rev=24592&view=rev
Author:   cyx
Date:     2006-11-03 13:23:07 -0800 (Fri, 03 Nov 2006)

Log Message:
-----------
added 'touche' engine for the game 'Touche: The Adventures of the 5th Musketeer'

Modified Paths:
--------------
    scummvm/trunk/base/plugins.cpp
    scummvm/trunk/configure
    scummvm/trunk/engines/engines.mk

Added Paths:
-----------
    scummvm/trunk/engines/touche/
    scummvm/trunk/engines/touche/graphics.cpp
    scummvm/trunk/engines/touche/graphics.h
    scummvm/trunk/engines/touche/module.mk
    scummvm/trunk/engines/touche/opcodes.cpp
    scummvm/trunk/engines/touche/plugin.cpp
    scummvm/trunk/engines/touche/resource.cpp
    scummvm/trunk/engines/touche/saveload.cpp
    scummvm/trunk/engines/touche/staticres.cpp
    scummvm/trunk/engines/touche/touche.cpp
    scummvm/trunk/engines/touche/touche.h
    scummvm/trunk/engines/touche/ui.cpp

Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp	2006-11-03 21:04:10 UTC (rev 24591)
+++ scummvm/trunk/base/plugins.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -150,6 +150,9 @@
 		#ifndef DISABLE_AGI
 		LINK_PLUGIN(AGI)
 		#endif
+		#ifndef DISABLE_TOUCHE
+		LINK_PLUGIN(TOUCHE)
+		#endif
 
 		return pl;
 	}
@@ -181,7 +184,7 @@
 		delete *pp;
 	}
 }
-	
+
 void PluginManager::addPluginProvider(PluginProvider *pp) {
 	_providers.push_back(pp);
 }

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2006-11-03 21:04:10 UTC (rev 24591)
+++ scummvm/trunk/configure	2006-11-03 21:23:07 UTC (rev 24592)
@@ -60,6 +60,7 @@
 _build_lure=no
 _build_cine=yes
 _build_agi=no
+_build_touche=no
 _need_memalign=no
 _build_plugins=no
 _nasm=auto
@@ -332,6 +333,7 @@
   --enable-lure            build the Lure of the Temptress engine
   --disable-cine           don't build the Cinematique engine evo 1
   --enable-agi             build the AGI engine
+  --enable-touche          build the Touche: The Adventures of the Fifth Musketeer engine
   --enable-plugins         build engines as loadable modules instead of
                            static linking them
   --disable-mt32emu        don't enable the integrated MT-32 emulator
@@ -400,6 +402,7 @@
       --enable-lure)            _build_lure=yes ;;
       --disable-cine)           _build_cine=no ;;
       --enable-agi)             _build_agi=yes ;;
+      --enable-touche)          _build_touche=yes ;;
       --disable-hq-scalers)     _build_hq_scalers=no ;;
       --disable-scalers)        _build_scalers=no ;;
       --enable-alsa)            _alsa=yes       ;;
@@ -685,6 +688,7 @@
 add_flag_to_config_mk $_build_lure        'DISABLE_LURE'
 add_flag_to_config_mk $_build_cine        'DISABLE_CINE'
 add_flag_to_config_mk $_build_agi         'DISABLE_AGI'
+add_flag_to_config_mk $_build_touche      'DISABLE_TOUCHE'
 add_flag_to_config_mk $_build_hq_scalers  'DISABLE_HQ_SCALERS'
 add_flag_to_config_mk $_build_scalers     'DISABLE_SCALERS'
 
@@ -1270,10 +1274,12 @@
 if test "$_build_cine" = yes ; then
 	echo "    Cinematique evo 1"
 fi
-
 if test "$_build_agi" = yes ; then
 	echo "    AGI"
 fi
+if test "$_build_touche" = yes ; then
+	echo "    Touche: The Adventures of the Fifth Musketeer"
+fi
 
 echo
 

Modified: scummvm/trunk/engines/engines.mk
===================================================================
--- scummvm/trunk/engines/engines.mk	2006-11-03 21:04:10 UTC (rev 24591)
+++ scummvm/trunk/engines/engines.mk	2006-11-03 21:23:07 UTC (rev 24592)
@@ -45,19 +45,19 @@
 
 ifdef DISABLE_SAGA
 DEFINES += -DDISABLE_SAGA
-else 
+else
 MODULES += engines/saga
 endif
 
 ifdef DISABLE_KYRA
 DEFINES += -DDISABLE_KYRA
-else 
+else
 MODULES += engines/kyra
 endif
 
 ifdef DISABLE_GOB
 DEFINES += -DDISABLE_GOB
-else 
+else
 MODULES += engines/gob
 endif
 
@@ -69,13 +69,18 @@
 
 ifdef DISABLE_CINE
 DEFINES += -DDISABLE_CINE
-else 
+else
 MODULES += engines/cine
 endif
 
 ifdef DISABLE_AGI
 DEFINES += -DDISABLE_AGI
-else 
+else
 MODULES += engines/agi
 endif
 
+ifdef DISABLE_TOUCHE
+DEFINES += -DDISABLE_TOUCHE
+else
+MODULES += engines/touche
+endif

Added: scummvm/trunk/engines/touche/graphics.cpp
===================================================================
--- scummvm/trunk/engines/touche/graphics.cpp	                        (rev 0)
+++ scummvm/trunk/engines/touche/graphics.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,210 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#include "common/stdafx.h"
+#include "common/endian.h"
+
+#include "touche/graphics.h"
+
+namespace Touche {
+
+int Graphics::getStringWidth16(const char *str) {
+	int w = 0;
+	while (*str) {
+		char chr = *str++;
+		w += getCharWidth16((uint8)chr);
+		if (*str == '\\') {
+			break;
+		}
+	}
+	return w;
+}
+
+int Graphics::getCharWidth16(uint8 chr) {
+	assert(chr >= 32 && chr < 174);
+	const uint8 *chrData = _fontData + _fontOffs[chr - 32];
+	return chrData[2];
+}
+
+void Graphics::drawString16(uint8 *dst, int dstPitch, uint16 color, int x, int y, const char *str) {
+	while (*str) {
+		uint8 chr = (uint8)*str++;
+		x += drawChar16(dst, dstPitch, chr, x, y, color);
+	}
+}
+
+int Graphics::drawChar16(uint8 *dst, int dstPitch, uint8 chr, int x, int y, uint16 color) {
+	dst += y * dstPitch + x;
+	uint8 color1 = color & 0xFF;
+	uint8 color2 = color >> 8;
+	assert(chr >= 32 && chr < 174);
+	const uint8 *chrData = _fontData + _fontOffs[chr - 32];
+	int chrHeight = chrData[1];
+	int chrWidth = chrData[2];
+	chrData += 3;
+	while (chrHeight--) {
+		int shiftCount = 0;
+		int mask = 0;
+		for (int i = 0; i < chrWidth; ++i) {
+			if (shiftCount == 0) {
+				mask = READ_BE_UINT16(chrData); chrData += 2;
+				shiftCount = 8;
+			}
+			int b = (mask & 0xC000) >> 14;
+			mask <<= 2;
+			--shiftCount;
+			if (b) {
+				if (b & 2) {
+					dst[i] = color2;
+				} else {
+					dst[i] = color1;
+				}
+			}
+		}
+		dst += dstPitch;
+	}
+	return chrWidth;
+}
+
+void Graphics::fillRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color) {
+	dst += y * dstPitch + x;
+	while (h--) {
+		memset(dst, color, w);
+		dst += dstPitch;
+	}
+}
+
+void Graphics::drawRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color1, uint8 color2) {
+	int x1 = x;
+	int y1 = y;
+	int x2 = x + w - 1;
+	int y2 = y + h - 1;
+	drawLineHV(dst, dstPitch, x1, y1, x2, y1, color1);
+	drawLineHV(dst, dstPitch, x1, y1, x1, y2, color1);
+	drawLineHV(dst, dstPitch, x2, y1 + 1, x2, y2, color2);
+	drawLineHV(dst, dstPitch, x1 + 1, y2, x2, y2, color2);
+}
+
+void Graphics::drawLineHV(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color) {
+	if (x2 < x1) {
+		SWAP(x2, x1);
+	}
+	if (y2 < y1) {
+		SWAP(y2, y1);
+	}
+	if (y1 == y2) {
+		for (int x = x1; x < x2; ++x) {
+			dst[y1 * dstPitch + x] = color;
+		}
+	} else {
+		for (int y = y1; y < y2; ++y) {
+			dst[y * dstPitch + x1] = color;
+		}
+	}
+}
+
+void Graphics::drawLine(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color) {
+	assert(x1 >= 0 && y1 >= 0 && x2 >= 0 && y2 >= 0);
+
+	dst += y1 * dstPitch + x1;
+
+	int yInc, dy = y2 - y1;
+	if (dy < 0) {
+		dy = -dy;
+		yInc = -dstPitch;
+	} else {
+		yInc = dstPitch;
+	}
+
+	int xInc, dx = x2 - x1;
+	if (dx < 0) {
+		dx = -dx;
+		xInc = -1;
+	} else {
+		xInc = 1;
+	}
+
+	int step = 0;
+
+	if (dx > dy) {
+		for (int i = 0; i < dx + 1; ++i) {
+			*dst = color;
+			dst += xInc;
+			step += dy;
+			if (step > dx) {
+				step -= dx;
+				dst += yInc;
+			}
+		}
+	} else {
+		for (int i = 0; i < dy + 1; ++i) {
+			*dst = color;
+			dst += yInc;
+			step += dx;
+			if (step > 0) {
+				step -= dy;
+				dst += xInc;
+			}
+		}
+	}
+}
+
+void Graphics::copyRect(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, int flags) {
+	if (w != 0 && h != 0) {
+		if (flags & kHFlipped) {
+			srcY += h - 1;
+			srcPitch = -srcPitch;
+		}
+		int u = 1;
+		if (flags & kVFlipped) {
+			srcX += w - 1;
+			u = -1;
+		}
+		dst += dstY * dstPitch + dstX;
+		src += srcY * srcPitch + srcX;
+		while (h--) {
+			for (int i = 0; i < w; ++i) {
+				if ((flags & kTransparent) == 0 || src[u * i] != 0) {
+					dst[i] = src[u * i];
+				}
+			}
+			dst += dstPitch;
+			src += srcPitch;
+		}
+	}
+}
+
+void Graphics::copyMask(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, uint8 fillColor) {
+	dst += dstY * dstPitch * dstX;
+	src += srcY * srcPitch + srcX;
+	while (h--) {
+		for (int i = 0; i < w; ++i) {
+			if (src[i] != 0) {
+				dst[i] = fillColor;
+			}
+		}
+		dst += dstPitch;
+		src += srcPitch;
+	}
+}
+
+} // namespace Touche


Property changes on: scummvm/trunk/engines/touche/graphics.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + "Date Rev Author URL Id"
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/graphics.h
===================================================================
--- scummvm/trunk/engines/touche/graphics.h	                        (rev 0)
+++ scummvm/trunk/engines/touche/graphics.h	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,54 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#ifndef TOUCHE_GRAPHICS_H
+#define TOUCHE_GRAPHICS_H
+
+#include "common/util.h"
+
+namespace Touche {
+
+struct Graphics {
+	enum {
+		kVFlipped    = 1 << 0,
+		kHFlipped    = 1 << 1,
+		kTransparent = 1 << 2
+	};
+
+	static int getStringWidth16(const char *str);
+	static int getCharWidth16(uint8 chr);
+	static void drawString16(uint8 *dst, int dstPitch, uint16 color, int x, int y, const char *str);
+	static int drawChar16(uint8 *dst, int dstPitch, uint8 chr, int x, int y, uint16 color);
+	static void fillRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color);
+	static void drawRect(uint8 *dst, int dstPitch, int x, int y, int w, int h, uint8 color1, uint8 color2);
+	static void drawLineHV(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color);
+	static void drawLine(uint8 *dst, int dstPitch, int x1, int y1, int x2, int y2, uint8 color);
+	static void copyRect(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, int flags = 0);
+	static void copyMask(uint8 *dst, int dstPitch, int dstX, int dstY, const uint8 *src, int srcPitch, int srcX, int srcY, int w, int h, uint8 fillColor);
+
+	static const uint16 _fontOffs[];
+	static const uint8 _fontData[];
+};
+
+} // namespace Touche
+
+#endif


Property changes on: scummvm/trunk/engines/touche/graphics.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + "Date Rev Author URL Id"
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/module.mk
===================================================================
--- scummvm/trunk/engines/touche/module.mk	                        (rev 0)
+++ scummvm/trunk/engines/touche/module.mk	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,19 @@
+MODULE := engines/touche
+
+MODULE_OBJS := \
+	graphics.o \
+	plugin.o \
+	opcodes.o \
+	resource.o \
+	saveload.o \
+	staticres.o \
+	touche.o \
+	ui.o
+
+# This module can be built as a plugin
+ifdef BUILD_PLUGINS
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk


Property changes on: scummvm/trunk/engines/touche/module.mk
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/opcodes.cpp
===================================================================
--- scummvm/trunk/engines/touche/opcodes.cpp	                        (rev 0)
+++ scummvm/trunk/engines/touche/opcodes.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,822 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#include "common/stdafx.h"
+
+#include "touche/touche.h"
+
+namespace Touche {
+
+void ToucheEngine::op_nop() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_nop()");
+}
+
+void ToucheEngine::op_jnz() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_jnz()");
+	if (*_script.stackDataPtr != 0) {
+		_script.dataOffset = _script.readNextWord();
+	} else {
+		_script.dataOffset += 2;
+	}
+}
+
+void ToucheEngine::op_jz() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_jz()");
+	if (*_script.stackDataPtr == 0) {
+		_script.dataOffset = _script.readNextWord();
+	} else {
+		_script.dataOffset += 2;
+	}
+}
+
+void ToucheEngine::op_jmp() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_jmp()");
+	_script.dataOffset = _script.readNextWord();
+}
+
+void ToucheEngine::op_true() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_true()");
+	*_script.stackDataPtr = -1;
+}
+
+void ToucheEngine::op_false() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_false()");
+	*_script.stackDataPtr = 0;
+}
+
+void ToucheEngine::op_push() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_push()");
+	--_script.stackDataPtr;
+	*_script.stackDataPtr = 0;
+}
+
+void ToucheEngine::op_testFalse() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testFalse()");
+	if (*_script.stackDataPtr == 0) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_add() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_add()");
+	int16 val = *_script.stackDataPtr++;
+	*_script.stackDataPtr += val;
+}
+
+void ToucheEngine::op_sub() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_sub()");
+	int16 val = *_script.stackDataPtr++;
+	*_script.stackDataPtr -= val;
+}
+
+void ToucheEngine::op_mul() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_mul()");
+	int16 val = *_script.stackDataPtr++;
+	*_script.stackDataPtr *= val;
+}
+
+void ToucheEngine::op_div() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_div()");
+	int16 val = *_script.stackDataPtr++;
+	if (val != 0) {
+		*_script.stackDataPtr /= val;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_mod() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_mod()");
+	int16 val = *_script.stackDataPtr++;
+	if (val != 0) {
+		*_script.stackDataPtr %= val;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_and() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_and()");
+	uint16 val = *_script.stackDataPtr++;
+	*_script.stackDataPtr &= val;
+}
+
+void ToucheEngine::op_or() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_or()");
+	uint16 val = *_script.stackDataPtr++;
+	*_script.stackDataPtr |= val;
+}
+
+void ToucheEngine::op_not() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_not()");
+	uint16 val = *_script.stackDataPtr;
+	*_script.stackDataPtr = ~val;
+}
+
+void ToucheEngine::op_testGreater() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testGreater()");
+	int16 val = *_script.stackDataPtr++;
+	if (val > *_script.stackDataPtr) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_testEquals() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testEquals()");
+	int16 val = *_script.stackDataPtr++;
+	if (val == *_script.stackDataPtr) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_testLower() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testLower()");
+	int16 val = *_script.stackDataPtr++;
+	if (val < *_script.stackDataPtr) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_fetchScriptWord() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_fetchScriptWord()");
+	int16 val = _script.readNextWord();
+	*_script.stackDataPtr = val;
+}
+
+void ToucheEngine::op_testGreaterOrEquals() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testGreaterOrEquals()");
+	int16 val = *_script.stackDataPtr++;
+	if (val >= *_script.stackDataPtr) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_testLowerOrEquals() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testLowerOrEquals()");
+	int16 val = *_script.stackDataPtr++;
+	if (val <= *_script.stackDataPtr) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_testNotEquals() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_testNotEquals()");
+	int16 val = *_script.stackDataPtr++;
+	if (val != *_script.stackDataPtr) {
+		*_script.stackDataPtr = -1;
+	} else {
+		*_script.stackDataPtr = 0;
+	}
+}
+
+void ToucheEngine::op_endConversation() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_endConversation()");
+	_script.quitFlag = 1;
+	_conversationEnded = true;
+	_disabledInputCounter = false;
+}
+
+void ToucheEngine::op_stopScript() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_stopScript()");
+	_script.quitFlag = 1;
+}
+
+void ToucheEngine::op_getFlag() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getFlag()");
+	uint16 fl = _script.readNextWord();
+	*_script.stackDataPtr = _flagsTable[fl];
+}
+
+void ToucheEngine::op_setFlag() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setFlag()");
+	uint16 flag = _script.readNextWord();
+	int16 val = *_script.stackDataPtr;
+	_flagsTable[flag] = val;
+	switch (flag) {
+	case 104:
+		_currentKeyCharNum = val;
+		break;
+	case 612:
+		_flagsTable[613] = getRandomNumber(val);
+		break;
+	case 614:
+	case 615:
+		_fullRedrawCounter = 1;
+		break;
+	default:
+		break;
+	}
+}
+
+void ToucheEngine::op_fetchScriptByte() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_fetchScriptByte()");
+	int16 val = _script.readNextByte();
+	*_script.stackDataPtr = val;
+}
+
+void ToucheEngine::op_getScriptValue() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getScriptValue()");
+	uint8 index = _script.readNextByte();
+	assert(index < _script.stackDataBasePtr[2]);
+	*_script.stackDataPtr = _script.stackDataBasePtr[3 + index];
+}
+
+void ToucheEngine::op_setScriptValue() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setScriptValue()");
+	uint8 index = _script.readNextByte();
+	assert(index < _script.stackDataBasePtr[2]);
+	_script.stackDataBasePtr[3 + index] = *_script.stackDataPtr;
+}
+
+void ToucheEngine::op_getKeyCharWalkBox() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharWalkBox()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	*_script.stackDataPtr = _keyCharsTable[keyChar].walkDataNum;
+}
+
+void ToucheEngine::op_startSound() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startSound()");
+	_newSoundNum = _script.readNextWord();
+	_newSoundDelay = _script.readNextWord();
+	_newSoundPriority = 1;
+}
+
+void ToucheEngine::op_initKeyCharTalk() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_initKeyCharTalk()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	int16 num = _script.readNextWord();
+	if (num == -1) {
+		num = _script.readNextWord();
+		num = _keyCharsTable[num].pointsDataNum;
+	}
+	sortPointsData(-1, num);
+	buildWalkPointsList(keyChar);
+	_keyCharsTable[keyChar].flags &= ~0x10;
+	if (_script.keyCharNum == keyChar) {
+		removeFromTalkTable(_script.keyCharNum);
+		_keyCharsTable[keyChar].waitingKeyCharPosTable[0] = -1;
+		_keyCharsTable[keyChar].waitingKeyCharPosTable[2] = -1;
+		_keyCharsTable[keyChar].waitingKeyChar = _script.keyCharNum;
+		_keyCharsTable[keyChar].waitingKeyCharPosTable[1] = num;
+		_script.quitFlag = 3;
+	}
+}
+
+void ToucheEngine::op_loadRoom() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_loadRoom()");
+	int16 num = _script.readNextWord();
+	res_loadRoom(num);
+}
+
+void ToucheEngine::op_updateRoom() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_updateRoom()");
+	int16 area = _script.readNextWord();
+	updateRoomAreas(area, 0);
+}
+
+void ToucheEngine::op_startTalk() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startTalk()");
+	int16 keyChar = _script.readNextWord();
+	int16 num = _script.readNextWord();
+	if (num == 750) {
+		return;
+	}
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+		num += _currentKeyCharNum & 1;
+	}
+	addToTalkTable(keyChar, num, _script.keyCharNum);
+	_script.quitFlag = 3;
+}
+
+void ToucheEngine::op_loadSprite() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_loadSprite()");
+	int16 index = _script.readNextWord();
+	int16 num = _script.readNextWord();
+	res_loadSprite(num, index);
+}
+
+void ToucheEngine::op_loadSequence() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_loadSequence()");
+	int16 index = _script.readNextWord();
+	int16 num = _script.readNextWord();
+	res_loadSequence(num, index);
+}
+
+void ToucheEngine::op_setKeyCharBox() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharBox()");
+	int16 keyChar = _script.readNextWord();
+	int16 num = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	setKeyCharBox(keyChar, num);
+}
+
+void ToucheEngine::op_initKeyCharScript() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_initKeyCharScript()");
+	int16 keyChar = _script.readNextWord();
+	int16 color = _script.readNextWord();
+	int16 f1 = _script.readNextWord();
+	int16 f2 = _script.readNextWord();
+	int16 f3 = _script.readNextWord();
+	setKeyCharTextColor(keyChar, color);
+	initKeyCharScript(keyChar, f1, f2, f3);
+}
+
+void ToucheEngine::op_setKeyCharFrame() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharFrame()");
+	int16 keyChar = _script.readNextWord();
+	int16 val1 = _script.readNextWord();
+	int16 val2 = _script.readNextWord();
+	int16 val3 = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	setKeyCharFrame(keyChar, val1, val2, val3);
+}
+
+void ToucheEngine::op_setKeyCharDirection() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharDirection()");
+	int16 keyChar = _script.readNextWord();
+	int16 dir = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	setKeyCharFacingDirection(keyChar, dir);
+}
+
+void ToucheEngine::op_clearConversationChoices() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_clearConversationChoices()");
+	clearConversationChoices();
+}
+
+void ToucheEngine::op_addConversationChoice() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_addConversationChoice()");
+	int16 num = _script.readNextWord();
+	addConversationChoice(num);
+}
+
+void ToucheEngine::op_removeConversationChoice() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_removeConversationChoice()");
+	int16 num = _script.readNextWord();
+	removeConversationChoice(num);
+}
+
+void ToucheEngine::op_getInventoryItem() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getInventoryItem()");
+	int16 keyChar = _script.readNextWord();
+	uint16 item = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	assert(item < sizeof(_keyCharsTable[keyChar].inventoryItems));
+	*_script.stackDataPtr = _keyCharsTable[keyChar].inventoryItems[item];
+}
+
+void ToucheEngine::op_setInventoryItem() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setInventoryItem()");
+	int16 keyChar = _script.readNextWord();
+	uint16 item = _script.readNextWord();
+	if (item == 4) {
+		setKeyCharMoney();
+	}
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	assert(item < sizeof(_keyCharsTable[keyChar].inventoryItems));
+	_keyCharsTable[keyChar].inventoryItems[item] = *_script.stackDataPtr;
+	if (item == 4 && !_hideInventoryTexts) {
+		drawAmountOfMoneyInInventory();
+	}
+}
+
+void ToucheEngine::op_startEpisode() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startEpisode()");
+	_newEpisodeNum = _script.readNextWord();
+	_flagsTable[0] = _script.readNextWord();
+	_disabledInputCounter = 1;
+	_script.quitFlag = 1;
+}
+
+void ToucheEngine::op_setConversationNum() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setConversationNum()");
+	_conversationNum = _script.readNextWord();
+}
+
+void ToucheEngine::op_enableInventoryItem() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_enableInventoryItem()");
+	int16 flag = _script.readNextWord();
+	int16 item = _script.readNextWord();
+	int16 rnd = _script.readNextWord();
+	changeInventoryItemState(flag, item, rnd, 1);
+}
+
+void ToucheEngine::op_enableInput() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_enableInput()");
+	++_disabledInputCounter;
+}
+
+void ToucheEngine::op_disableInput() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_disableInput()");
+	if (_disabledInputCounter != 0) {
+		--_disabledInputCounter;
+	}
+}
+
+void ToucheEngine::op_faceKeyChar() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_faceKeyChar()");
+	int16 keyChar1 = _script.readNextWord();
+	int16 keyChar2 = _script.readNextWord();
+	if (keyChar1 == 256) {
+		keyChar1 = _currentKeyCharNum;
+	}
+	if (_keyCharsTable[keyChar1].xPos <= _keyCharsTable[keyChar2].xPos) {
+		_keyCharsTable[keyChar2].facingDirection = 3;
+	} else {
+		_keyCharsTable[keyChar2].facingDirection = 0;
+	}
+}
+
+void ToucheEngine::op_getKeyCharCurrentAnim() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharCurrentAnim()");
+	int16 keyChar = _script.readNextWord();
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	*_script.stackDataPtr = _keyCharsTable[keyChar].currentAnim;
+}
+
+void ToucheEngine::op_getCurrentKeyChar() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getCurrentKeyChar()");
+	*_script.stackDataPtr = _currentKeyCharNum;
+}
+
+void ToucheEngine::op_isKeyCharActive() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_isKeyCharActive()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	*_script.stackDataPtr = _keyCharsTable[keyChar].num != 0 ? 1 : 0;
+}
+
+void ToucheEngine::op_setPalette() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setPalette()");
+	int16 r = _script.readNextWord();
+	int16 g = _script.readNextWord();
+	int16 b = _script.readNextWord();
+	setPalette(0, 240, r, g, b);
+}
+
+void ToucheEngine::op_changeWalkPath() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_changeWalkPath()");
+	int16 num1 = _script.readNextWord();
+	int16 num2 = _script.readNextWord();
+	int16 val = _script.readNextWord();
+	changeWalkPath(num1, num2, val);
+}
+
+void ToucheEngine::op_lockWalkPath() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_lockWalkPath()");
+	int16 num1 = _script.readNextWord();
+	int16 num2 = _script.readNextWord();
+	lockWalkPath(num1, num2);
+}
+
+void ToucheEngine::op_initializeKeyChar() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_initializeKeyChar()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	initKeyChars(keyChar);
+}
+
+void ToucheEngine::op_setupWaitingKeyChars() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setupWaitingKeyChars()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	int16 val1 = _script.readNextWord();
+	int16 val2 = _script.readNextWord();
+	if (val1 == -1) {
+		_waitingSetKeyCharNum2 = keyChar;
+		_waitingSetKeyCharNum1 = val2;
+		_waitingSetKeyCharNum3 = _script.keyCharNum;
+		_script.quitFlag = 3;
+	} else {
+		_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[0] = -1;
+		_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[1] = -1;
+		_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[2] = -1;
+		_keyCharsTable[_script.keyCharNum].waitingKeyChar = keyChar;
+		assert(val1 >= 0 && val1 < 3);
+		_keyCharsTable[_script.keyCharNum].waitingKeyCharPosTable[val1] = val2;
+		_script.quitFlag = 3;
+	}
+}
+
+void ToucheEngine::op_updateRoomAreas() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setupWaitingKeyChars()");
+	int16 area = _script.readNextWord();
+	updateRoomAreas(area, 1);
+}
+
+void ToucheEngine::op_unlockWalkPath() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_unlockWalkPath()");
+	int16 num1 = _script.readNextWord();
+	int16 num2 = _script.readNextWord();
+	unlockWalkPath(num1, num2);
+}
+
+void ToucheEngine::op_addItemToInventoryAndRedraw() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_addItemToInventoryAndRedraw()");
+	int16 inventory = _script.readNextWord();
+	int16 item = *_script.stackDataPtr;
+	if (inventory == 256) {
+		inventory = _currentKeyCharNum;
+	}
+	addItemToInventory(inventory, item);
+	if (_currentKeyCharNum == inventory && !_hideInventoryTexts) {
+		drawInventory(_currentKeyCharNum, 1);
+	}
+}
+
+void ToucheEngine::op_giveItemTo() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_giveItemTo()");
+	_giveItemToCounter = 1;
+	_giveItemToObjectNum = _script.readNextWord();
+	_giveItemToKeyCharNum = _script.keyCharNum;
+	_script.quitFlag = 3;
+}
+
+void ToucheEngine::op_resetHitBoxes() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_resetHitBoxes()");
+	int16 num = _script.readNextWord();
+	if (num & 0x4000) {
+		num &= 0xFF;
+		_keyCharsTable[num].strNum = 1;
+	} else {
+		for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
+			if (_programHitBoxTable[i].item == num) {
+				_programHitBoxTable[i].str = _programHitBoxTable[i].defaultStr;
+				break;
+			}
+		}
+	}
+}
+
+void ToucheEngine::op_fadePalette() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_fadePalette()");
+	int16 fadeOut = _script.readNextWord();
+	if (fadeOut) {
+		fadePalette(0, 240, 255, -2, 128);
+	} else {
+		fadePalette(0, 240, 0, 2, 128);
+	}
+}
+
+void ToucheEngine::op_disableInventoryItem() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_disableInventoryItem()");
+	int16 flag = _script.readNextWord();
+	int16 item = _script.readNextWord();
+	int16 rnd = _script.readNextWord();
+	changeInventoryItemState(flag, item, rnd, 0);
+}
+
+void ToucheEngine::op_getInventoryItemFlags() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getInventoryItemFlags()");
+	int16 item = _script.readNextWord();
+	int16 flags = _inventoryItemsInfoTable[item];
+	if (flags & 0x10) {
+		flags &= 0xF;
+	} else {
+		flags &= ~0xF;
+	}
+	*_script.stackDataPtr = flags;
+}
+
+void ToucheEngine::op_drawInventory() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_drawInventory()");
+	int16 num = _script.readNextWord();
+	drawInventory(num, 1);
+}
+
+void ToucheEngine::op_stopKeyCharScript() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_stopKeyCharScript()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	_keyCharsTable[keyChar].flags |= kScriptStopped;
+}
+
+void ToucheEngine::op_restartKeyCharScript() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_restartKeyCharScript()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	KeyChar *key = &_keyCharsTable[keyChar];
+	key->flags &= ~(kScriptStopped | kScriptPaused);
+	key->scriptDataOffset = key->scriptDataStartOffset;
+	key->scriptStackPtr = &key->scriptStackTable[39];
+}
+
+void ToucheEngine::op_getKeyCharCurrentWalkBox() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharCurrentWalkBox()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	*_script.stackDataPtr = _keyCharsTable[keyChar].currentWalkBox;
+}
+
+void ToucheEngine::op_getKeyCharPointsDataNum() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharPointsDataNum()");
+	int16 keyChar = _script.readNextWord();
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	*_script.stackDataPtr = _keyCharsTable[keyChar].pointsDataNum;
+}
+
+void ToucheEngine::op_setupFollowingKeyChar() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setupFollowingKeyChar()");
+	int16 val = _script.readNextWord();
+	int16 keyChar = _script.readNextWord();
+	assert(keyChar >= 0 && keyChar < NUM_KEYCHARS);
+	_keyCharsTable[keyChar].followingKeyCharNum = val;
+	_keyCharsTable[keyChar].flags |= 0x10;
+	_keyCharsTable[keyChar].followingKeyCharPos = -1;
+}
+
+void ToucheEngine::op_startAnimation() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startAnimation()");
+	int16 num = _script.readNextWord();
+	int16 pos = _script.readNextWord();
+	int16 keyChar = *_script.stackDataPtr;
+	addToAnimationTable(num, pos, keyChar, 3);
+}
+
+void ToucheEngine::op_setKeyCharTextColor() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharTextColor()");
+	int16 keyChar = _script.readNextWord();
+	uint16 color = _script.readNextWord();
+	setKeyCharTextColor(keyChar, color);
+}
+
+void ToucheEngine::op_startMusic() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startMusic()");
+	_newMusicNum = _script.readNextWord();
+}
+
+void ToucheEngine::op_copyPaletteColor() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_copyPaletteColor()");
+	int16 src = _script.readNextWord();
+	int16 dst = _script.readNextWord();
+	copyPaletteColor(src, dst);
+}
+
+void ToucheEngine::op_delay() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_delay()");
+	int16 delay = _script.readNextWord();
+	_keyCharsTable[_script.keyCharNum].delay = delay;
+	_script.quitFlag = 3;
+}
+
+void ToucheEngine::op_lockHitBox() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_lockHitBox()");
+	int16 num = _script.readNextWord();
+	lockUnlockHitBox(num, 1);
+}
+
+void ToucheEngine::op_removeItemFromInventory() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_removeItemFromInventory()");
+	int16 keyChar = _script.readNextWord();
+	int16 item = *_script.stackDataPtr;
+	if (keyChar == 256) {
+		keyChar = _currentKeyCharNum;
+	}
+	removeItemFromInventory(keyChar, item);
+	if (keyChar == _currentKeyCharNum && !_hideInventoryTexts) {
+		drawInventory(_currentKeyCharNum, 1);
+	}
+}
+
+void ToucheEngine::op_unlockHitBox() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_unlockHitBox()");
+	int16 num = _script.readNextWord();
+	lockUnlockHitBox(num, 0);
+}
+
+void ToucheEngine::op_addRoomArea() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_addRoomArea()");
+	int16 num = _script.readNextWord();
+	uint16 flag = _script.readNextWord();
+	addRoomArea(num, flag);
+}
+
+void ToucheEngine::op_setKeyCharFlags() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setKeyCharFlags()");
+	int16 keyChar = _script.readNextWord();
+	uint16 flags = _script.readNextWord();
+	flags &= 0xFF00;
+	_keyCharsTable[keyChar].flags |= flags;
+}
+
+void ToucheEngine::op_unsetKeyCharFlags() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_unsetKeyCharFlags()");
+	int16 keyChar = _script.readNextWord();
+	uint16 flags = _script.readNextWord();
+	flags &= 0xFF00;
+	_keyCharsTable[keyChar].flags &= ~flags;
+}
+
+void ToucheEngine::op_loadVoice() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_loadVoice()");
+	int16 num = _script.readNextWord();
+	res_loadSpeech(num);
+}
+
+void ToucheEngine::op_drawSpriteOnBackdrop() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_drawSpriteOnBackdrop()");
+	int16 num = _script.readNextWord();
+	int16 x = _script.readNextWord();
+	int16 y = _script.readNextWord();
+	drawSpriteOnBackdrop(num, x, y);
+}
+
+void ToucheEngine::op_startPaletteFadeIn() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startPaletteFadeIn()");
+	_flagsTable[290] = 0;
+	_flagsTable[605] = 0;
+	_flagsTable[607] = 0;
+	_flagsTable[608] = 0xFF;
+	_flagsTable[609] = 0xFF;
+	_flagsTable[610] = 0;
+	_flagsTable[603] = _script.readNextWord();
+}
+
+void ToucheEngine::op_startPaletteFadeOut() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_startPaletteFadeOut()");
+	_flagsTable[290] = 0;
+	_flagsTable[605] = 0xFF;
+	_flagsTable[607] = 0;
+	_flagsTable[608] = 0xFF;
+	_flagsTable[609] = 0xFF;
+	_flagsTable[610] = 0;
+	_flagsTable[603] = -_script.readNextWord();
+}
+
+void ToucheEngine::op_setRoomAreaState() {
+	debugC(9, kDebugOpcodes, "ToucheEngine::op_setRoomAreaState()");
+	int16 num = _script.readNextWord();
+	int16 val = _script.readNextWord();
+	setRoomAreaState(num, val);
+}
+
+} // namespace Touche


Property changes on: scummvm/trunk/engines/touche/opcodes.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + "Date Rev Author URL Id"
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/plugin.cpp
===================================================================
--- scummvm/trunk/engines/touche/plugin.cpp	                        (rev 0)
+++ scummvm/trunk/engines/touche/plugin.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,154 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#include "common/stdafx.h"
+#include "common/config-manager.h"
+#include "common/fs.h"
+#include "common/md5.h"
+
+#include "base/plugins.h"
+
+#include "touche/touche.h"
+
+struct GameVersion {
+	const char *description;
+	uint32 filesize;
+	const char *md5digest;
+	Common::Language language;
+	Common::Platform platform;
+};
+
+static const GameVersion toucheGameVersionsTable[] = {
+	{
+		"Touche: The Adventures of the Fifth Musketeer",
+		26350211,
+		"2af0177f8887e3430f345e6b4d8b1414",
+		Common::EN_ANY,
+		Common::kPlatformPC
+	},
+	{
+		"Touche: Les Aventures du Cinquieme Mousquetaire",
+		26558232,
+		"1caa20bb4d4fc2ce8eb867b6610082b3",
+		Common::FR_FRA,
+		Common::kPlatformPC
+	}
+};
+
+static const PlainGameDescriptor toucheGameDescriptor = {
+	"touche", "Touche: The Adventures of the Fifth Musketeer"
+};
+
+static const char *toucheDetectFileName = "TOUCHE.DAT";
+
+static Common::String Engine_TOUCHE_md5digest(const FilesystemNode *file) {
+	static const int md5DataSize = 4096;
+	uint8 md5digest[16];
+	if (Common::md5_file(*file, md5digest, md5DataSize)) {
+		char md5sum[32 + 1];
+		for (int i = 0; i < 16; ++i) {
+			sprintf(md5sum + i * 2, "%02x", (int)md5digest[i]);
+		}
+		return md5sum;
+	}
+	return "";
+}
+
+static uint32 Engine_TOUCHE_filesize(const FilesystemNode *file) {
+	Common::File f;
+	if (f.open(file->path().c_str())) {
+		return f.size();
+	}
+	return 0;
+}
+
+GameList Engine_TOUCHE_gameIDList() {
+	GameList games;
+	games.push_back(toucheGameDescriptor);
+	return games;
+}
+
+GameDescriptor Engine_TOUCHE_findGameID(const char *gameid) {
+	if (scumm_stricmp(toucheGameDescriptor.gameid, gameid) == 0) {
+		return toucheGameDescriptor;
+	}
+	return GameDescriptor();
+}
+
+DetectedGameList Engine_TOUCHE_detectGames(const FSList &fslist) {
+	bool foundFile = false;
+	FSList::const_iterator file;
+	for (file = fslist.begin(); file != fslist.end(); ++file) {
+		if (file->isDirectory()) {
+			continue;
+		}
+		for (int i = 0; i < ARRAYSIZE(toucheGameVersionsTable); ++i) {
+			if (scumm_stricmp(file->name().c_str(), toucheDetectFileName) == 0) {
+				foundFile = true;
+				break;
+			}
+		}
+		if (foundFile) {
+			break;
+		}
+	}
+	DetectedGameList detectedGames;
+	if (foundFile) {
+		Common::String md5digest = Engine_TOUCHE_md5digest(file);
+		if (!md5digest.empty()) {
+			for (int i = 0; i < ARRAYSIZE(toucheGameVersionsTable); ++i) {
+				const GameVersion *gv = &toucheGameVersionsTable[i];
+				if (md5digest.equalsIgnoreCase(gv->md5digest)) {
+					DetectedGame dg(toucheGameDescriptor.gameid, gv->description, gv->language, gv->platform);
+					detectedGames.push_back(dg);
+					break;
+				}
+			}
+			if (detectedGames.empty()) {
+				const uint32 filesize = Engine_TOUCHE_filesize(file);
+				printf("Datafile size (%d) and MD5 (%s) are unknown !\n", filesize, md5digest.c_str());
+				printf("Please report the details (language, platform, etc.) of this game to the ScummVM team.\n");
+				detectedGames.push_back(toucheGameDescriptor);
+			}
+		}
+	}
+	return detectedGames;
+}
+
+PluginError Engine_TOUCHE_create(OSystem *system, Engine **engine) {
+	FSList fslist;
+	FilesystemNode dir(ConfMan.get("path"));
+	if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
+		warning("ToucheEngine: invalid game path '%s'", dir.path().c_str());
+		return kInvalidPathError;
+	}
+	DetectedGameList game = Engine_TOUCHE_detectGames(fslist);
+	if (game.size() != 1) {
+		warning("ToucheEngine: Unable to locate game data in '%s'", dir.path().c_str());
+		return kNoGameDataFoundError;
+	}
+	assert(engine);
+	*engine = new Touche::ToucheEngine(system, game[0].language);
+	return kNoError;
+}
+
+REGISTER_PLUGIN(TOUCHE, "Touche: The Adventures of the 5th Musketeer", "Touche: The Adventures of the 5th Musketeer (C) US Gold");


Property changes on: scummvm/trunk/engines/touche/plugin.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + "Date Rev Author URL Id"
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/resource.cpp
===================================================================
--- scummvm/trunk/engines/touche/resource.cpp	                        (rev 0)
+++ scummvm/trunk/engines/touche/resource.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,645 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#include "common/stdafx.h"
+
+#include "sound/flac.h"
+#include "sound/mixer.h"
+#include "sound/mp3.h"
+#include "sound/voc.h"
+#include "sound/vorbis.h"
+
+#include "touche/touche.h"
+#include "touche/graphics.h"
+
+namespace Touche {
+
+enum {
+	kCurrentSpeechDataVersion = 1,
+	kSpeechDataFileHeaderSize = 4
+};
+
+struct CompressedSpeechFile {
+	const char *filename;
+	Audio::AudioStream *(*makeStream)(Common::File *file, uint32 size);
+};
+
+static const CompressedSpeechFile compressedSpeechFilesTable[] = {
+#ifdef USE_MAD
+	{ "TOUCHE.SO3", Audio::makeMP3Stream },
+#endif
+#ifdef USE_VORBIS
+	{ "TOUCHE.SOG", Audio::makeVorbisStream },
+#endif
+#ifdef USE_FLAC
+	{ "TOUCHE.SOF", Audio::makeFlacStream },
+#endif
+	{ 0, 0 }
+};
+
+void ToucheEngine::res_openDataFile() {
+	if (!_fData.open("TOUCHE.DAT")) {
+		error("Unable to open 'TOUCHE.DAT' for reading");
+	}
+	for (int i = 0; compressedSpeechFilesTable[i].filename; ++i) {
+		if (_fSpeech[0].open(compressedSpeechFilesTable[i].filename)) {
+			_compressedSpeechData = i;
+			return;
+		}
+	}
+	// _fSpeech[0] opening/closing is driven by the scripts
+	_fSpeech[1].open("OBJ");
+	_compressedSpeechData = -1;
+}
+
+void ToucheEngine::res_closeDataFile() {
+	_fData.close();
+	_fSpeech[0].close();
+	_fSpeech[1].close();
+}
+
+void ToucheEngine::res_allocateTables() {
+	_fData.seek(64);
+	uint32 textDataOffs = _fData.readUint32LE();
+	uint32 textDataSize = _fData.readUint32LE();
+	_textData = (uint8 *)malloc(textDataSize);
+	if (!_textData) {
+		error("Unable to allocate memory for text data");
+	}
+	_fData.seek(textDataOffs);
+	_fData.read(_textData, textDataSize);
+
+	_fData.seek(2);
+	const int bw = _fData.readUint16LE();
+	const int bh = _fData.readUint16LE();
+	uint32 size = bw * bh;
+	_backdropBuffer = (uint8 *)malloc(size);
+	if (!_backdropBuffer) {
+		error("Unable to allocate memory for backdrop buffer");
+	}
+
+	_menuKitData = (uint8 *)malloc(5040);
+	if (!_menuKitData) {
+		error("Unable to allocate memory for menu kit data");
+	}
+
+	_convKitData = (uint8 *)malloc(12160);
+	if (!_convKitData) {
+		error("Unable to allocate memory for conv kit data");
+	}
+
+	for (int i = 0; i < 5; ++i) {
+		_sequenceDataTable[i] = (uint8 *)malloc(16384);
+		if (!_sequenceDataTable[i]) {
+			error("Unable to allocate memory for sequence data %d", i);
+		}
+	}
+
+	_programData = (uint8 *)malloc(61440);
+	if (!_programData) {
+		error("Unable to allocate memory for program data");
+	}
+
+	_mouseData = (uint8 *)malloc(58 * 42);
+	if (!_mouseData) {
+		error("Unable to allocate memory for mouse data");
+	}
+
+	_iconData = (uint8 *)malloc(58 * 42);
+	if (!_iconData) {
+		error("Unable to allocate memory for object data");
+	}
+	for (int i = 0; i < NUM_SPRITES; ++i) {
+		_spritesTable[i].ptr = (uint8 *)malloc(_spritesTable[i].size);
+		if (!_spritesTable[i].ptr) {
+			error("Unable to allocate memory for sprite %d", i);
+		}
+	}
+
+	_offscreenBuffer = (uint8 *)malloc(640 * 400);
+	if (!_offscreenBuffer) {
+		error("Unable to allocate memory for offscreen buffer");
+	}
+}
+
+void ToucheEngine::res_deallocateTables() {
+	free(_textData);
+	_textData = 0;
+
+	free(_backdropBuffer);
+	_backdropBuffer = 0;
+
+	free(_menuKitData);
+	_menuKitData = 0;
+
+	free(_convKitData);
+	_convKitData = 0;
+
+	for (int i = 0; i < 5; ++i) {
+		free(_sequenceDataTable[i]);
+		_sequenceDataTable[i] = 0;
+	}
+
+	free(_programData);
+	_programData = 0;
+
+	free(_mouseData);
+	_mouseData = 0;
+
+	free(_iconData);
+	_iconData = 0;
+
+	for (int i = 0; i < NUM_SPRITES; ++i) {
+		free(_spritesTable[i].ptr);
+	}
+
+	free(_offscreenBuffer);
+	_offscreenBuffer = 0;
+}
+
+uint32 ToucheEngine::res_getDataOffset(ResourceType type, int num, uint32 *size) {
+	debugC(9, kDebugResource, "ToucheEngine::res_getDataOffset() type=%d num=%d", type, num);
+	static const struct ResourceData {
+		int offs;
+		int count;
+		int type;
+	} dataTypesTable[] = {
+		{ 0x048, 100, kResourceTypeRoomImage   },
+		{ 0x228,  30, kResourceTypeSequence    },
+		{ 0x2A0,  50, kResourceTypeSpriteImage },
+		{ 0x390, 100, kResourceTypeIconImage   },
+		{ 0x6B0,  80, kResourceTypeRoomInfo    },
+		{ 0x908, 150, kResourceTypeProgram     },
+		{ 0xB60,  50, kResourceTypeMusic       },
+		{ 0xC28, 120, kResourceTypeSound       }
+	};
+
+	const ResourceData *rd = NULL;
+	for (unsigned int i = 0; i < ARRAYSIZE(dataTypesTable); ++i) {
+		rd = &dataTypesTable[i];
+		if (rd->type == type) {
+			break;
+		}
+	}
+	if (rd == NULL) {
+		error("Invalid resource type %d", type);
+	}
+	if (num < 0 || num > rd->count) {
+		error("Invalid resource number %d (type %d)", num, type);
+	}
+	_fData.seek(rd->offs + num * 4);
+	uint32 offs = _fData.readUint32LE();
+	assert(offs != 0);
+	if (size) {
+		uint32 nextOffs = _fData.readUint32LE();
+		*size = nextOffs - offs;
+	}
+	return offs;
+}
+
+void ToucheEngine::res_loadSpriteImage(int num, uint8 *dst) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadSpriteImage() num=%d", num);
+	const uint32 offs = res_getDataOffset(kResourceTypeSpriteImage, num);
+	_fData.seek(offs);
+	_currentImageWidth = _fData.readUint16LE();
+	_currentImageHeight = _fData.readUint16LE();
+	for (int i = 0; i < _currentImageHeight; ++i) {
+		res_decodeScanLineImageRLE(dst + _currentImageWidth * i, _currentImageWidth);
+	}
+}
+
+void ToucheEngine::res_loadProgram(int num) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadProgram() num=%d", num);
+	const uint32 offs = res_getDataOffset(kResourceTypeProgram, num, &_programDataSize);
+	_fData.seek(offs);
+	_fData.read(_programData, _programDataSize);
+}
+
+void ToucheEngine::res_decodeProgramData() {
+	debugC(9, kDebugResource, "ToucheEngine::res_decodeProgramData()");
+
+	uint8 *p;
+	uint8 *programDataEnd = _programData + _programDataSize;
+
+	p = _programData + READ_LE_UINT32(_programData + 32);
+	_script.init(p);
+
+	p = _programData + READ_LE_UINT32(_programData + 4);
+	_programTextDataPtr = p;
+
+	_programRectsTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 20);
+	while (p < programDataEnd) {
+		int16 x = READ_LE_UINT16(p); p += 2;
+		int16 y = READ_LE_UINT16(p); p += 2;
+		int16 w = READ_LE_UINT16(p); p += 2;
+		int16 h = READ_LE_UINT16(p); p += 2;
+		_programRectsTable.push_back(Common::Rect(x, y, x + w, y + h));
+		if (x == -1) {
+			break;
+		}
+	}
+
+	_programPointsTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 24);
+	while (p < programDataEnd) {
+		ProgramPointData ppd;
+		ppd.x = READ_LE_UINT16(p); p += 2;
+		ppd.y = READ_LE_UINT16(p); p += 2;
+		ppd.z = READ_LE_UINT16(p); p += 2;
+		ppd.priority = READ_LE_UINT16(p); p += 2;
+		_programPointsTable.push_back(ppd);
+		if (ppd.x == -1) {
+			break;
+		}
+	}
+
+	_programWalkTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 28);
+	while (p < programDataEnd) {
+		ProgramWalkData pwd;
+		pwd.point1 = READ_LE_UINT16(p); p += 2;
+		if (pwd.point1 == -1) {
+			break;
+		}
+		assert((uint16)pwd.point1 < _programPointsTable.size());
+		pwd.point2 = READ_LE_UINT16(p); p += 2;
+		assert((uint16)pwd.point2 < _programPointsTable.size());
+		pwd.clippingRect = READ_LE_UINT16(p); p += 2;
+		pwd.area1 = READ_LE_UINT16(p); p += 2;
+		pwd.area2 = READ_LE_UINT16(p); p += 2;
+		p += 12; // unused
+		_programWalkTable.push_back(pwd);
+	}
+
+	_programAreaTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 8);
+	while (p < programDataEnd) {
+		ProgramAreaData pad;
+		int16 x = READ_LE_UINT16(p); p += 2;
+		if (x == -1) {
+			break;
+		}
+		int16 y = READ_LE_UINT16(p); p += 2;
+		int16 w = READ_LE_UINT16(p); p += 2;
+		int16 h = READ_LE_UINT16(p); p += 2;
+		pad.area.r = Common::Rect(x, y, x + w, y + h);
+		pad.area.srcX = READ_LE_UINT16(p); p += 2;
+		pad.area.srcY = READ_LE_UINT16(p); p += 2;
+		pad.id = READ_LE_UINT16(p); p += 2;
+		pad.state = READ_LE_UINT16(p); p += 2;
+		pad.animCount = READ_LE_UINT16(p); p += 2;
+		pad.animNext = READ_LE_UINT16(p); p += 2;
+		_programAreaTable.push_back(pad);
+	}
+
+	_programBackgroundTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 12);
+	while (p < programDataEnd) {
+		ProgramBackgroundData pbd;
+		int16 x = READ_LE_UINT16(p); p += 2;
+		if (x == -1) {
+			break;
+		}
+		int16 y = READ_LE_UINT16(p); p += 2;
+		int16 w = READ_LE_UINT16(p); p += 2;
+		int16 h = READ_LE_UINT16(p); p += 2;
+		pbd.area.r = Common::Rect(x, y, x + w, y + h);
+		pbd.area.srcX = READ_LE_UINT16(p); p += 2;
+		pbd.area.srcY = READ_LE_UINT16(p); p += 2;
+		pbd.type = READ_LE_UINT16(p); p += 2;
+		pbd.offset = READ_LE_UINT16(p); p += 2;
+		pbd.scaleMul = READ_LE_UINT16(p); p += 2;
+		pbd.scaleDiv = READ_LE_UINT16(p); p += 2;
+		_programBackgroundTable.push_back(pbd);
+	}
+
+	_programHitBoxTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 16);
+	while (p < programDataEnd) {
+		ProgramHitBoxData phbd;
+		phbd.item = READ_LE_UINT16(p); p += 2;
+		if (phbd.item == 0) {
+			break;
+		}
+		phbd.talk = READ_LE_UINT16(p); p += 2;
+		phbd.state = READ_LE_UINT16(p); p += 2;
+		phbd.str = READ_LE_UINT16(p); p += 2;
+		phbd.defaultStr = READ_LE_UINT16(p); p += 2;
+		for (int i = 0; i < 8; ++i) {
+			phbd.actions[i] = READ_LE_UINT16(p); p += 2;;
+		}
+		for (int i = 0; i < 2; ++i) {
+			int16 x = READ_LE_UINT16(p); p += 2;
+			int16 y = READ_LE_UINT16(p); p += 2;
+			int16 w = READ_LE_UINT16(p); p += 2;
+			int16 h = READ_LE_UINT16(p); p += 2;
+			phbd.hitBoxes[i].left = x;
+			phbd.hitBoxes[i].top = y;
+			phbd.hitBoxes[i].right = x + w;
+			phbd.hitBoxes[i].bottom = y + h;
+		}
+		p += 8; // unused
+		_programHitBoxTable.push_back(phbd);
+	}
+
+	_programActionScriptOffsetTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 36);
+	while (p < programDataEnd) {
+		ProgramActionScriptOffsetData pasod;
+		pasod.object1 = READ_LE_UINT16(p); p += 2;
+		if (pasod.object1 == 0) {
+			break;
+		}
+		pasod.action = READ_LE_UINT16(p); p += 2;
+		pasod.object2 = READ_LE_UINT16(p); p += 2;
+		pasod.offset = READ_LE_UINT16(p); p += 2;
+		_programActionScriptOffsetTable.push_back(pasod);
+	}
+
+	_programConversationTable.clear();
+	int count = (READ_LE_UINT32(_programData + 44) - READ_LE_UINT32(_programData + 40)) / 6;
+	assert(count >= 0);
+	p = _programData + READ_LE_UINT32(_programData + 40);
+	while (p < programDataEnd && count != 0) {
+		ProgramConversationData pcd;
+		pcd.num = READ_LE_UINT16(p); p += 2;
+		pcd.offset = READ_LE_UINT16(p); p += 2;
+		pcd.msg = READ_LE_UINT16(p); p += 2;
+		_programConversationTable.push_back(pcd);
+		--count;
+	}
+
+	_programKeyCharScriptOffsetTable.clear();
+	p = _programData + READ_LE_UINT32(_programData + 44);
+	while (p < programDataEnd) {
+		ProgramKeyCharScriptOffsetData pksod;
+		pksod.keyChar = READ_LE_UINT16(p); p += 2;
+		if (pksod.keyChar == 0) {
+			break;
+		}
+		pksod.offset = READ_LE_UINT16(p); p += 2;
+		_programKeyCharScriptOffsetTable.push_back(pksod);
+	}
+}
+
+void ToucheEngine::res_loadRoom(int num) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadRoom() num=%d flag115=%d", num, _flagsTable[115]);
+
+	_currentRoomNum = num;
+	_updatedRoomAreasTable[0] = 1;
+
+	const uint32 offsInfo = res_getDataOffset(kResourceTypeRoomInfo, num);
+	_fData.seek(offsInfo);
+	_fData.readUint16LE();
+	const int roomImageNum = _fData.readUint16LE();
+	_fData.readUint16LE();
+	for (int i = 0; i < 256; ++i) {
+		_fData.read(&_paletteBuffer[i * 4], 3);
+		_paletteBuffer[i * 4 + 3] = 0;
+	}
+
+	const uint32 offsImage = res_getDataOffset(kResourceTypeRoomImage, roomImageNum);
+	_fData.seek(offsImage);
+	res_loadBackdrop();
+
+	if (_flagsTable[115] == 0) {
+		updatePalette();
+	}
+	_fullRedrawCounter = 1;
+	_roomNeedRedraw = true;
+
+	_sequenceEntryTable[5].sprNum = -1;
+	_sequenceEntryTable[5].seqNum = -1;
+	_sequenceEntryTable[6].sprNum = -1;
+	_sequenceEntryTable[6].seqNum = -1;
+}
+
+void ToucheEngine::res_loadSprite(int num, int index) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadSprite() num=%d index=%d", num, index);
+	assert(index >= 0 && index < NUM_SEQUENCES);
+	_sequenceEntryTable[index].sprNum = num;
+	SpriteData *spr = &_spritesTable[index];
+	const uint32 offs = res_getDataOffset(kResourceTypeSpriteImage, num);
+	_fData.seek(offs);
+	_currentImageWidth = _fData.readUint16LE();
+	_currentImageHeight = _fData.readUint16LE();
+	for (int i = 0; i < _currentImageHeight; ++i) {
+		res_decodeScanLineImageRLE(spr->ptr + _currentImageWidth * i, _currentImageWidth);
+	}
+	spr->bitmapWidth = _currentImageWidth;
+	spr->bitmapHeight = _currentImageHeight;
+	if (_flagsTable[268] == 0) {
+		res_loadImageHelper(spr->ptr, _currentImageWidth, _currentImageHeight);
+	}
+	spr->w = _currentImageWidth;
+	spr->h = _currentImageHeight;
+	Graphics::copyRect(_offscreenBuffer, 640, 0, 0,
+	  _backdropBuffer, _currentImageWidth, _flagsTable[614], _flagsTable[615],
+	  640, 100);
+}
+
+void ToucheEngine::res_loadSequence(int num, int index) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadSequence() num=%d index=%d", num, index);
+	assert(index < NUM_SEQUENCES);
+	_sequenceEntryTable[index].seqNum = num;
+	const uint32 offs = res_getDataOffset(kResourceTypeSequence, num);
+	_fData.seek(offs);
+	_fData.read(_sequenceDataTable[index], 16000);
+}
+
+void ToucheEngine::res_decodeScanLineImageRLE(uint8 *dst, int lineWidth) {
+	int w = 0;
+	while (w < lineWidth) {
+		uint8 code = _fData.readByte();
+		if ((code & 0xC0) == 0xC0) {
+			int len = code & 0x3F;
+			uint8 color = _fData.readByte();
+			memset(dst, color, len);
+			dst += len;
+			w += len;
+		} else {
+			*dst = code;
+			++dst;
+			++w;
+		}
+	}
+}
+
+void ToucheEngine::res_loadBackdrop() {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadBackdrop()");
+	_currentBitmapWidth = _fData.readUint16LE();
+	_currentBitmapHeight = _fData.readUint16LE();
+	uint8 *dst = _backdropBuffer;
+	for (int i = 0; i < _currentBitmapHeight; ++i) {
+		res_decodeScanLineImageRLE(dst + _currentBitmapWidth * i, _currentBitmapWidth);
+	}
+	_roomWidth = _currentBitmapWidth;
+	dst = _backdropBuffer;
+	for (int i = 0; i < _currentBitmapWidth; ++i) {
+		if (*dst == 255) {
+			_roomWidth = i;
+			*dst = 0;
+			break;
+		}
+		++dst;
+	}
+}
+
+void ToucheEngine::res_loadImage(int num, uint8 *dst) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadImage() num=%d", num);
+	const uint32 offsInfo = res_getDataOffset(kResourceTypeIconImage, num);
+	_fData.seek(offsInfo);
+	_currentImageWidth = _fData.readUint16LE();
+	_currentImageHeight = _fData.readUint16LE();
+	for (int i = 0; i < _currentImageHeight; ++i) {
+		res_decodeScanLineImageRLE(dst + _currentImageWidth * i, _currentImageWidth);
+	}
+	res_loadImageHelper(dst, _currentImageWidth, _currentImageHeight);
+}
+
+void ToucheEngine::res_loadImageHelper(uint8 *imgData, int imgWidth, int imgHeight) {
+	uint8 *p = imgData;
+	for (_currentImageHeight = 0; _currentImageHeight < imgHeight; ++_currentImageHeight, p += imgWidth) {
+		if (*p == 64 || *p == 255) {
+			break;
+		}
+	}
+	p = imgData;
+	for (_currentImageWidth = 0; _currentImageWidth < imgWidth; ++_currentImageWidth, ++p) {
+		if (*p == 64 || *p == 255) {
+			break;
+		}
+	}
+	if (_flagsTable[267] == 0) {
+		for (int i = 0; i < imgWidth * imgHeight; ++i) {
+			uint8 color = imgData[i];
+			if (color != 0) {
+				if (color < 64) {
+					color += 192;
+				} else {
+					color = 0;
+				}
+			}
+			imgData[i] = color;
+		}
+	}
+}
+
+void ToucheEngine::res_loadSound(int priority, int num) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadSound() num=%d", num);
+	if (priority >= _defaultSoundPriority) {
+		uint32 size;
+		const uint32 offs = res_getDataOffset(kResourceTypeSound, num, &size);
+		_fData.seek(offs);
+		Audio::AudioStream *stream = Audio::makeVOCStream(_fData);
+		if (stream) {
+			_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream);
+		}
+	}
+}
+
+void ToucheEngine::res_loadMusic(int num) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadMusic() num=%d", num);
+	warning("UNIMPLEMENTED ToucheEngine::res_loadMusic() num=%d", num);
+	uint32 size;
+	const uint32 offs = res_getDataOffset(kResourceTypeMusic, num, &size);
+	_fData.seek(offs);
+	// XXX start MIDI data playback
+}
+
+void ToucheEngine::res_loadSpeech(int num) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadSpeech() num=%d", num);
+	if (num == -1) {
+		// XXX stop all sounds currently playing
+	} else {
+		if (_compressedSpeechData < 0) { // uncompressed speech data
+			if (_fSpeech[0].isOpen()) {
+				_fSpeech[0].close();
+			}
+			char filename[10];
+			sprintf(filename, "V%d", num);
+			_fSpeech[0].open(filename);
+		}
+		if (_fSpeech[0].isOpen()) {
+			_flagsTable[617] = num;
+		}
+	}
+}
+
+void ToucheEngine::res_loadSpeechSegment(int num) {
+	debugC(9, kDebugResource, "ToucheEngine::res_loadSpeechSegment() num=%d", num);
+	if (_talkTextMode != kTalkModeTextOnly) {
+		Audio::AudioStream *stream = 0;
+		if (_compressedSpeechData < 0) { // uncompressed speech data
+			int i = 0;
+			if (num >= 750) {
+				num -= 750;
+				i = 1;
+			}
+			if (!_fSpeech[i].isOpen()) {
+				return;
+			}
+			_fSpeech[i].seek(num * 8);
+			uint32 offs = _fSpeech[i].readUint32LE();
+			uint32 size = _fSpeech[i].readUint32LE();
+			if (size == 0) {
+				return;
+			}
+			_fSpeech[i].seek(offs);
+			stream = Audio::makeVOCStream(_fSpeech[i]);
+		} else {
+			if (num >= 750) {
+				num -= 750;
+				_fSpeech[0].seek(kSpeechDataFileHeaderSize);
+			} else {
+				assert(_flagsTable[617] > 0 && _flagsTable[617] < 140);
+				_fSpeech[0].seek(kSpeechDataFileHeaderSize + _flagsTable[617] * 4);
+			}
+			uint32 dataOffs = _fSpeech[0].readUint32LE();
+			if (dataOffs == 0) {
+				return;
+			}
+			_fSpeech[0].seek(dataOffs + num * 8);
+			uint32 offs = _fSpeech[0].readUint32LE();
+			uint32 size = _fSpeech[0].readUint32LE();
+			if (size == 0) {
+				return;
+			}
+			_fSpeech[0].seek(offs);
+			stream = (compressedSpeechFilesTable[_compressedSpeechData].makeStream)(&_fSpeech[0], size);
+		}
+		if (stream) {
+			_speechPlaying = true;
+			_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream);
+		}
+	}
+}
+
+void ToucheEngine::res_stopSpeech() {
+	debugC(9, kDebugResource, "ToucheEngine::res_stopSpeech()");
+	_mixer->stopHandle(_speechHandle);
+	_speechPlaying = false;
+	_defaultSoundPriority = 0;
+}
+
+} // namespace Touche


Property changes on: scummvm/trunk/engines/touche/resource.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + "Date Rev Author URL Id"
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/saveload.cpp
===================================================================
--- scummvm/trunk/engines/touche/saveload.cpp	                        (rev 0)
+++ scummvm/trunk/engines/touche/saveload.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,418 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#include "common/stdafx.h"
+#include "common/savefile.h"
+
+#include "touche/graphics.h"
+#include "touche/touche.h"
+
+namespace Touche {
+
+enum {
+	kCurrentGameStateVersion = 5,
+	kGameStateDescriptionLen = 32
+};
+
+template <class S, class T>
+static void saveOrLoad(S &s, T &t);
+
+template <>
+static void saveOrLoad(Common::WriteStream &stream, uint16 &i) {
+	stream.writeUint16LE(i);
+}
+
+template <>
+static void saveOrLoad(Common::ReadStream &stream, uint16 &i) {
+	i = stream.readUint16LE();
+}
+
+template <>
+static void saveOrLoad(Common::WriteStream &stream, int16 &i) {
+	stream.writeSint16LE(i);
+}
+
+template <>
+static void saveOrLoad(Common::ReadStream &stream, int16 &i) {
+	i = stream.readSint16LE();
+}
+
+template <class S, class T>
+static void saveOrLoadPtr(S &s, T *&t, T *base);
+
+template <>
+static void saveOrLoadPtr(Common::WriteStream &stream, int16 *&p, int16 *base) {
+	int32 offset = (int32)(p - base);
+	stream.writeSint32LE(offset);
+}
+
+template <>
+static void saveOrLoadPtr(Common::ReadStream &stream, int16 *&p, int16 *base) {
+	int32 offset = stream.readSint32LE();
+	p = base + offset;
+}
+
+template <class S>
+static void saveOrLoad(S &s, Common::Rect &r) {
+	saveOrLoad(s, r.left);
+	saveOrLoad(s, r.top);
+	saveOrLoad(s, r.right);
+	saveOrLoad(s, r.bottom);
+}
+
+template <class S>
+static void saveOrLoad(S &s, SequenceEntry &seq) {
+	saveOrLoad(s, seq.sprNum);
+	saveOrLoad(s, seq.seqNum);
+}
+
+template <class S>
+static void saveOrLoad(S &s, KeyChar &key) {
+	saveOrLoad(s, key.num);
+	saveOrLoad(s, key.flags);
+	saveOrLoad(s, key.currentAnimCounter);
+	saveOrLoad(s, key.strNum);
+	saveOrLoad(s, key.walkDataNum);
+	saveOrLoad(s, key.spriteNum);
+	saveOrLoad(s, key.prevBoundingRect);
+	saveOrLoad(s, key.boundingRect);
+	saveOrLoad(s, key.xPos);
+	saveOrLoad(s, key.yPos);
+	saveOrLoad(s, key.zPos);
+	saveOrLoad(s, key.xPosPrev);
+	saveOrLoad(s, key.yPosPrev);
+	saveOrLoad(s, key.zPosPrev);
+	saveOrLoad(s, key.prevWalkDataNum);
+	saveOrLoad(s, key.textColor);
+	for (uint i = 0; i < 4; ++i) {
+		saveOrLoad(s, key.inventoryItems[i]);
+	}
+	saveOrLoad(s, key.money);
+	saveOrLoad(s, key.pointsDataNum);
+	saveOrLoad(s, key.currentWalkBox);
+	saveOrLoad(s, key.prevPointsDataNum);
+	saveOrLoad(s, key.currentAnim);
+	saveOrLoad(s, key.facingDirection);
+	saveOrLoad(s, key.currentAnimSpeed);
+	for (uint i = 0; i < 16; ++i) {
+		saveOrLoad(s, key.framesList[i]);
+	}
+	saveOrLoad(s, key.framesListCount);
+	saveOrLoad(s, key.currentFrame);
+	saveOrLoad(s, key.anim1Start);
+	saveOrLoad(s, key.anim1Count);
+	saveOrLoad(s, key.anim2Start);
+	saveOrLoad(s, key.anim2Count);
+	saveOrLoad(s, key.anim3Start);
+	saveOrLoad(s, key.anim3Count);
+	saveOrLoad(s, key.followingKeyCharNum);
+	saveOrLoad(s, key.followingKeyCharPos);
+	saveOrLoad(s, key.sequenceDataIndex);
+	saveOrLoad(s, key.sequenceDataOffset);
+	saveOrLoad(s, key.walkPointsListCount);
+	for (uint i = 0; i < 40; ++i) {
+		saveOrLoad(s, key.walkPointsList[i]);
+	}
+	saveOrLoad(s, key.scriptDataStartOffset);
+	saveOrLoad(s, key.scriptDataOffset);
+	saveOrLoadPtr(s, key.scriptStackPtr, &key.scriptStackTable[39]);
+	saveOrLoad(s, key.delay);
+	saveOrLoad(s, key.waitingKeyChar);
+	for (uint i = 0; i < 3; ++i) {
+		saveOrLoad(s, key.waitingKeyCharPosTable[i]);
+	}
+	for (uint i = 0; i < 40; ++i) {
+		saveOrLoad(s, key.scriptStackTable[i]);
+	}
+}
+
+template <class S>
+static void saveOrLoad(S &s, TalkEntry &entry) {
+	saveOrLoad(s, entry.otherKeyChar);
+	saveOrLoad(s, entry.talkingKeyChar);
+	saveOrLoad(s, entry.num);
+}
+
+template <class S>
+static void saveOrLoad(S &s, ProgramHitBoxData &data) {
+	saveOrLoad(s, data.item);
+	saveOrLoad(s, data.talk);
+	saveOrLoad(s, data.state);
+	saveOrLoad(s, data.str);
+	saveOrLoad(s, data.defaultStr);
+	for (uint i = 0; i < 8; ++i) {
+		saveOrLoad(s, data.actions[i]);
+	}
+	for (uint i = 0; i < 2; ++i) {
+		saveOrLoad(s, data.hitBoxes[i]);
+	}
+}
+
+template <class S>
+static void saveOrLoad(S &s, Area &area) {
+	saveOrLoad(s, area.r);
+	saveOrLoad(s, area.srcX);
+	saveOrLoad(s, area.srcY);
+}
+
+template <class S>
+static void saveOrLoad(S &s, ProgramBackgroundData &data) {
+	saveOrLoad(s, data.area);
+	saveOrLoad(s, data.type);
+	saveOrLoad(s, data.offset);
+	saveOrLoad(s, data.scaleMul);
+	saveOrLoad(s, data.scaleDiv);
+}
+
+template <class S>
+static void saveOrLoad(S &s, ProgramAreaData &data) {
+	saveOrLoad(s, data.area);
+	saveOrLoad(s, data.id);
+	saveOrLoad(s, data.state);
+	saveOrLoad(s, data.animCount);
+	saveOrLoad(s, data.animNext);
+}
+
+template <class S>
+static void saveOrLoad(S &s, ProgramWalkData &data) {
+	saveOrLoad(s, data.point1);
+	saveOrLoad(s, data.point2);
+	saveOrLoad(s, data.clippingRect);
+	saveOrLoad(s, data.area1);
+	saveOrLoad(s, data.area2);
+}
+
+template <class S>
+static void saveOrLoad(S &s, ProgramPointData &data) {
+	saveOrLoad(s, data.x);
+	saveOrLoad(s, data.y);
+	saveOrLoad(s, data.z);
+	saveOrLoad(s, data.priority);
+}
+
+void ToucheEngine::saveGameStateData(Common::WriteStream *stream) {
+	setKeyCharMoney();
+	stream->writeUint16LE(_currentEpisodeNum);
+	stream->writeUint16LE(_currentMusicNum);
+	stream->writeUint16LE(_currentRoomNum);
+	stream->writeUint16LE(_flagsTable[614]);
+	stream->writeUint16LE(_flagsTable[615]);
+	stream->writeUint16LE(_disabledInputCounter);
+	for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
+		saveOrLoad(*stream, _programHitBoxTable[i]);
+	}
+	for (uint i = 0; i < _programBackgroundTable.size(); ++i) {
+		saveOrLoad(*stream, _programBackgroundTable[i]);
+	}
+	for (uint i = 0; i < _programAreaTable.size(); ++i) {
+		saveOrLoad(*stream, _programAreaTable[i]);
+	}
+	for (uint i = 0; i < _programWalkTable.size(); ++i) {
+		saveOrLoad(*stream, _programWalkTable[i]);
+	}
+	for (uint i = 0; i < _programPointsTable.size(); ++i) {
+		saveOrLoad(*stream, _programPointsTable[i]);
+	}
+	stream->write(_updatedRoomAreasTable, 200);
+	for (uint i = 0; i < 6; ++i) {
+		saveOrLoad(*stream, _sequenceEntryTable[i]);
+	}
+	for (uint i = 0; i < 1024; ++i) {
+		saveOrLoad(*stream, _flagsTable[i]);
+	}
+	for (uint i = 0; i < 100; ++i) {
+		saveOrLoad(*stream, _inventoryList1[i]);
+	}
+	for (uint i = 0; i < 100; ++i) {
+		saveOrLoad(*stream, _inventoryList2[i]);
+	}
+	for (uint i = 0; i < 6; ++i) {
+		saveOrLoad(*stream, _inventoryList3[i]);
+	}
+	for (uint i = 0; i < NUM_KEYCHARS; ++i) {
+		saveOrLoad(*stream, _keyCharsTable[i]);
+	}
+	for (uint i = 0; i < NUM_INVENTORY_ITEMS; ++i) {
+		saveOrLoad(*stream, _inventoryItemsInfoTable[i]);
+	}
+	for (uint i = 0; i < NUM_TALK_ENTRIES; ++i) {
+		saveOrLoad(*stream, _talkTable[i]);
+	}
+	stream->writeUint16LE(_talkListEnd);
+	stream->writeUint16LE(_talkListCurrent);
+}
+
+void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
+	setKeyCharMoney();
+	clearDirtyRects();
+	clearAreaTable();
+	_flagsTable[115] = 0;
+	clearRoomArea();
+	int16 room_offs_x, room_offs_y;
+	_currentEpisodeNum = stream->readUint16LE();
+	_currentMusicNum = stream->readUint16LE();
+	_currentRoomNum = stream->readUint16LE();
+	res_loadRoom(_currentRoomNum);
+	room_offs_x = stream->readUint16LE();
+	room_offs_y = stream->readUint16LE();
+	_disabledInputCounter = stream->readUint16LE();
+	res_loadProgram(_currentEpisodeNum);
+	setupEpisode(-1);
+	for (uint i = 0; i < _programHitBoxTable.size(); ++i) {
+		saveOrLoad(*stream, _programHitBoxTable[i]);
+	}
+	for (uint i = 0; i < _programBackgroundTable.size(); ++i) {
+		saveOrLoad(*stream, _programBackgroundTable[i]);
+	}
+	for (uint i = 0; i < _programAreaTable.size(); ++i) {
+		saveOrLoad(*stream, _programAreaTable[i]);
+	}
+	for (uint i = 0; i < _programWalkTable.size(); ++i) {
+		saveOrLoad(*stream, _programWalkTable[i]);
+	}
+	for (uint i = 0; i < _programPointsTable.size(); ++i) {
+		saveOrLoad(*stream, _programPointsTable[i]);
+	}
+	stream->read(_updatedRoomAreasTable, 200);
+	for (uint i = 1; i <= _updatedRoomAreasTable[0]; ++i) {
+		updateRoomAreas(_updatedRoomAreasTable[i], -1);
+	}
+	for (uint i = 0; i < 6; ++i) {
+		saveOrLoad(*stream, _sequenceEntryTable[i]);
+	}
+	for (uint i = 0; i < 1024; ++i) {
+		saveOrLoad(*stream, _flagsTable[i]);
+	}
+	for (uint i = 0; i < 100; ++i) {
+		saveOrLoad(*stream, _inventoryList1[i]);
+	}
+	for (uint i = 0; i < 100; ++i) {
+		saveOrLoad(*stream, _inventoryList2[i]);
+	}
+	for (uint i = 0; i < 6; ++i) {
+		saveOrLoad(*stream, _inventoryList3[i]);
+	}
+	for (uint i = 0; i < NUM_KEYCHARS; ++i) {
+		saveOrLoad(*stream, _keyCharsTable[i]);
+	}
+	for (uint i = 0; i < NUM_INVENTORY_ITEMS; ++i) {
+		saveOrLoad(*stream, _inventoryItemsInfoTable[i]);
+	}
+	for (uint i = 0; i < NUM_TALK_ENTRIES; ++i) {
+		saveOrLoad(*stream, _talkTable[i]);
+	}
+	_talkListEnd = stream->readUint16LE();
+	_talkListCurrent = stream->readUint16LE();
+	_flagsTable[614] = room_offs_x;
+	_flagsTable[615] = room_offs_y;
+	for (uint i = 0; i < 6; ++i) {
+		if (_sequenceEntryTable[i].seqNum != -1) {
+			res_loadSequence(_sequenceEntryTable[i].seqNum, i);
+		}
+		if (_sequenceEntryTable[i].sprNum != -1) {
+			res_loadSprite(_sequenceEntryTable[i].sprNum, i);
+		}
+	}
+	_currentKeyCharNum = _flagsTable[104];
+	_inventoryListCount[0] = 0;
+	_inventoryListCount[3] = 0;
+	_inventoryListCount[6] = 0;
+	drawInventory(_currentKeyCharNum, 1);
+	Graphics::copyRect(_offscreenBuffer, 640, 0, 0, _backdropBuffer, _currentBitmapWidth, _flagsTable[614], _flagsTable[615], 640, 352);
+	updateEntireScreen();
+	if (_flagsTable[617] != 0) {
+		res_loadSpeech(_flagsTable[617]);
+	}
+}
+
+bool ToucheEngine::saveGameState(int num, const char *description) {
+	bool saveOk = false;
+	char gameStateFileName[16];
+	generateGameStateFileName(num, gameStateFileName, 15);
+	Common::OutSaveFile *f = _saveFileMan->openForSaving(gameStateFileName);
+	if (f) {
+		f->writeUint16LE(kCurrentGameStateVersion);
+		f->writeUint16LE(0);
+		char headerDescription[kGameStateDescriptionLen];
+		memset(headerDescription, 0, kGameStateDescriptionLen);
+		strncpy(headerDescription, description, kGameStateDescriptionLen - 1);
+		f->write(headerDescription, kGameStateDescriptionLen);
+		saveGameStateData(f);
+		f->flush();
+		if (!f->ioFailed()) {
+			saveOk = true;
+		} else {
+			warning("Can't write file '%s'", gameStateFileName);
+		}
+		delete f;
+	}
+	return saveOk;
+}
+
+bool ToucheEngine::loadGameState(int num, const char *description) {
+	bool loadOk = false;
+	char gameStateFileName[16];
+	generateGameStateFileName(num, gameStateFileName, 15);
+	Common::InSaveFile *f = _saveFileMan->openForLoading(gameStateFileName);
+	if (f) {
+		uint16 version = f->readUint16LE();
+		if (version < kCurrentGameStateVersion) {
+			warning("Unsupported gamestate version %d\n", version);
+		} else {
+			f->skip(2 + kGameStateDescriptionLen);
+			loadGameStateData(f);
+			if (!f->ioFailed()) {
+				loadOk = true;
+			} else {
+				warning("Can't read file '%s'", gameStateFileName);
+			}
+		}
+		delete f;
+	}
+	return loadOk;
+}
+
+void ToucheEngine::readGameStateDescription(int num, char *description, int len) {
+	char gameStateFileName[16];
+	generateGameStateFileName(num, gameStateFileName, 15);
+	Common::InSaveFile *f = _saveFileMan->openForLoading(gameStateFileName);
+	if (f) {
+		uint16 version = f->readUint16LE();
+		if (version >= kCurrentGameStateVersion) {
+			f->readUint16LE();
+			f->read(description, MIN<int>(len, kGameStateDescriptionLen));
+			description[len] = 0;
+		}
+		delete f;
+	}
+}
+
+void ToucheEngine::generateGameStateFileName(int num, char *dst, int len, bool prefixOnly) const {
+	if (prefixOnly) {
+		snprintf(dst, len, "%s.", _targetName.c_str());
+	} else {
+		snprintf(dst, len, "%s.%d", _targetName.c_str(), num);
+	}
+	dst[len] = 0;
+}
+
+} // namespace Touche


Property changes on: scummvm/trunk/engines/touche/saveload.cpp
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + "Date Rev Author URL Id"
Name: svn:eol-style
   + native

Added: scummvm/trunk/engines/touche/staticres.cpp
===================================================================
--- scummvm/trunk/engines/touche/staticres.cpp	                        (rev 0)
+++ scummvm/trunk/engines/touche/staticres.cpp	2006-11-03 21:23:07 UTC (rev 24592)
@@ -0,0 +1,659 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * 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: $
+ *
+ */
+
+#include "common/stdafx.h"
+
+#include "touche/graphics.h"
+#include "touche/touche.h"
+
+namespace Touche {
+
+ToucheEngine::OpcodeProc ToucheEngine::_opcodesTable[NUM_OPCODES] = {
+	/* 0x00 */
+	&ToucheEngine::op_nop,
+	&ToucheEngine::op_jnz,
+	&ToucheEngine::op_jz,
+	&ToucheEngine::op_jmp,
+	/* 0x04 */
+	&ToucheEngine::op_true,
+	&ToucheEngine::op_false,
+	&ToucheEngine::op_push,
+	&ToucheEngine::op_testFalse,
+	/* 0x08 */
+	&ToucheEngine::op_add,
+	&ToucheEngine::op_sub,
+	&ToucheEngine::op_mul,
+	&ToucheEngine::op_div,
+	/* 0x0C */
+	&ToucheEngine::op_mod,
+	&ToucheEngine::op_and,
+	&ToucheEngine::op_or,
+	&ToucheEngine::op_not,
+	/* 0x10 */
+	&ToucheEngine::op_testGreater,
+	&ToucheEngine::op_testEquals,
+	&ToucheEngine::op_testLower,
+	&ToucheEngine::op_fetchScriptWord,
+	/* 0x14 */
+	0,
+	0,
+	0,
+	0,
+	/* 0x18 */
+	&ToucheEngine::op_testGreaterOrEquals,
+	&ToucheEngine::op_testLowerOrEquals,
+	&ToucheEngine::op_testNotEquals,
+	&ToucheEngine::op_endConversation,
+	/* 0x1C */
+	&ToucheEngine::op_stopScript,
+	&ToucheEngine::op_getFlag,
+	&ToucheEngine::op_setFlag,
+	0,
+	/* 0x20 */
+	0,
+	0,
+	0,
+	&ToucheEngine::op_fetchScriptByte,
+	/* 0x24 */
+	0,
+	0,
+	0,
+	0,
+	/* 0x28 */
+	&ToucheEngine::op_getScriptValue,
+	&ToucheEngine::op_setScriptValue,
+	0,
+	0,
+	/* 0x2C */
+	0,
+	0,
+	&ToucheEngine::op_getKeyCharWalkBox,
+	&ToucheEngine::op_startSound,
+	/* 0x30 */
+	&ToucheEngine::op_initKeyCharTalk,
+	0,
+	0,
+	0,
+	/* 0x34 */
+	&ToucheEngine::op_loadRoom,
+	&ToucheEngine::op_updateRoom,
+	&ToucheEngine::op_startTalk,
+	&ToucheEngine::op_setKeyCharBox,
+	/* 0x38 */
+	&ToucheEngine::op_initKeyCharScript,
+	&ToucheEngine::op_loadSprite,
+	&ToucheEngine::op_loadSequence,
+	&ToucheEngine::op_setKeyCharFrame,
+	/* 0x3C */
+	&ToucheEngine::op_setKeyCharDirection,
+	&ToucheEngine::op_clearConversationChoices,
+	&ToucheEngine::op_addConversationChoice,
+	&ToucheEngine::op_removeConversationChoice,
+	/* 0x40 */
+	&ToucheEngine::op_getInventoryItem,
+	&ToucheEngine::op_setInventoryItem,
+	&ToucheEngine::op_startEpisode,
+	&ToucheEngine::op_setConversationNum,
+	/* 0x44 */
+	&ToucheEngine::op_enableInventoryItem,
+	&ToucheEngine::op_enableInput,
+	&ToucheEngine::op_disableInput,
+	&ToucheEngine::op_faceKeyChar,
+	/* 0x48 */
+	&ToucheEngine::op_getKeyCharCurrentAnim,
+	&ToucheEngine::op_getCurrentKeyChar,
+	&ToucheEngine::op_isKeyCharActive,
+	&ToucheEngine::op_setPalette,
+	/* 0x4C */
+	&ToucheEngine::op_changeWalkPath,
+	&ToucheEngine::op_lockWalkPath,
+	&ToucheEngine::op_initializeKeyChar,
+	&ToucheEngine::op_setupWaitingKeyChars,
+	/* 0x50 */
+	&ToucheEngine::op_updateRoomAreas,
+	&ToucheEngine::op_unlockWalkPath,
+	0,
+	&ToucheEngine::op_addItemToInventoryAndRedraw,
+	/* 0x54 */
+	&ToucheEngine::op_giveItemTo,
+	&ToucheEngine::op_resetHitBoxes,
+	&ToucheEngine::op_fadePalette,
+	0,
+	/* 0x58 */
+	&ToucheEngine::op_disableInventoryItem,
+	0,
+	0,
+	0,
+	/* 0x5C */
+	0,
+	0,
+	0,
+	0,
+	/* 0x60 */
+	0,
+	&ToucheEngine::op_getInventoryItemFlags,
+	&ToucheEngine::op_drawInventory,
+	&ToucheEngine::op_stopKeyCharScript,
+	/* 0x64 */
+	&ToucheEngine::op_restartKeyCharScript,
+	&ToucheEngine::op_getKeyCharCurrentWalkBox,
+	&ToucheEngine::op_getKeyCharPointsDataNum,
+	&ToucheEngine::op_setupFollowingKeyChar,
+	/* 0x68 */
+	&ToucheEngine::op_startAnimation,
+	&ToucheEngine::op_setKeyCharTextColor,
+	0,
+	0,
+	/* 0x6C */
+	0,
+	0,
+	0,
+	0,
+	/* 0x70 */
+	&ToucheEngine::op_startMusic,
+	0,
+	0,
+	&ToucheEngine::op_copyPaletteColor,
+	/* 0x74 */
+	&ToucheEngine::op_delay,
+	&ToucheEngine::op_lockHitBox,
+	&ToucheEngine::op_removeItemFromInventory,
+	&ToucheEngine::op_unlockHitBox,
+	/* 0x78 */
+	&ToucheEngine::op_addRoomArea,
+	&ToucheEngine::op_setKeyCharFlags,
+	0,
+	0,
+	/* 0x7C */
+	0,
+	0,
+	0,
+	0,
+	/* 0x80 */
+	&ToucheEngine::op_unsetKeyCharFlags,
+	&ToucheEngine::op_drawSpriteOnBackdrop,
+	&ToucheEngine::op_loadVoice,
+	0,
+	/* 0x84 */
+	&ToucheEngine::op_startPaletteFadeIn,
+	&ToucheEngine::op_startPaletteFadeOut,
+	&ToucheEngine::op_setRoomAreaState
+};
+
+SpriteData ToucheEngine::_spritesTable[NUM_SPRITES] = {
+	{ 0x34BC0, 0, 0, 0, 0, 0 },
+	{ 0x1E848, 0, 0, 0, 0, 0 },
+	{ 0x1E848, 0, 0, 0, 0, 0 },
+	{ 0x23A50, 0, 0, 0, 0, 0 },
+	{ 0x1E848, 0, 0, 0, 0, 0 }
+};
+
+const uint8 ToucheEngine::_directionsTable[] = {
+	0x7F, 0x7F, 0x7F, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7F,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
+	0x7F, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x02, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x02, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x02,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
+	0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00
+};
+
+char ToucheEngine::_saveLoadDescriptionsTable[10][33] = {
+	"[Empty.1.......................]",
+	"[Empty.2.......................]",
+	"[Empty.3.......................]",
+	"[Empty.4.......................]",
+	"[Empty.5.......................]",
+	"[Empty.6.......................]",
+	"[Empty.7.......................]",
+	"[Empty.8.......................]",
+	"[Empty.9.......................]"
+};
+
+const Common::Rect ToucheEngine::_inventoryAreasTable[13] = {
+	Common::Rect(  0, 354,  50, 400),
+	Common::Rect( 66, 354, 124, 380),
+	Common::Rect( 74, 380, 116, 398),
+	Common::Rect(116, 380, 158, 398),
+	Common::Rect(144, 354, 198, 380),
+	Common::Rect(202, 354, 238, 396),
+	Common::Rect(242, 354, 300, 396),
+	Common::Rect(300, 354, 358, 396),
+	Common::Rect(358, 354, 416, 396),
+	Common::Rect(416, 354, 474, 396),
+	Common::Rect(474, 354, 532, 396),
+	Common::Rect(532, 354, 590, 396),
+	Common::Rect(594, 354, 640, 395)
+};
+
+const uint16 Graphics::_fontOffs[] = {
+	0x0000, 0x0007, 0x0024, 0x0043, 0x0072, 0x00AD, 0x00E0, 0x0113, 0x0124, 0x0141,
+	0x015E, 0x0191, 0x01C4, 0x01E3, 0x01F8, 0x0215, 0x0232, 0x0269, 0x0286, 0x02BD,
+	0x02F4, 0x032B, 0x0362, 0x0399, 0x03D0, 0x0407, 0x043E, 0x045B, 0x047C, 0x0495,
+	0x04C0, 0x04D9, 0x0510, 0x054B, 0x0582, 0x05B9, 0x05F0, 0x0627, 0x065E, 0x0695,
+	0x06CC, 0x0703, 0x0720, 0x0757, 0x078E, 0x07C5, 0x07FC, 0x0833, 0x086A, 0x08A1,
+	0x08D8, 0x090F, 0x0946, 0x097D, 0x09B4, 0x09EB, 0x0A3C, 0x0A73, 0x0AAA, 0x0AE1,
+	0x0B00, 0x0B1D, 0x0B3C, 0x0B77, 0x0BAA, 0x0BBB, 0x0BF2, 0x0C29, 0x0C60, 0x0C97,
+	0x0CCE, 0x0CEB, 0x0D2E, 0x0D65, 0x0D82, 0x0DA5, 0x0DDC, 0x0DF9, 0x0E30, 0x0E67,
+	0x0E9E, 0x0EE1, 0x0F24, 0x0F41, 0x0F78, 0x0F95, 0x0FCC, 0x1003, 0x103A, 0x1071,
+	0x10B4, 0x10EB, 0x110A, 0x112B, 0x114A, 0x116D, 0x1178, 0x11BB, 0x11F2, 0x1229,
+	0x1260, 0x1297, 0x12CE, 0x1305, 0x1348, 0x137F, 0x13B6, 0x13ED, 0x1424, 0x1441,
+	0x145E, 0x149D, 0x14A8, 0x14B3, 0x14EA, 0x14F5, 0x152C, 0x1563, 0x159A, 0x15D1,
+	0x1608, 0x1613, 0x161E, 0x1629, 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 0xC0, 0x0D, 0xF0,
+	0x0D, 0xF3, 0x0D, 0xF0, 0x37, 0xF0, 0x37, 0xC0, 0xDF, 0xC0, 0x3F, 0x00, 0x0C, 0x00, 0x02, 0x0C,
+	0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x03, 0x0F, 0x7C, 0x00,
+	0x0D, 0x37, 0x77, 0x00, 0x0D, 0x3D, 0x5F, 0xC0, 0xFD, 0xD5, 0xD5, 0xC3, 0x55, 0x3D, 0x5F, 0xF0,
+	0xFD, 0x37, 0x77, 0xC0, 0x3D, 0x0F, 0x7F, 0xC0, 0x0D, 0x03, 0xFF, 0x00, 0x03, 0x00, 0x30, 0x00,
+	0x00, 0x02, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,
+	0x03, 0x70, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x3F, 0x7F, 0x00, 0x00, 0xD5, 0x55, 0xC0, 0x00,
+	0x3F, 0x7F, 0xF0, 0x00, 0x0F, 0x7F, 0xC0, 0x3C, 0x03, 0x7C, 0x00, 0xD7, 0x00, 0xFC, 0x00, 0xD7,
+	0x00, 0x30, 0x03, 0x5F, 0x01, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0F, 0x00, 0x35, 0xC0, 0x35, 0xF0, 0xD7, 0xF0, 0x3F,
+	0xC0, 0x0F, 0x00, 0x01, 0x09, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x3F, 0xC0, 0xD5, 0x70, 0x3F, 0xFC, 0x0F, 0xF0, 0x01, 0x0D, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00,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0xDF, 0x00, 0x37, 0x00, 0x37, 0xC0, 0x0D, 0xC0, 0x0D,
+	0xF0, 0x03, 0x70, 0x03, 0x7C, 0x00, 0xDC, 0x00, 0xDF, 0x00, 0x3F, 0x00, 0x0C, 0x01, 0x0E, 0x06,
+	0x3F, 0x00, 0xD5, 0xC0, 0x3D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0, 0x0D, 0xF0,
+	0x0D, 0xF0, 0x0D, 0xF0, 0x3D, 0xF0, 0xD5, 0xF0, 0x3F, 0xF0, 0x0F, 0xC0, 0x02, 0x0E, 0x0A, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x0D,
+	0x5C, 0x00, 0x03, 0x37, 0x77, 0x00, 0x0D, 0xDF, 0x7D, 0xC0, 0x35, 0x3F, 0x7F, 0xF0, 0x0D, 0x0F,
+	0x7C, 0xC0, 0x03, 0x03, 0x7C, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x03, 0x7C, 0x00, 0x00, 0x00,
+	0xFC, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x02, 0x0C, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x0D, 0xFC, 0x00, 0x00, 0x37, 0xFF,
+	0xC0, 0x00, 0xD5, 0x55, 0x70, 0x00, 0x37, 0xFF, 0xFC, 0x00, 0x0D, 0xFF, 0xF0, 0x00, 0x03, 0x70,
+	0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x01, 0x07, 0x04, 0x0C, 0x00, 0x37,
+	0x00, 0xD7, 0x00, 0xD7, 0x00, 0xD7, 0x03, 0xDC, 0x0D, 0x30, 0x03, 0x02, 0x0D, 0x09, 0x00, 0x00,
+	0x00, 0x3C, 0x00, 0x00, 0x00, 0xD7, 0x00, 0x00, 0x00, 0xD7, 0x0F, 0xF0, 0x00, 0xD7, 0x35, 0x5C,
+	0x00, 0xD5, 0xD7, 0xD7, 0x00, 0xD7, 0x3D, 0x57, 0xC0, 0xD7, 0x35, 0xD7, 0xC0, 0xD7, 0xD7, 0xD7,
+	0xC0, 0xD7, 0xD7, 0xD7, 0xC0, 0xD7, 0x35, 0x57, 0xC0, 0xD5, 0x0F, 0xFF, 0xC0, 0x3F, 0x03, 0xFF,
+	0x00, 0x0F, 0x02, 0x0D, 0x09, 0x3C, 0x00, 0x00, 0x00, 0xD7, 0x00, 0x00, 0x00, 0xD7, 0xC0, 0x00,

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list