[Scummvm-git-logs] scummvm master -> a7e04266e51018a4908e893a5b131c518f44df6a
neuromancer
noreply at scummvm.org
Tue Aug 1 05:56:51 UTC 2023
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9ba48ec7a4 FREESCAPE: improved group parsing in amiga/atari
11e82b7e8b FREESCAPE: added ecd indicator for zx release of dark
d4cb716963 FREESCAPE: fixed position of text in zx releases of dark
085272d533 FREESCAPE: fixed border in fullscreen messages for dark
c423d3eda3 FREESCAPE: missing message in the info screen in driller
a7e04266e5 FREESCAPE: initial implementation of info menu for dark
Commit: 9ba48ec7a41ace7cfb64b6d3e741545188965281
https://github.com/scummvm/scummvm/commit/9ba48ec7a41ace7cfb64b6d3e741545188965281
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-01T07:58:40+02:00
Commit Message:
FREESCAPE: improved group parsing in amiga/atari
Changed paths:
engines/freescape/loaders/8bitBinaryLoader.cpp
diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index 5607807b0dc..0e6d9eb4058 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -303,7 +303,7 @@ Object *FreescapeEngine::load8bitObject(Common::SeekableReadStream *file) {
while(--byteSizeOfObject > 0)
if (isAmiga() || isAtariST()) {
uint16 field = file->readUint16BE();
- groupDataArray.push_back(field >> 8);
+ assert((field >> 8) == 0);
groupDataArray.push_back(field & 0xff);
} else
groupDataArray.push_back(readField(file, 8));
Commit: 11e82b7e8b1962fc745a214aee2940c5b93afeb7
https://github.com/scummvm/scummvm/commit/11e82b7e8b1962fc745a214aee2940c5b93afeb7
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-01T07:58:40+02:00
Commit Message:
FREESCAPE: added ecd indicator for zx release of dark
Changed paths:
engines/freescape/games/dark/zx.cpp
diff --git a/engines/freescape/games/dark/zx.cpp b/engines/freescape/games/dark/zx.cpp
index 7d540bb7dc8..09e98327d4b 100644
--- a/engines/freescape/games/dark/zx.cpp
+++ b/engines/freescape/games/dark/zx.cpp
@@ -22,6 +22,7 @@
#include "common/file.h"
#include "freescape/freescape.h"
+#include "freescape/games/dark/dark.h"
#include "freescape/language/8bitDetokeniser.h"
namespace Freescape {
@@ -81,6 +82,7 @@ void DarkEngine::drawZXUI(Graphics::Surface *surface) {
uint32 back = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
int score = _gameStateVars[k8bitVariableScore];
+ int ecds = _gameStateVars[kVariableActiveECDs];
drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), 191, 141, front, back, surface);
drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), 191, 149, front, back, surface);
drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), 191, 157, front, back, surface);
@@ -88,6 +90,7 @@ void DarkEngine::drawZXUI(Graphics::Surface *surface) {
drawStringInSurface(Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), 78, 165, front, back, surface);
drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 78, 173, front, back, surface);
drawStringInSurface(Common::String::format("%07d", score), 94, 13, front, back, surface);
+ drawStringInSurface(Common::String::format("%3d%%", ecds), 190, 13, front, back, surface);
int seconds, minutes, hours;
getTimeFromCountdown(seconds, minutes, hours);
Commit: d4cb716963944ee8576908ef257a44f8b396c161
https://github.com/scummvm/scummvm/commit/d4cb716963944ee8576908ef257a44f8b396c161
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-01T07:58:40+02:00
Commit Message:
FREESCAPE: fixed position of text in zx releases of dark
Changed paths:
engines/freescape/games/dark/dark.cpp
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 72c5cce8bd8..1fcc03f7cb3 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -395,8 +395,8 @@ void DarkEngine::drawFullscreenMessage(Common::String message, uint32 front, Gra
letterPerLine = 28;
numberOfLines = 10;
} else if (isSpectrum()) {
- x = 58;
- y = 32;
+ x = 60;
+ y = 35;
letterPerLine = 24;
numberOfLines = 12;
}
Commit: 085272d533ecd7a2271c82d45463e9f573e3dcbc
https://github.com/scummvm/scummvm/commit/085272d533ecd7a2271c82d45463e9f573e3dcbc
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-01T07:58:40+02:00
Commit Message:
FREESCAPE: fixed border in fullscreen messages for dark
Changed paths:
engines/freescape/games/dark/dark.cpp
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 1fcc03f7cb3..0baadfa09bb 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -459,6 +459,8 @@ void DarkEngine::drawFullscreenMessageAndWait(Common::String message) {
}
}
drawBorder();
+ if (_currentArea)
+ drawUI();
drawFullscreenMessage(message, front, surface);
_gfx->flipBuffer();
g_system->updateScreen();
Commit: c423d3eda3ed4b98fc1524015d529648b082b348
https://github.com/scummvm/scummvm/commit/c423d3eda3ed4b98fc1524015d529648b082b348
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-01T07:58:40+02:00
Commit Message:
FREESCAPE: missing message in the info screen in driller
Changed paths:
engines/freescape/games/driller/driller.cpp
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 9efc659b5e2..b8bd14761a3 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -243,7 +243,7 @@ void DrillerEngine::drawInfoMenu() {
switch (_drillStatusByArea[_currentArea->getAreaID()]) {
case kDrillerNoRig:
- rigStatus = "Unpositioned";
+ rigStatus = _currentArea->_gasPocketRadius > 0 ? "Unpositioned" : "Not required";
gasFound = "-";
perTapped = "-";
gasTapped = "-";
Commit: a7e04266e51018a4908e893a5b131c518f44df6a
https://github.com/scummvm/scummvm/commit/a7e04266e51018a4908e893a5b131c518f44df6a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-08-01T07:58:40+02:00
Commit Message:
FREESCAPE: initial implementation of info menu for dark
Changed paths:
engines/freescape/freescape.h
engines/freescape/games/dark/dark.cpp
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 9ff9be4eda7..90d3059ac45 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -547,6 +547,7 @@ public:
void drawDOSUI(Graphics::Surface *surface) override;
void drawZXUI(Graphics::Surface *surface) override;
+ void drawInfoMenu() override;
void drawFullscreenMessageAndWait(Common::String message);
void drawFullscreenMessage(Common::String message, uint32 front, Graphics::Surface *surface);
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 0baadfa09bb..1e44abe35a0 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -229,6 +229,7 @@ bool DarkEngine::checkIfGameEnded() {
gotoArea(1, 26);
} else if (_forceEndGame) {
_forceEndGame = false;
+ insertTemporaryMessage(_messagesList[18], _countdown - 2);
_gameStateVars[kVariableDarkEnding] = kDarkEndingEvathDestroyed;
drawFrame();
_gfx->flipBuffer();
@@ -490,6 +491,97 @@ void DarkEngine::drawSensorShoot(Sensor *sensor) {
_gfx->renderSensorShoot(1, sensor->getOrigin(), target, _viewArea);
}
+void DarkEngine::drawInfoMenu() {
+ _savedScreen = _gfx->getScreenshot();
+ uint32 color = 0;
+ switch (_renderMode) {
+ case Common::kRenderCGA:
+ color = 1;
+ break;
+ case Common::kRenderZX:
+ color = 6;
+ break;
+ default:
+ color = 14;
+ }
+ uint8 r, g, b;
+ _gfx->readFromPalette(color, r, g, b);
+ uint32 front = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+ uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
+
+ Graphics::Surface *surface = new Graphics::Surface();
+ surface->create(_screenW, _screenH, _gfx->_texturePixelFormat);
+
+ surface->fillRect(Common::Rect(88, 48, 231, 103), black);
+ surface->frameRect(Common::Rect(88, 48, 231, 103), front);
+
+ surface->frameRect(Common::Rect(90, 50, 229, 101), front);
+
+ drawStringInSurface("L-LOAD S-SAVE", 105, 56, front, black, surface);
+ if (isSpectrum())
+ drawStringInSurface("1-TERMINATE", 105, 64, front, black, surface);
+ else
+ drawStringInSurface("ESC-TERMINATE", 105, 64, front, black, surface);
+
+ drawStringInSurface("T-TOGGLE", 128, 81, front, black, surface);
+ drawStringInSurface("SOUND ON/OFF", 113, 88, front, black, surface);
+
+ Common::Event event;
+ bool cont = true;
+ while (!shouldQuit() && cont) {
+ while (g_system->getEventManager()->pollEvent(event)) {
+
+ // Events
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ if (event.kbd.keycode == Common::KEYCODE_l) {
+ _gfx->setViewport(_fullscreenViewArea);
+ loadGameDialog();
+ _gfx->setViewport(_viewArea);
+ } else if (event.kbd.keycode == Common::KEYCODE_s) {
+ _gfx->setViewport(_fullscreenViewArea);
+ saveGameDialog();
+ _gfx->setViewport(_viewArea);
+ } else if (isDOS() && event.kbd.keycode == Common::KEYCODE_t) {
+ // TODO
+ } else if ((isDOS() || isCPC()) && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+ _forceEndGame = true;
+ cont = false;
+ } else if (isSpectrum() && event.kbd.keycode == Common::KEYCODE_1) {
+ _forceEndGame = true;
+ cont = false;
+ } else
+ cont = false;
+ break;
+ case Common::EVENT_SCREEN_CHANGED:
+ _gfx->computeScreenViewport();
+ break;
+
+ default:
+ break;
+ }
+ }
+ drawFrame();
+
+ if (!_uiTexture)
+ _uiTexture = _gfx->createTexture(surface);
+ else
+ _uiTexture->update(surface);
+
+ _gfx->setViewport(_fullscreenViewArea);
+ _gfx->drawTexturedRect2D(_fullscreenViewArea, _fullscreenViewArea, _uiTexture);
+ _gfx->setViewport(_viewArea);
+
+ _gfx->flipBuffer();
+ g_system->updateScreen();
+ g_system->delayMillis(15); // try to target ~60 FPS
+ }
+
+ _savedScreen->free();
+ delete _savedScreen;
+ surface->free();
+ delete surface;
+}
Common::Error DarkEngine::saveGameStreamExtended(Common::WriteStream *stream, bool isAutosave) {
for (auto &it : _areaMap) {
More information about the Scummvm-git-logs
mailing list