diff options
author | Filippos Karapetis | 2009-09-06 22:27:29 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-09-06 22:27:29 +0000 |
commit | 876a7b657fabd6722432fa3eface3137a12eb34f (patch) | |
tree | e41e5e42e4298c80ae9d4ee226aa6989dae2c60a | |
parent | f98dc19f71f008af8642704aa13cd953f05de8e0 (diff) | |
download | scummvm-rg350-876a7b657fabd6722432fa3eface3137a12eb34f.tar.gz scummvm-rg350-876a7b657fabd6722432fa3eface3137a12eb34f.tar.bz2 scummvm-rg350-876a7b657fabd6722432fa3eface3137a12eb34f.zip |
Removed the hi-color code (16bpp & 24bpp). All SCI games use up to 256 colors, so hi-color isn't really used anywhere, and it only makes the overall code more complex for no reason
svn-id: r43994
-rw-r--r-- | engines/sci/gfx/gfx_driver.cpp | 53 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_pixmap_scale.cpp | 80 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_resmgr.cpp | 1 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_support.cpp | 74 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_system.h | 8 | ||||
-rw-r--r-- | engines/sci/gfx/gfx_tools.cpp | 6 | ||||
-rw-r--r-- | engines/sci/gfx/res_pic.cpp | 7 |
7 files changed, 57 insertions, 172 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 7803fbbe11..e71081ce2c 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -52,11 +52,11 @@ GfxDriver::GfxDriver(int xfact, int yfact, Graphics::PixelFormat format) { // create the visual buffers for (i = 0; i < 2; i++) { _visual[i] = NULL; - _visual[i] = new byte[_mode->xsize * _mode->ysize * _mode->bytespp]; + _visual[i] = new byte[_mode->xsize * _mode->ysize]; if (!_visual[i]) { error("Out of memory: Could not allocate visual buffers! (%dx%d)\n", _mode->xsize, _mode->ysize); } - memset(_visual[i], 0, _mode->xsize * _mode->ysize * _mode->bytespp); + memset(_visual[i], 0, _mode->xsize * _mode->ysize); } if (_mode->palette) @@ -79,12 +79,11 @@ GfxDriver::~GfxDriver() { // Drawing operations -template<int COPY_BYTES, typename SIZETYPE, int EXTRA_BYTE_OFFSET> static void drawProc(int x, int y, int c, void *data) { GfxDriver *drv = (GfxDriver *)data; byte *p = drv->getVisual0(); - SIZETYPE col = c << (EXTRA_BYTE_OFFSET * 8); - memcpy(p + (y * 320* drv->getMode()->xfact + x) * COPY_BYTES, &col, COPY_BYTES); + uint8 col = c; + memcpy(p + (y * 320* drv->getMode()->xfact + x), &col, 1); } void GfxDriver::drawLine(Common::Point start, Common::Point end, gfx_color_t color, @@ -95,28 +94,6 @@ void GfxDriver::drawLine(Common::Point start, Common::Point end, gfx_color_t col int xsize = _mode->xsize; int ysize = _mode->ysize; - void (*modeDrawProc)(int,int,int,void*); - switch (_mode->bytespp) { - case 1: - modeDrawProc = drawProc<1, uint8, 0>; - break; - case 2: - modeDrawProc = drawProc<2, uint16, 0>; - break; - case 3: -#ifdef SCUMM_BIG_ENDIAN - modeDrawProc = drawProc<3, uint32, 1>; -#else - modeDrawProc = drawProc<3, uint32, 0>; -#endif - break; - case 4: - modeDrawProc = drawProc<4, uint32, 0>; - break; - default: - error("Invalid mode->bytespp=%d", _mode->bytespp); - } - if (color.mask & GFX_MASK_VISUAL) { Common::Point nstart, nend; @@ -128,7 +105,7 @@ void GfxDriver::drawLine(Common::Point start, Common::Point end, gfx_color_t col nend.x = CLIP<int16>(end.x + xc, 0, xsize - 1); nend.y = CLIP<int16>(end.y + yc, 0, ysize - 1); - Graphics::drawLine(nstart.x, nstart.y, nend.x, nend.y, scolor, modeDrawProc, this); + Graphics::drawLine(nstart.x, nstart.y, nend.x, nend.y, scolor, drawProc, this); if (color.mask & GFX_MASK_PRIORITY) { gfx_draw_line_pixmap_i(_priority[0], nstart, nend, color.priority); @@ -142,8 +119,8 @@ void GfxDriver::drawFilledRect(rect_t rect, gfx_color_t color1, gfx_color_t colo gfx_rectangle_fill_t shade_mode) { if (color1.mask & GFX_MASK_VISUAL) { for (int i = rect.y; i < rect.y + rect.height; i++) { - memset(_visual[0] + (i * _mode->xsize + rect.x) * _mode->bytespp, - color1.visual.parent_index, rect.width * _mode->bytespp); + memset(_visual[0] + (i * _mode->xsize + rect.x), + color1.visual.parent_index, rect.width); } } @@ -162,7 +139,7 @@ void GfxDriver::drawPixmap(gfx_pixmap_t *pxm, int priority, rect_t src, rect_t d } gfx_crossblit_pixmap(_mode, pxm, priority, src, dest, _visual[bufnr], - _mode->xsize * _mode->bytespp, + _mode->xsize, _priority[bufnr]->index_data, _priority[bufnr]->index_width, 1, 0); } @@ -180,9 +157,9 @@ void GfxDriver::grabPixmap(rect_t src, gfx_pixmap_t *pxm, gfx_map_mask_t map) { pxm->width = src.width; pxm->height = src.height; for (int i = 0; i < src.height; i++) { - memcpy(pxm->data + i * src.width * _mode->bytespp, - _visual[0] + _mode->bytespp * ((i + src.y) * _mode->xsize + src.x), - src.width * _mode->bytespp); + memcpy(pxm->data + i * src.width, + _visual[0] + ((i + src.y) * _mode->xsize + src.x), + src.width); } break; @@ -211,15 +188,15 @@ void GfxDriver::update(rect_t src, Common::Point dest, gfx_buffer_t buffer) { switch (buffer) { case GFX_BUFFER_BACK: for (int i = 0; i < src.height; i++) { - memcpy(_visual[0] + _mode->bytespp * ( (dest.y + i) * _mode->xsize + dest.x), - _visual[1] + _mode->bytespp * ( (src.y + i) * _mode->xsize + src.x), src.width * _mode->bytespp ); + memcpy(_visual[0] + ( (dest.y + i) * _mode->xsize + dest.x), + _visual[1] + ( (src.y + i) * _mode->xsize + src.x), src.width ); } if ((src.x == dest.x) && (src.y == dest.y)) gfx_copy_pixmap_box_i(_priority[0], _priority[1], src); break; case GFX_BUFFER_FRONT: { - g_system->copyRectToScreen(_visual[0] + _mode->bytespp * (src.x + src.y * _mode->xsize), _mode->xsize * _mode->bytespp, dest.x, dest.y, src.width, src.height); + g_system->copyRectToScreen(_visual[0] + (src.x + src.y * _mode->xsize), _mode->xsize, dest.x, dest.y, src.width, src.height); g_system->updateScreen(); break; } @@ -229,7 +206,7 @@ void GfxDriver::update(rect_t src, Common::Point dest, gfx_buffer_t buffer) { } void GfxDriver::setStaticBuffer(gfx_pixmap_t *pic, gfx_pixmap_t *priority) { - memcpy(_visual[1], pic->data, _mode->xsize * _mode->ysize * _mode->bytespp); + memcpy(_visual[1], pic->data, _mode->xsize * _mode->ysize); gfx_copy_pixmap_box_i(_priority[1], priority, gfx_rect(0, 0, _mode->xsize, _mode->ysize)); } diff --git a/engines/sci/gfx/gfx_pixmap_scale.cpp b/engines/sci/gfx/gfx_pixmap_scale.cpp index 865fcf3662..6131c88619 100644 --- a/engines/sci/gfx/gfx_pixmap_scale.cpp +++ b/engines/sci/gfx/gfx_pixmap_scale.cpp @@ -26,7 +26,6 @@ /* Required defines: ** FUNCNAME: Function name ** SIZETYPE: Type used for each pixel -** EXTRA_BYTE_OFFSET: Extra source byte offset for copying (used on big-endian machines in 24 bit mode) */ #include "sci/gfx/gfx_system.h" @@ -39,18 +38,14 @@ namespace Sci { // TODO: Replace this code with our common scalers (/graphics/scaler.h) -#define EXTEND_COLOR(x) (unsigned) ((((unsigned) x) << 24) | (((unsigned) x) << 16) | (((unsigned) x) << 8) | ((unsigned) x)) - -template<int COPY_BYTES, typename SIZETYPE, int EXTRA_BYTE_OFFSET> -void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) { - SIZETYPE result_colors[GFX_PIC_COLORS]; - SIZETYPE alpha_color = 0; - SIZETYPE alpha_ormask = 0xffffffff & 0; +static void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) { + byte result_colors[GFX_PIC_COLORS]; + byte alpha_color = 0; + byte alpha_ormask = 0xffffffff & 0; int xfact = (scale) ? mode->xfact : 1; int yfact = (scale) ? mode->yfact : 1; int widthc, heightc; // Width duplication counter int line_width = xfact * pxm->index_width; - int bytespp = mode->bytespp; int x, y; int i; byte byte_transparent = 0; @@ -61,23 +56,12 @@ void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale int using_alpha = pxm->color_key != GFX_PIXMAP_COLOR_KEY_NONE; int separate_alpha_map = using_alpha; - assert(bytespp == COPY_BYTES); - if (separate_alpha_map && !alpha_dest) alpha_dest = pxm->alpha_map = (byte *)malloc(pxm->index_width * xfact * pxm->index_height * yfact); // Calculate all colors - for (i = 0; i < pxm->colors_nr(); i++) { - int col; - const PaletteEntry& color = pxm->palette->getColor(i); - if (mode->palette) - col = color.parent_index; - else { - col = mode->format.ARGBToColor(0, color.r, color.g, color.b); - col |= alpha_ormask; - } - result_colors[i] = col; - } + for (i = 0; i < pxm->colors_nr(); i++) + result_colors[i] = pxm->palette->getColor(i).parent_index; if (!separate_alpha_map && pxm->color_key != GFX_PIXMAP_COLOR_KEY_NONE) result_colors[pxm->color_key] = alpha_color; @@ -89,15 +73,15 @@ void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale for (x = 0; x < pxm->index_width; x++) { int isalpha; - SIZETYPE col = result_colors[isalpha = *src++] << (EXTRA_BYTE_OFFSET * 8); + byte col = result_colors[isalpha = *src++]; isalpha = (isalpha == pxm->color_key) && using_alpha; // O(n) loops. There is an O(ln(n)) algorithm for this, but its slower for small n (which we're optimizing for here). // And, anyway, most of the time is spent in memcpy() anyway. for (widthc = 0; widthc < xfact; widthc++) { - memcpy(dest, &col, COPY_BYTES); - dest += COPY_BYTES; + memcpy(dest, &col, 1); + dest++; } if (separate_alpha_map) { // Set separate alpha map @@ -109,42 +93,14 @@ void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale // Copies each line. O(n) iterations; again, this could be optimized to O(ln(n)) for very high resolutions, // but that wouldn't really help that much, as the same amount of data still would have to be transferred. for (heightc = 1; heightc < yfact; heightc++) { - memcpy(dest, prev_dest, line_width * bytespp); - dest += line_width * bytespp; + memcpy(dest, prev_dest, line_width); + dest += line_width; if (separate_alpha_map) { memcpy(alpha_dest, prev_alpha_dest, line_width); alpha_dest += line_width; } } } -} - -static void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) { - switch (mode->bytespp) { - - case 1: - _gfx_xlate_pixmap_unfiltered<1, uint8, 0>(mode, pxm, scale); - break; - - case 2: - _gfx_xlate_pixmap_unfiltered<2, uint16, 0>(mode, pxm, scale); - break; - - case 3: -#ifdef SCUMM_BIG_ENDIAN - _gfx_xlate_pixmap_unfiltered<3, uint32, 1>(mode, pxm, scale); -#else - _gfx_xlate_pixmap_unfiltered<3, uint32, 0>(mode, pxm, scale); -#endif - break; - - case 4: - _gfx_xlate_pixmap_unfiltered<4, uint32, 0>(mode, pxm, scale); - break; - - default: - error("Invalid mode->bytespp=%d", mode->bytespp); - } if (pxm->flags & GFX_PIXMAP_FLAG_SCALED_INDEX) { pxm->width = pxm->index_width; @@ -157,24 +113,18 @@ static void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, in void gfx_xlate_pixmap(gfx_pixmap_t *pxm, gfx_mode_t *mode) { - int was_allocated = 0; - - if (mode->palette) { - if (pxm->palette && pxm->palette != mode->palette) - pxm->palette->mergeInto(mode->palette); - } - + if (pxm->palette && pxm->palette != mode->palette) + pxm->palette->mergeInto(mode->palette); if (!pxm->data) { - pxm->data = (byte*)malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height * mode->bytespp + 1); + pxm->data = (byte*)malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height + 1); // +1: Eases coying on BE machines in 24 bpp packed mode // Assume that memory, if allocated already, will be sufficient // Allocate alpha map if (pxm->colors_nr() < GFX_PIC_COLORS) pxm->alpha_map = (byte*)malloc(mode->xfact * mode->yfact * pxm->index_width * pxm->index_height + 1); - } else - was_allocated = 1; + } _gfx_xlate_pixmap_unfiltered(mode, pxm, !(pxm->flags & GFX_PIXMAP_FLAG_SCALED_INDEX)); diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index 258764ca2b..17b5b4e3ed 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -314,7 +314,6 @@ static gfxr_pic_t *gfxr_pic_xlate_common(gfx_resource_t *res, int maps, int scal gfx_mode_t mode_1x1_color_index = { /* Fake 1x1 mode */ /* xfact */ 1, /* yfact */ 1, /* xsize */ 1, /* ysize */ 1, - /* bytespp */ 1, /* palette */ NULL, Graphics::PixelFormat() diff --git a/engines/sci/gfx/gfx_support.cpp b/engines/sci/gfx/gfx_support.cpp index 4f247e2cb1..945dabec0e 100644 --- a/engines/sci/gfx/gfx_support.cpp +++ b/engines/sci/gfx/gfx_support.cpp @@ -124,16 +124,11 @@ void gfx_draw_box_pixmap_i(gfx_pixmap_t *pxm, rect_t box, int color) { } -/* Template parameters: - * BYTESPP: Bytes per pixel - * USE_PRIORITY: Whether to care about the priority buffer - */ -template <int BYTESPP, bool USE_PRIORITY> void _gfx_crossblit(byte *dest, byte *src, int bytes_per_dest_line, int bytes_per_src_line, int xl, int yl, byte *alpha, int bytes_per_alpha_line, int bytes_per_alpha_pixel, unsigned int alpha_test_mask, unsigned int alpha_min, - byte *priority_buffer, int bytes_per_priority_line, int bytes_per_priority_pixel, int priority - ) { + byte *priority_buffer, int bytes_per_priority_line, int bytes_per_priority_pixel, int priority, + bool usePriority) { int x, y; int alpha_end = xl * bytes_per_alpha_pixel; @@ -145,46 +140,32 @@ void _gfx_crossblit(byte *dest, byte *src, int bytes_per_dest_line, int bytes_pe for (x = 0; x < alpha_end; x += bytes_per_alpha_pixel) { if (((alpha_test_mask & alpha[x]) < alpha_min) ^ 1) { - if (USE_PRIORITY) { + if (usePriority) { if (priority_buffer[priority_offset] <= priority) { priority_buffer[priority_offset] = priority; - memcpy(dest + pixel_offset, src + pixel_offset, BYTESPP); + memcpy(dest + pixel_offset, src + pixel_offset, 1); } } else { - memcpy(dest + pixel_offset, src + pixel_offset, BYTESPP); + memcpy(dest + pixel_offset, src + pixel_offset, 1); } } - pixel_offset += BYTESPP; + pixel_offset++; alpha_offset += bytes_per_alpha_pixel; - if (USE_PRIORITY) + if (usePriority) priority_offset += bytes_per_priority_pixel; } dest += bytes_per_dest_line; src += bytes_per_src_line; alpha += bytes_per_alpha_line; - if (USE_PRIORITY) + if (usePriority) priority_buffer += bytes_per_priority_line; } } -static void (*crossblit_fns[5])(byte *, byte *, int, int, int, int, byte *, int, int, unsigned int, unsigned int, byte *, int, int, int) = { NULL, - _gfx_crossblit<1, false>, - _gfx_crossblit<2, false>, - _gfx_crossblit<3, false>, - _gfx_crossblit<4, false> -}; - -static void (*crossblit_fns_P[5])(byte *, byte *, int, int, int, int, byte *, int, int, unsigned int, unsigned int, byte *, int, int, int) = { NULL, - _gfx_crossblit<1, true>, - _gfx_crossblit<2, true>, - _gfx_crossblit<3, true>, - _gfx_crossblit<4, true> -}; - -void _gfx_crossblit_simple(byte *dest, byte *src, int dest_line_width, int src_line_width, int xl, int yl, int bpp) { - int line_width = xl * bpp; +void _gfx_crossblit_simple(byte *dest, byte *src, int dest_line_width, int src_line_width, int xl, int yl) { + int line_width = xl; int i; for (i = 0; i < yl; i++) { @@ -202,9 +183,6 @@ void gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rec byte *alpha = pxm->alpha_map ? pxm->alpha_map : pxm->data; byte *priority_pos = priority_dest; unsigned int alpha_mask, alpha_min; - int bpp = mode->bytespp; - int bytes_per_alpha_pixel = bpp; - int bytes_per_alpha_line = bytes_per_alpha_pixel * pxm->width; int xl = pxm->width, yl = pxm->height; int xoffset = (dest_coords.x < 0) ? - dest_coords.x : 0; int yoffset = (dest_coords.y < 0) ? - dest_coords.y : 0; @@ -240,7 +218,7 @@ void gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rec // Set x offsets if (!(flags & GFX_CROSSBLIT_FLAG_DATA_IS_HOMED)) - dest += dest_coords.x * bpp; + dest += dest_coords.x; priority_pos += dest_coords.x * priority_skip; // Set y offsets @@ -251,15 +229,15 @@ void gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rec // Set source offsets if (xoffset += src_coords.x) { dest_coords.x = 0; - src += xoffset * bpp; - alpha += xoffset * bytes_per_alpha_pixel; + src += xoffset; + alpha += xoffset; } if (yoffset += src_coords.y) { dest_coords.y = 0; - src += yoffset * bpp * pxm->width; - alpha += yoffset * bytes_per_alpha_line; + src += yoffset * pxm->width; + alpha += yoffset * pxm->width; } // Adjust length for clip box @@ -307,25 +285,17 @@ void gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rec alpha_min = 255 - alpha_min; // Since we use it for the reverse effect if (!alpha_mask) - _gfx_crossblit_simple(dest, src, dest_line_width, pxm->width * bpp, xl, yl, bpp); + _gfx_crossblit_simple(dest, src, dest_line_width, pxm->width, xl, yl); else if (priority == GFX_NO_PRIORITY) { - if (bpp > 0 && bpp < 5) - crossblit_fns[bpp](dest, src, dest_line_width, pxm->width * bpp, - xl, yl, alpha, bytes_per_alpha_line, bytes_per_alpha_pixel, alpha_mask, alpha_min, - 0, 0, 0, 0); - else { - error("Invalid mode->bytespp: %d", mode->bytespp); - } + _gfx_crossblit(dest, src, dest_line_width, pxm->width, + xl, yl, alpha, pxm->width, 1, alpha_mask, alpha_min, + 0, 0, 0, 0, false); } else { // priority - if (bpp > 0 && bpp < 5) - crossblit_fns_P[bpp](dest, src, dest_line_width, pxm->width * bpp, - xl, yl, alpha, bytes_per_alpha_line, bytes_per_alpha_pixel, alpha_mask, alpha_min, - priority_pos, priority_line_width, priority_skip, priority); - else { - error("Invalid mode->bytespp: %d", mode->bytespp); - } + _gfx_crossblit(dest, src, dest_line_width, pxm->width, + xl, yl, alpha, pxm->width, 1, alpha_mask, alpha_min, + priority_pos, priority_line_width, priority_skip, priority, true); } } diff --git a/engines/sci/gfx/gfx_system.h b/engines/sci/gfx/gfx_system.h index 9bc2c82605..c9fe627b14 100644 --- a/engines/sci/gfx/gfx_system.h +++ b/engines/sci/gfx/gfx_system.h @@ -61,7 +61,6 @@ struct gfx_mode_t { int xfact, yfact; /**< Horizontal and vertical scaling factors */ int xsize, ysize; /**< Horizontal and vertical size */ - int bytespp; /**< Bytes per pixel */ /** * Palette or NULL to indicate non-palette mode. @@ -272,13 +271,6 @@ enum gfx_rectangle_fill_t { GFX_SHADE_HORIZONTALLY /**< Shade horizontally */ }; - -enum gfx_color_mode_t { - GFX_COLOR_MODE_AUTO = 0, /**< Auto-detect- handled by the gfxop library */ - GFX_COLOR_MODE_INDEX = 1, /**< Index mode */ - GFX_COLOR_MODE_HIGH = 2, /**< High color mode (15bpp or 16 bpp) */ - GFX_COLOR_MODE_TRUE = 4 /**< True color mode (24 bpp padded to 32 bpp) */ -}; /** @} */ } // End of namespace Sci diff --git a/engines/sci/gfx/gfx_tools.cpp b/engines/sci/gfx/gfx_tools.cpp index 4beecf38f2..2a6550598e 100644 --- a/engines/sci/gfx/gfx_tools.cpp +++ b/engines/sci/gfx/gfx_tools.cpp @@ -48,7 +48,6 @@ gfx_mode_t *gfx_new_mode(int xfact, int yfact, const Graphics::PixelFormat &form mode->xfact = xfact; mode->yfact = yfact; - mode->bytespp = format.bytesPerPixel; mode->format = format; mode->palette = palette; @@ -56,8 +55,7 @@ gfx_mode_t *gfx_new_mode(int xfact, int yfact, const Graphics::PixelFormat &form } void gfx_free_mode(gfx_mode_t *mode) { - if (mode->palette) - mode->palette->free(); + mode->palette->free(); free(mode); mode = NULL; } @@ -183,7 +181,7 @@ gfx_pixmap_t *gfx_pixmap_alloc_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode) { pixmap->height = pixmap->index_height * mode->yfact; } - size = pixmap->width * pixmap->height * mode->bytespp; + size = pixmap->width * pixmap->height; if (!size) size = 1; diff --git a/engines/sci/gfx/res_pic.cpp b/engines/sci/gfx/res_pic.cpp index bed677206e..adf2bf1c2c 100644 --- a/engines/sci/gfx/res_pic.cpp +++ b/engines/sci/gfx/res_pic.cpp @@ -1116,7 +1116,7 @@ static void view_transparentize(gfx_pixmap_t *view, gfx_pixmap_t *background, in } extern gfx_pixmap_t *gfxr_draw_cel0(int id, int loop, int cel, byte *resource, int size, gfxr_view_t *view, int mirrored); -extern void _gfx_crossblit_simple(byte *dest, byte *src, int dest_line_width, int src_line_width, int xl, int yl, int bpp); +extern void _gfx_crossblit_simple(byte *dest, byte *src, int dest_line_width, int src_line_width, int xl, int yl); void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, byte *resource, gfxr_pic0_params_t *style, int resid, ViewType viewType, Palette *static_pal, Common::Rect portBounds) { @@ -1509,7 +1509,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, _gfx_crossblit_simple(pic->visual_map->index_data + (titlebar_size * 320) + posy * 320 + posx, view->index_data, pic->visual_map->index_width, view->index_width, - view->index_width, view->index_height, 1); + view->index_width, view->index_height); gfx_free_pixmap(view); view = NULL; @@ -1616,8 +1616,7 @@ void gfxr_draw_pic11(gfxr_pic_t *pic, int flags, int default_palette, int size, view->index_data, pic->visual_map->index_width, view->index_width, view->index_width, - view->index_height, - 1); + view->index_height); } else { warning("[GFX] No view was contained in SCI1.1 pic resource"); } |