aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-12-30 13:55:36 +0000
committerMax Horn2002-12-30 13:55:36 +0000
commit69dfba70eb07d8f281c0ddabe111b6db0096c009 (patch)
tree557ada7cb9593a7fcf6a473a5d9fbee0980bc944 /scumm
parent85fe4018bc11b523e0135bcded40ed3ca41c33e7 (diff)
downloadscummvm-rg350-69dfba70eb07d8f281c0ddabe111b6db0096c009.tar.gz
scummvm-rg350-69dfba70eb07d8f281c0ddabe111b6db0096c009.tar.bz2
scummvm-rg350-69dfba70eb07d8f281c0ddabe111b6db0096c009.zip
removed more dead weight
svn-id: r6277
Diffstat (limited to 'scumm')
-rw-r--r--scumm/charset.cpp2
-rw-r--r--scumm/nut_renderer.cpp20
-rw-r--r--scumm/nut_renderer.h3
3 files changed, 3 insertions, 22 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index f22ac86ec7..143d313805 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -403,8 +403,6 @@ CharsetRendererNut::CharsetRendererNut(Scumm *vm)
delete _fr[i];
_fr[i] = NULL;
}
-
- _fr[i]->bindDisplay(_vm->virtscr[0].screenPtr, _vm->_realWidth, _vm->_realHeight, _vm->_realWidth);
}
}
diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp
index a1ca27638d..b644fb4117 100644
--- a/scumm/nut_renderer.cpp
+++ b/scumm/nut_renderer.cpp
@@ -67,20 +67,6 @@ void NutRenderer::decodeCodec44(byte *dst, byte *src, uint32 length) {
} while (length > 1);
}
-void NutRenderer::bindDisplay(byte *dst, int32 width, int32 height, int32 pitch) {
- debug(2, "NutRenderer::init() called");
- if (_initialized == true) {
- debug(2, "NutRenderer::init() Already initialized, ok, changing...");
- }
-
- _dstPtr = dst;
- _dstWidth = width;
- _dstHeight = height;
- _dstPitch = pitch;
-
- _initialized = true;
-}
-
bool NutRenderer::loadFont(const char *filename, const char *dir) {
debug(2, "NutRenderer::loadFont() called");
if (_loaded == true) {
@@ -188,7 +174,7 @@ void NutRenderer::drawString(const char *string, int32 x, int32 y, byte color, i
int left = x;
int height = 0, tmp;
do {
- if ((x < 0) || (y < 0) || (x > _dstWidth) || (y > _dstHeight)) {
+ if ((x < 0) || (y < 0) || (x > _vm->_realWidth) || (y > _vm->_realHeight)) {
debug(2, "NutRenderer::drawString() position x, y out of range");
return;
}
@@ -212,7 +198,7 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) {
}
byte * src = (byte*)(_dataSrc + _offsets[c] + 14);
- byte * dst = _dstPtr + y * _dstPitch + x;
+ byte * dst = _vm->virtscr[0].screenPtr + y * _vm->_realWidth + x;
uint32 length = READ_BE_UINT32(_dataSrc + _offsets[c] - 4) - 14;
decodeCodec44(_tmpCodecBuffer, src, length);
@@ -232,6 +218,6 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) {
dst[tx] = pixel;
}
}
- dst += _dstPitch;
+ dst += _vm->_realWidth;
}
}
diff --git a/scumm/nut_renderer.h b/scumm/nut_renderer.h
index 3c349a6f8c..03bee41c89 100644
--- a/scumm/nut_renderer.h
+++ b/scumm/nut_renderer.h
@@ -31,10 +31,8 @@ private:
int32 _offsets[256];
byte _tmpCodecBuffer[2000];
byte *_dataSrc;
- byte *_dstPtr;
bool _initialized;
bool _loaded;
- int32 _dstWidth, _dstHeight, _dstPitch;
void decodeCodec44(byte *dst, byte *src, uint32 length);
@@ -42,7 +40,6 @@ public:
NutRenderer(Scumm *vm);
~NutRenderer();
- void bindDisplay(byte *dst, int32 width, int32 height, int32 pitch);
bool loadFont(const char *filename, const char *dir);
void drawChar(char c, int32 x, int32 y, byte color);
void drawString(const char *string, int32 x, int32 y, byte color, int32 mode);