[Scummvm-cvs-logs] SF.net SVN: scummvm:[52216] scummvm/trunk/engines/mohawk/riven_external.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu Aug 19 20:04:13 CEST 2010
Revision: 52216
http://scummvm.svn.sourceforge.net/scummvm/?rev=52216&view=rev
Author: mthreepwood
Date: 2010-08-19 18:04:11 +0000 (Thu, 19 Aug 2010)
Log Message:
-----------
MOHAWK: Draw in the dome combination in the lab journal
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/riven_external.cpp
Modified: scummvm/trunk/engines/mohawk/riven_external.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_external.cpp 2010-08-19 17:33:10 UTC (rev 52215)
+++ scummvm/trunk/engines/mohawk/riven_external.cpp 2010-08-19 18:04:11 UTC (rev 52216)
@@ -458,9 +458,28 @@
// 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
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list