[Scummvm-git-logs] scummvm master -> d2aedb650bd33d456e002fd1e5fc893266d08d44
wonst719
wonst719 at gmail.com
Mon Nov 16 18:06:59 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d2aedb650b SCUMM: Cleanup Korean Multi-font code
Commit: d2aedb650bd33d456e002fd1e5fc893266d08d44
https://github.com/scummvm/scummvm/commit/d2aedb650bd33d456e002fd1e5fc893266d08d44
Author: wonst719 (wonst719 at gmail.com)
Date: 2020-11-17T03:06:21+09:00
Commit Message:
SCUMM: Cleanup Korean Multi-font code
- Remove unused code
- Fix uninitialized variables
Changed paths:
engines/scumm/charset.cpp
engines/scumm/scumm.cpp
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 38ddfd12bc..3f97ec6192 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -360,12 +360,10 @@ void CharsetRendererCommon::setCurID(int32 id) {
_numChars = READ_LE_UINT16(_fontPtr + 2);
if (_vm->_useMultiFont) {
- if (id == 6) { // HACK: Fix inventory font error
- _vm->_2byteFontPtr = _vm->_2byteMultiFontPtr[0];
- _vm->_2byteWidth = _vm->_2byteMultiWidth[0];
- _vm->_2byteHeight = _vm->_2byteMultiHeight[0];
- _vm->_2byteShadow = _vm->_2byteMultiShadow[0];
- } else if (_vm->_2byteMultiFontPtr[id]) {
+ if (id == 6) // HACK: Fix monkey1cd/monkey2/dott font error
+ id = 0;
+
+ if (_vm->_2byteMultiFontPtr[id]) {
_vm->_2byteFontPtr = _vm->_2byteMultiFontPtr[id];
_vm->_2byteWidth = _vm->_2byteMultiWidth[id];
_vm->_2byteHeight = _vm->_2byteMultiHeight[id];
@@ -410,12 +408,7 @@ void CharsetRendererV3::setCurID(int32 id) {
_fontPtr += _numChars;
if (_vm->_useMultiFont) {
- if (id == 6) { // HACK: Fix inventory font error
- _vm->_2byteFontPtr = _vm->_2byteMultiFontPtr[0];
- _vm->_2byteWidth = _vm->_2byteMultiWidth[0];
- _vm->_2byteHeight = _vm->_2byteMultiHeight[0];
- _vm->_2byteShadow = _vm->_2byteMultiShadow[0];
- } else if (_vm->_2byteMultiFontPtr[id]) {
+ if (_vm->_2byteMultiFontPtr[id]) {
_vm->_2byteFontPtr = _vm->_2byteMultiFontPtr[id];
_vm->_2byteWidth = _vm->_2byteMultiWidth[id];
_vm->_2byteHeight = _vm->_2byteMultiHeight[id];
@@ -753,7 +746,6 @@ void CharsetRendererPC::drawBits1Kor(Graphics::Surface &dest, int x1, int y1, co
// HACK: Since Korean fonts don't have shadow/stroke information,
// we use NUT-Renderer-like shadow drawing method.
- //bool useOldShadow = false;
int offsetX[14] = {-2, -2, -2, -1, 0, -1, 0, 1, -1, 1, -1, 0, 1, 0};
int offsetY[14] = {0, 1, 2, 2, 2, -1, -1, -1, 0, 0, 1, 1, 1, 0};
@@ -789,11 +781,6 @@ void CharsetRendererPC::drawBits1Kor(Graphics::Surface &dest, int x1, int y1, co
if ((x % 8) == 0)
bits = *src++;
if ((bits & revBitMask(x % 8)) && y + drawTop + offsetY[i] >= 0 && x + x1 + offsetX[i] >= 0) {
- if (_enableShadow) {
- *(dst + 1) = _shadowColor;
- *(dst + dest.pitch) = _shadowColor;
- *(dst + dest.pitch + 1) = _shadowColor;
- }
*(dst + (dest.pitch * offsetY[i]) + offsetX[i]) = cTable[i];
}
dst++;
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index ad1812b366..5afa175515 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -329,6 +329,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_translatedLines = 0;
_languageLineIndex = 0;
_2byteFontPtr = 0;
+ _2byteWidth = 0;
+ _2byteHeight = 0;
+ _2byteShadow = 0;
_krStrPost = 0;
_V1TalkingActor = 0;
for (int i = 0; i < 20; i++)
More information about the Scummvm-git-logs
mailing list