aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-12-07 10:40:17 +0100
committerMax Horn2011-12-07 11:07:10 +0100
commitbd71a3bcec6c4bda9906b1e5818713ab9d40ccae (patch)
tree297bdcb5eece06c7fe5ad02c6c12bdd453ddee91
parent6161d7906efc1a99c05aeef91e60bcc44aeb8ac4 (diff)
downloadscummvm-rg350-bd71a3bcec6c4bda9906b1e5818713ab9d40ccae.tar.gz
scummvm-rg350-bd71a3bcec6c4bda9906b1e5818713ab9d40ccae.tar.bz2
scummvm-rg350-bd71a3bcec6c4bda9906b1e5818713ab9d40ccae.zip
DREAMWEB: Replace cs by data (outside of dreamgen.cpp)
-rw-r--r--engines/dreamweb/monitor.cpp12
-rw-r--r--engines/dreamweb/object.cpp2
-rw-r--r--engines/dreamweb/people.cpp6
-rw-r--r--engines/dreamweb/saveload.cpp6
-rw-r--r--engines/dreamweb/stubs.cpp14
5 files changed, 20 insertions, 20 deletions
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index c813037ddb..f552b71c00 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -32,10 +32,10 @@ struct MonitorKeyEntry {
void DreamGenContext::useMon() {
data.byte(kLasttrigger) = 0;
- memset(cs.ptr(kCurrentfile+1, 0), ' ', 12);
- memset(cs.ptr(offset_operand1+1, 0), ' ', 12);
+ memset(data.ptr(kCurrentfile+1, 0), ' ', 12);
+ memset(data.ptr(offset_operand1+1, 0), ' ', 12);
- MonitorKeyEntry *monitorKeyEntries = (MonitorKeyEntry *)cs.ptr(offset_keys, 0);
+ MonitorKeyEntry *monitorKeyEntries = (MonitorKeyEntry *)data.ptr(offset_keys, 0);
monitorKeyEntries[0].b0 = 1;
monitorKeyEntries[1].b0 = 0;
monitorKeyEntries[2].b0 = 0;
@@ -103,7 +103,7 @@ void DreamGenContext::printLogo() {
}
void DreamGenContext::input() {
- char *inputLine = (char *)cs.ptr(kInputline, 64);
+ char *inputLine = (char *)data.ptr(kInputline, 64);
memset(inputLine, 0, 64);
data.word(kCurpos) = 0;
printChar(engine->tempCharset(), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL);
@@ -149,7 +149,7 @@ void DreamGenContext::input() {
}
void DreamGenContext::delChar() {
- char *inputLine = (char *)cs.ptr(kInputline, 0);
+ char *inputLine = (char *)data.ptr(kInputline, 0);
--data.word(kCurpos);
inputLine[data.word(kCurpos) * 2] = 0;
uint8 width = inputLine[data.word(kCurpos) * 2 + 1];
@@ -204,7 +204,7 @@ void DreamGenContext::scrollMonitor() {
void DreamGenContext::showCurrentFile() {
uint16 x = 178; // TODO: Looks like this hardcoded constant in the asm doesn't match the frame
- const char *currentFile = (const char *)cs.ptr(kCurrentfile+1, 0);
+ const char *currentFile = (const char *)data.ptr(kCurrentfile+1, 0);
while (*currentFile) {
char c = *currentFile++;
c = engine->modifyChar(c);
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 02526b583d..44be58c168 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -167,7 +167,7 @@ void DreamGenContext::examineOb(bool examineAgain) {
{ 273,320,157,198,&DreamGenContext::getBackFromOb },
{ 255,294,0,24,&DreamGenContext::dropObject },
{ kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incRyanPage },
- { kInventx, cs.word(offset_openchangesize),kInventy+100,kInventy+100+kItempicsize,&DreamGenContext::useOpened },
+ { kInventx, data.word(offset_openchangesize),kInventy+100,kInventy+100+kItempicsize,&DreamGenContext::useOpened },
{ kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::inToInv },
{ 0,320,0,200,&DreamGenContext::blank },
{ 0xFFFF,0,0,0,0 }
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 6e2128e391..d1814ce8b9 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -96,8 +96,8 @@ void DreamGenContext::updatePeople() {
// The original callbacks are called with es:bx pointing to their reelRoutine entry.
// The new callbacks take a mutable ReelRoutine parameter.
- es = cs;
- ReelRoutine *r = (ReelRoutine *)cs.ptr(kReelroutines, 0);
+ es = data;
+ ReelRoutine *r = (ReelRoutine *)data.ptr(kReelroutines, 0);
for (int i = 0; r[i].reallocation != 255; ++i) {
bx = kReelroutines + 8*i;
@@ -196,7 +196,7 @@ void DreamGenContext::addToPeopleList() {
}
void DreamGenContext::addToPeopleList(ReelRoutine *routine) {
- uint16 routinePointer = (const uint8 *)routine - cs.ptr(0, 0);
+ uint16 routinePointer = (const uint8 *)routine - data.ptr(0, 0);
People *people = (People *)getSegment(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People));
people->setReelPointer(routine->reelPointer());
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 9bc24f2631..45a1c8ef7a 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -219,11 +219,11 @@ void DreamGenContext::saveGame() {
}
void DreamGenContext::namesToOld() {
- memcpy(getSegment(data.word(kBuffers)).ptr(kZoomspace, 0), cs.ptr(kSavenames, 0), 17*4);
+ memcpy(getSegment(data.word(kBuffers)).ptr(kZoomspace, 0), data.ptr(kSavenames, 0), 17*4);
}
void DreamGenContext::oldToNames() {
- memcpy(cs.ptr(kSavenames, 0), getSegment(data.word(kBuffers)).ptr(kZoomspace, 0), 17*4);
+ memcpy(data.ptr(kSavenames, 0), getSegment(data.word(kBuffers)).ptr(kZoomspace, 0), 17*4);
}
void DreamGenContext::saveLoad() {
@@ -377,7 +377,7 @@ void DreamGenContext::loadPosition(unsigned int slot) {
engine->readFromSaveFile((uint8 *)&g_madeUpRoomDat, sizeof(Room));
engine->readFromSaveFile(data.ptr(kRoomscango, 16), 16);
- engine->readFromSaveFile(cs.ptr(kReelroutines, len[5]), len[5]);
+ engine->readFromSaveFile(data.ptr(kReelroutines, len[5]), len[5]);
closeFile();
}
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index da02360e55..0c9b2e3eb9 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -736,7 +736,7 @@ void DreamGenContext::switchRyanOff() {
}
Common::String DreamGenContext::getFilename(Context &context) {
- const char *name = (const char *)context.cs.ptr(context.dx, 0);
+ const char *name = (const char *)context.data.ptr(context.dx, 0);
return Common::String(name);
}
@@ -770,7 +770,7 @@ void *DreamGenContext::standardLoadCPP(const char *fileName, uint16 *outSizeInBy
}
void DreamGenContext::loadIntoTemp() {
- loadIntoTemp((const char *)cs.ptr(dx, 0));
+ loadIntoTemp((const char *)data.ptr(dx, 0));
}
void DreamGenContext::loadIntoTemp(const char *fileName) {
@@ -786,7 +786,7 @@ void DreamGenContext::loadIntoTemp3(const char *fileName) {
}
void DreamGenContext::loadTempCharset() {
- loadTempCharset((const char *)cs.ptr(dx, 0));
+ loadTempCharset((const char *)data.ptr(dx, 0));
}
void DreamGenContext::loadTempCharset(const char *fileName) {
@@ -1427,7 +1427,7 @@ const uint8 *DreamGenContext::findObName(uint8 type, uint8 index) {
}
void DreamGenContext::copyName() {
- copyName(ah, al, cs.ptr(di, 0));
+ copyName(ah, al, data.ptr(di, 0));
}
void DreamGenContext::copyName(uint8 type, uint8 index, uint8 *dst) {
@@ -2606,7 +2606,7 @@ void DreamGenContext::getRidOfAll() {
// if skipDat, skip clearing and loading Setdat and Freedat
void DreamGenContext::loadRoomData(const Room &room, bool skipDat) {
engine->openFile(room.name);
- cs.word(kHandle) = 1; //only one handle
+ data.word(kHandle) = 1; //only one handle
flags._c = false;
FileHeader header;
@@ -2659,7 +2659,7 @@ void DreamGenContext::restoreReels() {
const Room &room = g_roomData[data.byte(kReallocation)];
engine->openFile(room.name);
- cs.word(kHandle) = 1; //only one handle
+ data.word(kHandle) = 1; //only one handle
flags._c = false;
FileHeader header;
@@ -2903,7 +2903,7 @@ void DreamGenContext::loadTravelText() {
}
void DreamGenContext::loadTempText() {
- loadTempText((const char *)cs.ptr(dx, 0));
+ loadTempText((const char *)data.ptr(dx, 0));
}
void DreamGenContext::loadTempText(const char *fileName) {