mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 08:17:40 +00:00
Set a cursor palette for the classic theme, as well. Otherwise we'll get the
wrong colours in many games. svn-id: r22540
This commit is contained in:
parent
87ee8db10d
commit
22fb1e48ef
@ -146,6 +146,17 @@ void NewGui::runLoop() {
|
||||
int i;
|
||||
bool useStandardCurs = !_theme->ownCursor();
|
||||
|
||||
if (useStandardCurs) {
|
||||
const byte palette[] = {
|
||||
255, 255, 255, 0,
|
||||
255, 255, 255, 0,
|
||||
171, 171, 171, 0,
|
||||
87, 87, 87, 0
|
||||
};
|
||||
|
||||
_system->setCursorPalette(palette, 0, 4);
|
||||
}
|
||||
|
||||
while (!_dialogStack.empty() && activeDialog == _dialogStack.top()) {
|
||||
activeDialog->handleTickle();
|
||||
|
||||
@ -305,21 +316,17 @@ void NewGui::closeTopDialog() {
|
||||
_needRedraw = true;
|
||||
}
|
||||
|
||||
//
|
||||
// Draw the mouse cursor (animated). This is mostly ripped from the cursor code in gfx.cpp
|
||||
// We could plug in a different cursor here if we like to.
|
||||
//
|
||||
// Draw the mouse cursor (animated). This is pretty much the same as in old
|
||||
// SCUMM games, but the code no longer resembles what we have in cursor.cpp
|
||||
// very much. We could plug in a different cursor here if we like to.
|
||||
|
||||
void NewGui::animateCursor() {
|
||||
int time = _system->getMillis();
|
||||
if (time > _cursorAnimateTimer + kCursorAnimateDelay) {
|
||||
const byte colors[4] = { 15, 15, 7, 8 };
|
||||
const byte color = colors[_cursorAnimateCounter];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 15; i++) {
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if ((i < 6) || (i > 8)) {
|
||||
_cursor[16 * 7 + i] = color;
|
||||
_cursor[16 * i + 7] = color;
|
||||
_cursor[16 * 7 + i] = _cursorAnimateCounter;
|
||||
_cursor[16 * i + 7] = _cursorAnimateCounter;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user