[Scummvm-cvs-logs] SF.net SVN: scummvm:[47681] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Jan 29 22:51:22 CET 2010
Revision: 47681
http://scummvm.svn.sourceforge.net/scummvm/?rev=47681&view=rev
Author: m_kiewitz
Date: 2010-01-29 21:51:21 +0000 (Fri, 29 Jan 2010)
Log Message:
-----------
SCI: adding shakeScreen() for gui32 for lsl6
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/graphics/gui32.cpp
scummvm/trunk/engines/sci/graphics/gui32.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-29 21:34:59 UTC (rev 47680)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-29 21:51:21 UTC (rev 47681)
@@ -1070,7 +1070,10 @@
int16 shakeCount = (argc > 0) ? argv[0].toUint16() : 1;
int16 directions = (argc > 1) ? argv[1].toUint16() : 1;
- s->_gui->shakeScreen(shakeCount, directions);
+ if (s->_gui)
+ s->_gui->shakeScreen(shakeCount, directions);
+ else
+ s->_gui32->shakeScreen(shakeCount, directions);
return s->r_acc;
}
Modified: scummvm/trunk/engines/sci/graphics/gui32.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui32.cpp 2010-01-29 21:34:59 UTC (rev 47680)
+++ scummvm/trunk/engines/sci/graphics/gui32.cpp 2010-01-29 21:51:21 UTC (rev 47681)
@@ -75,6 +75,20 @@
*textHeight = 0;
}
+void SciGui32::shakeScreen(uint16 shakeCount, uint16 directions) {
+ while (shakeCount--) {
+ if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
+ _screen->setVerticalShakePos(10);
+ // TODO: horizontal shakes
+ g_system->updateScreen();
+ g_system->delayMillis(50);
+ if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
+ _screen->setVerticalShakePos(0);
+ g_system->updateScreen();
+ g_system->delayMillis(50);
+ }
+}
+
uint16 SciGui32::onControl(byte screenMask, Common::Rect rect) {
Common::Rect adjustedRect = rect;
uint16 result;
Modified: scummvm/trunk/engines/sci/graphics/gui32.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui32.h 2010-01-29 21:34:59 UTC (rev 47680)
+++ scummvm/trunk/engines/sci/graphics/gui32.h 2010-01-29 21:51:21 UTC (rev 47681)
@@ -46,6 +46,8 @@
void textSize(const char *text, int16 font, int16 maxWidth, int16 *textWidth, int16 *textHeight);
+ void shakeScreen(uint16 shakeCount, uint16 directions);
+
uint16 onControl(byte screenMask, Common::Rect rect);
void setNowSeen(reg_t objectReference);
bool canBeHere(reg_t curObject, reg_t listReference);
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