[Scummvm-git-logs] scummvm master -> 55e70ae1590838512a346ea7e8b072dd99492aa1
neuromancer
noreply at scummvm.org
Fri Jan 24 07:00:52 UTC 2025
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:
ff7aaf3d7f FREESCAPE: fix font rendering in dark for atari
d874e7ba2d FREESCAPE: completed loading of assets data in dark for amiga
55e70ae159 FREESCAPE: allow to play dark music theme, if available
Commit: ff7aaf3d7f1606dde07b981105144873475185e0
https://github.com/scummvm/scummvm/commit/ff7aaf3d7f1606dde07b981105144873475185e0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-01-24T07:59:24+01:00
Commit Message:
FREESCAPE: fix font rendering in dark for atari
Changed paths:
engines/freescape/games/dark/amiga.cpp
engines/freescape/games/dark/atari.cpp
diff --git a/engines/freescape/games/dark/amiga.cpp b/engines/freescape/games/dark/amiga.cpp
index 1771cb09c22..04e95e96099 100644
--- a/engines/freescape/games/dark/amiga.cpp
+++ b/engines/freescape/games/dark/amiga.cpp
@@ -46,27 +46,30 @@ void DarkEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
uint32 transparent = _gfx->_texturePixelFormat.ARGBToColor(0x00, 0x00, 0x00, 0x00);
uint32 grey = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x60, 0x60, 0x60);
+ uint32 grey8 = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x88, 0x88, 0x88);
+ uint32 greyA = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xAA, 0xAA, 0xAA);
+
int score = _gameStateVars[k8bitVariableScore];
int ecds = _gameStateVars[kVariableActiveECDs];
- drawString(kDarkFontSmall, Common::String::format("%04d", int(2 * _position.x())), 18, 178, red, red, black, surface);
- drawString(kDarkFontSmall, Common::String::format("%04d", int(2 * _position.z())), 18, 184, red, red, black, surface);
- drawString(kDarkFontSmall, Common::String::format("%04d", int(2 * _position.y())), 18, 190, red, red, black, surface);
+ drawString(kDarkFontSmall, Common::String::format("%04d", int(2 * _position.x())), 19, 178, red, red, black, surface);
+ drawString(kDarkFontSmall, Common::String::format("%04d", int(2 * _position.z())), 19, 184, red, red, black, surface);
+ drawString(kDarkFontSmall, Common::String::format("%04d", int(2 * _position.y())), 19, 190, red, red, black, surface);
drawString(kDarkFontBig, Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), 73, 178, red, red, black, surface);
drawString(kDarkFontBig, Common::String::format("%3d", _playerSteps[_playerStepIndex]), 73, 186, red, red, black, surface);
- drawString(kDarkFontBig, Common::String::format("%07d", score), 93, 16, yellow, orange, black, surface);
- drawString(kDarkFontBig, Common::String::format("%3d%%", ecds), 181, 16, yellow, orange, black, surface);
+ drawString(kDarkFontBig, Common::String::format("%07d", score), 93, 16, orange, yellow, black, surface);
+ drawString(kDarkFontBig, Common::String::format("%3d%%", ecds), 181, 16, orange, yellow, black, surface);
Common::String message;
int deadline;
getLatestMessages(message, deadline);
if (deadline <= _countdown) {
- drawString(kDarkFontSmall, message, 32, 157, white, white, transparent, surface);
+ drawString(kDarkFontSmall, message, 32, 157, grey8, greyA, transparent, surface);
_temporaryMessages.push_back(message);
_temporaryMessageDeadlines.push_back(deadline);
}
- drawString(kDarkFontSmall, _currentArea->_name, 32, 151, white, white, transparent, surface);
+ drawString(kDarkFontSmall, _currentArea->_name, 32, 151, grey8, greyA, transparent, surface);
drawBinaryClock(surface, 6, 110, white, grey);
int x = 229;
diff --git a/engines/freescape/games/dark/atari.cpp b/engines/freescape/games/dark/atari.cpp
index b70f396f8ff..e461e1f7ccf 100644
--- a/engines/freescape/games/dark/atari.cpp
+++ b/engines/freescape/games/dark/atari.cpp
@@ -60,13 +60,13 @@ void DarkEngine::loadAssetsAtariFullGame() {
_border = loadAndConvertNeoImage(stream, 0xd710);
Common::Array<Graphics::ManagedSurface *> chars;
- chars = getCharsAmigaAtari(stream, 0xd06a, 85);
+ chars = getCharsAmigaAtariInternal(8, 8, - 7 - 8, 16, 16, stream, 0xd06a, 85);
_fontBig = Font(chars);
chars = getCharsAmigaAtariInternal(8, 8, 0, 10, 8, stream, 0xd49a, 85);
_fontMedium = Font(chars);
- chars = getCharsAmigaAtariInternal(8, 5, 0, 10, 16, stream, 0xd49a, 85);
+ chars = getCharsAmigaAtariInternal(8, 5, - 7 - 8, 10, 16, stream, 0xd49a, 85);
_fontSmall = Font(chars);
_fontSmall.setCharWidth(4);
Commit: d874e7ba2d4d040abbfad2792767f63e111da663
https://github.com/scummvm/scummvm/commit/d874e7ba2d4d040abbfad2792767f63e111da663
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-01-24T07:59:24+01:00
Commit Message:
FREESCAPE: completed loading of assets data in dark for amiga
Changed paths:
engines/freescape/games/dark/amiga.cpp
diff --git a/engines/freescape/games/dark/amiga.cpp b/engines/freescape/games/dark/amiga.cpp
index 04e95e96099..31e337664cb 100644
--- a/engines/freescape/games/dark/amiga.cpp
+++ b/engines/freescape/games/dark/amiga.cpp
@@ -26,7 +26,14 @@
namespace Freescape {
+extern Common::String centerAndPadString(const Common::String &str, int size);
+
void DarkEngine::loadAssetsAmigaFullGame() {
+ Common::File file;
+ file.open("0.drk");
+ _title = loadAndConvertNeoImage(&file, 0x9930);
+ file.close();
+
Common::SeekableReadStream *stream = decryptFileAmigaAtari("1.drk", "0.drk", 798);
parseAmigaAtariHeader(stream);
@@ -35,6 +42,45 @@ void DarkEngine::loadAssetsAmigaFullGame() {
loadPalettes(stream, 0x2e528);
loadGlobalObjects(stream, 0x30f0 - 50, 24);
loadMessagesVariableSize(stream, 0x3d37, 66);
+ loadSoundsFx(stream, 0x34738 + 2, 11);
+
+ Common::Array<Graphics::ManagedSurface *> chars;
+ chars = getCharsAmigaAtariInternal(8, 8, - 7 - 8, 16, 16, stream, 0x1b0bc, 85);
+ _fontBig = Font(chars);
+
+ chars = getCharsAmigaAtariInternal(8, 8, 0, 10, 8, stream, 0x1b0bc + 0x430, 85);
+ _fontMedium = Font(chars);
+
+ chars = getCharsAmigaAtariInternal(8, 5, - 7 - 8, 10, 16, stream, 0x1b0bc + 0x430, 85);
+ _fontSmall = Font(chars);
+ _fontSmall.setCharWidth(4);
+
+ _fontLoaded = true;
+
+ GeometricObject *obj = nullptr;
+ obj = (GeometricObject *)_areaMap[15]->objectWithID(18);
+ assert(obj);
+ obj->_cyclingColors = true;
+
+ obj = (GeometricObject *)_areaMap[15]->objectWithID(26);
+ assert(obj);
+ obj->_cyclingColors = true;
+
+ for (int i = 0; i < 3; i++) {
+ int16 id = 227 + i * 6 - 2;
+ for (int j = 0; j < 2; j++) {
+ //debugC(1, kFreescapeDebugParser, "Restoring object %d to from ECD %d", id, index);
+ obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
+ assert(obj);
+ obj->_cyclingColors = true;
+ id--;
+ }
+ }
+
+ for (auto &area : _areaMap) {
+ // Center and pad each area name so we do not have to do it at each frame
+ area._value->_name = centerAndPadString(area._value->_name, 26);
+ }
}
void DarkEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
Commit: 55e70ae1590838512a346ea7e8b072dd99492aa1
https://github.com/scummvm/scummvm/commit/55e70ae1590838512a346ea7e8b072dd99492aa1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-01-24T07:59:24+01:00
Commit Message:
FREESCAPE: allow to play dark music theme, if available
Changed paths:
engines/freescape/games/dark/dark.cpp
engines/freescape/sound.cpp
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 990993b524c..c2bf08dc266 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -265,6 +265,8 @@ void DarkEngine::initGameState() {
getTimeFromCountdown(seconds, minutes, hours);
_lastMinute = minutes;
_lastTenSeconds = seconds / 10;
+ // Start playing music, if any, in any supported format
+ playMusic("Dark Side Theme");
}
void DarkEngine::loadAssets() {
diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index def35d5de9b..32507952ee2 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -411,6 +411,7 @@ void FreescapeEngine::playMusic(const Common::Path &filename) {
Audio::SeekableAudioStream *stream = nullptr;
stream = Audio::SeekableAudioStream::openStreamFile(filename);
if (stream) {
+ _mixer->stopHandle(_musicHandle);
Audio::LoopingAudioStream *loop = new Audio::LoopingAudioStream(stream, 0);
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, loop);
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, Audio::Mixer::kMaxChannelVolume / 10);
@@ -452,7 +453,7 @@ void FreescapeEngine::stopAllSounds() {
void FreescapeEngine::waitForSounds() {
if (_usePrerecordedSounds || isAmiga() || isAtariST())
- while (_mixer->isSoundIDActive(-1))
+ while (_mixer->isSoundHandleActive(_soundFxHandle))
g_system->delayMillis(10);
else {
while (!_speaker->endOfStream())
@@ -462,7 +463,7 @@ void FreescapeEngine::waitForSounds() {
bool FreescapeEngine::isPlayingSound() {
if (_usePrerecordedSounds || isAmiga() || isAtariST())
- return _mixer->isSoundIDActive(-1);
+ return _mixer->isSoundHandleActive(_soundFxHandle);
return (!_speaker->endOfStream());
}
More information about the Scummvm-git-logs
mailing list