[ scummvm-Patches-1342902 ] [KYRA] Fix MSVC .NET build warnings

SourceForge.net noreply at sourceforge.net
Mon Oct 31 01:03:55 CET 2005


Patches item #1342902, was opened at 2005-10-31 00:03
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1342902&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Drueing (doc_wagon)
Assigned to: Nobody/Anonymous (nobody)
Summary: [KYRA] Fix MSVC .NET build warnings

Initial Comment:
Here's a patch to fix some build warnings in the KYRA
engine. The warnings are "truncation of constant
initializer" (or similar; this is a rough translation
from German), and because the MSVC projects treat
warnings as errors, the build fails.

Someone should look over it before committing, I'm not
sure if the initYPosTable values should really be
unsigned (or rather signed, with 0xA2 changed to
minus-something to reflect a signed integer)

-- Dark-Star on IRC/Forum

Index: kyra/kyra.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.cpp,v
retrieving revision 1.63
diff -u -3 -p -r1.63 kyra.cpp
--- kyra/kyra.cpp       29 Oct 2005 18:37:40 -0000    
 1.63
+++ kyra/kyra.cpp       30 Oct 2005 23:59:00 -0000
@@ -1185,7 +1185,7 @@ void
KyraEngine::setCharactersPositions(
                0x00CA, 0x00F0, 0x0082, 0x00A2, 0x0042,
0x6767,
                0x5A60
        };
-       static int8 initYPosTable[] = {
+       static uint8 initYPosTable[] = {
                0x00, 0xA2, 0x00, 0x42, 0x00,
                0x67, 0x67, 0x60, 0x5A, 0x71,
                0x76
Index: kyra/staticres.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/staticres.cpp,v
retrieving revision 1.13
diff -u -3 -p -r1.13 staticres.cpp
--- kyra/staticres.cpp  29 Oct 2005 18:37:40 -0000    
 1.13
+++ kyra/staticres.cpp  30 Oct 2005 23:59:01 -0000
@@ -574,11 +574,11 @@ const char
*KyraEngine::_xmidiFiles[] =
 const int KyraEngine::_xmidiFilesCount =
ARRAYSIZE(_xmidiFiles);

 const int8 KyraEngine::_charXPosTable[] = {
-       0x00, 0x04, 0x04, 0x04, 0x00, 0xFC, 0xFC, 0xFC
+       0, 4, 4, 4, 0, -4, -4, -4
 };

 const int8 KyraEngine::_charYPosTable[] = {
-       0xFE, 0xFE, 0x00, 0x03, 0x02, 0x02, 0x00, 0xFE
+       -2, -2, 0, 3, 2, 2, 0, -2
 };

 } // End of namespace Kyra


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1342902&group_id=37116




More information about the Scummvm-tracker mailing list