[Scummvm-cvs-logs] SF.net SVN: scummvm:[54657] scummvm/trunk/engines/mohawk

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Tue Nov 30 00:36:50 CET 2010


Revision: 54657
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54657&view=rev
Author:   fuzzie
Date:     2010-11-29 23:36:49 +0000 (Mon, 29 Nov 2010)

Log Message:
-----------
MOHAWK: implement hardcoded Living Books 1.0 code

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/detection_tables.h
    scummvm/trunk/engines/mohawk/livingbooks.cpp
    scummvm/trunk/engines/mohawk/mohawk.h

Modified: scummvm/trunk/engines/mohawk/detection_tables.h
===================================================================
--- scummvm/trunk/engines/mohawk/detection_tables.h	2010-11-29 23:19:59 UTC (rev 54656)
+++ scummvm/trunk/engines/mohawk/detection_tables.h	2010-11-29 23:36:49 UTC (rev 54657)
@@ -719,7 +719,7 @@
 			Common::GUIO_NONE
 		},
 		GType_LIVINGBOOKSV1,
-		GF_NO_READONLY,
+		GF_LB_10,
 		"ARTHUR.EXE" // FIXME: Check this (ST?) 
 	},
 
@@ -734,7 +734,7 @@
 			Common::GUIO_NONE
 		},
 		GType_LIVINGBOOKSV1,
-		GF_DEMO | GF_NO_READONLY,
+		GF_DEMO | GF_LB_10,
 		"ARTHUR.EXE"
 	},
 
@@ -764,7 +764,7 @@
 			Common::GUIO_NONE
 		},
 		GType_LIVINGBOOKSV1,
-		GF_DEMO,
+		GF_DEMO | GF_LB_10,
 		"Arthur's Teacher Trouble"
 	},
 
@@ -794,7 +794,7 @@
 			Common::GUIO_NONE
 		},
 		GType_LIVINGBOOKSV1,
-		GF_DEMO | GF_NO_READONLY,
+		GF_DEMO | GF_LB_10,
 		"GRANDMA.EXE"
 	},
 
@@ -824,7 +824,7 @@
 			Common::GUIO_NONE
 		},
 		GType_LIVINGBOOKSV1,
-		GF_DEMO | GF_NO_READONLY,
+		GF_DEMO | GF_LB_10,
 		"Just Grandma and Me"
 	},
 

Modified: scummvm/trunk/engines/mohawk/livingbooks.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-11-29 23:19:59 UTC (rev 54656)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-11-29 23:36:49 UTC (rev 54657)
@@ -293,10 +293,9 @@
 		return false;
 	}
 
-	if (getFeatures() & GF_NO_READONLY) {
+	if (getFeatures() & GF_LB_10) {
 		if (_readOnly) {
-			// TODO: make this a warning, after some testing?
-			error("game detection table is bad (remove GF_NO_READONLY)");
+			error("found .r entry in Living Books 1.0 game");
 		} else {
 			// some very early versions of the LB engine don't have
 			// .r entries in their book info; instead, it is just hardcoded
@@ -341,7 +340,16 @@
 			if (item)
 				item->togglePlaying(false);
 
-			switch (_curPage) {
+			uint16 page = _curPage;
+			if (getFeatures() & GF_LB_10) {
+				// Living Books 1.0 had the meanings of these pages reversed
+				if (page == 2)
+					page = 3;
+				else if (page == 3)
+					page = 2;
+			}
+
+			switch (page) {
 			case 1:
 				debug(2, "updatePage() for control page 1 (menu)");
 
@@ -648,16 +656,29 @@
 		// The scripting passes us the control ID as param, so we work
 		// out which control was clicked, then run the relevant code.
 
+		uint16 page;
+		page = _curPage;
+		if (getFeatures() & GF_LB_10) {
+			// Living Books 1.0 had the meanings of these pages reversed
+			if (page == 2)
+				page = 3;
+			else if (page == 3)
+				page = 2;
+		}
+
 		LBItem *item;
-		switch (_curPage) {
+		switch (page) {
 		case 1:
 			// main menu
 			// TODO: poetry mode
 
 			switch (event.param) {
 			case 1:
-				// TODO: page 2 in some versions?
-				loadPage(kLBControlMode, 3, 0);
+				if (getFeatures() & GF_LB_10) {
+					loadPage(kLBControlMode, 2, 0);
+				} else {
+					loadPage(kLBControlMode, 3, 0);
+				}
 				break;
 
 			case 2:
@@ -689,8 +710,11 @@
 				break;
 
 			case 4:
-				// TODO: page 3 in some versions?
-				loadPage(kLBControlMode, 2, 0);
+				if (getFeatures() & GF_LB_10) {
+					loadPage(kLBControlMode, 3, 0);
+				} else {
+					loadPage(kLBControlMode, 2, 0);
+				}
 				break;
 
 			case 10:

Modified: scummvm/trunk/engines/mohawk/mohawk.h
===================================================================
--- scummvm/trunk/engines/mohawk/mohawk.h	2010-11-29 23:19:59 UTC (rev 54656)
+++ scummvm/trunk/engines/mohawk/mohawk.h	2010-11-29 23:36:49 UTC (rev 54657)
@@ -69,7 +69,7 @@
 	GF_DVD =     (1 << 1),
 	GF_DEMO =    (1 << 2),
 	GF_HASMIDI = (1 << 3),
-	GF_NO_READONLY = (1 << 4) // very early Living Books games
+	GF_LB_10   = (1 << 4)   // very early Living Books 1.0 games
 };
 
 struct MohawkGameDescription;


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