aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/widgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gfx/widgets.cpp')
-rw-r--r--engines/sci/gfx/widgets.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/engines/sci/gfx/widgets.cpp b/engines/sci/gfx/widgets.cpp
index fc0a177a50..777d567a32 100644
--- a/engines/sci/gfx/widgets.cpp
+++ b/engines/sci/gfx/widgets.cpp
@@ -29,7 +29,7 @@
#undef GFXW_DEBUG_DIRTY /* Enable to debug dirty rectangle propagation (writes to stderr) */
#ifdef GFXW_DEBUG_DIRTY
-# define DDIRTY fprintf(stderr, "%s:%5d| ", __FILE__, __LINE__); fprintf
+# define DDIRTY error("%s:%5d| ", __FILE__, __LINE__); fprintf
#else
# define DDIRTY if (0) fprintf
#endif
@@ -47,7 +47,7 @@ int debug_widget_pos = 0;
static void
_gfxw_debug_add_widget(gfxw_widget_t *widget) {
if (debug_widget_pos == GFXW_DEBUG_WIDGETS) {
- GFXERROR("WIDGET DEBUG: Allocated the maximum number of %d widgets- Aborting!\n", GFXW_DEBUG_WIDGETS);
+ GFXERROR("WIDGET DEBUG: Allocated the maximum number of %d widgets- Aborting", GFXW_DEBUG_WIDGETS);
BREAKPOINT();
}
debug_widgets[debug_widget_pos++] = widget;
@@ -67,12 +67,12 @@ _gfxw_debug_remove_widget(gfxw_widget_t *widget) {
}
if (found > 1) {
- GFXERROR("While removing widget: Found it %d times!\n", found);
+ GFXERROR("While removing widget: Found it %d times", found);
BREAKPOINT();
}
if (found == 0) {
- GFXERROR("Attempted removal of unregistered widget!\n");
+ GFXERROR("Attempted removal of unregistered widget");
BREAKPOINT();
}
}
@@ -199,7 +199,7 @@ _gfxw_unallocate_widget(gfx_state_t *state, gfxw_widget_t *widget) {
if (text->text_handle) {
if (!state) {
- GFXERROR("Attempt to free text without supplying mode to free it from!\n");
+ GFXERROR("Attempt to free text without supplying mode to free it from");
BREAKPOINT();
} else {
gfxop_free_text(state, text->text_handle);
@@ -217,7 +217,7 @@ _gfxw_unallocate_widget(gfx_state_t *state, gfxw_widget_t *widget) {
{ \
int retval = (_x); \
if (retval == GFX_ERROR) { \
- GFXERROR("Error occured while drawing widget!\n"); \
+ GFXERROR("Error occured while drawing widget"); \
return 1; \
} else if (retval == GFX_FATAL) { \
GFXERROR("Fatal error occured while drawing widget!\nGraphics state invalid; aborting program..."); \
@@ -235,11 +235,11 @@ _gfxw_unallocate_widget(gfx_state_t *state, gfxw_widget_t *widget) {
/* Assertion for drawing */
#define DRAW_ASSERT(widget, exp_type) \
if (!(widget)) { \
- sciprintf("L%d: NULL widget!\n", __LINE__); \
+ sciprintf("L%d: NULL widget", __LINE__); \
return 1; \
} \
if (!(widget)->print) { \
- sciprintf("L%d: Widget of type %d does not have print function!\n", __LINE__, \
+ sciprintf("L%d: Widget of type %d does not have print function", __LINE__, \
(widget)->type); \
} \
if ((widget)->type != (exp_type)) { \
@@ -324,7 +324,7 @@ gfxw_remove_widget_from_container(gfxw_container_t *container, gfxw_widget_t *wi
gfxw_widget_t **seekerp;
if (!container) {
- GFXERROR("Attempt to remove widget from NULL container!\n");
+ GFXERROR("Attempt to remove widget from NULL container");
BREAKPOINT();
}
@@ -342,7 +342,7 @@ gfxw_remove_widget_from_container(gfxw_container_t *container, gfxw_widget_t *wi
seekerp = &((*seekerp)->next);
if (!*seekerp) {
- GFXERROR("Internal error: Attempt to remove widget from container it was not contained in!\n");
+ GFXERROR("Internal error: Attempt to remove widget from container it was not contained in");
sciprintf("Widget:");
widget->print(GFXW(widget), 1);
sciprintf("Container:");
@@ -705,7 +705,7 @@ _gfxw_new_simple_view(gfx_state_t *state, Common::Point pos, int view, int loop,
Common::Point offset;
if (!state) {
- GFXERROR("Attempt to create view widget with NULL state!\n");
+ GFXERROR("Attempt to create view widget with NULL state");
return NULL;
}
@@ -988,7 +988,7 @@ gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int lo
Common::Point offset;
if (!state) {
- GFXERROR("Attempt to create view widget with NULL state!\n");
+ GFXERROR("Attempt to create view widget with NULL state");
return NULL;
}
@@ -1657,7 +1657,7 @@ _gfxwop_list_equals(gfxw_widget_t *widget, gfxw_widget_t *other)
return 0;
if (!GFXW_IS_LIST(widget)) {
- GFXWARN("_gfxwop_list_equals(): Method called on non-list!\n");
+ GFXWARN("_gfxwop_list_equals(): Method called on non-list");
widget->print(widget, 0);
sciprintf("\n");
return 0;
@@ -1866,9 +1866,9 @@ _gfxwop_visual_print(gfxw_widget_t *widget, int indentation) {
static int
_gfxwop_visual_set_visual(gfxw_widget_t *self, gfxw_visual_t *visual) {
if (self != GFXW(visual)) {
- GFXWARN("Attempt to set a visual's parent visual to something else!\n");
+ GFXWARN("Attempt to set a visual's parent visual to something else");
} else {
- GFXWARN("Attempt to set a visual's parent visual!\n");
+ GFXWARN("Attempt to set a visual's parent visual");
}
return 1;
}
@@ -1967,12 +1967,12 @@ _gfxwop_port_free(gfxw_widget_t *widget) {
int ID = port->ID;
if (ID < 0 || ID >= visual->port_refs_nr) {
- GFXWARN("Attempt to free port #%d; allowed: [0..%d]!\n", ID, visual->port_refs_nr);
+ GFXWARN("Attempt to free port #%d; allowed: [0..%d]", ID, visual->port_refs_nr);
return GFX_ERROR;
}
if (visual->port_refs[ID] != port) {
- GFXWARN("While freeing port %d: Port is at %p, but port list indicates %p!\n",
+ GFXWARN("While freeing port %d: Port is at %p, but port list indicates %p",
ID, port, visual->port_refs[ID]);
} else visual->port_refs[ID] = NULL;
@@ -2045,7 +2045,7 @@ _gfxwop_port_add_dirty(gfxw_container_t *widget, rect_t dirty, int propagate) {
if (self->port_bg->superarea_of(self->port_bg, &foo)) {
gfxw_container_t *parent = self->parent;
while (parent) {
- fprintf(stderr, "Dirtifying parent id %d\n", parent->ID);
+ error("Dirtifying parent id %d\n", parent->ID);
parent->flags |= GFXW_FLAG_DIRTY;
parent = parent->parent;
}