aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-05-20 22:49:09 +0000
committerEugene Sandulenko2005-05-20 22:49:09 +0000
commitd00c990808fa3fcec1df926771a70ed9bdf8dfca (patch)
treee167c934ab77834fce067e7d15813105c79a8267
parent201be9543a16af5fb3f4a6e87d0d1736a727e747 (diff)
downloadscummvm-rg350-d00c990808fa3fcec1df926771a70ed9bdf8dfca.tar.gz
scummvm-rg350-d00c990808fa3fcec1df926771a70ed9bdf8dfca.tar.bz2
scummvm-rg350-d00c990808fa3fcec1df926771a70ed9bdf8dfca.zip
Fix charsets in MM NES after gameload.
svn-id: r18196
-rw-r--r--scumm/charset.cpp10
-rw-r--r--scumm/charset.h2
-rw-r--r--scumm/scumm.cpp2
3 files changed, 5 insertions, 9 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp
index bb96cadc7c..91b11c1746 100644
--- a/scumm/charset.cpp
+++ b/scumm/charset.cpp
@@ -1677,18 +1677,14 @@ void CharsetRendererNut::printChar(int chr) {
_str.bottom = shadow.bottom;
}
-CharsetRendererNES::CharsetRendererNES(ScummEngine *vm, Common::Language language)
- : CharsetRendererCommon(vm) {
- _trTable = NULL; // can't init it here, since resources aren't yet loaded!
-}
-
void CharsetRendererNES::printChar(int chr) {
int width, height, origWidth, origHeight;
VirtScreen *vs;
byte *charPtr, *dst;
- if (!_trTable) // have to init it here instead
- _trTable = _vm->getResourceAddress(rtCostume, 77) + 2;
+ // Init it here each time since it is cheap and fixes bug with
+ // charset after game load
+ _trTable = _vm->getResourceAddress(rtCostume, 77) + 2;
// HACK: how to set it properly?
if (_top == 0)
diff --git a/scumm/charset.h b/scumm/charset.h
index cbf44e0540..04650ab86f 100644
--- a/scumm/charset.h
+++ b/scumm/charset.h
@@ -144,7 +144,7 @@ protected:
void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height);
public:
- CharsetRendererNES(ScummEngine *vm, Common::Language language);
+ CharsetRendererNES(ScummEngine *vm) : CharsetRendererCommon(vm) {}
void setCurID(byte id) {}
void printChar(int chr);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index db653b4c32..4acc911889 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1446,7 +1446,7 @@ int ScummEngine::init(GameDetector &detector) {
// Create the charset renderer
if (_platform == Common::kPlatformNES)
- _charset = new CharsetRendererNES(this, _language);
+ _charset = new CharsetRendererNES(this);
else if (_version <= 2)
_charset = new CharsetRendererV2(this, _language);
else if (_version == 3)