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

bluegr md5 at scummvm.org
Sun Dec 25 17:42:54 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:
eaf87bdfa7 DREAMWEB: Port 'emergencypurge' to C++


Commit: eaf87bdfa7ac279f736c03b25af94ac1df3b31ce
    https://github.com/scummvm/scummvm/commit/eaf87bdfa7ac279f736c03b25af94ac1df3b31ce
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-25T08:42:13-08:00

Commit Message:
DREAMWEB: Port 'emergencypurge' to C++

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 b058d1e..0ca442f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -406,6 +406,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'eden',
 	'edeninbath',
 	'edenscdplayer',
+	'emergencypurge',
 	'enablesoundint',
 	'endgame',
 	'endgameseq',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6ecbba7..42c0f71 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -475,26 +475,6 @@ void DreamGenContext::transferConToEx() {
 	ds.byte(si+2) = 255;
 }
 
-void DreamGenContext::emergencyPurge() {
-	STACK_CHECK;
-checkpurgeagain:
-	ax = data.word(kExframepos);
-	_add(ax, 4000);
-	_cmp(ax, (30000));
-	if (flags.c())
-		goto notnearframeend;
-	purgeAnItem();
-	goto checkpurgeagain;
-notnearframeend:
-	ax = data.word(kExtextpos);
-	_add(ax, 400);
-	_cmp(ax, (18000));
-	if (flags.c())
-		return /* (notneartextend) */;
-	purgeAnItem();
-	goto checkpurgeagain;
-}
-
 void DreamGenContext::purgeAnItem() {
 	STACK_CHECK;
 	es = data.word(kExtras);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 7bb4793..d86e007 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -477,7 +477,6 @@ public:
 	void getExAd();
 	void transferToEx();
 	void parser();
-	void emergencyPurge();
 	void transferConToEx();
 };
 
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 3a0ca79..4eea0b7 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3701,4 +3701,16 @@ void DreamBase::incRyanPage() {
 
 }
 
+void DreamGenContext::emergencyPurge() {
+	while (true) {
+		if (data.word(kExframepos) + 4000 < kExframeslen) {
+			// Not near frame end
+			if (data.word(kExtextpos) + 400 < kExtextlen)
+				return;	// notneartextend
+		}
+
+		purgeAnItem();
+	}
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 4cc0ee0..5bb07ad 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -199,5 +199,6 @@
 	void outOfOpen();
 	void swapWithOpen();
 	void swapWithInv();
+	void emergencyPurge();
 
 #endif






More information about the Scummvm-git-logs mailing list