From 2617f36cb6f87c9fc05da4aebcc9fc343540eaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Andersson?= Date: Sun, 2 May 2004 15:59:06 +0000 Subject: [PATCH] Made the cursor work a bit better in IHNM. svn-id: r13749 --- saga/gfx.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/saga/gfx.cpp b/saga/gfx.cpp index 48e1d19a6a4..f3f22913af2 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -906,22 +906,22 @@ int GFX_SetPalette(R_SURFACE *surface, PALENTRY *pal) { // there is only one cursor image. if (GfxModule.white_index != best_windex) { + int white = (best_windex == 255) ? 254 : best_windex; + // Set up the mouse cursor static byte cursor_img[R_CURSOR_W * R_CURSOR_H] = { - 0, 0, 0, 255, 0, 0, 0, - 0, 0, 0, 255, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 255, 255, 0, 0, 0, 255, 255, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 0, 0, 0, - 0, 0, 0, 255, 0, 0, 0 + 255, 255, 255, 0, 255, 255, 255, + 255, 255, 255, 0, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 0, 0, 255, 255, 255, 0, 0, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 0, 255, 255, 255, + 255, 255, 255, 0, 255, 255, 255, }; for (i = 0; i < R_CURSOR_W * R_CURSOR_H; i++) { - if (cursor_img[i] == 0) - cursor_img[i] = 255; - else if (cursor_img[i] == 255) - cursor_img[i] = best_windex; + if (cursor_img[i] != 255) + cursor_img[i] = white; } _system->setMouseCursor(cursor_img, R_CURSOR_W, R_CURSOR_H, 4, 4);