aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorBertrand Augereau2011-10-09 18:09:24 +0200
committerBertrand Augereau2011-10-09 18:09:24 +0200
commit4e825c069d6072ffadee87b7035940cd97916fb8 (patch)
tree9bdebe56897ab49c625176e5287eb4a32867be18 /engines/dreamweb
parent250fac9895afff4f07bd727bbdc79764d691fece (diff)
downloadscummvm-rg350-4e825c069d6072ffadee87b7035940cd97916fb8.tar.gz
scummvm-rg350-4e825c069d6072ffadee87b7035940cd97916fb8.tar.bz2
scummvm-rg350-4e825c069d6072ffadee87b7035940cd97916fb8.zip
DREAMWEB: 'wornerror' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp20
-rw-r--r--engines/dreamweb/dreamgen.h5
-rw-r--r--engines/dreamweb/object.cpp13
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 16 insertions, 23 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index e0bb1b1cb3..8f4b4cea21 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -5029,25 +5029,6 @@ void DreamGenContext::cantdrop() {
worktoscreenm();
}
-void DreamGenContext::wornerror() {
- STACK_CHECK;
- data.byte(kCommandtype) = 255;
- delpointer();
- di = 76;
- bx = 21;
- al = 57;
- dl = 240;
- printmessage();
- worktoscreenm();
- cx = 50;
- hangonp();
- showpanel();
- showman();
- examicon();
- data.byte(kCommandtype) = 255;
- worktoscreenm();
-}
-
void DreamGenContext::removeobfrominv() {
STACK_CHECK;
_cmp(data.byte(kCommand), 100);
@@ -16866,7 +16847,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_dropobject: dropobject(); break;
case addr_droperror: droperror(); break;
case addr_cantdrop: cantdrop(); break;
- case addr_wornerror: wornerror(); break;
case addr_removeobfrominv: removeobfrominv(); break;
case addr_selectopenob: selectopenob(); break;
case addr_useopened: useopened(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 729b802b41..f3a763fbd8 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -452,7 +452,6 @@ public:
static const uint16 addr_useopened = 0xc3e0;
static const uint16 addr_selectopenob = 0xc3dc;
static const uint16 addr_removeobfrominv = 0xc3d8;
- static const uint16 addr_wornerror = 0xc3d4;
static const uint16 addr_cantdrop = 0xc3d0;
static const uint16 addr_droperror = 0xc3cc;
static const uint16 addr_dropobject = 0xc3c8;
@@ -1286,7 +1285,7 @@ public:
void showbyte();
void screenupdate();
//void addlength();
- void wornerror();
+ //void usetimedtext();
void putundercentre();
void checkobjectsize();
//void commandonly();
@@ -1433,7 +1432,6 @@ public:
//void showallex();
void openpoolboss();
void buttontwo();
- //void usetimedtext();
//void delsprite();
//void getroomspaths();
//void dumptextline();
@@ -1491,6 +1489,7 @@ public:
void saveload();
void monitorlogo();
void loadposition();
+ //void wornerror();
void entersymbol();
void showword();
void dirfile();
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 99dfa4d6e7..e2da902465 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -46,6 +46,19 @@ bool DreamGenContext::isitworn(const DynObject *object) {
return (object->id[0] == 'W'-'A') && (object->id[1] == 'E'-'A');
}
+void DreamGenContext::wornerror() {
+ data.byte(kCommandtype) = 255;
+ delpointer();
+ printmessage(76, 21, 57, 240, false);
+ worktoscreenm();
+ hangonp(50);
+ showpanel();
+ showman();
+ examicon();
+ data.byte(kCommandtype) = 255;
+ worktoscreenm();
+}
+
void DreamGenContext::makeworn() {
makeworn((DynObject *)es.ptr(bx, sizeof(DynObject)));
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f757c19449..ac7e1a5b91 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -223,6 +223,7 @@
bool checkifpathison(uint8 index);
void isitworn();
bool isitworn(const DynObject *object);
+ void wornerror();
void makeworn();
void makeworn(DynObject *object);
void obtoinv();