aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoryinsimei2017-07-04 23:59:02 +0200
committerEugene Sandulenko2017-07-13 18:27:45 +0200
commit0e8db2bf0d5cd03b23694440fbb05d51f1a02879 (patch)
treedf96b7bf11b5f93ad36676fba5f4a242f0e02418 /engines
parentb5a77c93930cac9532eab4bb7a777424c7639e21 (diff)
downloadscummvm-rg350-0e8db2bf0d5cd03b23694440fbb05d51f1a02879.tar.gz
scummvm-rg350-0e8db2bf0d5cd03b23694440fbb05d51f1a02879.tar.bz2
scummvm-rg350-0e8db2bf0d5cd03b23694440fbb05d51f1a02879.zip
SLUDGE: add blankscreen effect
Diffstat (limited to 'engines')
-rw-r--r--engines/sludge/backdrop.cpp14
-rw-r--r--engines/sludge/builtin.cpp5
2 files changed, 10 insertions, 9 deletions
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index 9bd8cbf3ac..93a1e0fc72 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -72,9 +72,7 @@ int cameraPX = 0, cameraPY = 0;
unsigned int sceneWidth, sceneHeight;
int lightMapNumber;
-#if 0
-unsigned int currentBlankColour = g_sludge->getOrigPixelFormat()->RGBToColor(0, 0, 0);
-#endif
+unsigned int currentBlankColour = TS_ARGB(255, 0, 0, 0);
extern int cameraX, cameraY;
extern float cameraZoom;
@@ -344,6 +342,10 @@ void mixBackDrop(int fileNum, int x, int y) {
}
void blankScreen(int x1, int y1, int x2, int y2) {
+ // in case of no backdrop added at all
+ if (!backdropSurface.getPixels()) {
+ return;
+ }
if (y1 < 0)
y1 = 0;
@@ -354,8 +356,8 @@ void blankScreen(int x1, int y1, int x2, int y2) {
if (y2 > (int)sceneHeight)
y2 = (int)sceneHeight;
- int picWidth = x2 - x1;
- int picHeight = y2 - y1;
+ backdropSurface.fillRect(Common::Rect(x1, y1, x2, y2), currentBlankColour);
+
#if 0
setPixelCoords(true);
@@ -473,6 +475,8 @@ inline int sortOutPCamera(int cX, int fX, int sceneMax, int boxMax) {
}
void drawBackDrop() {
+ if (!backdropExists)
+ return;
renderSurface.copyRectToSurface(backdropSurface, 0, 0, Common::Rect(0, 0, backdropSurface.w, backdropSurface.h));
#if 0
setPrimaryColor(1.0, 1.0, 1.0, 1.0);
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 3ac316d0c0..6af0eafef6 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -91,9 +91,7 @@ extern unsigned char brightnessLevel;
extern unsigned char fadeMode;
extern unsigned short saveEncoding;
extern frozenStuffStruct *frozenStuff;
-#if 0
extern unsigned int currentBlankColour;
-#endif
extern unsigned int languageID;
extern unsigned char currentBurnR, currentBurnG, currentBurnB;
@@ -850,9 +848,8 @@ builtIn(setBlankColour) {
if (!getRGBParams(red, green, blue, fun))
return BR_ERROR;
-#if 0
+
currentBlankColour = g_sludge->getOrigPixelFormat()->RGBToColor(red & 255, green & 255, blue & 255);
-#endif
setVariable(fun->reg, SVT_INT, 1);
return BR_CONTINUE;
}