[Scummvm-cvs-logs] scummvm master -> a5598aaaa8e0ad434283e56040fc05498e68222c
fingolfin
max at quendi.de
Mon May 2 14:36:42 CEST 2011
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d521d6a1c2 GUI: Inform use about ignored games when mass adding
a48b705c54 GRAPHICS: Turn printf into warning
7407a48cd3 SCUMM: fix whitespaces (patch #3281359)
a5598aaaa8 TSAGE: Stop shadowing local variables
Commit: d521d6a1c2ac78f2f47c5e6c97b95019faab65ec
https://github.com/scummvm/scummvm/commit/d521d6a1c2ac78f2f47c5e6c97b95019faab65ec
Author: Max Horn (max at quendi.de)
Date: 2011-05-02T04:40:25-07:00
Commit Message:
GUI: Inform use about ignored games when mass adding
Changed paths:
gui/massadd.cpp
gui/massadd.h
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index c5af6c6..80d580d 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -62,6 +62,7 @@ enum {
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
: Dialog("MassAdd"),
_dirsScanned(0),
+ _oldGamesCount(0),
_okButton(0),
_dirProgressText(0),
_gameProgressText(0) {
@@ -212,8 +213,10 @@ void MassAddDialog::handleTickle() {
break;
}
}
- if (duplicate)
+ if (duplicate) {
+ _oldGamesCount++;
break; // Skip duplicates
+ }
}
result["path"] = path;
_games.push_back(result);
@@ -243,14 +246,14 @@ void MassAddDialog::handleTickle() {
snprintf(buf, sizeof(buf), "%s", _("Scan complete!"));
_dirProgressText->setLabel(buf);
- snprintf(buf, sizeof(buf), _("Discovered %d new games."), _games.size());
+ snprintf(buf, sizeof(buf), _("Discovered %d new games, ignored %d previously added games."), _games.size(), _oldGamesCount);
_gameProgressText->setLabel(buf);
} else {
snprintf(buf, sizeof(buf), _("Scanned %d directories ..."), _dirsScanned);
_dirProgressText->setLabel(buf);
- snprintf(buf, sizeof(buf), _("Discovered %d new games ..."), _games.size());
+ snprintf(buf, sizeof(buf), _("Discovered %d new games, ignored %d previously added games ..."), _games.size(), _oldGamesCount);
_gameProgressText->setLabel(buf);
}
diff --git a/gui/massadd.h b/gui/massadd.h
index 3dbab43..6aad392 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -62,6 +62,7 @@ private:
Common::HashMap<Common::String, StringArray> _pathToTargets;
int _dirsScanned;
+ int _oldGamesCount;
Widget *_okButton;
StaticTextWidget *_dirProgressText;
Commit: a48b705c542eaab55b9b5ac5e3ea256b94d2a246
https://github.com/scummvm/scummvm/commit/a48b705c542eaab55b9b5ac5e3ea256b94d2a246
Author: Max Horn (max at quendi.de)
Date: 2011-05-02T04:40:25-07:00
Commit Message:
GRAPHICS: Turn printf into warning
Changed paths:
graphics/jpeg.cpp
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index f1dcd4a..70ffb06 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -711,9 +711,9 @@ uint8 JPEG::readBit() {
if (byte2 == 0xDC) {
// DNL marker: Define Number of Lines
// TODO: terminate scan
- printf("DNL marker detected: terminate scan\n");
+ warning("DNL marker detected: terminate scan");
} else {
- printf("Error: marker 0x%02X read in entropy data\n", byte2);
+ warning("Error: marker 0x%02X read in entropy data", byte2);
}
}
}
Commit: 7407a48cd30de9db15556c66ccdb10df0b40fe0a
https://github.com/scummvm/scummvm/commit/7407a48cd30de9db15556c66ccdb10df0b40fe0a
Author: Max Horn (max at quendi.de)
Date: 2011-05-02T05:32:49-07:00
Commit Message:
SCUMM: fix whitespaces (patch #3281359)
Changed paths:
engines/scumm/charset.cpp
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 0246a25..9fb76d9 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -401,7 +401,7 @@ int CharsetRendererClassic::getCharWidth(uint16 chr) {
spacing++;
}
}
-
+
} else if (chr >= 0x80) {
return _vm->_2byteWidth / 2;
}
@@ -618,11 +618,12 @@ int CharsetRendererV3::getCharWidth(uint16 chr) {
spacing = 4;
} else if (chr & 0x80) {
spacing = _vm->_2byteWidth / 2;
- }
+ }
}
- if (!spacing)
+ if (!spacing) {
spacing = *(_widthTable + chr);
+ }
return spacing;
}
@@ -857,17 +858,17 @@ void CharsetRenderer::processTownsCharsetColors(uint8 bytesPerPixel) {
if (_vm->_game.platform == Common::kPlatformFMTowns) {
for (int i = 0; i < (1 << bytesPerPixel); i++) {
uint8 c = _vm->_charsetColorMap[i];
-
+
if (c > 16) {
uint8 t = (_vm->_currentPalette[c * 3] < 32) ? 4 : 12;
t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 2 : 10);
t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 1 : 9);
c = t;
}
-
+
if (c == 0)
c = _vm->_townsOverrideShadowColor;
-
+
c = ((c & 0x0f) << 4) | (c & 0x0f);
_vm->_townsCharsetColorMap[i] = c;
}
@@ -920,12 +921,12 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
noSjis = true;
}
}
-
+
if (useTownsFontRomCharacter(chr) && !noSjis) {
charPtr = 0;
_vm->_cjkChar = chr;
enableShadow(true);
-
+
width = getCharWidth(chr);
// For whatever reason MI1 uses a different font width
// for alignment calculation and for drawing when
@@ -947,7 +948,7 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
height++;
}
} else
-#endif
+#endif
{
uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
assert(charOffs < 0x14000);
@@ -1259,14 +1260,14 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
byte *dst3 = dst2;
byte *dst4 = dst2;
- if (scale2x) {
+ if (scale2x) {
dst3 = dst2 + s.pitch;
dst4 = dst3 + s.pitch;
pitch <<= 1;
}
if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 5)
col = _vm->_townsCharsetColorMap[1];
-#endif
+#endif
for (y = 0; y < height && y + drawTop < s.h; y++) {
for (x = 0; x < width; x++) {
@@ -1287,19 +1288,19 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
if (scale2x) {
dst[2] = dst[3] = dst2[2] = dst2[3] = _shadowColor;
dst3[0] = dst4[0] = dst3[1] = dst4[1] = _shadowColor;
- } else
+ } else
#endif
{
dst[1] = dst2[0] = _shadowColor;
if (_shadowMode != kFMTOWNSShadowMode)
dst2[1] = _shadowColor;
- }
+ }
}
dst[0] = col;
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (scale2x)
- dst[1] = dst2[0] = dst2[1] = col;
+ dst[1] = dst2[0] = dst2[1] = col;
#endif
}
}
@@ -1317,7 +1318,7 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
dst += pitch;
dst2 += pitch;
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
dst3 += pitch;
dst4 += pitch;
#endif
Commit: a5598aaaa8e0ad434283e56040fc05498e68222c
https://github.com/scummvm/scummvm/commit/a5598aaaa8e0ad434283e56040fc05498e68222c
Author: Max Horn (max at quendi.de)
Date: 2011-05-02T05:34:59-07:00
Commit Message:
TSAGE: Stop shadowing local variables
Changed paths:
engines/tsage/resources.cpp
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index 4a188c1..a73c23a 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -200,11 +200,11 @@ struct DecodeReference {
*/
byte *TLib::getResource(uint16 id, bool suppressErrors) {
// Scan for an entry for the given Id
- ResourceEntry *re= NULL;
- ResourceList::iterator i;
- for (i = _resources.begin(); i != _resources.end(); ++i) {
- if ((*i).id == id) {
- re = &(*i);
+ ResourceEntry *re = NULL;
+ ResourceList::iterator iter;
+ for (iter = _resources.begin(); iter != _resources.end(); ++iter) {
+ if ((*iter).id == id) {
+ re = &(*iter);
break;
}
}
More information about the Scummvm-git-logs
mailing list