[Scummvm-cvs-logs] SF.net SVN: scummvm:[45856] scummvm/trunk/engines/m4

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Thu Nov 12 11:07:45 CET 2009


Revision: 45856
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45856&view=rev
Author:   dreammaster
Date:     2009-11-12 10:07:44 +0000 (Thu, 12 Nov 2009)

Log Message:
-----------
Added a staticres file with the MADS articles list, and added an article field to the MADSObject class

Modified Paths:
--------------
    scummvm/trunk/engines/m4/console.cpp
    scummvm/trunk/engines/m4/globals.cpp
    scummvm/trunk/engines/m4/globals.h
    scummvm/trunk/engines/m4/module.mk

Added Paths:
-----------
    scummvm/trunk/engines/m4/staticres.cpp
    scummvm/trunk/engines/m4/staticres.h

Modified: scummvm/trunk/engines/m4/console.cpp
===================================================================
--- scummvm/trunk/engines/m4/console.cpp	2009-11-12 09:27:41 UTC (rev 45855)
+++ scummvm/trunk/engines/m4/console.cpp	2009-11-12 10:07:44 UTC (rev 45856)
@@ -26,6 +26,7 @@
 #include "m4/m4.h"
 #include "m4/console.h"
 #include "m4/scene.h"
+#include "m4/staticres.h"
 
 namespace M4 {
 
@@ -327,8 +328,9 @@
 		else {
 			const MadsObject *obj = _vm->_globals->getObject(id);
 
-			DebugPrintf("Object #%d (%s) room=%d vocabs=%d", id, _vm->_globals->getVocab(obj->descId),
-				obj->roomNumber, obj->vocabCount);
+			DebugPrintf("Object #%d (%s) room=%d article=%d/%s vocabs=%d", id, _vm->_globals->getVocab(obj->descId),
+				obj->roomNumber, (int)obj->article, englishMADSArticleList[obj->article], obj->vocabCount);
+
 			if (obj->vocabCount > 0) {
 				DebugPrintf(" - ");
 				for (int i = 0; i < obj->vocabCount; ++i) {

Modified: scummvm/trunk/engines/m4/globals.cpp
===================================================================
--- scummvm/trunk/engines/m4/globals.cpp	2009-11-12 09:27:41 UTC (rev 45855)
+++ scummvm/trunk/engines/m4/globals.cpp	2009-11-12 10:07:44 UTC (rev 45856)
@@ -471,6 +471,7 @@
 	// Extract object data fields
 	descId = READ_LE_UINT16(&obj[0]);
 	roomNumber = READ_LE_UINT16(&obj[2]);
+	article = (MADSArticles)obj[4];
 	vocabCount = obj[5];
 	assert(vocabCount <= 3);
 

Modified: scummvm/trunk/engines/m4/globals.h
===================================================================
--- scummvm/trunk/engines/m4/globals.h	2009-11-12 09:27:41 UTC (rev 45855)
+++ scummvm/trunk/engines/m4/globals.h	2009-11-12 10:07:44 UTC (rev 45856)
@@ -151,6 +151,18 @@
 
 #define PLAYER_INVENTORY 2
 
+enum MADSArticles {
+	kArticleNone	= 0,
+	kArticleWith	= 1,
+	kArticleTo		= 2,
+	kArticleAt		= 3,
+	kArticleFrom	= 4,
+	kArticleOn		= 5,
+	kArticleIn		= 6,
+	kArticleUnder	= 7,
+	kArticleBehind	= 8
+};
+
 struct VocabEntry {
 	uint16 unk;
 	uint16 vocabId;
@@ -164,6 +176,7 @@
 
 	uint16 descId;
 	uint16 roomNumber;
+	MADSArticles article;
 	uint8 vocabCount;
 	VocabEntry vocabList[3];
 };

Modified: scummvm/trunk/engines/m4/module.mk
===================================================================
--- scummvm/trunk/engines/m4/module.mk	2009-11-12 09:27:41 UTC (rev 45855)
+++ scummvm/trunk/engines/m4/module.mk	2009-11-12 10:07:44 UTC (rev 45856)
@@ -27,6 +27,7 @@
 	script.o \
 	sound.o \
 	sprite.o \
+	staticres.o \
 	viewmgr.o \
 	woodscript.o \
 	ws_machine.o \

Added: scummvm/trunk/engines/m4/staticres.cpp
===================================================================
--- scummvm/trunk/engines/m4/staticres.cpp	                        (rev 0)
+++ scummvm/trunk/engines/m4/staticres.cpp	2009-11-12 10:07:44 UTC (rev 45856)
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "m4/staticres.h"
+
+namespace M4 {
+
+const char *englishMADSArticleList[9] = {
+	NULL, "with", "to", "at", "from", "on", "in", "under", "behind"
+};
+
+} // End of namespace M4


Property changes on: scummvm/trunk/engines/m4/staticres.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/m4/staticres.h
===================================================================
--- scummvm/trunk/engines/m4/staticres.h	                        (rev 0)
+++ scummvm/trunk/engines/m4/staticres.h	2009-11-12 10:07:44 UTC (rev 45856)
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef M4_STATICRES_H
+#define M4_STATICRES_H
+
+#include "common/scummsys.h"
+#include "m4/m4.h"
+
+namespace M4 {
+
+extern const char *englishMADSArticleList[9];
+
+} // End of namespace M4
+
+#endif


Property changes on: scummvm/trunk/engines/m4/staticres.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native


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