aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-08 21:54:58 +0200
committerFilippos Karapetis2011-12-08 21:54:58 +0200
commite287ac0e39324d2149633d080780bf2b57ccf3d2 (patch)
treecd05cfd2547344f47fe1b5ae9008b24c17e56823
parentcd9a65f34058c838d5ed5900d8cc28e3a9692ecd (diff)
downloadscummvm-rg350-e287ac0e39324d2149633d080780bf2b57ccf3d2.tar.gz
scummvm-rg350-e287ac0e39324d2149633d080780bf2b57ccf3d2.tar.bz2
scummvm-rg350-e287ac0e39324d2149633d080780bf2b57ccf3d2.zip
DREAMWEB: Port 'afternewroom' to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp39
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/stubs.cpp34
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 36 insertions, 40 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 08471f3875..ecc6b92a5c 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -154,6 +154,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'adjustlen',
'advisor',
'afterintroroom',
+ 'afternewroom',
'aide',
'alleybarksound',
'allocatebuffers',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index ab4d8cbead..65d8d4a33d 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6781,45 +6781,6 @@ gotfirst:
al = es.byte(bx+6);
}
-void DreamGenContext::afterNewRoom() {
- STACK_CHECK;
- _cmp(data.byte(kNowinnewroom), 0);
- if (flags.z())
- return /* (notnew) */;
- data.word(kTimecount) = 0;
- createPanel();
- data.byte(kCommandtype) = 0;
- findRoomInLoc();
- _cmp(data.byte(kRyanon), 1);
- if (flags.z())
- goto ryansoff;
- al = data.byte(kRyanx);
- _add(al, 12);
- ah = data.byte(kRyany);
- _add(ah, 12);
- findPathOfPoint();
- data.byte(kManspath) = dl;
- findXYFromPath();
- data.byte(kResetmanxy) = 1;
-ryansoff:
- data.byte(kNewobs) = 1;
- drawFloor();
- data.word(kLookcounter) = 160;
- data.byte(kNowinnewroom) = 0;
- showIcon();
- spriteUpdate();
- printSprites();
- underTextLine();
- reelsOnScreen();
- mainScreen();
- getUnderZoom();
- zoom();
- workToScreenM();
- walkIntoRoom();
- reminders();
- atmospheres();
-}
-
void DreamGenContext::printmessage2() {
STACK_CHECK;
push(dx);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 2b5538750c..5e0523d2a3 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -680,7 +680,6 @@ public:
void searchForFiles();
void monkSpeaking();
void madmanRun();
- void afterNewRoom();
void getExAd();
void initialMonCols();
void useButtonA();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 9d3719f806..674ea212fa 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3865,4 +3865,38 @@ void DreamGenContext::watchReel() {
plotReel(reelPointer);
}
+void DreamGenContext::afterNewRoom() {
+ if (data.byte(kNowinnewroom) == 0)
+ return; // notnew
+
+ data.word(kTimecount) = 0;
+ createPanel();
+ data.byte(kCommandtype) = 0;
+ findRoomInLoc();
+ if (data.byte(kRyanon) != 1) {
+ al = data.byte(kRyanx) + 12;
+ ah = data.byte(kRyany) + 12;
+ findPathOfPoint();
+ data.byte(kManspath) = dl;
+ findXYFromPath();
+ data.byte(kResetmanxy) = 1;
+ }
+ data.byte(kNewobs) = 1;
+ drawFloor();
+ data.word(kLookcounter) = 160;
+ data.byte(kNowinnewroom) = 0;
+ showIcon();
+ spriteUpdate();
+ printSprites();
+ underTextLine();
+ reelsOnScreen();
+ mainScreen();
+ getUnderZoom();
+ zoom();
+ workToScreenM();
+ walkIntoRoom();
+ reminders();
+ atmospheres();
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index cfebddd308..582109f400 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -548,5 +548,6 @@
void removeFreeObject(uint8 index) {
DreamBase::removeFreeObject(index);
}
+ void afterNewRoom();
#endif