aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-08-11 22:58:06 +0200
committerBertrand Augereau2011-08-15 22:30:16 +0200
commitc8d8056777e61f1ee3e56fcf00679c16aa3ebd6d (patch)
treeca191a715a53326ad9531d56889c91397c8ec463 /engines
parent62aabc57e446efcf15353a49209ce1d99c567fa4 (diff)
downloadscummvm-rg350-c8d8056777e61f1ee3e56fcf00679c16aa3ebd6d.tar.gz
scummvm-rg350-c8d8056777e61f1ee3e56fcf00679c16aa3ebd6d.tar.bz2
scummvm-rg350-c8d8056777e61f1ee3e56fcf00679c16aa3ebd6d.zip
DREAMWEB: 'showgamereel' ported to C++
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp17
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/sprite.cpp13
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 15 insertions, 19 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 12bfcb413f..72f7069686 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2160,22 +2160,6 @@ void DreamGenContext::addtopeoplelist() {
_add(data.word(kListpos), 5);
}
-void DreamGenContext::showgamereel() {
- STACK_CHECK;
- ax = es.word(bx+3);
- _cmp(ax, 512);
- if (!flags.c())
- return /* (noshow) */;
- data.word(kReelpointer) = ax;
- push(es);
- push(bx);
- plotreel();
- bx = pop();
- es = pop();
- ax = data.word(kReelpointer);
- es.word(bx+3) = ax;
-}
-
void DreamGenContext::checkspeed() {
STACK_CHECK;
_cmp(data.byte(kLastweapon), -1);
@@ -19478,7 +19462,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_sparky: sparky(); break;
case addr_train: train(); break;
case addr_addtopeoplelist: addtopeoplelist(); break;
- case addr_showgamereel: showgamereel(); break;
case addr_checkspeed: checkspeed(); break;
case addr_delsprite: delsprite(); break;
case addr_checkone: checkone(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 42d135fa9a..b08732c859 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -653,7 +653,6 @@ public:
static const uint16 addr_checkone = 0xc12c;
static const uint16 addr_delsprite = 0xc11c;
static const uint16 addr_checkspeed = 0xc110;
- static const uint16 addr_showgamereel = 0xc10c;
static const uint16 addr_addtopeoplelist = 0xc108;
static const uint16 addr_train = 0xc104;
static const uint16 addr_sparky = 0xc100;
@@ -1297,7 +1296,7 @@ public:
void loadtemptext();
void clearstartpal();
void femalefan();
- void showgamereel();
+ //void showgamereel();
void identifyob();
void trysoundalloc();
void uselighter();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 53c972008c..a970af9fe3 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -557,6 +557,19 @@ void DreamGenContext::showreelframe(Reel *reel) {
showframe(source, x, y, frame, 8, &width, &height);
}
+void DreamGenContext::showgamereel() {
+ uint16 reelpointer = es.word(bx+3);
+ if (reelpointer >= 512)
+ return;
+ data.word(kReelpointer) = reelpointer;
+ push(es);
+ push(bx);
+ plotreel();
+ bx = pop();
+ es = pop();
+ es.word(bx+3) = data.word(kReelpointer);
+}
+
void DreamGenContext::showrain() {
ds = data.word(kMainsprites);
si = 6*58;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5886630821..d3602501f1 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -98,6 +98,7 @@
void liftsprite(Sprite *sprite, ObjData *objData);
void findsource();
Frame *findsourceCPP();
+ void showgamereel();
void showreelframe();
void showreelframe(Reel *reel);
void turnpathonCPP(uint8 param);