diff options
author | Max Horn | 2003-05-15 22:48:06 +0000 |
---|---|---|
committer | Max Horn | 2003-05-15 22:48:06 +0000 |
commit | 5e756aa8b8d4d20f2c0c1c559868e07d64d6bd5e (patch) | |
tree | 4328feea064b0c291dd0f98e0d5bb3e6d4e46dd5 | |
parent | 7baef4ad4eb5768e3222cfe85d3b716cd65f4705 (diff) | |
download | scummvm-rg350-5e756aa8b8d4d20f2c0c1c559868e07d64d6bd5e.tar.gz scummvm-rg350-5e756aa8b8d4d20f2c0c1c559868e07d64d6bd5e.tar.bz2 scummvm-rg350-5e756aa8b8d4d20f2c0c1c559868e07d64d6bd5e.zip |
cleanup
svn-id: r7550
-rw-r--r-- | scumm/gfx.cpp | 14 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 4 | ||||
-rw-r--r-- | scumm/scumm.h | 4 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 7 |
4 files changed, 13 insertions, 16 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 45da9e7b4a..2ef7509dd3 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -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); } } diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 4410fd6d95..82fea76781 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -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; } diff --git a/scumm/scumm.h b/scumm/scumm.h index 52aaeffe9e..275fe871d3 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -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); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 9745221707..e1ad40bc5d 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -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; } |