[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.143,2.144 charset.h,2.41,2.42 scumm.cpp,1.523,1.524
Eugene Sandulenko
sev at users.sourceforge.net
Fri May 20 15:50:31 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19742
Modified Files:
charset.cpp charset.h scumm.cpp
Log Message:
Fix charsets in MM NES after gameload.
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.143
retrieving revision 2.144
diff -u -d -r2.143 -r2.144
--- charset.cpp 15 May 2005 10:40:27 -0000 2.143
+++ charset.cpp 20 May 2005 22:49:07 -0000 2.144
@@ -1677,18 +1677,14 @@
_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)
Index: charset.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.h,v
retrieving revision 2.41
retrieving revision 2.42
diff -u -d -r2.41 -r2.42
--- charset.h 5 Apr 2005 07:53:45 -0000 2.41
+++ charset.h 20 May 2005 22:49:08 -0000 2.42
@@ -144,7 +144,7 @@
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);
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.523
retrieving revision 1.524
diff -u -d -r1.523 -r1.524
--- scumm.cpp 19 May 2005 22:14:49 -0000 1.523
+++ scumm.cpp 20 May 2005 22:49:09 -0000 1.524
@@ -1446,7 +1446,7 @@
// 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)
More information about the Scummvm-git-logs
mailing list