aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-05 14:13:57 +0100
committerBertrand Augereau2011-11-14 22:08:19 +0100
commit66c740ceea29f97e631e794a7ccdec5865fbb92d (patch)
tree52b023eb952b906c1f346df3c5ee68007023b803 /engines
parent1f405afbda0c74f0c1ca02921c299a50da87d7d1 (diff)
downloadscummvm-rg350-66c740ceea29f97e631e794a7ccdec5865fbb92d.tar.gz
scummvm-rg350-66c740ceea29f97e631e794a7ccdec5865fbb92d.tar.bz2
scummvm-rg350-66c740ceea29f97e631e794a7ccdec5865fbb92d.zip
DREAMWEB: 'showicon' ported to C++
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp52
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp19
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 21 insertions, 54 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index a092509262..5b869d44a3 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -14708,57 +14708,6 @@ success:
data.byte(kTurndirection) = 0;
}
-void DreamGenContext::showicon() {
- STACK_CHECK;
- _cmp(data.byte(kReallocation), 50);
- if (!flags.c())
- goto isdream1;
- showpanel();
- showman();
- roomname();
- panelicons1();
- zoomicon();
- return;
-isdream1:
- ds = data.word(kTempsprites);
- di = 72;
- bx = 2;
- al = 45;
- ah = 0;
- showframe();
- ds = data.word(kTempsprites);
- di = 72+47;
- bx = 2;
- al = 46;
- ah = 0;
- showframe();
- ds = data.word(kTempsprites);
- di = 69-10;
- bx = 21;
- al = 49;
- ah = 0;
- showframe();
- ds = data.word(kTempsprites);
- di = 160+88;
- bx = 2;
- al = 45;
- ah = 4;
- showframe();
- ds = data.word(kTempsprites);
- di = 160+43;
- bx = 2;
- al = 46;
- ah = 4;
- showframe();
- ds = data.word(kTempsprites);
- di = 160+101;
- bx = 21;
- al = 49;
- ah = 4;
- showframe();
- middlepanel();
-}
-
void DreamGenContext::middlepanel() {
STACK_CHECK;
ds = data.word(kTempsprites);
@@ -17131,7 +17080,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_printmessage2: printmessage2(); break;
case addr_setwalk: setwalk(); break;
case addr_workoutframes: workoutframes(); break;
- case addr_showicon: showicon(); break;
case addr_middlepanel: middlepanel(); break;
case addr_showman: showman(); break;
case addr_roomname: roomname(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index c29463a258..4ba7e40e54 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -97,7 +97,6 @@ public:
static const uint16 addr_roomname = 0xca74;
static const uint16 addr_showman = 0xca6c;
static const uint16 addr_middlepanel = 0xca68;
- static const uint16 addr_showicon = 0xca64;
static const uint16 addr_workoutframes = 0xca54;
static const uint16 addr_setwalk = 0xca44;
static const uint16 addr_printmessage2 = 0xca30;
@@ -1652,7 +1651,7 @@ public:
void startup();
void savegame();
void startpaltoend();
- void showicon();
+ //void showicon();
void findopenpos();
void describeob();
void deleteexframe();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 674bc49de3..5fa6e8af6d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1721,6 +1721,25 @@ bool DreamGenContext::isCD() {
return (data.byte(kSpeechloaded) == 1);
}
+void DreamGenContext::showicon() {
+ if (data.byte(kReallocation) < 50) {
+ showpanel();
+ showman();
+ roomname();
+ panelicons1();
+ zoomicon();
+ } else {
+ Frame *tempSprites = (Frame *)segRef(data.word(kTempsprites)).ptr(0, 0);
+ showframe(tempSprites, 72, 2, 45, 0);
+ showframe(tempSprites, 72+47, 2, 46, 0);
+ showframe(tempSprites, 69-10, 21, 49, 0);
+ showframe(tempSprites, 160+88, 2, 45, 4 & 0xfe);
+ showframe(tempSprites, 160+43, 2, 46, 4 & 0xfe);
+ showframe(tempSprites, 160+101, 21, 49, 4 & 0xfe);
+ middlepanel();
+ }
+}
+
void DreamGenContext::checkifset() {
flags._z = !checkifset(al, ah);
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 8fd15989c9..27bbe31cfc 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -235,6 +235,7 @@
void hangon(uint16 frameCount);
void hangonp();
void hangonp(uint16 count);
+ void showicon();
uint8 findnextcolon(uint8 **string);
void findnextcolon();
uint8 *getobtextstartCPP();