[Scummvm-cvs-logs] scummvm master -> ff0fcf52044e9c643637440fad8057dff811b448

lordhoto lordhoto at gmail.com
Tue Jul 2 00:33:18 CEST 2013


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b1dcd252b3 KYRA: Fix (a few) font checks for systems with unsigend char.
ff0fcf5204 BUILD: Pass -Wno-nested-anon-types to clang.


Commit: b1dcd252b3b3eb4c91ba9b334541bdd97a95ef14
    https://github.com/scummvm/scummvm/commit/b1dcd252b3b3eb4c91ba9b334541bdd97a95ef14
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-07-01T06:10:06-07:00

Commit Message:
KYRA: Fix (a few) font checks for systems with unsigend char.

Thanks to wjp for reporting those. This only affects games with SJIS font use.

Changed paths:
    engines/kyra/kyra_rpg.cpp
    engines/kyra/screen.cpp



diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index f8eb7d0..4f7adcc 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -213,7 +213,7 @@ void KyraRpgEngine::drawDialogueButtons() {
 			screen()->printText(_dialogueButtonString[i], (x + 37 - (screen()->getTextWidth(_dialogueButtonString[i])) / 2) & ~3,
 			                    ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xC1 : 0xE1, 0);
 		} else {
-			int sjisYOffset = (_flags.lang == Common::JA_JPN && _dialogueButtonString[i][0] < 0) ? 2 : 0;
+			int sjisYOffset = (_flags.lang == Common::JA_JPN && (_dialogueButtonString[i][0] & 0x80)) ? 2 : 0;
 			gui_drawBox(x, (_dialogueButtonYoffs + _dialogueButtonPosY[i]), _dialogueButtonWidth, guiSettings()->buttons.height, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
 			screen()->printText(_dialogueButtonString[i], x + (_dialogueButtonWidth >> 1) - (screen()->getTextWidth(_dialogueButtonString[i])) / 2,
 			                    (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2 - sjisYOffset, _dialogueHighlightedButton == i ? _dialogueButtonLabelColor1 : _dialogueButtonLabelColor2, 0);
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 419b630..054397a 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1256,7 +1256,7 @@ int Screen::getTextWidth(const char *str) {
 
 	while (1) {
 		if (_sjisMixedFontMode)
-			setFont(*str < 0 ? FID_SJIS_FNT : curFont);
+			setFont((*str & 0x80) ? FID_SJIS_FNT : curFont);
 
 		uint c = fetchChar(str);
 
@@ -1296,7 +1296,7 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
 
 	while (1) {
 		if (_sjisMixedFontMode)
-			setFont(*str < 0 ? FID_SJIS_FNT : curFont);
+			setFont((*str & 0x80) ? FID_SJIS_FNT : curFont);
 
 		uint8 charHeightFnt = getFontHeight();
 


Commit: ff0fcf52044e9c643637440fad8057dff811b448
    https://github.com/scummvm/scummvm/commit/ff0fcf52044e9c643637440fad8057dff811b448
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-07-01T07:28:19-07:00

Commit Message:
BUILD: Pass -Wno-nested-anon-types to clang.

Changed paths:
    Makefile



diff --git a/Makefile b/Makefile
index 28eaead..1ed1824 100644
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,11 @@ endif
 
 ifeq "$(HAVE_CLANG)" "1"
 	CXXFLAGS+= -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants
+	# We use a anonymous nested type declaration in an anonymous union in
+	# common/str.h. This is no standard construct and clang warns about it.
+	# It works for all our target systems though, thus we simply disable that
+	# warning.
+	CXXFLAGS+= -Wno-nested-anon-types
 endif
 
 ifeq "$(HAVE_ICC)" "1"






More information about the Scummvm-git-logs mailing list