aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/operations.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-25 02:36:51 +0000
committerFilippos Karapetis2009-10-25 02:36:51 +0000
commit452ae8a5769142a934676b7fdc721910e12aaf5e (patch)
treef1fe820946807350c94bba4a9a061c380b0a7755 /engines/sci/gfx/operations.cpp
parent9b6f2be526f8fee3c2451d2f180f70ee4e976f4e (diff)
downloadscummvm-rg350-452ae8a5769142a934676b7fdc721910e12aaf5e.tar.gz
scummvm-rg350-452ae8a5769142a934676b7fdc721910e12aaf5e.tar.bz2
scummvm-rg350-452ae8a5769142a934676b7fdc721910e12aaf5e.zip
Cleanup
svn-id: r45366
Diffstat (limited to 'engines/sci/gfx/operations.cpp')
-rw-r--r--engines/sci/gfx/operations.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp
index 1d914ac1c2..0a51004f1d 100644
--- a/engines/sci/gfx/operations.cpp
+++ b/engines/sci/gfx/operations.cpp
@@ -131,7 +131,7 @@ static void _gfxop_grab_pixmap(GfxState *state, gfx_pixmap_t **pxmp, int x, int
*pxmp = gfx_new_pixmap(unscaled_xl, unscaled_yl, GFX_RESID_NONE, 0, 0);
else
if (xl * yl > (*pxmp)->width * (*pxmp)->height) {
- gfx_pixmap_free_data(*pxmp);
+ free((*pxmp)->data);
(*pxmp)->data = NULL;
}
@@ -514,19 +514,6 @@ void gfxop_set_color(GfxState *state, gfx_color_t *colorOut, gfx_color_t &colorI
(colorIn.mask & GFX_MASK_CONTROL) ? colorIn.control : -1);
}
-void gfxop_set_system_color(GfxState *state, unsigned int index, gfx_color_t *color) {
- if (index >= SCREEN_PALETTE->size()) {
- error("Attempt to set invalid color index %02x as system color", color->visual.getParentIndex());
- }
-
- SCREEN_PALETTE->makeSystemColor(index, color->visual);
-}
-
-void gfxop_free_color(GfxState *state, gfx_color_t *color) {
- // FIXME: implement. (And call in the appropriate places!)
-}
-
-
// Generic drawing operations
static int line_check_bar(int *start, int *length, int clipstart, int cliplength) {
@@ -1460,12 +1447,7 @@ void gfxop_get_text_params(GfxState *state, int font_nr, const char *text, int m
if (!font)
error("Attempt to calculate text size with invalid font #%d", font_nr);
-#ifdef CUSTOM_GRAPHICS_OPTIONS
- textsplits = gfxr_font_calculate_size(fragments, font, maxwidth, text, width, height, lineheight, lastline_width,
- (state->options->workarounds & GFX_WORKAROUND_WHITESPACE_COUNT) | text_flags);
-#else
textsplits = gfxr_font_calculate_size(fragments, font, maxwidth, text, width, height, lineheight, lastline_width, text_flags);
-#endif
if (!textsplits)
error("Could not calculate text size");
@@ -1498,15 +1480,8 @@ TextHandle *gfxop_new_text(GfxState *state, int font_nr, const Common::String &t
handle->valign = valign;
handle->line_height = font->line_height;
- bool result;
-#ifdef CUSTOM_GRAPHICS_OPTIONS
- result = gfxr_font_calculate_size(handle->lines, font, maxwidth, handle->_text.c_str(), &(handle->width), &(handle->height),
- NULL, NULL, ((state->options->workarounds & GFX_WORKAROUND_WHITESPACE_COUNT) ?
- kFontCountWhitespace : 0) | flags);
-#else
- result = gfxr_font_calculate_size(handle->lines, font, maxwidth, handle->_text.c_str(), &(handle->width), &(handle->height),
+ bool result = gfxr_font_calculate_size(handle->lines, font, maxwidth, handle->_text.c_str(), &(handle->width), &(handle->height),
NULL, NULL, flags);
-#endif
if (!result) {
error("Could not calculate text parameters in font #%d", font_nr);