[Scummvm-cvs-logs] scummvm master -> 055464cb6f0849915bf359affeeb265cf3f6ae55
tramboi
bertrand_augereau at yahoo.fr
Fri Nov 18 05:31:17 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8651e0f0d0 DREAMWEB: C++ hardcoding of an asm hardcoded file name
055464cb6f DREAMWEB: 'deallocatemem' overload that takes a parameter
Commit: 8651e0f0d06ad6a687e09eea4b93007bde33064e
https://github.com/scummvm/scummvm/commit/8651e0f0d06ad6a687e09eea4b93007bde33064e
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-17T22:23:21-08:00
Commit Message:
DREAMWEB: C++ hardcoding of an asm hardcoded file name
Changed paths:
engines/dreamweb/stubs.cpp
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 44a8552..b01d16f 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2155,8 +2155,7 @@ void DreamGenContext::readsetdata() {
data.word(kCurrentset) = ax;
if (data.byte(kSoundint) == 0xff)
return;
- Common::String name((const char*)cs.ptr(kVolumetabname, 0));
- engine->openFile(name);
+ engine->openFile("DREAMWEB.VOL");
uint8 *volumeTab = segRef(data.word(kSoundbuffer)).ptr(16384, 0);
engine->readFromFile(volumeTab, 2048-256);
engine->closeFile();
Commit: 055464cb6f0849915bf359affeeb265cf3f6ae55
https://github.com/scummvm/scummvm/commit/055464cb6f0849915bf359affeeb265cf3f6ae55
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-17T22:29:38-08:00
Commit Message:
DREAMWEB: 'deallocatemem' overload that takes a parameter
Changed paths:
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index b01d16f..3bb885a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -583,9 +583,12 @@ uint16 DreamGenContext::allocatemem(uint16 paragraphs) {
}
void DreamGenContext::deallocatemem() {
- uint16 id = (uint16)es;
- debug(1, "deallocating segment %04x", id);
- deallocateSegment(id);
+ deallocatemem((uint16)es);
+}
+
+void DreamGenContext::deallocatemem(uint16 segment) {
+ debug(1, "deallocating segment %04x", segment);
+ deallocateSegment(segment);
//fixing invalid entries in the sprite table
es = data;
@@ -599,7 +602,7 @@ void DreamGenContext::deallocatemem() {
for(uint i = 0; i < tsize; i += 32) {
uint16 seg = READ_LE_UINT16(ptr + i + 6);
//debug(1, "sprite segment = %04x", seg);
- if (seg == id)
+ if (seg == segment)
memset(ptr + i, 0xff, 32);
}
}
@@ -2230,12 +2233,9 @@ void DreamGenContext::usemon() {
} while (al == 0);
getridoftemp();
getridoftempcharset();
- es = data.word(kTextfile1);
- deallocatemem();
- es = data.word(kTextfile2);
- deallocatemem();
- es = data.word(kTextfile3);
- deallocatemem();
+ deallocatemem(data.word(kTextfile1));
+ deallocatemem(data.word(kTextfile2));
+ deallocatemem(data.word(kTextfile3));
data.byte(kGetback) = 1;
al = 26;
playchannel1();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 840d5ae..af4ad10 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -20,6 +20,7 @@
*
*/
uint16 allocatemem(uint16 paragraphs);
+ void deallocatemem(uint16 segment);
uint8 *workspace();
uint8 *textUnder();
void allocatework();
More information about the Scummvm-git-logs
mailing list