aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-12-16 19:53:41 +0000
committerPaweł Kołodziejski2002-12-16 19:53:41 +0000
commitfa4f785f71ab7ea7f353bf5268db1ac69bed24f8 (patch)
tree1578513771681704404e0d4be1e82cf78ea6e32d
parentf1db7ce77e91da462a4ed1740a044f4a7e2f23c1 (diff)
downloadscummvm-rg350-fa4f785f71ab7ea7f353bf5268db1ac69bed24f8.tar.gz
scummvm-rg350-fa4f785f71ab7ea7f353bf5268db1ac69bed24f8.tar.bz2
scummvm-rg350-fa4f785f71ab7ea7f353bf5268db1ac69bed24f8.zip
fixed compilation under MSVC
svn-id: r5998
-rw-r--r--gui/console.cpp7
-rw-r--r--scumm/gfx.cpp10
2 files changed, 11 insertions, 6 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index 1e3c2c1226..0433eee569 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -153,7 +153,8 @@ void ConsoleDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers)
nextLine();
int len = _promptEndPos - _promptStartPos;
- char str[len + 1];
+// char str[len + 1];
+ char str[1000];
if (len < 0) len = 0; // Prevent overflow from forced Ctrl-D deletion
@@ -409,7 +410,11 @@ int ConsoleDialog::vprintf(const char *format, va_list argptr)
{
char buf[2048];
+#if defined(WIN32)
+ int count = _vsnprintf(buf, sizeof(buf), format, argptr);
+#else
int count = vsnprintf(buf, sizeof(buf), format, argptr);
+#endif
print(buf);
return count;
}
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 247f800296..fa3324b904 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1648,7 +1648,7 @@ void Gdi::unkDecode11(byte *dst, byte *src, int height)
#pragma mark -
-#pragma mark ### Camera ###
+#pragma mark --- Camera ---
#pragma mark -
void Scumm::setCameraAtEx(int at)
@@ -2006,7 +2006,7 @@ void Scumm::actorFollowCamera(int act)
}
#pragma mark -
-#pragma mark ### Transition effects ###
+#pragma mark --- Transition effects ---
#pragma mark -
void Scumm::fadeIn(int effect)
@@ -2370,7 +2370,7 @@ void Scumm::setShake(int mode)
}
#pragma mark -
-#pragma mark ### Palette ###
+#pragma mark --- Palette ---
#pragma mark -
void Scumm::setPaletteFromPtr(byte *ptr)
@@ -2951,7 +2951,7 @@ byte *Scumm::getPalettePtr()
}
#pragma mark -
-#pragma mark ### Cursor ###
+#pragma mark --- Cursor ---
#pragma mark -
void Scumm::grabCursor(int x, int y, int w, int h)
@@ -3115,7 +3115,7 @@ void Scumm::makeCursorColorTransparent(int a)
}
#pragma mark -
-#pragma mark ### Bomp ###
+#pragma mark --- Bomp ---
#pragma mark -
int32 Scumm::bompDecodeLineMode0(byte * src, byte * line_buffer, int32 size) {