[Scummvm-cvs-logs] SF.net SVN: scummvm:[54002] scummvm/trunk/engines/sword25/gfx/image/art.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Nov 1 17:00:35 CET 2010
Revision: 54002
http://scummvm.svn.sourceforge.net/scummvm/?rev=54002&view=rev
Author: fingolfin
Date: 2010-11-01 16:00:35 +0000 (Mon, 01 Nov 2010)
Log Message:
-----------
SWORD25: Replace art_warn/art_die by warning/error
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/image/art.cpp
Modified: scummvm/trunk/engines/sword25/gfx/image/art.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/art.cpp 2010-11-01 16:00:17 UTC (rev 54001)
+++ scummvm/trunk/engines/sword25/gfx/image/art.cpp 2010-11-01 16:00:35 UTC (rev 54002)
@@ -34,40 +34,13 @@
/* Various utility functions RLL finds useful. */
+#include "common/textconsole.h"
+
#include "sword25/gfx/image/art.h"
namespace Sword25 {
/**
- * art_die: Print the error message to stderr and exit with a return code of 1.
- * @fmt: The printf-style format for the error message.
- *
- * Used for dealing with severe errors.
- **/
-void art_die(const char *fmt, ...) {
- va_list ap;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- exit(1);
-}
-
-/**
- * art_warn: Print the warning message to stderr.
- * @fmt: The printf-style format for the warning message.
- *
- * Used for generating warnings.
- **/
-void art_warn(const char *fmt, ...) {
- va_list ap;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-}
-
-/**
* art_svp_free: Free an #ArtSVP structure.
* @svp: #ArtSVP to free.
*
@@ -1172,7 +1145,7 @@
right_filled = (wind_right > 0);
break;
default:
- art_die("Unknown wind rule %d\n", swr->rule);
+ error("Unknown wind rule %d", swr->rule);
}
if (left_filled == right_filled) {
/* discard segment now */
@@ -1386,7 +1359,7 @@
ArtActiveSeg *place_right = NULL;
if (seg->flags & ART_ACTIVE_FLAGS_IN_HORIZ) {
- art_warn("*** attempt to put segment in horiz list twice\n");
+ warning("attempt to put segment in horiz list twice");
return;
}
seg->flags |= ART_ACTIVE_FLAGS_IN_HORIZ;
@@ -1563,7 +1536,7 @@
break;
new_x = x_test;
if (new_x < x_test) {
- art_warn("art_svp_intersect_add_point: non-ascending x\n");
+ warning("art_svp_intersect_add_point: non-ascending x");
}
x_test = new_x;
}
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