From f934e0d094baedc3da39aaefbeb95e47241d30a1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 19 Aug 2019 09:54:45 +0200 Subject: HDB: Replace cursor in PPC version with the one from Win version --- engines/hdb/gfx.cpp | 62 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 5 deletions(-) (limited to 'engines/hdb') diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 635157f34f..894a35fdc7 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -85,16 +85,68 @@ Gfx::~Gfx() { delete _skyClouds; } +static const byte cursorPalette[16 * 3] = { + 0x00, 0x01, 0x00, + 0x09, 0x4E, 0xA2, + 0x42, 0x3D, 0xBE, + 0xFF, 0x00, 0xFD, + 0x00, 0x57, 0xB8, + 0x0C, 0x66, 0xCB, + 0x0D, 0x65, 0xED, + 0x01, 0x6A, 0xDE, + 0x34, 0x59, 0xF1, + 0x26, 0x5E, 0xEE, + 0x00, 0x77, 0xFA, + 0x23, 0x87, 0xFE, + 0x47, 0x94, 0xFA, + 0x69, 0xAF, 0xFC, + 0x9F, 0xCD, 0xFE, + 0xDE, 0xEE, 0xFD +}; + +static const byte cursorData[] = { + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 3, 3, 3, 3, 3, 3, 3, 0, 6, 7, 7, 7, 5, 5, 4, 4, 4, 4, 1, 1, 1, 4, 0, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 9, 7, 5, 5, 4, 4, 4, 4, 4, 1, 1, 2, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 9, 7, 4, 4, 4, 4, 4, 2, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 +}; + + void Gfx::init() { // Set the default cursor pos & char clipping setCursor(0, 0); if (g_hdb->isPPC()) { - Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor(); - - CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor()); - CursorMan.replaceCursorPalette(cursor->getPalette(), cursor->getPaletteStartIndex(), cursor->getPaletteCount()); - delete cursor; + CursorMan.replaceCursorPalette(cursorPalette, 0, 16); + CursorMan.replaceCursor(cursorData, 32, 32, 16, 16, 3); } _eLeft = 0; -- cgit v1.2.3