mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
NES cursor fixes from Quitetust. No need to use separate palette.
svn-id: r17170
This commit is contained in:
parent
1abab50123
commit
ed45ee5a05
@ -108,7 +108,7 @@ void ScummEngine_v6::setCursorTransparency(int a) {
|
||||
void ScummEngine::updateCursor() {
|
||||
_system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height,
|
||||
_cursor.hotspotX, _cursor.hotspotY,
|
||||
(_features & GF_NES ? 0x40 : 255),
|
||||
(_features & GF_NES ? _grabbedCursor[63] : 255),
|
||||
(_heversion == 70 ? 2 : 1));
|
||||
}
|
||||
|
||||
@ -344,15 +344,13 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
|
||||
|
||||
byte *dst = _grabbedCursor;
|
||||
byte *src = &_NESCostumeGfx[0][0xfa * 16];
|
||||
byte *palette = getResourceAddress(rtCostume, 35) + 2;
|
||||
|
||||
// Cursor uses colors 0-2, which are differ from room to room
|
||||
// Instead of remapping, we shift it 0x40 colors up (beyond NES
|
||||
// palette) and specify those colors in setupNESPalette()
|
||||
for (i = 0; i < 8; i++) {
|
||||
byte c0 = src[i];
|
||||
byte c1 = src[i + 8];
|
||||
for (j = 0; j < 8; j++)
|
||||
*dst++ = ((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) + 0x40;
|
||||
*dst++ = palette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) | ((idx == 3) ? 4 : 0)];
|
||||
}
|
||||
|
||||
} else if (_version <= 2) {
|
||||
|
@ -97,11 +97,6 @@ void ScummEngine::setupNESPalette() {
|
||||
setPalColor(0x3D,0x00,0x00,0x00);
|
||||
setPalColor(0x3E,0x00,0x00,0x00);
|
||||
setPalColor(0x3F,0x00,0x00,0x00);
|
||||
|
||||
// We use it for cursor. 0x40 is transparent
|
||||
setPalColor(0x40, 0x00, 0x00, 0x00);
|
||||
setPalColor(0x41, 0x00, 0x00, 0x00);
|
||||
setPalColor(0x42, 0xff, 0xff, 0xff);
|
||||
}
|
||||
|
||||
void ScummEngine::setupAmigaPalette() {
|
||||
|
Loading…
Reference in New Issue
Block a user