[Scummvm-cvs-logs] scummvm master -> 9dc4542f3cda5aa055419bb0cc25cf06a3cc492a

digitall dgturner at iee.org
Fri Nov 30 12:23:07 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9dc4542f3c DREAMWEB: Migrate object/inventory related functions out of stubs.


Commit: 9dc4542f3cda5aa055419bb0cc25cf06a3cc492a
    https://github.com/scummvm/scummvm/commit/9dc4542f3cda5aa055419bb0cc25cf06a3cc492a
Author: D G Turner (digitall at scummvm.org)
Date: 2012-11-30T03:21:31-08:00

Commit Message:
DREAMWEB: Migrate object/inventory related functions out of stubs.

Changed paths:
    engines/dreamweb/object.cpp
    engines/dreamweb/stubs.cpp



diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 5e1f89f..1af9b03 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -1099,4 +1099,131 @@ void DreamWebEngine::pickupConts(uint8 from, uint8 containerEx) {
 	}
 }
 
+void DreamWebEngine::incRyanPage() {
+	commandOnlyCond(31, 222);
+
+	if (_mouseButton == _oldButton || !(_mouseButton & 1))
+		return;
+
+	_vars._ryanPage = (_mouseX - (kInventx + 167)) / 18;
+
+	delPointer();
+	fillRyan();
+	readMouse();
+	showPointer();
+	workToScreen();
+	delPointer();
+}
+
+void DreamWebEngine::emergencyPurge() {
+	while (true) {
+		if (_vars._exFramePos + 4000 < kExframeslen) {
+			// Not near frame end
+			if (_vars._exTextPos + 400 < kExtextlen)
+				return;	// notneartextend
+		}
+
+		purgeAnItem();
+	}
+}
+
+void DreamWebEngine::purgeAnItem() {
+	const DynObject *extraObjects = _exData;
+
+	for (size_t i = 0; i < kNumexobjects; ++i) {
+		if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 &&
+			extraObjects[i].initialLocation != _realLocation) {
+			deleteExObject(i);
+			return;
+		}
+	}
+
+	for (size_t i = 0; i < kNumexobjects; ++i) {
+		if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) {
+			deleteExObject(i);
+			return;
+		}
+	}
+}
+
+void DreamWebEngine::dropError() {
+	_commandType = 255;
+	delPointer();
+	printMessage(76, 21, 56, 240, 240 & 1);
+	workToScreenM();
+	hangOnP(50);
+	showPanel();
+	showMan();
+	examIcon();
+	_commandType = 255;
+	workToScreenM();
+}
+
+void DreamWebEngine::cantDrop() {
+	_commandType = 255;
+	delPointer();
+	printMessage(76, 21, 24, 240, 240 & 1);
+	workToScreenM();
+	hangOnP(50);
+	showPanel();
+	showMan();
+	examIcon();
+	_commandType = 255;
+	workToScreenM();
+}
+
+void DreamWebEngine::examineInventory() {
+	commandOnlyCond(32, 249);
+
+	if (!(_mouseButton & 1))
+		return;
+
+	createPanel();
+	showPanel();
+	showMan();
+	showExit();
+	examIcon();
+	_pickUp = 0;
+	_invOpen = 2;
+	openInv();
+	workToScreenM();
+}
+
+void DreamWebEngine::openInv() {
+	_invOpen = 1;
+	printMessage(80, 58 - 10, 61, 240, (240 & 1));
+	fillRyan();
+	_commandType = 255;
+}
+
+void DreamWebEngine::pickupOb(uint8 command, uint8 pos) {
+	_lastInvPos = pos;
+	_objectType = kFreeObjectType;
+	_itemFrame = command;
+	_command = command;
+	//uint8 dummy;
+	//getAnyAd(&dummy, &dummy);	// was in the original source, seems useless here
+	transferToEx(command);
+}
+
+void DreamWebEngine::initialInv() {
+	if (_realLocation != 24)
+		return;
+
+	pickupOb(11, 5);
+	pickupOb(12, 6);
+	pickupOb(13, 7);
+	pickupOb(14, 8);
+	pickupOb(18, 0);
+	pickupOb(19, 1);
+	pickupOb(20, 9);
+	pickupOb(16, 2);
+	_vars._watchMode = 1;
+	_vars._reelToHold = 0;
+	_vars._endOfHoldReel = 6;
+	_vars._watchSpeed = 1;
+	_vars._speedCount = 1;
+	switchRyanOff();
+}
+
 } // End of namespace DreamWeb
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 6ab0497..8eeaf00 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2213,36 +2213,6 @@ void DreamWebEngine::newGame() {
 		_getBack = 3;
 }
 
-void DreamWebEngine::pickupOb(uint8 command, uint8 pos) {
-	_lastInvPos = pos;
-	_objectType = kFreeObjectType;
-	_itemFrame = command;
-	_command = command;
-	//uint8 dummy;
-	//getAnyAd(&dummy, &dummy);	// was in the original source, seems useless here
-	transferToEx(command);
-}
-
-void DreamWebEngine::initialInv() {
-	if (_realLocation != 24)
-		return;
-
-	pickupOb(11, 5);
-	pickupOb(12, 6);
-	pickupOb(13, 7);
-	pickupOb(14, 8);
-	pickupOb(18, 0);
-	pickupOb(19, 1);
-	pickupOb(20, 9);
-	pickupOb(16, 2);
-	_vars._watchMode = 1;
-	_vars._reelToHold = 0;
-	_vars._endOfHoldReel = 6;
-	_vars._watchSpeed = 1;
-	_vars._speedCount = 1;
-	switchRyanOff();
-}
-
 void DreamWebEngine::walkIntoRoom() {
 	if (_vars._location == 14 && _mapX == 22) {
 		_destination = 1;
@@ -2307,13 +2277,6 @@ void DreamWebEngine::makeMainScreen() {
 	_manIsOffScreen = 0;
 }
 
-void DreamWebEngine::openInv() {
-	_invOpen = 1;
-	printMessage(80, 58 - 10, 61, 240, (240 & 1));
-	fillRyan();
-	_commandType = 255;
-}
-
 void DreamWebEngine::obsThatDoThings() {
 	if (!compare(_command, _objectType, "MEMB"))
 		return; // notlouiscard
@@ -2433,23 +2396,6 @@ bool DreamWebEngine::isSetObOnMap(uint8 index) {
 	return (getSetAd(index)->mapad[0] == 0);
 }
 
-void DreamWebEngine::examineInventory() {
-	commandOnlyCond(32, 249);
-
-	if (!(_mouseButton & 1))
-		return;
-
-	createPanel();
-	showPanel();
-	showMan();
-	showExit();
-	examIcon();
-	_pickUp = 0;
-	_invOpen = 2;
-	openInv();
-	workToScreenM();
-}
-
 void DreamWebEngine::underTextLine() {
 	if (_foreignRelease)
 		multiGet(_textUnder, _textAddressX, _textAddressY - 3, kUnderTextSizeX_f, kUnderTextSizeY_f);
@@ -2644,32 +2590,6 @@ void DreamWebEngine::showGun() {
 	getRidOfTempText();
 }
 
-void DreamWebEngine::dropError() {
-	_commandType = 255;
-	delPointer();
-	printMessage(76, 21, 56, 240, 240 & 1);
-	workToScreenM();
-	hangOnP(50);
-	showPanel();
-	showMan();
-	examIcon();
-	_commandType = 255;
-	workToScreenM();
-}
-
-void DreamWebEngine::cantDrop() {
-	_commandType = 255;
-	delPointer();
-	printMessage(76, 21, 24, 240, 240 & 1);
-	workToScreenM();
-	hangOnP(50);
-	showPanel();
-	showMan();
-	examIcon();
-	_commandType = 255;
-	workToScreenM();
-}
-
 void DreamWebEngine::getBack1() {
 	if (_pickUp != 0) {
 		blank();
@@ -2987,51 +2907,4 @@ void DreamWebEngine::edensFlatReminders() {
 	_vars._progressPoints++;	// got card
 }
 
-void DreamWebEngine::incRyanPage() {
-	commandOnlyCond(31, 222);
-
-	if (_mouseButton == _oldButton || !(_mouseButton & 1))
-		return;
-
-	_vars._ryanPage = (_mouseX - (kInventx + 167)) / 18;
-
-	delPointer();
-	fillRyan();
-	readMouse();
-	showPointer();
-	workToScreen();
-	delPointer();
-}
-
-void DreamWebEngine::emergencyPurge() {
-	while (true) {
-		if (_vars._exFramePos + 4000 < kExframeslen) {
-			// Not near frame end
-			if (_vars._exTextPos + 400 < kExtextlen)
-				return;	// notneartextend
-		}
-
-		purgeAnItem();
-	}
-}
-
-void DreamWebEngine::purgeAnItem() {
-	const DynObject *extraObjects = _exData;
-
-	for (size_t i = 0; i < kNumexobjects; ++i) {
-		if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 &&
-			extraObjects[i].initialLocation != _realLocation) {
-			deleteExObject(i);
-			return;
-		}
-	}
-
-	for (size_t i = 0; i < kNumexobjects; ++i) {
-		if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) {
-			deleteExObject(i);
-			return;
-		}
-	}
-}
-
 } // End of namespace DreamWeb






More information about the Scummvm-git-logs mailing list