aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/charset.cpp2
-rw-r--r--graphics/sjis.cpp17
-rw-r--r--graphics/sjis.h3
3 files changed, 13 insertions, 9 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 214eeb7d5c..775bdae999 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -68,7 +68,7 @@ void ScummEngine::loadCJKFont() {
if (!_cjkFont)
error("SCUMM::Font: Could not open file 'pce.cdbios'");
- _cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowMode);
+ _cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowRightMode);
_2byteWidth = _2byteHeight = 12;
_useCJKMode = true;
#endif
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index 0c65492ece..847c25db12 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -276,11 +276,14 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
if (_flippedMode)
glyphSource = flipCharacter(glyphSource, width);
#endif
-
+
+ int shadowOffset = bpp;
uint8 outline[18 * 18];
if (_drawMode == kOutlineMode) {
memset(outline, 0, sizeof(outline));
createOutline(outline, glyphSource, width, height);
+ } else if (_drawMode == kShadowLeftMode) {
+ shadowOffset = -shadowOffset;
}
if (bpp == 1) {
@@ -289,10 +292,10 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
blitCharacter<uint8>(glyphSource, width - outlineXOffset, height - outlineYOffset, (uint8 *)dst + pitch + 1, pitch, c1);
} else {
if (_drawMode != kDefaultMode) {
- blitCharacter<uint8>(glyphSource, width - outlineXOffset, height, ((uint8 *)dst) + 1, pitch, c2);
+ blitCharacter<uint8>(glyphSource, width - outlineXOffset, height, ((uint8 *)dst) + shadowOffset, pitch, c2);
blitCharacter<uint8>(glyphSource, width, height - outlineYOffset, ((uint8 *)dst) + pitch, pitch, c2);
- if (_drawMode == kShadowMode)
- blitCharacter<uint8>(glyphSource, width - outlineXOffset, height - outlineYOffset, ((uint8 *)dst) + pitch + 1, pitch, c2);
+ if (_drawMode != kFMTownsShadowMode)
+ blitCharacter<uint8>(glyphSource, width - outlineXOffset, height - outlineYOffset, ((uint8 *)dst) + pitch + shadowOffset, pitch, c2);
}
blitCharacter<uint8>(glyphSource, width, height, (uint8 *)dst, pitch, c1);
@@ -303,10 +306,10 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
blitCharacter<uint16>(glyphSource, width - outlineXOffset, height - outlineYOffset, (uint8 *)dst + pitch + 2, pitch, c1);
} else {
if (_drawMode != kDefaultMode) {
- blitCharacter<uint16>(glyphSource, width - outlineXOffset, height, ((uint8 *)dst) + 2, pitch, c2);
+ blitCharacter<uint16>(glyphSource, width - outlineXOffset, height, ((uint8 *)dst) + shadowOffset, pitch, c2);
blitCharacter<uint16>(glyphSource, width, height - outlineYOffset, ((uint8 *)dst) + pitch, pitch, c2);
- if (_drawMode == kShadowMode)
- blitCharacter<uint16>(glyphSource, width - outlineXOffset, height - outlineYOffset, ((uint8 *)dst) + pitch + 2, pitch, c2);
+ if (_drawMode != kFMTownsShadowMode)
+ blitCharacter<uint16>(glyphSource, width - outlineXOffset, height - outlineYOffset, ((uint8 *)dst) + pitch + shadowOffset, pitch, c2);
}
blitCharacter<uint16>(glyphSource, width, height, (uint8 *)dst, pitch, c1);
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 2872471d24..d06d20e44d 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -84,7 +84,8 @@ public:
enum DrawingMode {
kDefaultMode,
kOutlineMode,
- kShadowMode,
+ kShadowRightMode,
+ kShadowLeftMode,
kFMTownsShadowMode
};