[Scummvm-git-logs] scummvm master -> 5de0eb90453646d29e5d195a5150650c44acab1b
bgK
bastien.bouclet at gmail.com
Sun Sep 25 10:05:20 CEST 2016
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9a2fdf96ad MOHAWK: Use the color of the first pixel as the transparent cursor color
97f5b33fd7 MOHAWK: Always restart a sound when replacing it with the same one
5de0eb9045 MOHAWK: Fix the tower rotation line to be white instead of black
Commit: 9a2fdf96ade19b6b06e5f198dc4d3175130906f1
https://github.com/scummvm/scummvm/commit/9a2fdf96ade19b6b06e5f198dc4d3175130906f1
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2016-09-25T10:00:54+02:00
Commit Message:
MOHAWK: Use the color of the first pixel as the transparent cursor color
Fixes #9568
Changed paths:
engines/mohawk/cursors.cpp
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index 72eebca..abc1322 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -120,7 +120,11 @@ void MystCursorManager::setCursor(uint16 id) {
// Myst ME stores some cursors as 24bpp images instead of 8bpp
if (surface->format.bytesPerPixel == 1) {
- CursorMan.replaceCursor(surface->getPixels(), surface->w, surface->h, hotspotX, hotspotY, 255);
+ // The transparent color is almost always 255, except for the main cursor (100)
+ // in the D'ni archive, where it is 0.
+ // Using the color of the first pixel as the transparent color seems to always work.
+ byte transparentColor = ((byte *)surface->getPixels())[0];
+ CursorMan.replaceCursor(surface->getPixels(), surface->w, surface->h, hotspotX, hotspotY, transparentColor);
// We're using the screen palette for the original game, but we need
// to use this for any 8bpp cursor in ME.
Commit: 97f5b33fd71425aa8cb7cebecbb68f59b0e7760d
https://github.com/scummvm/scummvm/commit/97f5b33fd71425aa8cb7cebecbb68f59b0e7760d
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2016-09-25T10:02:00+02:00
Commit Message:
MOHAWK: Always restart a sound when replacing it with the same one
Fixes #9569
Changed paths:
engines/mohawk/sound.cpp
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index 0711561..2a54696 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -276,17 +276,6 @@ Audio::SoundHandle *Sound::playSound(uint16 id, byte volume, bool loop, CueList
Audio::SoundHandle *Sound::replaceSoundMyst(uint16 id, byte volume, bool loop) {
debug (0, "Replacing sound %d", id);
- // TODO: The original engine does fading
-
- Common::String name = _vm->getResourceName(ID_MSND, convertMystID(id));
-
- // Check if sound is already playing
- for (uint32 i = 0; i < _handles.size(); i++)
- if (_handles[i].type == kUsedHandle
- && _vm->_mixer->isSoundHandleActive(_handles[i].handle)
- && name.equals(_vm->getResourceName(ID_MSND, convertMystID(_handles[i].id))))
- return &_handles[i].handle;
-
// The original engine also forces looping for those sounds
switch (id) {
case 2205:
Commit: 5de0eb90453646d29e5d195a5150650c44acab1b
https://github.com/scummvm/scummvm/commit/5de0eb90453646d29e5d195a5150650c44acab1b
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2016-09-25T10:03:13+02:00
Commit Message:
MOHAWK: Fix the tower rotation line to be white instead of black
This was a regression from the default palette change.
Fixes #9567.
Changed paths:
engines/mohawk/myst_stacks/myst.cpp
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index bd50c4f..ffab55f 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -3271,7 +3271,7 @@ void Myst::towerRotationMapDrawLine(const Common::Point ¢er, const Common::P
color = pf.RGBToColor(0xFF, 0, 0); // Red
} else {
if (!_towerRotationOverSpot)
- color = 0x00; // White
+ color = 0xFF; // White
else
color = 0xF9; // Red
}
More information about the Scummvm-git-logs
mailing list