[Scummvm-cvs-logs] SF.net SVN: scummvm:[51583] scummvm/trunk/engines/sci
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Sun Aug 1 19:54:48 CEST 2010
Revision: 51583
http://scummvm.svn.sourceforge.net/scummvm/?rev=51583&view=rev
Author: mthreepwood
Date: 2010-08-01 17:54:48 +0000 (Sun, 01 Aug 2010)
Log Message:
-----------
SCI: Move kernelShakeScreen to GfxScreen so it can be used in SCI32 (it's used in GK1)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/graphics/paint.cpp
scummvm/trunk/engines/sci/graphics/paint.h
scummvm/trunk/engines/sci/graphics/paint16.cpp
scummvm/trunk/engines/sci/graphics/paint16.h
scummvm/trunk/engines/sci/graphics/screen.cpp
scummvm/trunk/engines/sci/graphics/screen.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-08-01 17:54:48 UTC (rev 51583)
@@ -1082,7 +1082,7 @@
int16 shakeCount = (argc > 0) ? argv[0].toUint16() : 1;
int16 directions = (argc > 1) ? argv[1].toUint16() : 1;
- g_sci->_gfxPaint->kernelShakeScreen(shakeCount, directions);
+ g_sci->_gfxScreen->kernelShakeScreen(shakeCount, directions);
return s->r_acc;
}
Modified: scummvm/trunk/engines/sci/graphics/paint.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint.cpp 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/graphics/paint.cpp 2010-08-01 17:54:48 UTC (rev 51583)
@@ -49,8 +49,4 @@
void GfxPaint::kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control) {
}
-void GfxPaint::kernelShakeScreen(uint16 shakeCount, uint16 directions) {
- warning("Unimplemented kShakeScreen");
-}
-
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/graphics/paint.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint.h 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/graphics/paint.h 2010-08-01 17:54:48 UTC (rev 51583)
@@ -38,10 +38,6 @@
virtual void kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo);
virtual void kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle);
virtual void kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control);
-
- virtual void kernelShakeScreen(uint16 shakeCount, uint16 directions);
-
-private:
};
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp 2010-08-01 17:54:48 UTC (rev 51583)
@@ -596,23 +596,6 @@
return result;
}
-// TODO: If this matches the sci32 implementation, we may put it into GfxScreen
-void GfxPaint16::kernelShakeScreen(uint16 shakeCount, uint16 directions) {
- while (shakeCount--) {
- if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
- _screen->setVerticalShakePos(10);
- // TODO: horizontal shakes
- g_system->updateScreen();
- g_sci->getEngineState()->wait(3);
-
- if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
- _screen->setVerticalShakePos(0);
-
- g_system->updateScreen();
- g_sci->getEngineState()->wait(3);
- }
-}
-
reg_t GfxPaint16::kernelPortraitLoad(const Common::String &resourceName) {
//Portrait *myPortrait = new Portrait(g_sci->getResMan(), _screen, _palette, resourceName);
return NULL_REG;
Modified: scummvm/trunk/engines/sci/graphics/paint16.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.h 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/graphics/paint16.h 2010-08-01 17:54:48 UTC (rev 51583)
@@ -88,8 +88,6 @@
reg_t kernelDisplay(const char *text, int argc, reg_t *argv);
- void kernelShakeScreen(uint16 shakeCount, uint16 directions);
-
reg_t kernelPortraitLoad(const Common::String &resourceName);
void kernelPortraitShow(const Common::String &resourceName, Common::Point position, uint16 resourceNum, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
void kernelPortraitUnload(uint16 portraitId);
Modified: scummvm/trunk/engines/sci/graphics/screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/screen.cpp 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/graphics/screen.cpp 2010-08-01 17:54:48 UTC (rev 51583)
@@ -534,6 +534,22 @@
g_system->setShakePos(shakePos * 2);
}
+void GfxScreen::kernelShakeScreen(uint16 shakeCount, uint16 directions) {
+ while (shakeCount--) {
+ if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
+ setVerticalShakePos(10);
+ // TODO: horizontal shakes
+ g_system->updateScreen();
+ g_sci->getEngineState()->wait(3);
+
+ if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
+ setVerticalShakePos(0);
+
+ g_system->updateScreen();
+ g_sci->getEngineState()->wait(3);
+ }
+}
+
void GfxScreen::dither(bool addToFlag) {
int y, x;
byte color, ditheredColor;
Modified: scummvm/trunk/engines/sci/graphics/screen.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/screen.h 2010-08-01 17:51:21 UTC (rev 51582)
+++ scummvm/trunk/engines/sci/graphics/screen.h 2010-08-01 17:54:48 UTC (rev 51583)
@@ -109,8 +109,6 @@
void getPalette(Palette *pal);
void setPalette(Palette *pal);
- void setVerticalShakePos(uint16 shakePos);
-
void scale2x(const byte *src, byte *dst, int16 srcWidth, int16 srcHeight);
void adjustToUpscaledCoordinates(int16 &y, int16 &x);
@@ -126,6 +124,7 @@
int _picNotValidSci11; // another variable that is used by kPicNotValid in sci1.1
int16 kernelPicNotValid(int16 newPicNotValid);
+ void kernelShakeScreen(uint16 shakeCount, uint16 direction);
private:
uint16 _width;
@@ -143,6 +142,8 @@
void bitsSaveScreen(Common::Rect rect, byte *screen, uint16 screenWidth, byte *&memoryPtr);
void bitsSaveDisplayScreen(Common::Rect rect, byte *&memoryPtr);
+ void setVerticalShakePos(uint16 shakePos);
+
bool _unditherState;
int16 _unditherMemorial[SCI_SCREEN_UNDITHERMEMORIAL_SIZE];
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