Permalink
Browse files

SLUDGE: add blankscreen effect

  • Loading branch information...
yinsimei committed Jul 4, 2017
1 parent b19911c commit eb0c8924ca28531b87be95822ec015c03833d026
Showing with 10 additions and 9 deletions.
  1. +9 −5 engines/sludge/backdrop.cpp
  2. +1 −4 engines/sludge/builtin.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);
@@ -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;
}

0 comments on commit eb0c892

Please sign in to comment.