aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorStrangerke2013-07-20 11:17:18 +0200
committerStrangerke2013-07-20 18:59:47 +0200
commit8b14677f57b63a36701fa9841027c6f68d476ec0 (patch)
tree784ef9ef02a35a682966874ab0a398744c2c098d /engines/mortevielle
parent7fbdf23dc812cfdc08cc9ef84675122847b91c44 (diff)
downloadscummvm-rg350-8b14677f57b63a36701fa9841027c6f68d476ec0.tar.gz
scummvm-rg350-8b14677f57b63a36701fa9841027c6f68d476ec0.tar.bz2
scummvm-rg350-8b14677f57b63a36701fa9841027c6f68d476ec0.zip
MORTEVIELLE: Get rid of magic value 0x7000
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/dialogs.cpp2
-rw-r--r--engines/mortevielle/graphics.cpp4
-rw-r--r--engines/mortevielle/mortevielle.h2
-rw-r--r--engines/mortevielle/outtext.cpp6
-rw-r--r--engines/mortevielle/utils.cpp24
5 files changed, 19 insertions, 19 deletions
diff --git a/engines/mortevielle/dialogs.cpp b/engines/mortevielle/dialogs.cpp
index 2c644bc459..d992fa0cce 100644
--- a/engines/mortevielle/dialogs.cpp
+++ b/engines/mortevielle/dialogs.cpp
@@ -465,7 +465,7 @@ void DialogManager::displayIntroScreen(bool drawFrame2Fl) {
_vm->_caff = 50;
_vm->_maff = 0;
_vm->_text.taffich();
- _vm->draw(kAdrDes, 63, 12);
+ _vm->draw(kAdrPictureComp, 63, 12);
if (drawFrame2Fl)
displayIntroFrame2();
else
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index cf15b07ccc..d5036cb4d7 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -937,7 +937,7 @@ void ScreenSurface::drawPicture(GfxSurface &surface, int x, int y) {
(x + surface.w) * 2, (y + surface.h) * 2));
// Get a lookup for the palette mapping
- const byte *paletteMap = &_vm->_mem[0x7000 * 16 + 2];
+ const byte *paletteMap = &_vm->_mem[kAdrPictureComp * 16 + 2];
// Loop through writing
for (int yp = 0; yp < surface.h; ++yp) {
@@ -1108,7 +1108,7 @@ void ScreenSurface::drawString(const Common::String &l, int command) {
pt.x += 1;
pt.y += 1;
- for (x = 1; (x <= l.size()) && (l[x - 1] != 0); ++x) {
+ for (x = 1; (x <= (int)l.size()) && (l[x - 1] != 0); ++x) {
_vm->_screenSurface.writeCharacter(Common::Point(pt.x, pt.y), ord(l[x - 1]), color);
pt.x += charWidth;
}
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index b990859ac5..d95f2dc6f6 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -63,6 +63,7 @@ namespace Mortevielle {
* 7000:2 - 16 words representing palette map
* 7000:4138 - width, height, x/y offset of decoded image
*/
+const int kAdrPictureComp = 0x7000;
#define ord(v) ((int) v)
#define chr(v) ((unsigned char) v)
@@ -114,7 +115,6 @@ const int kTime1 = 410;
const int kTime2 = 250;
const int kAcha = 492;
-const int kAdrDes = 0x7000;
const int kFleche = 1758;
const int kAsoul = 154;
diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp
index d9d47a9fd3..6e372508d7 100644
--- a/engines/mortevielle/outtext.cpp
+++ b/engines/mortevielle/outtext.cpp
@@ -150,7 +150,7 @@ void TextHandler::loadDesFile(Common::String filename, int32 skipSize, int lengt
f.close();
for (int i = remainingSkipSize; i <= length + remainingSkipSize; ++i)
- _vm->_mem[0x7000 * 16 + i - remainingSkipSize] = _vm->_mem[0x6000 * 16 + i];
+ _vm->_mem[(kAdrPictureComp * 16) + i - remainingSkipSize] = _vm->_mem[0x6000 * 16 + i];
}
/**
@@ -288,7 +288,7 @@ void TextHandler::taffich() {
loadDesFile(filename, lgt, handle);
if (_vm->_currGraphicalDevice == MODE_HERCULES) {
for (int i = 0; i <= 15; ++i) {
- int palh = READ_LE_UINT16(&_vm->_mem[(0x7000 * 16) + ((i + 1) << 1)]);
+ int palh = READ_LE_UINT16(&_vm->_mem[(kAdrPictureComp * 16) + ((i + 1) << 1)]);
alllum[i] = (palh & 15) + (((uint)palh >> 12) & 15) + (((uint)palh >> 8) & 15);
}
for (int i = 0; i <= 15; ++i) {
@@ -296,7 +296,7 @@ void TextHandler::taffich() {
for (int j = 0; j <= 15; ++j)
if (alllum[j] > alllum[k])
k = j;
- _vm->_mem[(0x7000 * 16) + 2 + (k << 1)] = _rang[i];
+ _vm->_mem[(kAdrPictureComp * 16) + 2 + (k << 1)] = _rang[i];
alllum[k] = -1;
}
}
diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp
index 8e0e76f088..2a39e4b4f7 100644
--- a/engines/mortevielle/utils.cpp
+++ b/engines/mortevielle/utils.cpp
@@ -1997,8 +1997,8 @@ void MortevielleEngine::setPal(int n) {
case MODE_EGA:
case MODE_AMSTRAD1512:
for (int i = 1; i <= 16; ++i) {
- _mem[(0x7000 * 16) + (2 * i)] = _stdPal[n][i].x;
- _mem[(0x7000 * 16) + (2 * i) + 1] = _stdPal[n][i].y;
+ _mem[(kAdrPictureComp * 16) + (2 * i)] = _stdPal[n][i].x;
+ _mem[(kAdrPictureComp * 16) + (2 * i) + 1] = _stdPal[n][i].y;
}
break;
case MODE_CGA: {
@@ -2245,7 +2245,7 @@ void MortevielleEngine::showTitleScreen() {
if (_newGraphicalDevice != _currGraphicalDevice)
_currGraphicalDevice = _newGraphicalDevice;
hirs();
- draw(kAdrDes, 0, 0);
+ draw(kAdrPictureComp, 0, 0);
Common::String cpr = "COPYRIGHT 1989 : LANKHOR";
_screenSurface.putxy(104 + 72 * _resolutionScaler, 185);
@@ -2270,7 +2270,7 @@ void MortevielleEngine::draw(int ad, int x, int y) {
void MortevielleEngine::drawRightFrame() {
setPal(89);
if (_currGraphicalDevice == MODE_HERCULES) {
- _mem[0x7000 * 16 + 14] = 15;
+ _mem[(kAdrPictureComp * 16) + 14] = 15;
}
_mouse.hideMouse();
pictout(0x73a2, 0, 0, 0);
@@ -2561,12 +2561,12 @@ void MortevielleEngine::pictout(int seg, int dep, int x, int y) {
surface.decode(&_mem[seg * 16 + dep]);
if (_currGraphicalDevice == MODE_HERCULES) {
- _mem[0x7000 * 16 + 2] = 0;
- _mem[0x7000 * 16 + 32] = 15;
+ _mem[(kAdrPictureComp * 16) + 2] = 0;
+ _mem[(kAdrPictureComp * 16) + 32] = 15;
}
- if ((_caff != 51) && (READ_LE_UINT16(&_mem[0x7000 * 16 + 0x4138]) > 0x100))
- WRITE_LE_UINT16(&_mem[0x7000 * 16 + 0x4138], 0x100);
+ if ((_caff != 51) && (READ_LE_UINT16(&_mem[(kAdrPictureComp * 16) + 0x4138]) > 0x100))
+ WRITE_LE_UINT16(&_mem[(kAdrPictureComp * 16) + 0x4138], 0x100);
_screenSurface.drawPicture(surface, x, y);
}
@@ -2998,13 +2998,13 @@ void MortevielleEngine::aniof(int ouf, int num) {
void MortevielleEngine::drawPicture() {
clearUpperLeftPart();
if (_caff > 99) {
- draw(kAdrDes, 60, 33);
+ draw(kAdrPictureComp, 60, 33);
_screenSurface.drawBox(118, 32, 291, 121, 15); // Medium box
} else if (_caff > 69) {
- draw(kAdrDes, 112, 48); // Heads
+ draw(kAdrPictureComp, 112, 48); // Heads
_screenSurface.drawBox(222, 47, 155, 92, 15);
} else {
- draw(kAdrDes, 0, 12);
+ draw(kAdrPictureComp, 0, 12);
prepareScreenType1();
if ((_caff < 30) || (_caff > 32)) {
for (int cx = 1; cx <= 6; ++cx) {
@@ -3177,7 +3177,7 @@ void MortevielleEngine::mennor() {
}
void MortevielleEngine::premtet() {
- draw(kAdrDes, 10, 80);
+ draw(kAdrPictureComp, 10, 80);
_screenSurface.drawBox(18, 79, 155, 91, 15);
}