[Scummvm-cvs-logs] scummvm master -> c95bdeb20ca16927fbac990c9633cb0db9e1fc3e

bluegr md5 at scummvm.org
Wed Dec 14 00:04:45 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:
c95bdeb20c DREAMWEB: Port 'dumpdiarykeys' to C++ and remove the now unused 'findtext1'


Commit: c95bdeb20ca16927fbac990c9633cb0db9e1fc3e
    https://github.com/scummvm/scummvm/commit/c95bdeb20ca16927fbac990c9633cb0db9e1fc3e
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-13T15:03:57-08:00

Commit Message:
DREAMWEB: Port 'dumpdiarykeys' to C++ and remove the now unused 'findtext1'

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index b989217..cd8d46a 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -342,6 +342,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'drunk',
 	'dumpblink',
 	'dumpcurrent',
+	'dumpdiarykeys',
 	'dumpeverything',
 	'dumpkeypad',
 	'dumpmap',
@@ -395,6 +396,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'findormake',
 	'findroominloc',
 	'findsource',
+	'findtext1',
 	'findxyfrompath',
 	'finishedwalking',
 	'folderexit',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 725e682..e2b5530 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4202,75 +4202,6 @@ gotkeyp:
 	showDiaryPage();
 }
 
-void DreamGenContext::dumpDiaryKeys() {
-	STACK_CHECK;
-	_cmp(data.byte(kPresscount), 1);
-	if (!flags.z())
-		goto notdumpdiary;
-	_cmp(data.byte(kSartaindead), 1);
-	if (flags.z())
-		goto notsartadd;
-	_cmp(data.byte(kDiarypage), 5);
-	if (!flags.z())
-		goto notsartadd;
-	_cmp(data.byte(kDiarypage), 5);
-	if (!flags.z())
-		goto notsartadd;
-	al = 6;
-	getLocation();
-	_cmp(al, 1);
-	if (flags.z())
-		goto notsartadd;
-	al = 6;
-	setLocation();
-	delPointer();
-	al = 12;
-	findText1();
-	di = 70;
-	bx = 106;
-	dl = 241;
-	ah = 16;
-	printDirect();
-	workToScreenM();
-	cx = 200;
-	hangOnP();
-	createPanel();
-	showIcon();
-	showDiary();
-	showDiaryPage();
-	workToScreenM();
-	showPointer();
-	return;
-notsartadd:
-	di = (68+24)+48;
-	bx = (48+12)+15;
-	cl = 200;
-	ch = 16;
-	multiDump();
-notdumpdiary:
-	di = (68+24)+94;
-	bx = (48+12)+97;
-	cl = 16;
-	ch = 16;
-	multiDump();
-	di = (68+24)+151;
-	bx = (48+12)+71;
-	cl = 16;
-	ch = 16;
-	multiDump();
-}
-
-void DreamGenContext::findText1() {
-	STACK_CHECK;
-	ah = 0;
-	si = ax;
-	_add(si, si);
-	es = data.word(kTextfile1);
-	ax = es.word(si);
-	_add(ax, (66*2));
-	si = ax;
-}
-
 void DreamGenContext::showSlots() {
 	STACK_CHECK;
 	di = (60)+7;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f5c333b..48b40fe 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -488,7 +488,6 @@ public:
 	void clearBuffers();
 	void getObTextStart();
 	void checkObjectSize();
-	void findText1();
 	void isRyanHolding();
 	void showSlots();
 	void useCashCard();
@@ -507,7 +506,6 @@ public:
 	void startTalk();
 	void getAnyAd();
 	void reminders();
-	void dumpDiaryKeys();
 	void checkForExit();
 	void lookInInterface();
 	void inToInv();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 4fc46ad..e753efd 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4599,4 +4599,32 @@ void DreamGenContext::showDiaryPage() {
 	useCharset1();
 }
 
+void DreamGenContext::dumpDiaryKeys() {
+	if (data.byte(kPresscount) == 1) {
+		if (data.byte(kSartaindead) != 1 && data.byte(kDiarypage) == 5 && DreamBase::getLocation(6) != 1) {
+			// Add Sartain Industries note
+			DreamBase::setLocation(6);
+			delPointer();
+			uint16 offset = kTextstart + getSegment(data.word(kTextfile1)).word(12 * 2);
+			const uint8 *string = getSegment(data.word(kTextfile1)).ptr(offset, 0);
+			uint16 y = 106;
+			printDirect(&string, 70, &y, 241, 241 & 1);
+			workToScreenM();
+			hangOnP(200);
+			createPanel();
+			showIcon();
+			showDiary();
+			showDiaryPage();
+			workToScreenM();
+			showPointer();
+			return;
+		} else {
+			multiDump(kDiaryx + 48, kDiaryy + 15, 200, 16);
+		}
+	}
+
+	multiDump(kDiaryx + 94, kDiaryy + 97, 16, 16);
+	multiDump(kDiaryx + 151, kDiaryy + 71, 16, 16);
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index da01c9b..50a8faa 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -582,5 +582,6 @@
 	void updateSymbolTop();
 	void updateSymbolBot();
 	void showDiaryPage();
+	void dumpDiaryKeys();
 
 #endif






More information about the Scummvm-git-logs mailing list