aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-18 03:28:21 +0200
committerFilippos Karapetis2011-12-18 03:28:21 +0200
commit9818def85b7ede9635a918e3635b521de7e996b2 (patch)
tree7721272c6819d9cc957b434e16bcb9253f149cc1
parent83b31ccb1d79276cbb04cd33c8a133bc0039003a (diff)
downloadscummvm-rg350-9818def85b7ede9635a918e3635b521de7e996b2.tar.gz
scummvm-rg350-9818def85b7ede9635a918e3635b521de7e996b2.tar.bz2
scummvm-rg350-9818def85b7ede9635a918e3635b521de7e996b2.zip
DREAMWEB: Port 'lookininterface' to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp19
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/monitor.cpp13
4 files changed, 10 insertions, 26 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 30a6ea3036..b872dc10dd 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -554,6 +554,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'lockmon',
'look',
'lookatcard',
+ 'lookininterface',
'loopchannel0',
'louis',
'louischair',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3c3abe9ca4..72f2feca0e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2044,25 +2044,6 @@ clearedlocations:
es.byte(bx) = 0;
}
-void DreamGenContext::lookInInterface() {
- STACK_CHECK;
- al = 'I';
- ah = 'N';
- cl = 'T';
- ch = 'F';
- findSetObject();
- ah = 1;
- checkInside();
- _cmp(cl, (114));
- if (flags.z())
- goto emptyinterface;
- al = es.byte(bx+15);
- _inc(al);
- return;
-emptyinterface:
- al = 0;
-}
-
void DreamGenContext::dirCom() {
STACK_CHECK;
cx = 30;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 98bab1bd0e..29cd6e39ab 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -473,7 +473,6 @@ public:
void getPersonText();
void getObTextStart();
void checkObjectSize();
- void fillOpen();
void doSomeTalk();
void resetLocation();
void outOfOpen();
@@ -482,7 +481,6 @@ public:
void startTalk();
void getAnyAd();
void reminders();
- void lookInInterface();
void inToInv();
void deleteExText();
void getFreeAd();
@@ -505,6 +503,7 @@ public:
void rollEm();
void lookAtPlace();
void findAllOpen();
+ void fillOpen();
void deleteExObject();
void getEitherAd();
void setPickup();
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 30ba9b88e0..577d5701ee 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -403,15 +403,18 @@ void DreamGenContext::loadNews() {
}
void DreamGenContext::loadCart() {
- lookInInterface();
+ byte cartridgeId = 0;
+ uint16 objectIndex = findSetObject("INTF");
+ if (checkInside(objectIndex, 1) != kNumexobjects)
+ cartridgeId = getSetAd(objectIndex)->name[0] + 1;
- if (al == 0)
+ if (cartridgeId == 0)
data.word(kTextfile3) = standardLoad("DREAMWEB.T20"); // monitor file 20
- else if (al == 1)
+ else if (cartridgeId == 1)
data.word(kTextfile3) = standardLoad("DREAMWEB.T21"); // monitor file 21
- else if (al == 2)
+ else if (cartridgeId == 2)
data.word(kTextfile3) = standardLoad("DREAMWEB.T22"); // monitor file 22
- else if (al == 3)
+ else if (cartridgeId == 3)
data.word(kTextfile3) = standardLoad("DREAMWEB.T23"); // monitor file 23
else
data.word(kTextfile3) = standardLoad("DREAMWEB.T24"); // monitor file 24