aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-08-31 19:26:04 +0000
committerPaweł Kołodziejski2002-08-31 19:26:04 +0000
commit0559f7a6aacacede9fe5b45b1f8e064613d35db3 (patch)
tree57ea29b5cdb6ee7c849504a399629fb613bbb0d9 /scumm
parentc1cbba1d652f694ef95996cfd574f6182c08eb28 (diff)
downloadscummvm-rg350-0559f7a6aacacede9fe5b45b1f8e064613d35db3.tar.gz
scummvm-rg350-0559f7a6aacacede9fe5b45b1f8e064613d35db3.tar.bz2
scummvm-rg350-0559f7a6aacacede9fe5b45b1f8e064613d35db3.zip
and more fixes
svn-id: r4889
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp10
-rw-r--r--scumm/gfx.h2
-rw-r--r--scumm/scumm.h2
-rw-r--r--scumm/scummvm.cpp4
-rw-r--r--scumm/string.cpp6
5 files changed, 12 insertions, 12 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 7e6afc8364..e08f208e89 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -236,7 +236,7 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b)
_vm->_system->copy_rect(ptr, _vm->_realWidth, x * 8, vs->topline + t, w, height);
}
-void blit(byte *dst, byte *src, int w, int h)
+void Scumm::blit(byte *dst, byte *src, int w, int h)
{
assert(h > 0);
assert(src != NULL);
@@ -244,8 +244,8 @@ void blit(byte *dst, byte *src, int w, int h)
do {
memcpy(dst, src, w);
- dst += _vm->_realWidth;
- src += _vm->_realWidth;
+ dst += _realWidth;
+ src += _realWidth;
} while (--h);
}
@@ -920,7 +920,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h,
if (flag & dbClear || !lightsOn)
clear8Col();
else
- blit(_backbuff_ptr, _bgbak_ptr, 8, h);
+ _vm->blit(_backbuff_ptr, _bgbak_ptr, 8, h);
}
}
CHECK_HEAP;
@@ -2604,7 +2604,7 @@ void Gdi::resetBackground(int top, int bottom, int strip)
if (_vm->hasCharsetMask(strip << 3, top, (strip + 1) << 3, bottom))
draw8ColWithMasking();
else
- blit(_backbuff_ptr, _bgbak_ptr, 8, _numLinesToProcess);
+ _vm->blit(_backbuff_ptr, _bgbak_ptr, 8, _numLinesToProcess);
} else {
clear8Col();
}
diff --git a/scumm/gfx.h b/scumm/gfx.h
index bc858536a4..41cbad7d37 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -188,6 +188,4 @@ struct Gdi {
};
};
-void blit(byte *dst, byte *src, int w, int h);
-
#endif
diff --git a/scumm/scumm.h b/scumm/scumm.h
index b0412d1ac4..e268a2b491 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -839,6 +839,8 @@ public:
void dissolveEffect(int width, int height);
void scrollEffect(int dir);
+ void blit(byte *dst, byte *src, int w, int h);
+
void decompressBomp(byte *dst, byte *src, int w, int h);
uint _shakeFrame;
int _screenStartStrip, _screenEndStrip;
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index d8058405fb..0c681b4148 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -91,8 +91,8 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
if (_gameId == GID_ZAK256) { // FmTowns is 320x240
_realWidth = 320;
_realHeight = 240;
- } else {
- if (_gameId == GID_CMI) {
+ }
+ else if (_gameId == GID_CMI) {
_realWidth = 640;
_realHeight = 480;
} else {
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 140094b31d..4bf0d75eeb 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -219,7 +219,7 @@ void Scumm::CHARSET_1()
if (a && string[0].overhead != 0) {
if (!(_features & GF_AFTER_V6)) {
- string[0].xpos = a->x - camera._cur.x + (_vm->_realWidth / 2);
+ string[0].xpos = a->x - camera._cur.x + (_realWidth / 2);
if (_vars[VAR_V5_TALK_STRING_Y] < 0) {
s = (a->scaley * (int)_vars[VAR_V5_TALK_STRING_Y]) / 0xFF;
@@ -451,7 +451,7 @@ void Scumm::description()
buffer = charset._buffer + charset._bufPos;
string[0].ypos = camera._cur.y + 88;
- string[0].xpos = (_vm->_realWidth / 2) - (charset.getStringWidth(0, buffer, 0) >> 1);
+ string[0].xpos = (_realWidth / 2) - (charset.getStringWidth(0, buffer, 0) >> 1);
if (string[0].xpos < 0)
string[0].xpos = 0;
@@ -958,7 +958,7 @@ void CharsetRenderer::printChar(int chr)
#if !defined(OLD)
if (_blitAlso)
- blit(_backbuff_ptr, _bgbak_ptr, _width, _height);
+ _vm->blit(_backbuff_ptr, _bgbak_ptr, _width, _height);
#endif
_left += _width;