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

tramboi bertrand_augereau at yahoo.fr
Wed Nov 30 15:32:14 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:
9edd0f2903 DREAMWEB: 'allocatebuffers' ported to C++


Commit: 9edd0f2903fd10dc06e22f37442d9787f964fab4
    https://github.com/scummvm/scummvm/commit/9edd0f2903fd10dc06e22f37442d9787f964fab4
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-30T06:30:59-08:00

Commit Message:
DREAMWEB: 'allocatebuffers' ported 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 2730e45..a87d529 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -318,6 +318,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'constant',
 	'random',
 	'drawfloor',
+	'allocatebuffers',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 5e0520e..04cf555 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -11252,40 +11252,6 @@ void DreamGenContext::checkforemm() {
 	STACK_CHECK;
 }
 
-void DreamGenContext::allocatebuffers() {
-	STACK_CHECK;
-	bx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/16;
-	allocatemem();
-	data.word(kExtras) = ax;
-	trysoundalloc();
-	bx = (0+(66*60))/16;
-	allocatemem();
-	data.word(kMapdata) = ax;
-	trysoundalloc();
-	bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534+68-0)/16;
-	allocatemem();
-	data.word(kBuffers) = ax;
-	trysoundalloc();
-	bx = (16*80)/16;
-	allocatemem();
-	data.word(kFreedat) = ax;
-	trysoundalloc();
-	bx = (64*128)/16;
-	allocatemem();
-	data.word(kSetdat) = ax;
-	trysoundalloc();
-	bx = (22*8*20*8)/16;
-	allocatemem();
-	data.word(kMapstore) = ax;
-	allocatework();
-	bx = 2048/16;
-	allocatemem();
-	data.word(kSounddata) = ax;
-	bx = 2048/16;
-	allocatemem();
-	data.word(kSounddata2) = ax;
-}
-
 void DreamGenContext::clearbuffers() {
 	STACK_CHECK;
 	es = data.word(kBuffers);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index ccffb21..3cd2f73 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -94,7 +94,6 @@ public:
 	static const uint16 addr_clearbeforeload = 0xc978;
 	static const uint16 addr_clearchanges = 0xc974;
 	static const uint16 addr_clearbuffers = 0xc970;
-	static const uint16 addr_allocatebuffers = 0xc96c;
 	static const uint16 addr_checkforemm = 0xc964;
 	static const uint16 addr_removeemm = 0xc960;
 	static const uint16 addr_setupemm = 0xc95c;
@@ -1528,7 +1527,6 @@ public:
 	void findpuztext();
 	void usechurchgate();
 	void monkandryan();
-	void allocatebuffers();
 	void swapwithinv();
 	void usecontrol();
 	void buttonseven();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 67f7922..ab574c5 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2522,5 +2522,22 @@ void DreamGenContext::drawfloor() {
 	data.byte(kNewobs) = 0;
 }
 
+void DreamGenContext::allocatebuffers() {
+	data.word(kExtras) = allocatemem(kLengthofextra/16);
+	trysoundalloc();
+	data.word(kMapdata) = allocatemem(kLengthofmap/16);
+	trysoundalloc();
+	data.word(kBuffers) = allocatemem(kLengthofbuffer/16);
+	trysoundalloc();
+	data.word(kFreedat) = allocatemem(kFreedatlen/16);
+	trysoundalloc();
+	data.word(kSetdat) = allocatemem(kSetdatlen/16);
+	trysoundalloc();
+	data.word(kMapstore) = allocatemem(kLenofmapstore/16);
+	allocatework();
+	data.word(kSounddata) = allocatemem(2048/16);
+	data.word(kSounddata2) = allocatemem(2048/16);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 6ac7d41..67cfe41 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -373,4 +373,5 @@
 	void loadtemptext(const char *fileName);
 	void loadtraveltext();
 	void drawfloor();
+	void allocatebuffers();
 






More information about the Scummvm-git-logs mailing list