[Scummvm-cvs-logs] scummvm master -> 3ff26ba84fd298886c6515407c61751984e05f68

bluegr md5 at scummvm.org
Tue Dec 27 02:01:26 CET 2011


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:
3ff26ba84f DREAMWEB: Move all of the functions to DreamBase and remove stubs.h


Commit: 3ff26ba84fd298886c6515407c61751984e05f68
    https://github.com/scummvm/scummvm/commit/3ff26ba84fd298886c6515407c61751984e05f68
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-26T17:00:00-08:00

Commit Message:
DREAMWEB: Move all of the functions to DreamBase and remove stubs.h

Changed paths:
  R engines/dreamweb/stubs.h
    devtools/tasmrecover/tasm/cpp.py
    engines/dreamweb/dreambase.h
    engines/dreamweb/dreamgen.h
    engines/dreamweb/object.cpp
    engines/dreamweb/saveload.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/talk.cpp
    engines/dreamweb/vgagrafx.cpp



diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py
index 686aea9..e1f8228 100644
--- a/devtools/tasmrecover/tasm/cpp.py
+++ b/devtools/tasmrecover/tasm/cpp.py
@@ -653,10 +653,6 @@ public:
 			self.hd.write(
 """	void __dispatch_call(uint16 addr);
 """)
-		self.hd.write(
-"""#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
-
-""")
 
 
 		for p in set(self.methods):
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 5625b28..fb06309 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -247,6 +247,8 @@ public:
 	void selectOpenOb();
 	void examineOb(bool examineAgain = true);
 	void selectOb();
+	void inventory();
+	void identifyOb();
 
 	// from pathfind.cpp
 	void turnPathOn(uint8 param);
@@ -613,6 +615,30 @@ public:
 	void searchForFiles(uint16 segment);
 	void triggerMessage(uint16 index);
 	void processTrigger();
+	void dreamweb();
+	void screenUpdate();
+	void startup1();
+	void quickQuit();
+	void readOneBlock();
+	void seeCommandTail();
+	void quickQuit2();
+	bool checkIfPerson(uint8 x, uint8 y);
+	bool checkIfFree(uint8 x, uint8 y);
+	bool checkIfEx(uint8 x, uint8 y);
+	void walkAndExamine();
+	void obName(uint8 command, uint8 commandType);
+	bool checkIfSet(uint8 x, uint8 y);
+	void readSetData();
+	void look();
+	void autoLook();
+	void doLook();
+	void mainScreen();
+	void zoomOnOff();
+	void initialInv();
+	void walkIntoRoom();
+	void afterNewRoom();
+	void madmanRun();
+	void showGun();
 
 	// from talk.cpp
 	void talk();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index a68c5cd..102b382 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -410,8 +410,6 @@ public:
 	DreamGenContext(DreamWeb::DreamWebEngine *en) : DreamBase(en), Context(this) {}
 
 	void __start();
-#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
-
 };
 
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 65f45bd..8152394 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -213,7 +213,7 @@ void DreamBase::examineOb(bool examineAgain) {
 	data.byte(kOpenedob) = 255;
 }
 
-void DreamGenContext::inventory() {
+void DreamBase::inventory() {
 	if (data.byte(kMandead) == 1 || data.word(kWatchingtime) != 0) {
 		blank();
 		return;
@@ -308,7 +308,7 @@ void DreamBase::openOb() {
 	_openChangeSize = getOpenedSlotCount() * kItempicsize + kInventx;
 }
 
-void DreamGenContext::identifyOb() {
+void DreamBase::identifyOb() {
 	if (data.word(kWatchingtime) != 0) {
 		blank();
 		return;
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 4fa8cf3..c879afe 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -267,10 +267,10 @@ void DreamBase::doSaveLoad() {
 	showMainOps();
 	workToScreen();
 
-	RectWithCallback<DreamGenContext> opsList[] = {
+	RectWithCallback<DreamBase> opsList[] = {
 		{ kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamBase::getBackFromOps },
 		{ kOpsx+10,kOpsx+77,kOpsy+10,kOpsy+59,&DreamBase::DOSReturn },
-		{ kOpsx+128,kOpsx+190,kOpsy+16,kOpsy+100,&DreamGenContext::discOps },
+		{ kOpsx+128,kOpsx+190,kOpsy+16,kOpsy+100,&DreamBase::discOps },
 		{ 0,320,0,200,&DreamBase::blank },
 		{ 0xFFFF,0,0,0,0 }
 	};
@@ -367,7 +367,7 @@ void DreamBase::discOps() {
 	workToScreenM();
 	data.byte(kGetback) = 0;
 
-	RectWithCallback<DreamGenContext> discOpsList[] = {
+	RectWithCallback<DreamBase> discOpsList[] = {
 		{ kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamBase::loadGame },
 		{ kOpsx+10,kOpsx+79,kOpsy+10,kOpsy+59,&DreamBase::saveGame },
 		{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamBase::getBackToOps },
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index dd49116..ebc2580 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -456,7 +456,7 @@ static const Atmosphere g_atmosphereList[] = {
 
 };
 
-void DreamGenContext::dreamweb() {
+void DreamBase::dreamweb() {
 	switch(engine->getLanguage()) {
 	case Common::EN_ANY:
 	case Common::EN_GRB:
@@ -649,7 +649,7 @@ bool DreamBase::quitRequested() {
 	return data.byte(kQuitrequested);
 }
 
-void DreamGenContext::screenUpdate() {
+void DreamBase::screenUpdate() {
 	newPlace();
 	mainScreen();
 	if (quitRequested())
@@ -720,7 +720,7 @@ void DreamBase::startup() {
 	atmospheres();
 }
 
-void DreamGenContext::startup1() {
+void DreamBase::startup1() {
 	clearPalette();
 	data.byte(kThroughdoor) = 0;
 
@@ -787,15 +787,15 @@ void DreamBase::hangOnCurs(uint16 frameCount) {
 	}
 }
 
-void DreamGenContext::seeCommandTail() {
+void DreamBase::seeCommandTail() {
 	data.byte(kBrightness) = 1;
 }
 
-void DreamGenContext::quickQuit() {
+void DreamBase::quickQuit() {
 	engine->quit();
 }
 
-void DreamGenContext::quickQuit2() {
+void DreamBase::quickQuit2() {
 	engine->quit();
 }
 
@@ -1143,7 +1143,7 @@ void DreamBase::commandOnly(uint8 command) {
 	data.byte(kNewtextline) = 1;
 }
 
-bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) {
+bool DreamBase::checkIfPerson(uint8 x, uint8 y) {
 	Common::List<People>::iterator i;
 	for (i = _peopleList.begin(); i != _peopleList.end(); ++i) {
 		People &people = *i;
@@ -1170,7 +1170,7 @@ bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) {
 	return false;
 }
 
-bool DreamGenContext::checkIfFree(uint8 x, uint8 y) {
+bool DreamBase::checkIfFree(uint8 x, uint8 y) {
 	Common::List<ObjPos>::const_iterator i;
 	for (i = _freeList.reverse_begin(); i != _freeList.end(); --i) {
 		const ObjPos &pos = *i;
@@ -1183,7 +1183,7 @@ bool DreamGenContext::checkIfFree(uint8 x, uint8 y) {
 	return false;
 }
 
-bool DreamGenContext::checkIfEx(uint8 x, uint8 y) {
+bool DreamBase::checkIfEx(uint8 x, uint8 y) {
 	Common::List<ObjPos>::const_iterator i;
 	for (i = _exList.reverse_begin(); i != _exList.end(); --i) {
 		const ObjPos &pos = *i;
@@ -1391,7 +1391,7 @@ void DreamBase::getFlagUnderP(uint8 *flag, uint8 *flagEx) {
 	data.byte(kLastflag) = *flag;
 }
 
-void DreamGenContext::walkAndExamine() {
+void DreamBase::walkAndExamine() {
 	if (!finishedWalking())
 		return;
 	data.byte(kCommandtype) = data.byte(kWalkexamtype);
@@ -1401,7 +1401,7 @@ void DreamGenContext::walkAndExamine() {
 		examineOb();
 }
 
-void DreamGenContext::obName(uint8 command, uint8 commandType) {
+void DreamBase::obName(uint8 command, uint8 commandType) {
 	if (data.byte(kReasseschanges) == 0) {
 		if ((commandType == data.byte(kCommandtype)) && (command == data.byte(kCommand))) {
 			if (data.byte(kWalkandexam) == 1) {
@@ -1721,7 +1721,7 @@ void DreamBase::showIcon() {
 	}
 }
 
-bool DreamGenContext::checkIfSet(uint8 x, uint8 y) {
+bool DreamBase::checkIfSet(uint8 x, uint8 y) {
 	Common::List<ObjPos>::const_iterator i;
 	for (i = _setList.reverse_begin(); i != _setList.end(); --i) {
 		const ObjPos &pos = *i;
@@ -1860,7 +1860,7 @@ void DreamBase::enterSymbol() {
 	}
 }
 
-void DreamGenContext::zoomOnOff() {
+void DreamBase::zoomOnOff() {
 	if (data.word(kWatchingtime) != 0 || data.byte(kPointermode) == 2) {
 		blank();
 		return;
@@ -1898,27 +1898,27 @@ void DreamBase::sortOutMap() {
 	}
 }
 
-void DreamGenContext::mainScreen() {
+void DreamBase::mainScreen() {
 	data.byte(kInmaparea) = 0;
 	if (data.byte(kWatchon) == 1) {
-		RectWithCallback<DreamGenContext> mainList[] = {
-			{ 44,70,32,46,&DreamGenContext::look },
-			{ 0,50,0,180,&DreamGenContext::inventory },
-			{ 226,244,10,26,&DreamGenContext::zoomOnOff },
-			{ 226,244,26,40,&DreamGenContext::saveLoad },
-			{ 240,260,100,124,&DreamGenContext::madmanRun },
-			{ 0,320,0,200,&DreamGenContext::identifyOb },
+		RectWithCallback<DreamBase> mainList[] = {
+			{ 44,70,32,46,&DreamBase::look },
+			{ 0,50,0,180,&DreamBase::inventory },
+			{ 226,244,10,26,&DreamBase::zoomOnOff },
+			{ 226,244,26,40,&DreamBase::saveLoad },
+			{ 240,260,100,124,&DreamBase::madmanRun },
+			{ 0,320,0,200,&DreamBase::identifyOb },
 			{ 0xFFFF,0,0,0,0 }
 		};
 		checkCoords(mainList);
 	} else {
-		RectWithCallback<DreamGenContext> mainList2[] = {
-			{ 44,70,32,46,&DreamGenContext::look },
-			{ 0,50,0,180,&DreamGenContext::inventory },
-			{ 226+48,244+48,10,26,&DreamGenContext::zoomOnOff },
-			{ 226+48,244+48,26,40,&DreamGenContext::saveLoad },
-			{ 240,260,100,124,&DreamGenContext::madmanRun },
-			{ 0,320,0,200,&DreamGenContext::identifyOb },
+		RectWithCallback<DreamBase> mainList2[] = {
+			{ 44,70,32,46,&DreamBase::look },
+			{ 0,50,0,180,&DreamBase::inventory },
+			{ 226+48,244+48,10,26,&DreamBase::zoomOnOff },
+			{ 226+48,244+48,26,40,&DreamBase::saveLoad },
+			{ 240,260,100,124,&DreamBase::madmanRun },
+			{ 0,320,0,200,&DreamBase::identifyOb },
 			{ 0xFFFF,0,0,0,0 }
 		};
 		checkCoords(mainList2);
@@ -2029,7 +2029,7 @@ void DreamBase::loadRoom() {
 	getDimension(&mapXstart, &mapYstart, &mapXsize, &mapYsize);
 }
 
-void DreamGenContext::readSetData() {
+void DreamBase::readSetData() {
 	data.word(kCharset1) = standardLoad("DREAMWEB.C00");
 
 	void *icons1Buffer = standardLoadCPP("DREAMWEB.G00");
@@ -2068,7 +2068,7 @@ void DreamBase::findRoomInLoc() {
 	data.byte(kRoomnum) = roomNum;
 }
 
-void DreamGenContext::autoLook() {
+void DreamBase::autoLook() {
 	if ((data.word(kMousex) != data.word(kOldx)) || (data.word(kMousey) != data.word(kOldy))) {
 		data.word(kLookcounter) = 1000;
 		return;
@@ -2082,7 +2082,7 @@ void DreamGenContext::autoLook() {
 	doLook();
 }
 
-void DreamGenContext::look() {
+void DreamBase::look() {
 	if (data.word(kWatchingtime) || (data.byte(kPointermode) == 2)) {
 		blank();
 		return;
@@ -2095,7 +2095,7 @@ void DreamGenContext::look() {
 		doLook();
 }
 
-void DreamGenContext::doLook() {
+void DreamBase::doLook() {
 	createPanel();
 	showIcon();
 	underTextLine();
@@ -2719,7 +2719,7 @@ void DreamBase::pickupOb(uint8 command, uint8 pos) {
 	transferToEx(command);
 }
 
-void DreamGenContext::initialInv() {
+void DreamBase::initialInv() {
 	if (data.byte(kReallocation) != 24)
 		return;
 
@@ -2739,7 +2739,7 @@ void DreamGenContext::initialInv() {
 	switchRyanOff();
 }
 
-void DreamGenContext::walkIntoRoom() {
+void DreamBase::walkIntoRoom() {
 	if (data.byte(kLocation) == 14 && data.byte(kMapx) == 22) {
 		data.byte(kDestination) = 1;
 		data.byte(kFinaldest) = 1;
@@ -3048,7 +3048,7 @@ void DreamBase::watchReel() {
 	plotReel(reelPointer);
 }
 
-void DreamGenContext::afterNewRoom() {
+void DreamBase::afterNewRoom() {
 	if (data.byte(kNowinnewroom) == 0)
 		return; // notnew
 
@@ -3079,7 +3079,7 @@ void DreamGenContext::afterNewRoom() {
 	atmospheres();
 }
 
-void DreamGenContext::madmanRun() {
+void DreamBase::madmanRun() {
 	if (data.byte(kLocation)    != 14 ||
 		data.byte(kMapx)        != 22 ||
 		data.byte(kPointermode) !=  2 ||
@@ -3145,7 +3145,7 @@ void DreamBase::decide() {
 	data.byte(kTextlen) = 240;
 }
 
-void DreamGenContext::showGun() {
+void DreamBase::showGun() {
 	data.byte(kAddtored) = 0;
 	data.byte(kAddtogreen) = 0;
 	data.byte(kAddtoblue) = 0;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
deleted file mode 100644
index c9eaf26..0000000
--- a/engines/dreamweb/stubs.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* 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.
- *
- */
-#ifndef DREAMWEB_STUBS_H
-#define DREAMWEB_STUBS_H
-
-	void dreamweb();
-	void screenUpdate();
-	void startup1();
-	void multiGet(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height) {
-		DreamBase::multiGet(dst, x, y, width, height);
-	}
-	void multiPut(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height) {
-		DreamBase::multiPut(src, x, y, width, height);
-	}
-	void multiDump(uint16 x, uint16 y, uint8 width, uint8 height) {
-		DreamBase::multiDump(x, y, width, height);
-	}
-	void quickQuit();
-	void readOneBlock();
-	void seeCommandTail();
-	void quickQuit2();
-	uint8 printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {
-		return DreamBase::printDirect(string, x, y, maxWidth, centered);
-	}
-	uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {
-		return DreamBase::printDirect(string, x, y, maxWidth, centered);
-	}
-	bool checkIfPerson(uint8 x, uint8 y);
-	bool checkIfFree(uint8 x, uint8 y);
-	bool checkIfEx(uint8 x, uint8 y);
-	void walkAndExamine();
-	void obName(uint8 command, uint8 commandType);
-
-	bool checkIfSet(uint8 x, uint8 y);
-	void obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) {
-		DreamBase::obToInv(index, flag, x, y);
-	}
-	void readSetData();
-	void look();
-	void autoLook();
-	void doLook();
-	void inventory();
-	void mainScreen();
-	void zoomOnOff();
-	void initialInv();
-	void walkIntoRoom();
-	void afterNewRoom();
-	void madmanRun();
-	void showGun();
-	void identifyOb();
-
-#endif
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index a73a509..aacd2d2 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -40,7 +40,7 @@ void DreamBase::talk() {
 	showPointer();
 	workToScreen();
 
-	RectWithCallback<DreamGenContext> talkList[] = {
+	RectWithCallback<DreamBase> talkList[] = {
 		{ 273,320,157,198,&DreamBase::getBack1 },
 		{ 240,290,2,44,&DreamBase::moreTalk },
 		{ 0,320,0,200,&DreamBase::blank },
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index 06743ed..33a1770 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -21,7 +21,6 @@
  */
 
 #include "dreamweb/dreamweb.h"
-#include "dreamweb/stubs.h"
 #include "engines/util.h"
 #include "graphics/surface.h"
 






More information about the Scummvm-git-logs mailing list