mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
cleanup
svn-id: r7550
This commit is contained in:
parent
7baef4ad4e
commit
5e756aa8b8
@ -582,7 +582,7 @@ void Scumm::drawFlashlight() {
|
||||
int i, j, offset, x, y;
|
||||
|
||||
// Remove the flash light first if it was previously drawn
|
||||
if (_flashlightIsDrawn) {
|
||||
if (_flashlight.isDrawn) {
|
||||
updateDirtyRect(0, _flashlight.x, _flashlight.x + _flashlight.w,
|
||||
_flashlight.y, _flashlight.y + _flashlight.h, USAGE_BIT_DIRTY);
|
||||
|
||||
@ -593,10 +593,10 @@ void Scumm::drawFlashlight() {
|
||||
_flashlight.buffer += _screenWidth;
|
||||
} while (--i);
|
||||
}
|
||||
_flashlightIsDrawn = false;
|
||||
_flashlight.isDrawn = false;
|
||||
}
|
||||
|
||||
if (_flashlightXStrips == 0 || _flashlightYStrips == 0)
|
||||
if (_flashlight.xStrips == 0 || _flashlight.yStrips == 0)
|
||||
return;
|
||||
|
||||
// Calculate the area of the flashlight
|
||||
@ -608,8 +608,8 @@ void Scumm::drawFlashlight() {
|
||||
x = a->x;
|
||||
y = a->y;
|
||||
}
|
||||
_flashlight.w = _flashlightXStrips * 8;
|
||||
_flashlight.h = _flashlightYStrips * 8;
|
||||
_flashlight.w = _flashlight.xStrips * 8;
|
||||
_flashlight.h = _flashlight.yStrips * 8;
|
||||
_flashlight.x = x - _flashlight.w / 2 - _screenStartStrip * 8;
|
||||
_flashlight.y = y - _flashlight.h / 2;
|
||||
|
||||
@ -659,7 +659,7 @@ void Scumm::drawFlashlight() {
|
||||
}
|
||||
}
|
||||
|
||||
_flashlightIsDrawn = true;
|
||||
_flashlight.isDrawn = true;
|
||||
}
|
||||
|
||||
// Redraw background as needed, i.e. the left/right sides if scrolling took place etc.
|
||||
@ -705,7 +705,7 @@ void Scumm::redrawBGAreas() {
|
||||
redrawBGStrip(0, 1);
|
||||
} else if (_fullRedraw != 0 || camera._cur.x != camera._last.x) {
|
||||
_BgNeedsRedraw = false;
|
||||
_flashlightIsDrawn = false;
|
||||
_flashlight.isDrawn = false;
|
||||
redrawBGStrip(0, gdi._numStrips);
|
||||
}
|
||||
}
|
||||
|
@ -1314,8 +1314,8 @@ void Scumm_v5::o5_lights() {
|
||||
if (c == 0)
|
||||
VAR(VAR_CURRENT_LIGHTS) = a;
|
||||
else if (c == 1) {
|
||||
_flashlightXStrips = a;
|
||||
_flashlightYStrips = b;
|
||||
_flashlight.xStrips = a;
|
||||
_flashlight.yStrips = b;
|
||||
}
|
||||
_fullRedraw = 1;
|
||||
}
|
||||
|
@ -770,9 +770,9 @@ public:
|
||||
struct {
|
||||
int x, y, w, h;
|
||||
byte *buffer;
|
||||
uint16 xStrips, yStrips;
|
||||
bool isDrawn;
|
||||
} _flashlight;
|
||||
uint16 _flashlightXStrips, _flashlightYStrips;
|
||||
bool _flashlightIsDrawn;
|
||||
|
||||
void getGraphicsPerformance();
|
||||
void initScreens(int a, int b, int w, int h);
|
||||
|
@ -324,9 +324,6 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
|
||||
_switchRoomEffect = 0;
|
||||
_doEffect = false;
|
||||
memset(&_flashlight,0,sizeof(_flashlight));
|
||||
_flashlightXStrips = 0;
|
||||
_flashlightYStrips = 0;
|
||||
_flashlightIsDrawn = false;
|
||||
_bompScaleRight = 0;
|
||||
_bompScaleBottom = 0;
|
||||
_bompScallingXPtr = NULL;
|
||||
@ -720,8 +717,8 @@ void Scumm::scummInit() {
|
||||
|
||||
if (!(_features & GF_AFTER_V7)) {
|
||||
// Setup light
|
||||
_flashlightXStrips = 7;
|
||||
_flashlightYStrips = 7;
|
||||
_flashlight.xStrips = 7;
|
||||
_flashlight.yStrips = 7;
|
||||
_flashlight.buffer = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user