aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-11-01 16:00:35 +0000
committerMax Horn2010-11-01 16:00:35 +0000
commit6fa8772baef4e76a1cb4b92c14f2479def8210b5 (patch)
treef384c7152ce4a31a4c798d92b6a6bc8afa2f8866
parenta1dd7a07a12a0ef3f4ede9d346f590873c83dd2c (diff)
downloadscummvm-rg350-6fa8772baef4e76a1cb4b92c14f2479def8210b5.tar.gz
scummvm-rg350-6fa8772baef4e76a1cb4b92c14f2479def8210b5.tar.bz2
scummvm-rg350-6fa8772baef4e76a1cb4b92c14f2479def8210b5.zip
SWORD25: Replace art_warn/art_die by warning/error
svn-id: r54002
-rw-r--r--engines/sword25/gfx/image/art.cpp37
1 files changed, 5 insertions, 32 deletions
diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp
index 064ca333e7..d30460901d 100644
--- a/engines/sword25/gfx/image/art.cpp
+++ b/engines/sword25/gfx/image/art.cpp
@@ -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 @@ static int art_svp_writer_rewind_add_segment(ArtSvpWriter *self, int wind_left,
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 @@ static void art_svp_intersect_add_horiz(ArtIntersectCtx *ctx, ArtActiveSeg *seg)
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 @@ static ArtActiveSeg *art_svp_intersect_add_point(ArtIntersectCtx *ctx, double x,
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;
}