diff options
| author | Max Horn | 2010-11-01 20:40:33 +0000 | 
|---|---|---|
| committer | Max Horn | 2010-11-01 20:40:33 +0000 | 
| commit | 3d5e2fa82093bba2492fc65e6f4ebd735907ea1e (patch) | |
| tree | 8fba8327b200d760c3928f67a21f775472704b60 /engines/hugo/util.cpp | |
| parent | 7d09121c712cdfd666f201c369ff5ba40366eec3 (diff) | |
| download | scummvm-rg350-3d5e2fa82093bba2492fc65e6f4ebd735907ea1e.tar.gz scummvm-rg350-3d5e2fa82093bba2492fc65e6f4ebd735907ea1e.tar.bz2 scummvm-rg350-3d5e2fa82093bba2492fc65e6f4ebd735907ea1e.zip | |
HUGO: Replace Utils::Warn() by warning()
svn-id: r54021
Diffstat (limited to 'engines/hugo/util.cpp')
| -rw-r--r-- | engines/hugo/util.cpp | 37 | 
1 files changed, 12 insertions, 25 deletions
| diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp index 73efb4cd38..a3e778e228 100644 --- a/engines/hugo/util.cpp +++ b/engines/hugo/util.cpp @@ -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 @@ int Utils::firstBit(byte data) {  }  /** -* 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 @@ int Utils::lastBit(byte data) {  }  /** -* 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 @@ char *Utils::Box(box_t dismiss, const char *s, ...) {  		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 @@ char *Utils::Box(box_t dismiss, const char *s, ...) {  }  /** -* 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 @@ void Utils::Error(int error_type, const char *format, ...) {  }  /** -* 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]); | 
