[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6he.cpp,NONE,2.1 intern.h,2.128,2.129 module.mk,1.33,1.34 scummvm.cpp,2.568,2.569 vars.cpp,1.68,1.69

Travis Howell kirben at users.sourceforge.net
Fri Feb 6 19:40:49 CET 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15446/scumm

Modified Files:
	intern.h module.mk scummvm.cpp vars.cpp 
Added Files:
	script_v6he.cpp 
Log Message:

Add separate class for Humongous Entertainment games.


--- NEW FILE: script_v6he.cpp ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2001  Ludvig Strigeus
 * Copyright (C) 2001-2004 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v 2.1 2004/02/07 02:23:24 kirben Exp $
[...1230 lines suppressed...]
		setStringVars(m);
		if (n)
			_actorToPrintStrFor = pop();
		return;
	case 0xFF:
		_string[m].t_xpos = _string[m].xpos;
		_string[m].t_ypos = _string[m].ypos;
		_string[m].t_center = _string[m].center;
		_string[m].t_overhead = _string[m].overhead;
		_string[m].t_no_talk_anim = _string[m].no_talk_anim;
		_string[m].t_right = _string[m].right;
		_string[m].t_color = _string[m].color;
		_string[m].t_charset = _string[m].charset;
		return;
	default:
		error("decodeParseString: default case 0x%x", b);
	}
}

} // End of namespace Scumm

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.128
retrieving revision 2.129
diff -u -d -r2.128 -r2.129
--- intern.h	19 Jan 2004 20:27:18 -0000	2.128
+++ intern.h	7 Feb 2004 02:23:24 -0000	2.129
@@ -552,6 +552,61 @@
 	byte VAR_TIMEDATE_SECOND;
 };
 
+class ScummEngine_v6he : public ScummEngine_v6 {
+protected:
+	typedef void (ScummEngine_v6he::*OpcodeProcV6he)();
+	struct OpcodeEntryV6he {
+		OpcodeProcV6he proc;
+		const char *desc;
+	};
+	
+	const OpcodeEntryV6he *_opcodesV6he;
+
+	File _hFileTable[17];
+	
+public:
+	ScummEngine_v6he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs) : ScummEngine_v6(detector, syst, gs) {}
+
+protected:
+	virtual void setupOpcodes();
+	virtual void executeOpcode(byte i);
+	virtual const char *getOpcodeDesc(byte i);
+
+	virtual void setupScummVars();
+	virtual void decodeParseString(int a, int b);
+
+	void unknownEA_func(int a, int b, int c, int d, int e);
+	int readFileToArray(int slot, int32 size);
+	void writeFileFromArray(int slot, int resID);
+
+	/* Version 6 script opcodes */
+	void o6_drawBlastObject();
+	void o6_setBlastObjectWindow();
+	void o6_roomOps();
+	void o6_actorOps();
+	void o6_verbOps();
+	void o6_wait();
+	void o6_soundKludge();
+	void o6_dummy();
+	void o6_kernelSetFunctions();
+	void o6_kernelGetFunctions();
+	void o6_stampObject();
+	void o6_openFile();
+	void o6_closeFile();
+	void o6_deleteFile();
+	void o6_readFile();
+	void o6_rename();
+	void o6_writeFile();
+	void o6_findAllObjects();
+	void o6_unknownE0();
+	void o6_unknownE1();
+	void o6_unknownE4();
+	void o6_localizeArray();
+	void o6_unknownFA();
+	void o6_unknownEA();
+	void o6_readINI();
+};
+
 class ScummEngine_v7 : public ScummEngine_v6 {
 public:
 	ScummEngine_v7(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs) : ScummEngine_v6(detector, syst, gs) {}

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/module.mk,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- module.mk	30 Jan 2004 21:54:28 -0000	1.33
+++ module.mk	7 Feb 2004 02:23:24 -0000	1.34
@@ -36,6 +36,7 @@
 	scumm/script_v2.o \
 	scumm/script_v5.o \
 	scumm/script_v6.o \
+	scumm/script_v6he.o \
 	scumm/script_v8.o \
 	scumm/scummvm.o \
 	scumm/sound.o \

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.568
retrieving revision 2.569
diff -u -d -r2.568 -r2.569
--- scummvm.cpp	6 Feb 2004 21:05:57 -0000	2.568
+++ scummvm.cpp	7 Feb 2004 02:23:24 -0000	2.569
@@ -170,6 +170,9 @@
 	{"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_FBEAR, 6, MDT_ADLIB | MDT_NATIVE,
 	 GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
 
+	{"putter", "Putt-Putt Joins The Parade (Windows)", GID_PUTTPUTT, 6, MDT_NONE,
+	 GF_NEW_OPCODES | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, "puttputt"},
+
 	{"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_NATIVE,
 	 GF_NEW_OPCODES | GF_USE_KEY, 0},
 	{"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_NATIVE,
@@ -2982,7 +2985,10 @@
 		engine = new ScummEngine_v5(detector, syst, game);
 		break;
 	case 6:
-		engine = new ScummEngine_v6(detector, syst, game);
+		if (game.features & GF_HUMONGOUS)
+			engine = new ScummEngine_v6he(detector, syst, game);
+		else
+			engine = new ScummEngine_v6(detector, syst, game);
 		break;
 	case 7:
 		engine = new ScummEngine_v7(detector, syst, game);

Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- vars.cpp	19 Jan 2004 19:47:47 -0000	1.68
+++ vars.cpp	7 Feb 2004 02:23:24 -0000	1.69
@@ -161,6 +161,25 @@
 	VAR_TIMEDATE_MINUTE = 126;
 }
 
+void ScummEngine_v6he::setupScummVars() {
+	// Many vars are the same as in V5 & V6 games, so just call the inherited method first
+	ScummEngine::setupScummVars();
+
+	VAR_V6_SCREEN_WIDTH = 41;
+	VAR_V6_SCREEN_HEIGHT = 54;
+	VAR_V6_EMSSPACE = 76;
+	VAR_RANDOM_NR = 118;
+	
+	VAR_V6_SOUNDMODE = 9;
+
+	VAR_TIMEDATE_YEAR = 119;
+	VAR_TIMEDATE_MONTH = 129;
+	VAR_TIMEDATE_DAY = 128;
+	VAR_TIMEDATE_HOUR = 125;
+	VAR_TIMEDATE_MINUTE = 126;
+}
+
+
 void ScummEngine_v7::setupScummVars() {
 	VAR_MOUSE_X = 1;
 	VAR_MOUSE_Y = 2;





More information about the Scummvm-git-logs mailing list