aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-08-03 15:58:18 +0200
committerBertrand Augereau2011-08-03 15:58:18 +0200
commitc04a250c936b7de73215cd99e0476992cb3216d7 (patch)
tree01327817659403634c5c4058fbe6030b3e3233b1 /engines
parentf7752243196e83b9191735634a764c26f24d7427 (diff)
downloadscummvm-rg350-c04a250c936b7de73215cd99e0476992cb3216d7.tar.gz
scummvm-rg350-c04a250c936b7de73215cd99e0476992cb3216d7.tar.bz2
scummvm-rg350-c04a250c936b7de73215cd99e0476992cb3216d7.zip
DREAMWEB: 'findsource' has a new C++ flavour
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/sprite.cpp12
-rw-r--r--engines/dreamweb/stubs.h1
2 files changed, 11 insertions, 2 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 42c1b70d3a..00cbd2c4dc 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -552,6 +552,14 @@ void DreamGenContext::findsource() {
}
}
+void *DreamGenContext::findsourceCPP() {
+ push(ds);
+ findsource();
+ void *result = ds.ptr(0, 0);
+ ds = pop();
+ return result;
+}
+
void DreamGenContext::showreelframe() {
Reel *reel = (Reel *)es.ptr(si, sizeof(Reel));
showreelframe(reel);
@@ -561,10 +569,10 @@ void DreamGenContext::showreelframe(Reel *reel) {
uint16 x = reel->x + data.word(kMapadx);
uint16 y = reel->y + data.word(kMapady);
data.word(kCurrentframe) = reel->frame();
- findsource();
+ void *source = findsourceCPP();
uint16 frame = data.word(kCurrentframe) - data.word(kTakeoff);
uint8 width, height;
- showframe(ds.ptr(0, 0), x, y, frame, 8, &width, &height);
+ showframe(source, x, y, frame, 8, &width, &height);
}
void DreamGenContext::showrain() {
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 635d6c733a..c2b1172eef 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -96,6 +96,7 @@
void liftsprite();
void liftsprite(Sprite *sprite, ObjData *objData);
void findsource();
+ void *findsourceCPP();
void showreelframe();
void showreelframe(Reel *reel);
void turnpathonCPP(uint8 param);