aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorStrangerke2013-07-19 11:21:05 +0200
committerStrangerke2013-07-19 11:21:05 +0200
commiteb0de360853a7c7353133ecb7f88b2839a0ee188 (patch)
tree7303125159eb400a06ae219e226893f9c47156a8 /engines/mortevielle
parent5924230634710250152014fd9dff10ddfcd90d2b (diff)
downloadscummvm-rg350-eb0de360853a7c7353133ecb7f88b2839a0ee188.tar.gz
scummvm-rg350-eb0de360853a7c7353133ecb7f88b2839a0ee188.tar.bz2
scummvm-rg350-eb0de360853a7c7353133ecb7f88b2839a0ee188.zip
MORTEVIELLE: Constify an array in graphics, reduce the scope of some variables
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/graphics.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index d47b6b5a23..c6356f48db 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -69,7 +69,7 @@ void PaletteManager::setPalette(const int *palette, uint idx, uint size) {
* Set the default EGA palette
*/
void PaletteManager::setDefaultPalette() {
- int defaultPalette[16] = { 0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63 };
+ const int defaultPalette[16] = { 0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63 };
setPalette(defaultPalette, 0, 16);
}
@@ -1072,21 +1072,20 @@ void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) {
* @remarks Originally called 'writeg'
*/
void ScreenSurface::drawString(const Common::String &l, int command) {
- int i, x;
- Common::Point pt;
- int cecr = 0;
-
if (l == "")
return;
_vm->_mouse.hideMouse();
- pt = _textPos;
+ Common::Point pt = _textPos;
+ int i;
if (_vm->_resolutionScaler == 2)
i = 6;
else
i = 10;
- x = pt.x + i * l.size();
+
+ int x = pt.x + i * l.size();
+ int cecr = 0;
switch (command) {
case 1: