[Scummvm-cvs-logs] scummvm master -> a4ffb8fe54c41c957f506c127c6aa30586769c52
bluegr
md5 at scummvm.org
Fri Dec 23 02:37:18 CET 2011
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2bdcbadbfe DREAMWEB: Yet more things to DreamBase
d033566f6d DREAMWEB: Move most of saveload.cpp to DreamBase
a4ffb8fe54 DREAMWEB: Convert fadeDownMon, fadeUpMon, initialMonCols to C++
Commit: 2bdcbadbfe6badc8ab7c75bd27b988be7916828d
https://github.com/scummvm/scummvm/commit/2bdcbadbfe6badc8ab7c75bd27b988be7916828d
Author: Max Horn (max at quendi.de)
Date: 2011-12-22T17:30:59-08:00
Commit Message:
DREAMWEB: Yet more things to DreamBase
Changed paths:
engines/dreamweb/dreambase.h
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
engines/dreamweb/vgagrafx.cpp
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 6de854f..0cdcefe 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -440,6 +440,12 @@ public:
void makeMainScreen();
void showWatchReel();
void watchReel();
+ void commandWithOb(uint8 command, uint8 type, uint8 index);
+ void examineObText();
+ void blockNameText();
+ void personNameText();
+ void walkToText();
+ void entryTexts();
// from use.cpp
void placeFreeObject(uint8 index);
@@ -487,9 +493,8 @@ public:
void panelToMap();
void mapToPanel();
void dumpMap();
-
void transferInv();
-
+ void zoom();
void multiGet(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height);
void multiPut(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height);
void multiDump(uint16 x, uint16 y, uint8 width, uint8 height);
@@ -506,11 +511,11 @@ public:
void showPCX(const Common::String &name);
void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height);
void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag);
+ bool pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y);
void loadPalFromIFF();
void createPanel();
void createPanel2();
void showPanel();
- void entryTexts();
};
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index c755b93..1a0c07c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1266,7 +1266,7 @@ void DreamGenContext::commandWithOb() {
commandWithOb(al, bh, bl);
}
-void DreamGenContext::commandWithOb(uint8 command, uint8 type, uint8 index) {
+void DreamBase::commandWithOb(uint8 command, uint8 type, uint8 index) {
uint8 commandLine[64] = "OBJECT NAME ONE ";
delTextLine();
uint16 commandText = kTextstart + getSegment(data.word(kCommandtext)).word(command * 2);
@@ -1283,19 +1283,19 @@ void DreamGenContext::commandWithOb(uint8 command, uint8 type, uint8 index) {
data.byte(kNewtextline) = 1;
}
-void DreamGenContext::examineObText() {
+void DreamBase::examineObText() {
commandWithOb(1, data.byte(kCommandtype), data.byte(kCommand));
}
-void DreamGenContext::blockNameText() {
+void DreamBase::blockNameText() {
commandWithOb(0, data.byte(kCommandtype), data.byte(kCommand));
}
-void DreamGenContext::personNameText() {
+void DreamBase::personNameText() {
commandWithOb(2, data.byte(kCommandtype), data.byte(kCommand) & 127);
}
-void DreamGenContext::walkToText() {
+void DreamBase::walkToText() {
commandWithOb(3, data.byte(kCommandtype), data.byte(kCommand));
}
@@ -1446,10 +1446,6 @@ void DreamGenContext::walkAndExamine() {
examineOb();
}
-void DreamGenContext::obName() {
- obName(al, ah);
-}
-
void DreamGenContext::obName(uint8 command, uint8 commandType) {
if (data.byte(kReasseschanges) == 0) {
if ((commandType == data.byte(kCommandtype)) && (command == data.byte(kCommand))) {
@@ -1796,19 +1792,15 @@ void DreamBase::showIcon() {
}
}
-void DreamGenContext::checkIfSet() {
- flags._z = !checkIfSet(al, ah);
-}
-
bool DreamGenContext::checkIfSet(uint8 x, uint8 y) {
const ObjPos *setList = (const ObjPos *)getSegment(data.word(kBuffers)).ptr(kSetlist, sizeof(ObjPos) * 128);
for (size_t i = 0; i < 128; ++i) {
const ObjPos *pos = setList + 127 - i;
if (pos->index == 0xff || !pos->contains(x,y))
continue;
- if (! pixelCheckSet(pos, x, y))
+ if (!pixelCheckSet(pos, x, y))
continue;
- if (! isItDescribed(pos))
+ if (!isItDescribed(pos))
continue;
obName(pos->index, 1);
return true;
@@ -1843,10 +1835,6 @@ void DreamBase::hangOnW(uint16 frameCount) {
}
}
-void DreamGenContext::hangOnP() {
- hangOnP(cx);
-}
-
void DreamBase::hangOnP(uint16 count) {
data.word(kMaintimer) = 0;
uint8 pointerFrame = data.byte(kPointerframe);
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f50f4d8..987f04f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -61,7 +61,6 @@
DreamBase::showFrame(frameData, x, y, frameNumber, effectsFlag);
}
void width160();
- void zoom();
void commandOnly();
void commandOnly(uint8 command) {
DreamBase::commandOnly(command);
@@ -73,10 +72,9 @@
void checkIfEx();
bool checkIfEx(uint8 x, uint8 y);
void commandWithOb();
- void commandWithOb(uint8 command, uint8 type, uint8 index);
- void blockNameText();
- void walkToText();
- void personNameText();
+ void commandWithOb(uint8 command, uint8 type, uint8 index) {
+ DreamBase::commandWithOb(command, type, index);
+ }
DynObject *getFreeAd(uint8 index) {
return DreamBase::getFreeAd(index);
}
@@ -98,7 +96,6 @@
DreamBase::checkOne(x, y, flag, flagEx, type, flagX, flagY);
}
void walkAndExamine();
- void obName();
void obName(uint8 command, uint8 commandType);
void checkCoords(const RectWithCallback *rectWithCallbacks);
void getExPos();
@@ -106,8 +103,6 @@
bool compare(uint8 index, uint8 flag, const char id[4]) {
return DreamBase::compare(index, flag, id);
}
- bool pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y);
- void checkIfSet();
bool checkIfSet(uint8 x, uint8 y);
void isItWorn();
bool isItWorn(const DynObject *object) {
@@ -125,17 +120,12 @@
void hangOn(uint16 frameCount) {
DreamBase::hangOn(frameCount);
}
- void hangOnP();
- void hangOnP(uint16 count) {
- DreamBase::hangOnP(count);
- }
uint8 findNextColon(const uint8 **string) {
return DreamBase::findNextColon(string);
}
void findNextColon();
const uint8 *getObTextStartCPP();
void useText(const uint8 *string);
- void examineObText();
void showCity();
uint16 getPersFrame(uint8 index);
void convIcons();
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index cea9dbe..b1a23a6 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -371,7 +371,7 @@ void DreamBase::clearWork() {
memset(workspace(), 0, 320*200);
}
-void DreamGenContext::zoom() {
+void DreamBase::zoom() {
if (data.word(kWatchingtime) != 0)
return;
if (data.byte(kZoomon) != 1)
@@ -432,7 +432,7 @@ void DreamBase::transferInv() {
data.word(kExframepos) += byteCount;
}
-bool DreamGenContext::pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y) {
+bool DreamBase::pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y) {
x -= pos->xMin;
y -= pos->yMin;
SetObject *setObject = getSetAd(pos->index);
Commit: d033566f6dea0330d17f54d2f1539c4587f231d0
https://github.com/scummvm/scummvm/commit/d033566f6dea0330d17f54d2f1539c4587f231d0
Author: Max Horn (max at quendi.de)
Date: 2011-12-22T17:31:01-08:00
Commit Message:
DREAMWEB: Move most of saveload.cpp to DreamBase
Changed paths:
engines/dreamweb/dreambase.h
engines/dreamweb/saveload.cpp
engines/dreamweb/stubs.cpp
engines/dreamweb/stubs.h
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 0cdcefe..ba0499f 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -238,9 +238,18 @@ public:
void namesToOld();
void showMainOps();
void showDiscOps();
- void showNames();
+ void actualSave();
+ void actualLoad();
void loadPosition(unsigned int slot);
void savePosition(unsigned int slot, const char *descbuf);
+ void loadSaveBox();
+ void showNames();
+ void checkInput();
+ void selectSlot();
+ void showSlots();
+ void showOpBox();
+ void showSaveOps();
+ void showLoadOps();
// from sound.cpp
bool loadSpeech(byte type1, int idx1, byte type2, int idx2);
@@ -320,7 +329,6 @@ public:
Frame *tempGraphics2();
Frame *tempGraphics3();
void showArrows();
- void showOpBox();
void middlePanel();
void showDiary();
void readMouse();
@@ -446,6 +454,9 @@ public:
void personNameText();
void walkToText();
void entryTexts();
+ void setAllChanges();
+ void restoreAll();
+ void redrawMainScrn();
// from use.cpp
void placeFreeObject(uint8 index);
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index cd32e4f..5ca8ce8 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -81,9 +81,9 @@ void DreamGenContext::doLoad(int savegameId) {
dumpPointer();
dumpTextLine();
RectWithCallback loadlist[] = {
- { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps },
- { kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamGenContext::actualLoad },
- { kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamGenContext::selectSlot },
+ { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamBase::getBackToOps },
+ { kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamBase::actualLoad },
+ { kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamBase::selectSlot },
{ 0,320,0,200,&DreamBase::blank },
{ 0xFFFF,0,0,0,0 }
};
@@ -177,9 +177,9 @@ void DreamGenContext::saveGame() {
dumpTextLine();
RectWithCallback savelist[] = {
- { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps },
- { kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamGenContext::actualSave },
- { kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamGenContext::selectSlot },
+ { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamBase::getBackToOps },
+ { kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamBase::actualSave },
+ { kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamBase::selectSlot },
{ 0,320,0,200,&DreamBase::blank },
{ 0xFFFF,0,0,0,0 }
};
@@ -268,7 +268,7 @@ void DreamGenContext::doSaveLoad() {
workToScreenCPP();
RectWithCallback opsList[] = {
- { kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::getBackFromOps },
+ { kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamBase::getBackFromOps },
{ kOpsx+10,kOpsx+77,kOpsy+10,kOpsy+59,&DreamBase::DOSReturn },
{ kOpsx+128,kOpsx+190,kOpsy+16,kOpsy+100,&DreamGenContext::discOps },
{ 0,320,0,200,&DreamBase::blank },
@@ -316,6 +316,27 @@ void DreamGenContext::doSaveLoad() {
data.byte(kManisoffscreen) = 0;
}
+void DreamBase::getBackFromOps() {
+ if (data.byte(kMandead) == 2)
+ blank();
+ else
+ getBack1();
+}
+
+void DreamBase::getBackToOps() {
+ if (data.byte(kCommandtype) != 201) {
+ data.byte(kCommandtype) = 201;
+ commandOnly(42);
+ }
+
+ if (data.word(kMousebutton) != data.word(kOldbutton)) {
+ if (data.word(kMousebutton) & 1) {
+ oldToNames();
+ data.byte(kGetback) = 2;
+ }
+ }
+}
+
void DreamBase::showMainOps() {
showFrame(tempGraphics(), kOpsx+10, kOpsy+10, 8, 0);
showFrame(tempGraphics(), kOpsx+59, kOpsy+30, 7, 0);
@@ -329,7 +350,46 @@ void DreamBase::showDiscOps() {
showFrame(tempGraphics(), kOpsx+176+2, kOpsy+60-4, 5, 0);
}
-void DreamGenContext::actualSave() {
+void DreamGenContext::discOps() {
+ if (data.byte(kCommandtype) != 249) {
+ data.byte(kCommandtype) = 249;
+ commandOnly(43);
+ }
+
+ if (data.word(kMousebutton) == data.word(kOldbutton) || !(data.word(kMousebutton) & 1))
+ return;
+
+ scanForNames();
+ data.byte(kLoadingorsave) = 2;
+ showOpBox();
+ showDiscOps();
+ data.byte(kCurrentslot) = 0;
+ workToScreenM();
+ data.byte(kGetback) = 0;
+
+ RectWithCallback discOpsList[] = {
+ { kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::loadGame },
+ { kOpsx+10,kOpsx+79,kOpsy+10,kOpsy+59,&DreamGenContext::saveGame },
+ { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamBase::getBackToOps },
+ { 0,320,0,200,&DreamBase::blank },
+ { 0xFFFF,0,0,0,0 }
+ };
+
+ do {
+ if (data.byte(kQuitrequested) != 0)
+ return; // quitdiscops
+
+ delPointer();
+ readMouse();
+ showPointer();
+ vSync();
+ dumpPointer();
+ dumpTextLine();
+ checkCoords(discOpsList);
+ } while (!data.byte(kGetback));
+}
+
+void DreamBase::actualSave() {
if (data.byte(kCommandtype) != 222) {
data.byte(kCommandtype) = 222;
commandOnly(44);
@@ -356,7 +416,7 @@ void DreamGenContext::actualSave() {
data.byte(kGetback) = 4;
}
-void DreamGenContext::actualLoad() {
+void DreamBase::actualLoad() {
if (data.byte(kCommandtype) != 221) {
data.byte(kCommandtype) = 221;
commandOnly(41);
@@ -584,7 +644,7 @@ void DreamGenContext::loadOld() {
data.byte(kGetback) = 0;
}
-void DreamGenContext::loadSaveBox() {
+void DreamBase::loadSaveBox() {
loadIntoTemp("DREAMWEB.G08");
}
@@ -612,7 +672,7 @@ void DreamBase::showNames() {
}
}
-void DreamGenContext::checkInput() {
+void DreamBase::checkInput() {
if (data.byte(kLoadingorsave) == 3)
return;
@@ -649,7 +709,7 @@ void DreamGenContext::checkInput() {
workToScreenM();
}
-void DreamGenContext::selectSlot() {
+void DreamBase::selectSlot() {
if (data.byte(kCommandtype) != 244) {
data.byte(kCommandtype) = 244;
commandOnly(45);
@@ -677,8 +737,41 @@ void DreamGenContext::selectSlot() {
showSaveOps();
readMouse();
showPointer();
- workToScreen();
+ workToScreenCPP();
delPointer();
}
+void DreamBase::showSlots() {
+ showFrame(tempGraphics(), kOpsx + 7, kOpsy + 8, 2, 0);
+
+ uint16 y = kOpsy + 11;
+
+ for (int slot = 0; slot < 7; slot++) {
+ if (slot == data.byte(kCurrentslot))
+ showFrame(tempGraphics(), kOpsx + 10, y, 3, 0);
+
+ y += 10;
+ }
+}
+
+void DreamBase::showOpBox() {
+ showFrame(tempGraphics(), kOpsx, kOpsy, 0, 0);
+
+ // CHECKME: There seem to be versions of dreamweb in which this call
+ // should be removed. It displays a red dot on the ops dialogs if left in.
+ showFrame(tempGraphics(), kOpsx, kOpsy + 55, 4, 0);
+}
+
+void DreamBase::showLoadOps() {
+ showFrame(tempGraphics(), kOpsx + 128 + 4, kOpsy + 12, 1, 0);
+ showFrame(tempGraphics(), kOpsx + 176 + 2, kOpsy + 60 - 4, 5, 0);
+ printMessage(kOpsx + 104, kOpsy + 14, 55, 101, (101 & 1));
+}
+
+void DreamBase::showSaveOps() {
+ showFrame(tempGraphics(), kOpsx + 128 + 4, kOpsy + 12, 1, 0);
+ showFrame(tempGraphics(), kOpsx + 176 + 2, kOpsy + 60 - 4, 5, 0);
+ printMessage(kOpsx + 104, kOpsy + 14, 54, 101, (101 & 1));
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 1a0c07c..c31edc2 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1314,7 +1314,7 @@ void DreamBase::findOrMake(uint8 index, uint8 value, uint8 type) {
change->type = type;
}
-void DreamGenContext::setAllChanges() {
+void DreamBase::setAllChanges() {
Change *change = (Change *)getSegment(data.word(kBuffers)).ptr(kListofchanges, sizeof(Change));
for (; change->index != 0xff; ++change)
if (change->location == data.byte(kReallocation))
@@ -2309,7 +2309,7 @@ void DreamBase::loadRoomData(const Room &room, bool skipDat) {
engine->closeFile();
}
-void DreamGenContext::restoreAll() {
+void DreamBase::restoreAll() {
const Room &room = g_roomData[data.byte(kLocation)];
loadRoomData(room, true);
setAllChanges();
@@ -3131,27 +3131,6 @@ void DreamGenContext::newGame() {
data.byte(kGetback) = 3;
}
-void DreamBase::getBackFromOps() {
- if (data.byte(kMandead) == 2)
- blank();
- else
- getBack1();
-}
-
-void DreamBase::getBackToOps() {
- if (data.byte(kCommandtype) != 201) {
- data.byte(kCommandtype) = 201;
- commandOnly(42);
- }
-
- if (data.word(kMousebutton) != data.word(kOldbutton)) {
- if (data.word(kMousebutton) & 1) {
- oldToNames();
- data.byte(kGetback) = 2;
- }
- }
-}
-
void DreamGenContext::pickupOb(uint8 command, uint8 pos) {
data.byte(kLastinvpos) = pos;
data.byte(kObjecttype) = kFreeObjectType;
@@ -3234,7 +3213,7 @@ void DreamGenContext::gettingShot() {
clearBeforeLoad();
}
-void DreamGenContext::redrawMainScrn() {
+void DreamBase::redrawMainScrn() {
data.word(kTimecount) = 0;
createPanel();
data.byte(kNewobs) = 0;
@@ -3630,26 +3609,6 @@ void DreamBase::showArrows() {
showFrame(tempGraphics(), 280, 14, 2, 0);
}
-void DreamBase::showOpBox() {
- showFrame(tempGraphics(), kOpsx, kOpsy, 0, 0);
-
- // CHECKME: There seem to be versions of dreamweb in which this call
- // should be removed. It displays a red dot on the ops dialogs if left in.
- showFrame(tempGraphics(), kOpsx, kOpsy + 55, 4, 0);
-}
-
-void DreamGenContext::showLoadOps() {
- showFrame(tempGraphics(), kOpsx + 128 + 4, kOpsy + 12, 1, 0);
- showFrame(tempGraphics(), kOpsx + 176 + 2, kOpsy + 60 - 4, 5, 0);
- printMessage(kOpsx + 104, kOpsy + 14, 55, 101, (101 & 1));
-}
-
-void DreamGenContext::showSaveOps() {
- showFrame(tempGraphics(), kOpsx + 128 + 4, kOpsy + 12, 1, 0);
- showFrame(tempGraphics(), kOpsx + 176 + 2, kOpsy + 60 - 4, 5, 0);
- printMessage(kOpsx + 104, kOpsy + 14, 54, 101, (101 & 1));
-}
-
void DreamBase::middlePanel() {
Frame *tempSprites = (Frame *)getSegment(data.word(kTempsprites)).ptr(0, 0);
showFrame(tempSprites, 72 + 47 + 20, 0, 48, 0);
@@ -3891,45 +3850,6 @@ void DreamGenContext::talk() {
}
}
-void DreamGenContext::discOps() {
- if (data.byte(kCommandtype) != 249) {
- data.byte(kCommandtype) = 249;
- commandOnly(43);
- }
-
- if (data.word(kMousebutton) == data.word(kOldbutton) || !(data.word(kMousebutton) & 1))
- return;
-
- scanForNames();
- data.byte(kLoadingorsave) = 2;
- showOpBox();
- showDiscOps();
- data.byte(kCurrentslot) = 0;
- workToScreenM();
- data.byte(kGetback) = 0;
-
- RectWithCallback discOpsList[] = {
- { kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::loadGame },
- { kOpsx+10,kOpsx+79,kOpsy+10,kOpsy+59,&DreamGenContext::saveGame },
- { kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps },
- { 0,320,0,200,&DreamBase::blank },
- { 0xFFFF,0,0,0,0 }
- };
-
- do {
- if (data.byte(kQuitrequested) != 0)
- return; // quitdiscops
-
- delPointer();
- readMouse();
- showPointer();
- vSync();
- dumpPointer();
- dumpTextLine();
- checkCoords(discOpsList);
- } while (!data.byte(kGetback));
-}
-
void DreamGenContext::hangOnPQ() {
data.byte(kGetback) = 0;
@@ -4510,19 +4430,6 @@ void DreamGenContext::lookAtCard() {
putBackObStuff();
}
-void DreamGenContext::showSlots() {
- showFrame(tempGraphics(), kOpsx + 7, kOpsy + 8, 2, 0);
-
- uint16 y = kOpsy + 11;
-
- for (int slot = 0; slot < 7; slot++) {
- if (slot == data.byte(kCurrentslot))
- showFrame(tempGraphics(), kOpsx + 10, y, 3, 0);
-
- y += 10;
- }
-}
-
void DreamBase::clearBuffers() {
memset(getSegment(data.word(kBuffers)).ptr(0, kLengthofbuffer), 0, kLengthofbuffer);
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 987f04f..8a9a414 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -87,7 +87,6 @@
SetObject *getSetAd(uint8 index) {
return DreamBase::getSetAd(index);
}
- void setAllChanges();
void deleteTaken();
bool finishedWalkingCPP();
void finishedWalking();
@@ -162,9 +161,6 @@
void doLook();
void showFirstUse();
void showSecondUse();
- void actualSave();
- void actualLoad();
- void restoreAll();
void enterSymbol();
void viewFolder();
void edensCDPlayer();
@@ -221,7 +217,6 @@
void nextFolder();
void lastFolder();
void singleKey(uint8 key, uint16 x, uint16 y);
- void loadSaveBox();
uint8 nextSymbol(uint8 symbol);
void showSymbol();
void enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
@@ -247,9 +242,6 @@
void loadIntroRoom();
void afterIntroRoom();
void gettingShot();
- void redrawMainScrn();
- void selectSlot();
- void selectSlot2();
void allPointer();
void openYourNeighbour();
void openRyan();
@@ -294,8 +286,6 @@
return DreamBase::loadSpeech(type1, idx1, type2, idx2);
}
void set16ColPalette();
- void showSaveOps();
- void showLoadOps();
void afterNewRoom();
void madmanRun();
void showDecisions();
@@ -307,7 +297,6 @@
void hangOnPQ();
void showGun();
void endGame();
- void checkInput();
void dropError();
void cantDrop();
void newPlace();
@@ -341,7 +330,6 @@
void notHeldError();
void useGun();
void identifyOb();
- void showSlots();
void useCashCard();
void useStereo();
void selectOb();
Commit: a4ffb8fe54c41c957f506c127c6aa30586769c52
https://github.com/scummvm/scummvm/commit/a4ffb8fe54c41c957f506c127c6aa30586769c52
Author: Max Horn (max at quendi.de)
Date: 2011-12-22T17:32:50-08:00
Commit Message:
DREAMWEB: Convert fadeDownMon, fadeUpMon, initialMonCols to C++
Note that the two fade methods are currently unused; the only calls to them
are commented out in the asm version of the code.
This change also removes showGroup()
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreambase.h
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/monitor.cpp
engines/dreamweb/stubs.h
engines/dreamweb/vgafades.cpp
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 8952c3e..579a58f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -413,6 +413,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'facerightway',
'fadecalculation',
'fadedos',
+ 'fadedownmon',
'fadefromwhite',
'fadescreenup',
'fadescreenups',
@@ -421,6 +422,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'fadescreendowns',
'fadescreendownhalf',
'fadetowhite',
+ 'fadeupmon',
'fadeupmonfirst',
'fadeupyellows',
'femalefan',
@@ -504,6 +506,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'hotelcontrol',
'identifyob',
'initialinv',
+ 'initialmoncols',
'initman',
'initrain',
'input',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index ba0499f..45560db 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -479,8 +479,11 @@ public:
void fadeDOS();
void doFade();
void fadeCalculation();
- void fadeupYellows();
- void fadeupMonFirst();
+ void fadeUpYellows();
+ void fadeUpMonFirst();
+ void fadeUpMon();
+ void fadeDownMon();
+ void initialMonCols();
void fadeScreenUp();
void fadeScreenUps();
void fadeScreenUpHalf();
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index dff190a..c2d8530 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -167,64 +167,6 @@ endearly2:
cx = pop();
}
-void DreamGenContext::fadeDownMon() {
- STACK_CHECK;
- palToStartPal();
- palToEndPal();
- es = data.word(kBuffers);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
- cx = 3*8;
- ax = 0;
- _stosb(cx, true);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
- _stosb();
- _stosw();
- data.byte(kFadedirection) = 1;
- data.byte(kFadecount) = 63;
- data.byte(kColourpos) = 0;
- data.byte(kNumtofade) = 128;
- cx = 64;
- hangOn();
-}
-
-void DreamGenContext::fadeUpMon() {
- STACK_CHECK;
- palToStartPal();
- palToEndPal();
- es = data.word(kBuffers);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
- cx = 3*8;
- ax = 0;
- _stosb(cx, true);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
- _stosb();
- _stosw();
- data.byte(kFadedirection) = 1;
- data.byte(kFadecount) = 63;
- data.byte(kColourpos) = 0;
- data.byte(kNumtofade) = 128;
- cx = 128;
- hangOn();
-}
-
-void DreamGenContext::initialMonCols() {
- STACK_CHECK;
- palToStartPal();
- es = data.word(kBuffers);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
- cx = 3*9;
- ax = 0;
- _stosb(cx, true);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
- _stosb();
- _stosw();
- ds = data.word(kBuffers);
- si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
- al = 230;
- cx = 18;
- showGroup();
-}
-
void DreamGenContext::fillOpen() {
STACK_CHECK;
delTextLine();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 76fa167..92b75a2 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -465,7 +465,6 @@ public:
void __start();
#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
- void fadeDownMon();
void getPersonText();
void getObTextStart();
void checkObjectSize();
@@ -479,7 +478,6 @@ public:
void getFreeAd();
void dirFile();
void pickupConts();
- void fadeUpMon();
void reExFromInv();
void transferMap();
void purgeAnItem();
@@ -504,7 +502,6 @@ public:
void incRyanPage();
void searchForFiles();
void getExAd();
- void initialMonCols();
void swapWithInv();
void transferToEx();
void parser();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 26caeb2..6652650 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -63,8 +63,8 @@ void DreamGenContext::useMon() {
printLogo();
workToScreenCPP();
turnOnPower();
- fadeupYellows();
- fadeupMonFirst();
+ fadeUpYellows();
+ fadeUpMonFirst();
data.word(kMonadx) = 76;
data.word(kMonady) = 141;
monMessage(1);
@@ -171,10 +171,12 @@ bool DreamGenContext::execCommand() {
void DreamBase::monitorLogo() {
if (data.byte(kLogonum) != data.byte(kOldlogonum)) {
data.byte(kOldlogonum) = data.byte(kLogonum);
+ //fadeDownMon(); // FIXME: Commented out in ASM
printLogo();
printUnderMon();
workToScreenCPP();
printLogo();
+ //fadeUpMon(); // FIXME: Commented out in ASM
printLogo();
playChannel1(26);
randomAccess(20);
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 8a9a414..8194980 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -280,7 +280,6 @@
void moreTalk();
void redes();
void selectLocation();
- void showGroup();
void loadSpeech();
bool loadSpeech(byte type1, int idx1, byte type2, int idx2) {
return DreamBase::loadSpeech(type1, idx1, type2, idx2);
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index 7518c22..d975d30 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -114,7 +114,7 @@ void DreamBase::fadeCalculation() {
--data.byte(kFadecount);
}
-void DreamBase::fadeupYellows() {
+void DreamBase::fadeUpYellows() {
palToEndPal();
memset(endPalette() + 231 * 3, 0, 8 * 3);
memset(endPalette() + 246 * 3, 0, 1 * 3);
@@ -125,7 +125,7 @@ void DreamBase::fadeupYellows() {
hangOn(128);
}
-void DreamBase::fadeupMonFirst() {
+void DreamBase::fadeUpMonFirst() {
palToStartPal();
palToEndPal();
memset(startPalette() + 231 * 3, 0, 8 * 3);
@@ -139,6 +139,39 @@ void DreamBase::fadeupMonFirst() {
hangOn(64);
}
+
+void DreamBase::fadeDownMon() {
+ palToStartPal();
+ palToEndPal();
+ memset(endPalette() + 231 * 3, 0, 8 * 3);
+ memset(endPalette() + 246 * 3, 0, 1 * 3);
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ hangOn(64);
+}
+
+void DreamBase::fadeUpMon() {
+ palToStartPal();
+ palToEndPal();
+ memset(startPalette() + 231 * 3, 0, 8 * 3);
+ memset(startPalette() + 246 * 3, 0, 1 * 3);
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ hangOn(128);
+}
+
+void DreamBase::initialMonCols() {
+ palToStartPal();
+ memset(startPalette() + 230 * 3, 0, 9 * 3);
+ memset(startPalette() + 246 * 3, 0, 1 * 3);
+ engine->processEvents();
+ engine->setPalette(startPalette() + 230 * 3, 230, 18);
+}
+
void DreamBase::fadeScreenUp() {
clearStartPal();
palToEndPal();
@@ -260,15 +293,6 @@ void DreamBase::dumpCurrent() {
engine->setPalette(pal, 128, 128);
}
-void DreamGenContext::showGroup() {
- engine->processEvents();
- unsigned n = (uint16)cx;
- uint8 *src = ds.ptr(si, n * 3);
- engine->setPalette(src, al, n);
- si += n * 3;
- cx = 0;
-}
-
void DreamGenContext::rollEndCredits2() {
rollEm();
}
More information about the Scummvm-git-logs
mailing list