aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/stubs.cpp
diff options
context:
space:
mode:
authorBertrand Augereau2011-08-30 02:53:49 +0200
committerBertrand Augereau2011-08-30 03:01:40 +0200
commitaefdf240fb91efbecc3dc929ae311faa9c8d7b02 (patch)
tree33ed5d76288883042c7aa941768c36357aa01ea5 /engines/dreamweb/stubs.cpp
parent5bfe1f22d59471c50e0a6e65fb2dbf79e67fdf89 (diff)
downloadscummvm-rg350-aefdf240fb91efbecc3dc929ae311faa9c8d7b02.tar.gz
scummvm-rg350-aefdf240fb91efbecc3dc929ae311faa9c8d7b02.tar.bz2
scummvm-rg350-aefdf240fb91efbecc3dc929ae311faa9c8d7b02.zip
DREAMWEB: 'obpicture' ported to C++
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r--engines/dreamweb/stubs.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 1ffe3295ef..0f3e6420ef 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1643,6 +1643,18 @@ void DreamGenContext::printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWid
printdirect(&string, x, &y, maxWidth, centered);
}
+void DreamGenContext::obpicture() {
+ if (data.byte(kObjecttype) == 1)
+ return;
+ Frame *frames;
+ if (data.byte(kObjecttype) == 4)
+ frames = (Frame *)segRef(data.word(kExtras)).ptr(0, 0);
+ else
+ frames = (Frame *)segRef(data.word(kFreeframes)).ptr(0, 0);
+ uint8 frame = 3 * data.byte(kCommand) + 1;
+ showframe(frames, 160, 68, frame, 0x80);
+}
+
bool DreamGenContext::isCD() {
// The original sources has two codepaths depending if the game is 'if cd' or not
// This is a hack to guess which version to use with the assumption that if we have a cd version