From b093511239401c5d64d6b21c0b875d5be6e5f239 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 4 Jul 2009 16:30:20 +0000 Subject: - Merged the "early" and "late" SCI1 versions - these are functionally equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early") - Cleanup of the vocabulary setting functions - Cleanup of the cursor manipulation code svn-id: r42097 --- engines/sci/gfx/gfx_resmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/gfx') diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index 0ec27ae41a..1289997721 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -534,7 +534,7 @@ gfxr_view_t *GfxResManager::getView(int nr, int *loop, int *cel, int palette) { view = gfxr_draw_view0(resid, viewRes->data, viewRes->size, -1); else if (_version == SCI_VERSION_01 || !_isVGA) view = gfxr_draw_view0(resid, viewRes->data, viewRes->size, palette); - else if (_version >= SCI_VERSION_01_VGA && _version <= SCI_VERSION_1_LATE) + else if (_version >= SCI_VERSION_01_VGA && _version <= SCI_VERSION_1) view = gfxr_draw_view1(resid, viewRes->data, viewRes->size, _staticPalette, false); else if (_version >= SCI_VERSION_1_1) view = gfxr_draw_view1(resid, viewRes->data, viewRes->size, 0, true); -- cgit v1.2.3 From 177891a0c1b0a6b03e03b2a81520a1f51ff3ee00 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 4 Jul 2009 17:39:43 +0000 Subject: Cursors without a palette are now initialized correctly (from patch #2816652). Fixes the cursor transparent color in QFG3 svn-id: r42099 --- engines/sci/gfx/gfx_driver.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/sci/gfx') diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 3420472943..c665eef3b8 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -257,15 +257,14 @@ int GfxDriver::setPointer(gfx_pixmap_t *pointer, Common::Point *hotspot) { } else { byte *cursorData = createCursor(pointer); - // FIXME: The palette size check is a workaround for cursors using non-palette colour GFX_CURSOR_TRANSPARENT - // Note that some cursors don't have a palette in SQ5 + // FIXME: The palette size check is a workaround for cursors using non-palette color GFX_CURSOR_TRANSPARENT + // Note that some cursors don't have a palette (e.g. in SQ5 and QFG3) byte color_key = GFX_CURSOR_TRANSPARENT; if ((pointer->color_key != GFX_PIXMAP_COLOR_KEY_NONE) && (pointer->palette && (unsigned int)pointer->color_key < pointer->palette->size())) color_key = pointer->palette->getColor(pointer->color_key).parent_index; - // Some cursors in SQ5 don't have a palette. The cursor palette seems to use 64 colors, so setting the color key to 63 works - // TODO: Is this correct? + // Some cursors don't have a palette, so we set the color key directly if (!pointer->palette) - color_key = 63; + color_key = pointer->color_key; CursorMan.replaceCursor(cursorData, pointer->width, pointer->height, hotspot->x, hotspot->y, color_key); CursorMan.showMouse(true); -- cgit v1.2.3