aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMatthew Hoops2010-08-19 18:04:11 +0000
committerMatthew Hoops2010-08-19 18:04:11 +0000
commit5bd2a99717c04ade090a4be77da74ff99a8b0ce3 (patch)
tree417952b440582fcf41d95e4be72cb8e892cab568 /engines/mohawk
parentce9afcfab13bbbfe6ef5fe384a249a218067774a (diff)
downloadscummvm-rg350-5bd2a99717c04ade090a4be77da74ff99a8b0ce3.tar.gz
scummvm-rg350-5bd2a99717c04ade090a4be77da74ff99a8b0ce3.tar.bz2
scummvm-rg350-5bd2a99717c04ade090a4be77da74ff99a8b0ce3.zip
MOHAWK: Draw in the dome combination in the lab journal
svn-id: r52216
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/riven_external.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 4813ad5b33..55649dc907 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -458,9 +458,28 @@ void RivenExternal::xblabopenbook(uint16 argc, uint16 *argv) {
// Draw the image of the page based on the blabbook variable
_vm->_gfx->drawPLST(page);
- // TODO: Draw the dome combo
if (page == 14) {
- warning ("Need to draw dome combo");
+ // Draw the dome combination
+ // The images for the numbers are tBMP's 364 through 368
+ // The start point is at (240, 82)
+ uint32 domeCombo = *_vm->matchVarToString("adomecombo");
+ static const uint16 kNumberWidth = 32;
+ static const uint16 kNumberHeight = 24;
+ static const uint16 kDstX = 240;
+ static const uint16 kDstY = 82;
+ byte numCount = 0;
+
+ for (int bitPos = 24; bitPos >= 0; bitPos--) {
+ if (domeCombo & (1 << bitPos)) {
+ uint16 offset = (24 - bitPos) * kNumberWidth;
+ Common::Rect srcRect = Common::Rect(offset, 0, offset + kNumberWidth, kNumberHeight);
+ Common::Rect dstRect = Common::Rect(numCount * kNumberWidth + kDstX, kDstY, (numCount + 1) * kNumberWidth + kDstX, kDstY + kNumberHeight);
+ _vm->_gfx->drawImageRect(numCount + 364, srcRect, dstRect);
+ numCount++;
+ }
+ }
+
+ assert(numCount == 5); // Sanity check
}
}