aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/operations.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-07-06 10:39:22 +0000
committerFilippos Karapetis2009-07-06 10:39:22 +0000
commit522b161becfc702350d84cf431b716b1330286db (patch)
tree9ba220b8c1b8eeb247c6b2d35d8bc5bf1943a234 /engines/sci/gfx/operations.cpp
parent3ce15cb9b7c77560cd0f2b67e4407b9889ea0f9b (diff)
downloadscummvm-rg350-522b161becfc702350d84cf431b716b1330286db.tar.gz
scummvm-rg350-522b161becfc702350d84cf431b716b1330286db.tar.bz2
scummvm-rg350-522b161becfc702350d84cf431b716b1330286db.zip
Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
Diffstat (limited to 'engines/sci/gfx/operations.cpp')
-rw-r--r--engines/sci/gfx/operations.cpp125
1 files changed, 31 insertions, 94 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp
index 82b5e78117..4c0b8810d5 100644
--- a/engines/sci/gfx/operations.cpp
+++ b/engines/sci/gfx/operations.cpp
@@ -61,13 +61,6 @@ gfx_pixmap_color_t default_colors[DEFAULT_COLORS_NR] = {{GFX_COLOR_SYSTEM, 0x00,
#define POINTER_VISIBLE_BUT_CLIPPED 2
-// Performs basic checks that apply to most functions
-#define BASIC_CHECKS(error_retval) \
-if (!state) { \
- GFXERROR("Null state!\n"); \
- return error_retval; \
-}
-
// How to determine whether colors have to be allocated
#define PALETTE_MODE state->driver->getMode()->palette
@@ -157,7 +150,7 @@ static int _gfxop_grab_pixmap(GfxState *state, gfx_pixmap_t **pxmp, int x, int y
int x,y; \
\
if (!pxm->index_data) { \
- GFXERROR("Attempt to draw control color %d on pixmap %d/%d/%d without index data", color, pxm->ID, pxm->loop, pxm->cel); \
+ error("Attempt to draw control color %d on pixmap %d/%d/%d without index data", color, pxm->ID, pxm->loop, pxm->cel); \
return; \
} \
\
@@ -257,7 +250,7 @@ static int _gfxop_draw_pixmap(GfxDriver *driver, gfx_pixmap_t *pxm, int priority
err = driver->drawPixmap(pxm, priority, src, clipped_dest, static_buf ? GFX_BUFFER_STATIC : GFX_BUFFER_BACK);
if (err) {
- GFXERROR("driver->draw_pixmap() returned err!\n");
+ error("driver->draw_pixmap() returned error code");
return err;
}
@@ -301,7 +294,7 @@ static int _gfxop_update_box(GfxState *state, rect_t box) {
_gfxop_scale_rect(&box, state->driver->getMode());
if ((retval = _gfxop_buffer_propagate_box(state, box, GFX_BUFFER_FRONT))) {
- GFXERROR("Error occured while propagating box (%d,%d,%d,%d) to front buffer\n", box.x, box.y, box.width, box.height);
+ error("Error occured while propagating box (%d,%d,%d,%d) to front buffer", box.x, box.y, box.width, box.height);
return retval;
}
return GFX_OK;
@@ -354,7 +347,7 @@ void gfxdr_add_dirty(DirtyRectList &list, rect_t box, int strategy) {
break;
default:
- GFXERROR("Attempt to use invalid dirty frame mode %d!\nPlease refer to gfx_options.h.", strategy);
+ error("Attempt to use invalid dirty frame mode %d!\nPlease refer to gfx_options.h", strategy);
}
}
@@ -416,8 +409,6 @@ int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options,
//int color_depth = bpp ? bpp : 1;
//int initialized = 0;
- BASIC_CHECKS(GFX_FATAL);
-
state->options = options;
state->visible_map = GFX_MASK_VISUAL;
state->fullscreen_override = NULL; // No magical override
@@ -444,8 +435,6 @@ int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options,
}
int gfxop_exit(GfxState *state) {
- BASIC_CHECKS(GFX_ERROR);
-
state->gfxResMan->freeResManager();
if (state->control_map) {
@@ -520,7 +509,6 @@ int gfxop_scan_bitmask(GfxState *state, rect_t area, gfx_map_mask_t map) {
int gfxop_set_clip_zone(GfxState *state, rect_t zone) {
int xfact, yfact;
- BASIC_CHECKS(GFX_ERROR);
DDIRTY(stderr, "-- Setting clip zone %d %d %d %d\n", GFX_PRINT_RECT(zone));
@@ -557,8 +545,6 @@ int gfxop_set_color(GfxState *state, gfx_color_t *color, int r, int g, int b, in
int mask = ((r >= 0 && g >= 0 && b >= 0) ? GFX_MASK_VISUAL : 0) | ((priority >= 0) ? GFX_MASK_PRIORITY : 0)
| ((control >= 0) ? GFX_MASK_CONTROL : 0);
- BASIC_CHECKS(GFX_FATAL);
-
if (PALETTE_MODE && a >= GFXOP_ALPHA_THRESHOLD)
mask &= ~GFX_MASK_VISUAL;
@@ -593,13 +579,11 @@ int gfxop_set_color(GfxState *state, gfx_color_t *colorOut, gfx_color_t &colorIn
}
int gfxop_set_system_color(GfxState *state, unsigned int index, gfx_color_t *color) {
- BASIC_CHECKS(GFX_FATAL);
-
if (!PALETTE_MODE)
return GFX_OK;
if (index >= state->driver->getMode()->palette->size()) {
- GFXERROR("Attempt to set invalid color index %02x as system color\n", color->visual.parent_index);
+ error("Attempt to set invalid color index %02x as system color", color->visual.parent_index);
return GFX_ERROR;
}
@@ -752,7 +736,7 @@ static int simulate_stippled_line_draw(GfxDriver *driver, int skipone, Common::P
Common::Point nextpos = Common::Point(start.x + xl, start.y + yl);
if ((retval = driver->drawLine(start, nextpos, color, line_mode, GFX_LINE_STYLE_NORMAL))) {
- GFXERROR("Failed to draw partial stippled line (%d,%d) -- (%d,%d)\n", start.x, start.y, nextpos.x, nextpos.y);
+ error("Failed to draw partial stippled line (%d,%d) -- (%d,%d)", start.x, start.y, nextpos.x, nextpos.y);
return retval;
}
*posvar += delta;
@@ -774,7 +758,7 @@ static int simulate_stippled_line_draw(GfxDriver *driver, int skipone, Common::P
nextpos = Common::Point(start.x + xl, start.y + yl);
if ((retval = driver->drawLine(start, nextpos, color, line_mode, GFX_LINE_STYLE_NORMAL))) {
- GFXERROR("Failed to draw partial stippled line (%d,%d) -- (%d,%d)\n", start.x, start.y, nextpos.x, nextpos.y);
+ error("Failed to draw partial stippled line (%d,%d) -- (%d,%d)", start.x, start.y, nextpos.x, nextpos.y);
return retval;
}
}
@@ -787,7 +771,6 @@ static int _gfxop_draw_line_clipped(GfxState *state, Common::Point start, Common
int retval;
int skipone = (start.x ^ end.y) & 1; // Used for simulated line stippling
- BASIC_CHECKS(GFX_FATAL);
_gfxop_full_pointer_refresh(state);
// First, make sure that the line is normalized
@@ -813,7 +796,7 @@ static int _gfxop_draw_line_clipped(GfxState *state, Common::Point start, Common
}
if ((retval = state->driver->drawLine(start, end, color, line_mode, line_style))) {
- GFXERROR("Failed to draw line (%d,%d) -- (%d,%d)\n", start.x, start.y, end.x, end.y);
+ error("Failed to draw line (%d,%d) -- (%d,%d)", start.x, start.y, end.x, end.y);
return retval;
}
@@ -824,7 +807,6 @@ int gfxop_draw_line(GfxState *state, Common::Point start, Common::Point end,
gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
int xfact, yfact;
- BASIC_CHECKS(GFX_FATAL);
_gfxop_add_dirty_x(state, gfx_rect(start.x, start.y, end.x - start.x, end.y - start.y));
xfact = state->driver->getMode()->xfact;
@@ -855,7 +837,6 @@ int gfxop_draw_rectangle(GfxState *state, rect_t rect, gfx_color_t color, gfx_li
Common::Point upper_left_u, upper_right_u, lower_left_u, lower_right_u;
Common::Point upper_left, upper_right, lower_left, lower_right;
- BASIC_CHECKS(GFX_FATAL);
_gfxop_full_pointer_refresh(state);
xfact = state->driver->getMode()->xfact;
@@ -889,7 +870,7 @@ int gfxop_draw_rectangle(GfxState *state, rect_t rect, gfx_color_t color, gfx_li
#undef PARTIAL_LINE
if (retval) {
- GFXERROR("Failed to draw rectangle (%d,%d)+(%d,%d)\n", rect.x, rect.y, rect.width, rect.height);
+ error("Failed to draw rectangle (%d,%d)+(%d,%d)", rect.x, rect.y, rect.width, rect.height);
return retval;
}
@@ -906,7 +887,6 @@ int gfxop_draw_box(GfxState *state, rect_t box, gfx_color_t color1, gfx_color_t
gfx_rectangle_fill_t driver_shade_type;
rect_t new_box;
- BASIC_CHECKS(GFX_FATAL);
_gfxop_full_pointer_refresh(state);
shade_type = GFX_BOX_SHADE_FLAT;
@@ -959,7 +939,7 @@ int gfxop_draw_box(GfxState *state, rect_t box, gfx_color_t color1, gfx_color_t
break;
default:
- GFXERROR("Invalid shade type: %d\n", shade_type);
+ error("Invalid shade type: %d", shade_type);
return GFX_ERROR;
}
@@ -1020,7 +1000,7 @@ static int _gfxop_buffer_propagate_box(GfxState *state, rect_t box, gfx_buffer_t
return GFX_OK;
if ((err = state->driver->update(box, Common::Point(box.x, box.y), buffer))) {
- GFXERROR("Error occured while updating region (%d,%d,%d,%d) in buffer %d\n", box.x, box.y, box.width, box.height, buffer);
+ error("Error occured while updating region (%d,%d,%d,%d) in buffer %d", box.x, box.y, box.width, box.height, buffer);
return err;
}
@@ -1030,7 +1010,6 @@ static int _gfxop_buffer_propagate_box(GfxState *state, rect_t box, gfx_buffer_t
extern int sci0_palette;
int gfxop_clear_box(GfxState *state, rect_t box) {
- BASIC_CHECKS(GFX_FATAL);
_gfxop_full_pointer_refresh(state);
_gfxop_add_dirty(state, box);
DDIRTY(stderr, "[] clearing box %d %d %d %d\n", GFX_PRINT_RECT(box));
@@ -1077,11 +1056,7 @@ int gfxop_set_visible_map(GfxState *state, gfx_map_mask_t visible_map) {
}
int gfxop_update(GfxState *state) {
- int retval;
-
- BASIC_CHECKS(GFX_FATAL);
-
- retval = _gfxop_clear_dirty_rec(state, state->_dirtyRects);
+ int retval = _gfxop_clear_dirty_rec(state, state->_dirtyRects);
if (state->fullscreen_override) {
// We've been asked to re-draw the active full-screen image, essentially.
@@ -1092,7 +1067,7 @@ int gfxop_update(GfxState *state) {
}
if (retval) {
- GFXERROR("Clearing the dirty rectangles failed!\n");
+ error("Clearing the dirty rectangles failed");
}
if (state->tag_mode) {
@@ -1107,8 +1082,6 @@ int gfxop_update(GfxState *state) {
}
int gfxop_update_box(GfxState *state, rect_t box) {
- BASIC_CHECKS(GFX_FATAL);
-
if (state->disable_dirty)
_gfxop_update_box(state, box);
else
@@ -1118,15 +1091,12 @@ int gfxop_update_box(GfxState *state, rect_t box) {
}
int gfxop_enable_dirty_frames(GfxState *state) {
- BASIC_CHECKS(GFX_ERROR);
state->disable_dirty = 0;
return GFX_OK;
}
int gfxop_disable_dirty_frames(GfxState *state) {
- BASIC_CHECKS(GFX_ERROR);
-
state->disable_dirty = 1;
return GFX_OK;
@@ -1135,8 +1105,6 @@ int gfxop_disable_dirty_frames(GfxState *state) {
// Pointer and IO ops
int gfxop_sleep(GfxState *state, uint32 msecs) {
- BASIC_CHECKS(GFX_FATAL);
-
uint32 time;
const uint32 wakeup_time = g_system->getMillis() + msecs;
@@ -1159,8 +1127,6 @@ int gfxop_sleep(GfxState *state, uint32 msecs) {
}
static int _gfxop_set_pointer(GfxState *state, gfx_pixmap_t *pxm, Common::Point *hotspot) {
- BASIC_CHECKS(GFX_FATAL);
-
// FIXME: We may have to store this pxm somewhere, as the global palette
// may change when a new PIC is loaded. The cursor has to be regenerated
// from this pxm at that point. (An alternative might be to ensure the
@@ -1173,8 +1139,6 @@ static int _gfxop_set_pointer(GfxState *state, gfx_pixmap_t *pxm, Common::Point
}
int gfxop_set_pointer_cursor(GfxState *state, int nr) {
- BASIC_CHECKS(GFX_FATAL);
-
if (nr == GFXOP_NO_POINTER)
return _gfxop_set_pointer(state, NULL, NULL);
@@ -1190,8 +1154,6 @@ int gfxop_set_pointer_cursor(GfxState *state, int nr) {
}
int gfxop_set_pointer_view(GfxState *state, int nr, int loop, int cel, Common::Point *hotspot) {
- BASIC_CHECKS(GFX_FATAL);
-
int real_loop = loop;
int real_cel = cel;
// FIXME: For now, don't palettize pointers
@@ -1220,8 +1182,6 @@ int gfxop_set_pointer_view(GfxState *state, int nr, int loop, int cel, Common::P
}
int gfxop_set_pointer_position(GfxState *state, Common::Point pos) {
- BASIC_CHECKS(GFX_ERROR);
-
state->pointer_pos = pos;
if (pos.x > 320 || pos.y > 200) {
@@ -1551,7 +1511,6 @@ sci_event_t gfxop_get_event(GfxState *state, unsigned int mask) {
sci_event_t error_event = { SCI_EVT_ERROR, 0, 0, 0 };
sci_event_t event = { 0, 0, 0, 0 };
- BASIC_CHECKS(error_event);
_gfxop_full_pointer_refresh(state);
// Update the screen here, since it's called very often
@@ -1614,8 +1573,6 @@ int gfxop_lookup_view_get_loops(GfxState *state, int nr) {
int loop = 0, cel = 0;
gfxr_view_t *view = NULL;
- BASIC_CHECKS(GFX_ERROR);
-
view = state->gfxResMan->getView(nr, &loop, &cel, 0);
if (!view) {
@@ -1630,8 +1587,6 @@ int gfxop_lookup_view_get_cels(GfxState *state, int nr, int loop) {
int real_loop = loop, cel = 0;
gfxr_view_t *view = NULL;
- BASIC_CHECKS(GFX_ERROR);
-
view = state->gfxResMan->getView(nr, &real_loop, &cel, 0);
if (!view) {
@@ -1645,8 +1600,6 @@ int gfxop_lookup_view_get_cels(GfxState *state, int nr, int loop) {
}
int gfxop_check_cel(GfxState *state, int nr, int *loop, int *cel) {
- BASIC_CHECKS(GFX_ERROR);
-
gfxr_view_t *testView = state->gfxResMan->getView(nr, loop, cel, 0);
if (!testView) {
@@ -1660,7 +1613,6 @@ int gfxop_check_cel(GfxState *state, int nr, int *loop, int *cel) {
int gfxop_overflow_cel(GfxState *state, int nr, int *loop, int *cel) {
int loop_v = *loop;
int cel_v = *cel;
- BASIC_CHECKS(GFX_ERROR);
gfxr_view_t *testView = state->gfxResMan->getView(nr, &loop_v, &cel_v, 0);
@@ -1682,7 +1634,6 @@ int gfxop_overflow_cel(GfxState *state, int nr, int *loop, int *cel) {
int gfxop_get_cel_parameters(GfxState *state, int nr, int loop, int cel, int *width, int *height, Common::Point *offset) {
gfxr_view_t *view = NULL;
gfx_pixmap_t *pxm = NULL;
- BASIC_CHECKS(GFX_ERROR);
view = state->gfxResMan->getView(nr, &loop, &cel, 0);
@@ -1706,7 +1657,6 @@ static int _gfxop_draw_cel_buffer(GfxState *state, int nr, int loop, int cel, Co
gfxr_view_t *view = NULL;
gfx_pixmap_t *pxm = NULL;
int old_x, old_y;
- BASIC_CHECKS(GFX_FATAL);
view = state->gfxResMan->getView(nr, &loop, &cel, palette);
@@ -1777,8 +1727,6 @@ int *gfxop_get_pic_metainfo(GfxState *state) {
}
int gfxop_new_pic(GfxState *state, int nr, int flags, int default_palette) {
- BASIC_CHECKS(GFX_FATAL);
-
state->gfxResMan->tagResources();
state->tag_mode = 1;
state->palette_nr = default_palette;
@@ -1791,15 +1739,16 @@ int gfxop_new_pic(GfxState *state, int nr, int flags, int default_palette) {
}
if (!state->pic || !state->pic_unscaled) {
- GFXERROR("Could not retrieve background pic %d!\n", nr);
+ warning("Could not retrieve background pic %d", nr);
if (state->pic) {
- GFXERROR(" -- Inconsistency: scaled pic _was_ retrieved!\n");
+ warning(" -- Inconsistency: scaled pic _was_ retrieved!");
}
if (state->pic_unscaled) {
- GFXERROR(" -- Inconsistency: unscaled pic _was_ retrieved!\n");
+ warning(" -- Inconsistency: unscaled pic _was_ retrieved!");
}
+ error("Error occured in gfxop_new_pic()");
state->pic = state->pic_unscaled = NULL;
return GFX_ERROR;
}
@@ -1810,17 +1759,15 @@ int gfxop_new_pic(GfxState *state, int nr, int flags, int default_palette) {
}
int gfxop_add_to_pic(GfxState *state, int nr, int flags, int default_palette) {
- BASIC_CHECKS(GFX_FATAL);
-
if (!state->pic) {
- GFXERROR("Attempt to add to pic with no pic active!\n");
+ error("Attempt to add to pic with no pic active");
return GFX_ERROR;
}
state->pic = state->gfxResMan->addToPic(state->pic_nr, nr, flags, state->palette_nr, default_palette);
if (!state->pic) {
- GFXERROR("Could not add pic #%d to pic #%d!\n", state->pic_nr, nr);
+ error("Could not add pic #%d to pic #%d", state->pic_nr, nr);
return GFX_ERROR;
}
@@ -1835,7 +1782,6 @@ int gfxop_add_to_pic(GfxState *state, int nr, int flags, int default_palette) {
// replacing GfxState* state parameter with gfx_resstate_t* gfxResourceState and adjust callers accordingly
int gfxop_get_font_height(GfxState *state, int font_nr) {
gfx_bitmap_font_t *font;
- BASIC_CHECKS(GFX_FATAL);
font = state->gfxResMan->getFont(font_nr);
@@ -1851,12 +1797,10 @@ int gfxop_get_text_params(GfxState *state, int font_nr, const char *text, int ma
bool textsplits;
gfx_bitmap_font_t *font;
- BASIC_CHECKS(GFX_FATAL);
-
font = state->gfxResMan->getFont(font_nr);
if (!font) {
- GFXERROR("Attempt to calculate text size with invalid font #%d\n", font_nr);
+ error("Attempt to calculate text size with invalid font #%d", font_nr);
*width = *height = 0;
return GFX_ERROR;
}
@@ -1869,7 +1813,7 @@ int gfxop_get_text_params(GfxState *state, int font_nr, const char *text, int ma
#endif
if (!textsplits) {
- GFXERROR("Could not calculate text size!");
+ error("Could not calculate text size");
*width = *height = 0;
return GFX_ERROR;
}
@@ -1885,21 +1829,20 @@ TextHandle *gfxop_new_text(GfxState *state, int font_nr, const Common::String &t
TextHandle *handle;
gfx_bitmap_font_t *font;
int err = 0;
- BASIC_CHECKS(NULL);
// mapping text colors to palette
err |= gfxop_set_color(state, &color1, color1);
err |= gfxop_set_color(state, &color2, color2);
err |= gfxop_set_color(state, &bg_color, bg_color);
if (err) {
- GFXERROR("Unable to set up colors");
+ error("Unable to set up colors");
return NULL;
}
font = state->gfxResMan->getFont(font_nr);
if (!font) {
- GFXERROR("Attempt to draw text with invalid font #%d\n", font_nr);
+ error("Attempt to draw text with invalid font #%d", font_nr);
return NULL;
}
@@ -1921,7 +1864,7 @@ TextHandle *gfxop_new_text(GfxState *state, int font_nr, const Common::String &t
#endif
if (!result) {
- GFXERROR("Could not calculate text parameters in font #%d\n", font_nr);
+ error("Could not calculate text parameters in font #%d", font_nr);
delete handle;
return NULL;
}
@@ -1942,7 +1885,7 @@ TextHandle *gfxop_new_text(GfxState *state, int font_nr, const Common::String &t
(bg_color.mask & GFX_MASK_VISUAL) ? &bg_color.visual : NULL);
if (!handle->text_pixmaps[i]) {
- GFXERROR("Failed to draw text pixmap for line %d/%d\n", i, handle->lines.size());
+ error("Failed to draw text pixmap for line %d/%d", i, handle->lines.size());
delete handle;
return NULL;
}
@@ -1957,8 +1900,6 @@ TextHandle *gfxop_new_text(GfxState *state, int font_nr, const Common::String &t
}
int gfxop_free_text(GfxState *state, TextHandle *handle) {
- BASIC_CHECKS(GFX_ERROR);
-
delete handle;
return GFX_OK;
@@ -1983,11 +1924,10 @@ TextHandle::~TextHandle() {
int gfxop_draw_text(GfxState *state, TextHandle *handle, rect_t zone) {
int line_height;
rect_t pos;
- BASIC_CHECKS(GFX_FATAL);
_gfxop_full_pointer_refresh(state);
if (!handle) {
- GFXERROR("Attempt to draw text with NULL handle!\n");
+ error("Attempt to draw text with NULL handle");
return GFX_ERROR;
}
@@ -2016,7 +1956,7 @@ int gfxop_draw_text(GfxState *state, TextHandle *handle, rect_t zone) {
break;
default:
- GFXERROR("Invalid vertical alignment %d!\n", handle->valign);
+ error("Invalid vertical alignment %d", handle->valign);
return GFX_FATAL; // Internal error...
}
@@ -2032,7 +1972,7 @@ int gfxop_draw_text(GfxState *state, TextHandle *handle, rect_t zone) {
#endif
}
if (!pxm) {
- GFXERROR("Could not find text pixmap %d/%d\n", i, handle->lines.size());
+ error("Could not find text pixmap %d/%d", i, handle->lines.size());
return GFX_ERROR;
}
@@ -2052,7 +1992,7 @@ int gfxop_draw_text(GfxState *state, TextHandle *handle, rect_t zone) {
break;
default:
- GFXERROR("Invalid vertical alignment %d!\n", handle->valign);
+ error("Invalid vertical alignment %d", handle->valign);
return GFX_FATAL; // Internal error...
}
@@ -2072,7 +2012,6 @@ int gfxop_draw_text(GfxState *state, TextHandle *handle, rect_t zone) {
gfx_pixmap_t *gfxop_grab_pixmap(GfxState *state, rect_t area) {
gfx_pixmap_t *pixmap = NULL;
rect_t resultzone; // Ignored for this application
- BASIC_CHECKS(NULL);
_gfxop_full_pointer_refresh(state);
_gfxop_scale_rect(&area, state->driver->getMode());
@@ -2084,10 +2023,9 @@ gfx_pixmap_t *gfxop_grab_pixmap(GfxState *state, rect_t area) {
int gfxop_draw_pixmap(GfxState *state, gfx_pixmap_t *pxm, rect_t zone, Common::Point pos) {
rect_t target;
- BASIC_CHECKS(GFX_ERROR);
if (!pxm) {
- GFXERROR("Attempt to draw NULL pixmap!\n");
+ error("Attempt to draw NULL pixmap");
return GFX_ERROR;
}
@@ -2098,7 +2036,7 @@ int gfxop_draw_pixmap(GfxState *state, gfx_pixmap_t *pxm, rect_t zone, Common::P
_gfxop_add_dirty(state, target);
if (!pxm) {
- GFXERROR("Attempt to draw_pixmap with pxm=NULL\n");
+ error("Attempt to draw_pixmap with pxm=NULL");
return GFX_ERROR;
}
@@ -2110,7 +2048,6 @@ int gfxop_draw_pixmap(GfxState *state, gfx_pixmap_t *pxm, rect_t zone, Common::P
}
int gfxop_free_pixmap(GfxState *state, gfx_pixmap_t *pxm) {
- BASIC_CHECKS(GFX_ERROR);
gfx_free_pixmap(pxm);
return GFX_OK;
}