[Scummvm-cvs-logs] SF.net SVN: scummvm:[54021] scummvm/trunk/engines/hugo
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Nov 1 21:40:35 CET 2010
Revision: 54021
http://scummvm.svn.sourceforge.net/scummvm/?rev=54021&view=rev
Author: fingolfin
Date: 2010-11-01 20:40:33 +0000 (Mon, 01 Nov 2010)
Log Message:
-----------
HUGO: Replace Utils::Warn() by warning()
Modified Paths:
--------------
scummvm/trunk/engines/hugo/display.cpp
scummvm/trunk/engines/hugo/file.cpp
scummvm/trunk/engines/hugo/util.cpp
scummvm/trunk/engines/hugo/util.h
Modified: scummvm/trunk/engines/hugo/display.cpp
===================================================================
--- scummvm/trunk/engines/hugo/display.cpp 2010-11-01 20:26:32 UTC (rev 54020)
+++ scummvm/trunk/engines/hugo/display.cpp 2010-11-01 20:40:33 UTC (rev 54021)
@@ -273,7 +273,7 @@
break;
case D_ADD: // Add a rectangle to list
if (addIndex >= DMAX) {
- Utils::Warn("%s", "Display list exceeded");
+ warning("Display list exceeded");
return;
}
va_start(marker, update); // Initialize variable arguments
Modified: scummvm/trunk/engines/hugo/file.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file.cpp 2010-11-01 20:26:32 UTC (rev 54020)
+++ scummvm/trunk/engines/hugo/file.cpp 2010-11-01 20:40:33 UTC (rev 54021)
@@ -268,7 +268,7 @@
// Allocate memory for sound or music, if possible
sound_pt soundPtr = (byte *)malloc(s_hdr[sound].size); // Ptr to sound data
if (soundPtr == 0) {
- Utils::Warn("%s", "Low on memory");
+ warning("Low on memory");
return 0;
}
Modified: scummvm/trunk/engines/hugo/util.cpp
===================================================================
--- scummvm/trunk/engines/hugo/util.cpp 2010-11-01 20:26:32 UTC (rev 54020)
+++ scummvm/trunk/engines/hugo/util.cpp 2010-11-01 20:40:33 UTC (rev 54021)
@@ -41,8 +41,8 @@
namespace Hugo {
/**
-* Returns index (0 to 7) of first 1 in supplied byte, or 8 if not found
-*/
+ * Returns index (0 to 7) of first 1 in supplied byte, or 8 if not found
+ */
int Utils::firstBit(byte data) {
if (!data)
return 8;
@@ -57,8 +57,8 @@
}
/**
-* Returns index (0 to 7) of last 1 in supplied byte, or 8 if not found
-*/
+ * Returns index (0 to 7) of last 1 in supplied byte, or 8 if not found
+ */
int Utils::lastBit(byte data) {
if (!data)
return 8;
@@ -73,8 +73,8 @@
}
/**
-* Reverse the bit order in supplied byte
-*/
+ * Reverse the bit order in supplied byte
+ */
void Utils::reverseByte(byte *data) {
byte maskIn = 0x80;
byte maskOut = 0x01;
@@ -98,7 +98,7 @@
return 0;
if (strlen(s) > MAX_STRLEN - 100) { // Test length
- Warn("String too big:\n%s", s);
+ warning("String too big: '%s'", s);
return 0;
}
@@ -136,22 +136,9 @@
}
/**
-* Warning handler. Print supplied message and continue
-* Arguments are same as printf
-*/
-void Utils::Warn(const char *format, ...) {
- char buffer[WARNLEN];
- va_list marker;
- va_start(marker, format);
- vsnprintf(buffer, WARNLEN, format, marker);
- va_end(marker);
- warning("Hugo warning: %s", buffer);
-}
-
-/**
-* Fatal error handler. Reset environment, print error and exit
-* Arguments are same as printf
-*/
+ * Fatal error handler. Reset environment, print error and exit
+ * Arguments are same as printf
+ */
void Utils::Error(int error_type, const char *format, ...) {
char buffer[ERRLEN + 1];
bool fatal = true; // Fatal error, else continue
@@ -194,8 +181,8 @@
}
/**
-* Print options for user when dead
-*/
+ * Print options for user when dead
+ */
void Utils::gameOverMsg(void) {
//MessageBox(hwnd, gameoverstring, "Be more careful next time!", MB_OK | MB_ICONINFORMATION);
warning("STUB: Gameover_msg(): %s", HugoEngine::get()._textUtil[kGameOver]);
Modified: scummvm/trunk/engines/hugo/util.h
===================================================================
--- scummvm/trunk/engines/hugo/util.h 2010-11-01 20:26:32 UTC (rev 54020)
+++ scummvm/trunk/engines/hugo/util.h 2010-11-01 20:40:33 UTC (rev 54021)
@@ -55,7 +55,6 @@
void gameOverMsg();
void reverseByte(byte *data);
void Error(int code, const char *format, ...) GCC_PRINTF(2, 3);
-void Warn(const char *format, ...) GCC_PRINTF(1, 2);
char *Box(box_t, const char *, ...) GCC_PRINTF(2, 3);
char *strlwr(char *buffer);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list