[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.10,1.11 dialogs.cpp,1.2,1.3 resource.cpp,1.8,1.9 saveload.cpp,1.11,1.12 script_v1.cpp,1.10,1.11 string.cpp,1.21,1.22
Matt Hargett
matt_hargett at users.sourceforge.net
Sat Sep 21 20:54:03 CEST 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv5874/scummvm/scumm
Modified Files:
actor.cpp dialogs.cpp resource.cpp saveload.cpp script_v1.cpp
string.cpp
Log Message:
2002-09-21 Matt Hargett <matt at use.net>
* scumm.dsp, scummvm.dsp, simon.dsp: Turn on warning as errors. Generate
PDBs on all builds.
* gameDetector.cpp, newgui.cpp, widget.cpp, actor.cpp,
dialogs.cpp, resource.cpp, saveload.cpp, scumm_renderer.cpp:
Fix warnings where possible. One pragma added to eliminate
warning of unknown pragmas.
* string.cpp: If unknown escape sequence, print warning.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- actor.cpp 22 Sep 2002 01:17:53 -0000 1.10
+++ actor.cpp 22 Sep 2002 03:53:52 -0000 1.11
@@ -256,7 +256,7 @@
from = toSimpleDir(dirType, facing);
dir = remapDirection(newDirection, is_walking);
- shouldInterpolate = (dir & 1024);
+ shouldInterpolate = (dir & 1024) ? true : false;
to = toSimpleDir(dirType, dir & 1023);
num = dirType ? 8 : 4;
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dialogs.cpp 19 Sep 2002 21:45:56 -0000 1.2
+++ dialogs.cpp 22 Sep 2002 03:53:52 -0000 1.3
@@ -29,6 +29,11 @@
#include "gui/ListWidget.h"
#include "common/config-file.h"
+
+#ifdef _MSC_VER
+# pragma warning( disable : 4068 )
+#endif
+
struct ResString {
int num;
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- resource.cpp 21 Sep 2002 13:48:02 -0000 1.8
+++ resource.cpp 22 Sep 2002 03:53:52 -0000 1.9
@@ -1084,9 +1084,9 @@
dw = 500000; // for sanity
debug(4, " ticks = %d, speed = %ld", ticks, dw);
memcpy(ptr, "\x00\xFF\x51\x03", 4); ptr += 4;
- *ptr++ = (dw >> 16) & 0xFF;
- *ptr++ = (dw >> 8) & 0xFF;
- *ptr++ = dw & 0xFF;
+ *ptr++ = (byte)((dw >> 16) & 0xFF);
+ *ptr++ = (byte)((dw >> 8) & 0xFF);
+ *ptr++ = (byte)(dw & 0xFF);
memcpy(ptr, OLD256_MIDI_HACK, sizeof(OLD256_MIDI_HACK) - 1);
ptr += sizeof(OLD256_MIDI_HACK) - 1;
memcpy(ptr, track, size);
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- saveload.cpp 22 Sep 2002 02:53:15 -0000 1.11
+++ saveload.cpp 22 Sep 2002 03:53:52 -0000 1.12
@@ -142,7 +142,7 @@
int old_screenEffectFlag = _screenEffectFlag;
_screenEffectFlag = true;
fadeOut(129);
- _screenEffectFlag = old_screenEffectFlag;
+ _screenEffectFlag = old_screenEffectFlag ? true : false;
initScreens(0, sb, _realWidth, sh);
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v1.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- script_v1.cpp 22 Sep 2002 01:17:53 -0000 1.10
+++ script_v1.cpp 22 Sep 2002 03:53:52 -0000 1.11
@@ -851,7 +851,7 @@
if (_gameId == GID_INDY3_256)
newClass--;
- putClass(obj, newClass, (newClass & 0x80));
+ putClass(obj, newClass, (newClass & 0x80) ? true : false);
}
}
@@ -1379,7 +1379,7 @@
{
int a = getVarOrDirectWord(0x80);
int b = getVarOrDirectByte(0x40);
- bool isNegated = _opcode & 0x20;
+ bool isNegated = (_opcode & 0x20) ? true : false;
if ((getState(a) != b) ^ isNegated)
o5_jumpRelative();
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- string.cpp 22 Sep 2002 01:17:53 -0000 1.21
+++ string.cpp 22 Sep 2002 03:53:52 -0000 1.22
@@ -621,7 +621,7 @@
byte *Scumm::addMessageToStack(byte *msg)
{
int num, numorg;
- byte *ptr, chr;
+ unsigned char *ptr, chr;
numorg = num = _numInMsgStack;
ptr = getResourceAddress(rtTemp, 6);
@@ -640,7 +640,6 @@
if (chr == 0xff) { // 0xff is an escape character
ptr[num++] = chr = *msg++; // followed by a "command" code
-
if (chr != 1 && chr != 2 && chr != 3 && chr != 8) {
ptr[num++] = *msg++; // and some commands are followed by parameters to the functions below
ptr[num++] = *msg++; // these are numbers of names, strings, verbs, variables, etc
@@ -687,9 +686,11 @@
*_msgPtrToAdd++ = ptr[num++];
*_msgPtrToAdd++ = ptr[num++];
break;
- default:
+ default:
+ warning("addMessageToStack(): string escape sequence %d unknown", chr);
*_msgPtrToAdd++ = 0xFF;
*_msgPtrToAdd++ = chr;
+ break;
}
} else {
if (chr != '@') {
More information about the Scummvm-git-logs
mailing list