Opened 14 years ago

Closed 14 years ago

Last modified 12 months ago

#8480 closed patch

KYRA: Fix MSVC .NET build warnings

Reported by: SF/doc_wagon Owned by: lordhoto
Priority: normal Component: Engine: Kyra
Keywords: Cc:
Game:

Description

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

Ticket imported from: #1342902. Ticket imported from: patches/585.

Attachments (1)

kyra_msvc_warnings.diff (1.4 KB ) - added by SF/doc_wagon 14 years ago.
the patch as .diff file

Download all attachments as: .zip

Change History (6)

by SF/doc_wagon, 14 years ago

Attachment: kyra_msvc_warnings.diff added

the patch as .diff file

comment:1 by sev-, 14 years ago

Summary: [KYRA] Fix MSVC .NET build warningsKYRA: Fix MSVC .NET build warnings

comment:2 by lordhoto, 14 years ago

Owner: set to lordhoto

comment:3 by lordhoto, 14 years ago

Well it will be fixed within my next commit, should be
tomorrow or even today. So thx for your patch. I will let it
open unless the code is commited.

comment:4 by lordhoto, 14 years ago

Status: newclosed

comment:5 by digitall, 12 months ago

Component: Engine: Kyra
Note: See TracTickets for help on using tickets.