aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-12-03 20:10:15 +0100
committerBertrand Augereau2011-12-03 20:42:33 +0100
commit156d3a997e865d7dd703a97f64c5c426091ffae5 (patch)
treed59590d1d8be21e1b0145f6c1a0d4dfeaadd379d
parentee0f3bcaadcaf08988ba789b9875270cd6472672 (diff)
downloadscummvm-rg350-156d3a997e865d7dd703a97f64c5c426091ffae5.tar.gz
scummvm-rg350-156d3a997e865d7dd703a97f64c5c426091ffae5.tar.bz2
scummvm-rg350-156d3a997e865d7dd703a97f64c5c426091ffae5.zip
DREAMWEB: 'enterSymbol' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp69
-rw-r--r--engines/dreamweb/dreamgen.h6
-rw-r--r--engines/dreamweb/stubs.cpp71
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 61 insertions, 87 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 500a691ce3..a6f84e1ff6 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -160,6 +160,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'eden',
'endpaltostart',
'entercode',
+ 'entersymbol',
'eraseoldobs',
'examineob',
'examineobtext',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 7bd735f975..ce98b1aaf0 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9077,75 +9077,6 @@ void DreamGenContext::dumpKeypad() {
multiDump();
}
-void DreamGenContext::enterSymbol() {
- STACK_CHECK;
- data.byte(kManisoffscreen) = 1;
- getRidOfReels();
- dx = 2007;
- loadIntoTemp();
- data.byte(kSymboltopx) = 24;
- data.byte(kSymboltopdir) = 0;
- data.byte(kSymbolbotx) = 24;
- data.byte(kSymbolbotdir) = 0;
- redrawMainScrn();
- showSymbol();
- underTextLine();
- workToScreenM();
- data.byte(kGetback) = 0;
-symbolloop:
- delPointer();
- updateSymbolTop();
- updateSymbolBot();
- showSymbol();
- readMouse();
- showPointer();
- vSync();
- dumpPointer();
- dumpTextLine();
- dumpSymbol();
- bx = offset_symbollist;
- checkCoords();
- _cmp(data.byte(kGetback), 0);
- if (flags.z())
- goto symbolloop;
- _cmp(data.byte(kSymbolbotnum), 3);
- if (!flags.z())
- goto symbolwrong;
- _cmp(data.byte(kSymboltopnum), 5);
- if (!flags.z())
- goto symbolwrong;
- al = 43;
- removeSetObject();
- al = 46;
- placeSetObject();
- ah = data.byte(kRoomnum);
- _add(ah, 12);
- al = 0;
- turnAnyPathOn();
- data.byte(kManisoffscreen) = 0;
- redrawMainScrn();
- getRidOfTemp();
- restoreReels();
- workToScreenM();
- al = 13;
- playChannel1();
- return;
-symbolwrong:
- al = 46;
- removeSetObject();
- al = 43;
- placeSetObject();
- ah = data.byte(kRoomnum);
- _add(ah, 12);
- al = 0;
- turnAnyPathOff();
- data.byte(kManisoffscreen) = 0;
- redrawMainScrn();
- getRidOfTemp();
- restoreReels();
- workToScreenM();
-}
-
void DreamGenContext::quitSymbol() {
STACK_CHECK;
_cmp(data.byte(kSymboltopx), 24);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 662cb15704..ba3e690858 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -57,7 +57,6 @@ public:
static const uint16 offset_gameerror1 = 0x0a7d;
static const uint16 offset_gameerror3 = 0x0b12;
static const uint16 offset_gameerror7 = 0x0c13;
- static const uint16 offset_symbollist = 0x09c1;
static const uint16 offset_speechfilename = 0x0ec9;
static const uint16 offset_discopslist = 0x0a53;
static const uint16 offset_atmospherelist = 0x0edc;
@@ -756,7 +755,6 @@ public:
void discOps();
void middlePanel();
void monitorLogo();
- void enterSymbol();
void dirFile();
void pickupConts();
void lockLightOff();
@@ -834,7 +832,7 @@ public:
void priest();
void printmessage2();
void loadNews();
- void rollEm();
+ void wearShades();
void hangOnPQ();
void findOpenPos();
void describeOb();
@@ -848,7 +846,7 @@ public:
void getBack1();
void fadeFromWhite();
void useWindow();
- void wearShades();
+ void rollEm();
void delEverything();
void fadeScreenDown();
void poolGuard();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 230e885270..0909122868 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1711,20 +1711,6 @@ void DreamGenContext::checkCoords() {
checkCoords(destList);
break;
}
- case offset_symbollist: {
- RectWithCallback symbolList[] = {
- { kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitSymbol },
- { kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::setTopLeft },
- { kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::setTopRight },
- { kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setBotLeft },
- { kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setBotRight },
- { 0,320,0,200,&DreamGenContext::blank },
- { 0xFFFF,0,0,0,0 }
- };
- checkCoords(symbolList);
-
- break;
- }
case offset_diarylist: {
RectWithCallback diaryList[] = {
{ kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diaryKeyN },
@@ -2082,6 +2068,63 @@ uint8 *DreamGenContext::getObTextStartCPP() {
return result;
}
+void DreamGenContext::enterSymbol() {
+ data.byte(kManisoffscreen) = 1;
+ getRidOfReels();
+ loadIntoTemp("DREAMWEB.G12");
+ data.byte(kSymboltopx) = 24;
+ data.byte(kSymboltopdir) = 0;
+ data.byte(kSymbolbotx) = 24;
+ data.byte(kSymbolbotdir) = 0;
+ redrawMainScrn();
+ showSymbol();
+ underTextLine();
+ workToScreenM();
+ data.byte(kGetback) = 0;
+ do {
+ delPointer();
+ updateSymbolTop();
+ updateSymbolBot();
+ showSymbol();
+ readMouse();
+ showPointer();
+ vSync();
+ dumpPointer();
+ dumpTextLine();
+ dumpSymbol();
+ RectWithCallback symbolList[] = {
+ { kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitSymbol },
+ { kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::setTopLeft },
+ { kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::setTopRight },
+ { kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setBotLeft },
+ { kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setBotRight },
+ { 0,320,0,200,&DreamGenContext::blank },
+ { 0xFFFF,0,0,0,0 }
+ };
+ checkCoords(symbolList);
+ } while (data.byte(kGetback) == 0);
+ if ((data.byte(kSymbolbotnum) == 3) && (data.byte(kSymboltopnum) == 5)) {
+ removeSetObject(43);
+ placeSetObject(46);
+ turnAnyPathOn(0, data.byte(kRoomnum) + 12);
+ data.byte(kManisoffscreen) = 0;
+ redrawMainScrn();
+ getRidOfTemp();
+ restoreReels();
+ workToScreenM();
+ playChannel1(13);
+ } else {
+ removeSetObject(46);
+ placeSetObject(43);
+ turnAnyPathOff(0, data.byte(kRoomnum) + 12);
+ data.byte(kManisoffscreen) = 0;
+ redrawMainScrn();
+ getRidOfTemp();
+ restoreReels();
+ workToScreenM();
+ }
+}
+
void DreamGenContext::zoomOnOff() {
if (data.word(kWatchingtime) != 0) {
blank();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f80dfad4bb..c6c392ecf0 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -364,6 +364,7 @@
void loadRoomData(const Room &room, bool skipDat);
void restoreAll();
void restoreReels();
+ void enterSymbol();
void viewFolder();
void checkFolderCoords();
void loadFolder();