[Scummvm-cvs-logs] SF.net SVN: scummvm:[53518] scummvm/trunk/engines/scumm
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Fri Oct 15 23:26:07 CEST 2010
Revision: 53518
http://scummvm.svn.sourceforge.net/scummvm/?rev=53518&view=rev
Author: athrxx
Date: 2010-10-15 21:26:05 +0000 (Fri, 15 Oct 2010)
Log Message:
-----------
SCUMM/FM-TOWNS: fix up/down inventory arrows in Indy 4 Japanese
Modified Paths:
--------------
scummvm/trunk/engines/scumm/charset.cpp
scummvm/trunk/engines/scumm/charset.h
Modified: scummvm/trunk/engines/scumm/charset.cpp
===================================================================
--- scummvm/trunk/engines/scumm/charset.cpp 2010-10-15 21:16:36 UTC (rev 53517)
+++ scummvm/trunk/engines/scumm/charset.cpp 2010-10-15 21:26:05 UTC (rev 53518)
@@ -1104,7 +1104,7 @@
if (is2byte) {
drawBits1(dstSurface, dstPtr, charPtr, drawTop, origWidth, origHeight, dstSurface.bytesPerPixel);
} else {
- drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
+ drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight, _vm->_useCJKMode);
}
if (_blitAlso && vs->hasTwoBuffers) {
@@ -1177,19 +1177,33 @@
}
}
-void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height) {
+void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height,
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+ bool scale2x) {
+#else
+ bool) {
+#endif
+
int y, x;
int color;
byte numbits, bits;
+ byte *dst2 = dst;
+ int pitch = s.pitch - width;
+
assert(bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8);
bits = *src++;
numbits = 8;
- byte *cmap =
+ byte *cmap = _vm->_charsetColorMap;
+
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- (_vm->_game.platform == Common::kPlatformFMTowns) ? _vm->_townsCharsetColorMap :
+ if (_vm->_game.platform == Common::kPlatformFMTowns)
+ cmap = _vm->_townsCharsetColorMap;
+ if (scale2x) {
+ dst2 += s.pitch;
+ pitch <<= 1;
+ }
#endif
- _vm->_charsetColorMap;
for (y = 0; y < height && y + drawTop < s.h; y++) {
for (x = 0; x < width; x++) {
@@ -1197,8 +1211,21 @@
if (color && y + drawTop >= 0) {
*dst = cmap[color];
+
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+ if (scale2x)
+ dst[1] = dst2[0] = dst2[1] = dst[0];
+#endif
}
dst++;
+
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+ if (scale2x) {
+ dst++;
+ dst2 += 2;
+ }
+#endif
+
bits <<= bpp;
numbits -= bpp;
if (numbits == 0) {
@@ -1206,7 +1233,10 @@
numbits = 8;
}
}
- dst += s.pitch - width;
+ dst += pitch;
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+ dst2 += pitch;
+#endif
}
}
Modified: scummvm/trunk/engines/scumm/charset.h
===================================================================
--- scummvm/trunk/engines/scumm/charset.h 2010-10-15 21:16:36 UTC (rev 53517)
+++ scummvm/trunk/engines/scumm/charset.h 2010-10-15 21:26:05 UTC (rev 53518)
@@ -125,7 +125,7 @@
class CharsetRendererClassic : public CharsetRendererCommon {
protected:
- void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height);
+ void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height, bool scale2x = false);
void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list