[Scummvm-git-logs] scummvm master -> b0665bc4642f84fe8e33a7df7067ff65be0d0e6c
neuromancer
noreply at scummvm.org
Mon Aug 19 07:15:39 UTC 2024
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:
77e6e0be2c FREESCAPE: added some missing sounds and state changes in driller
9607cb474d FREESCAPE: added delay before starting the endgame
b0665bc464 FREESCAPE: improved spacing in input selection screen
Commit: 77e6e0be2c227b4e39f762d1fd2ab6f5fc9c578b
https://github.com/scummvm/scummvm/commit/77e6e0be2c227b4e39f762d1fd2ab6f5fc9c578b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-19T09:15:43+02:00
Commit Message:
FREESCAPE: added some missing sounds and state changes 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 4d3e2d2e89f..19fcb86a4eb 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -100,6 +100,13 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_soundIndexMenu = -1;
_soundIndexStart = 9;
_soundIndexAreaChange = 5;
+
+ _soundIndexNoShield = 20;
+ _soundIndexNoEnergy = 20;
+ _soundIndexFallen = 20;
+ _soundIndexTimeout = 20;
+ _soundIndexForceEndGame = 20;
+ _soundIndexCrushed = 20;
}
DrillerEngine::~DrillerEngine() {
@@ -941,6 +948,8 @@ void DrillerEngine::updateTimeVariables() {
if (_lastMinute != minutes) {
_lastMinute = minutes;
+ if (_gameStateVars[k8bitVariableEnergy] > 0)
+ _gameStateVars[k8bitVariableEnergy] = _gameStateVars[k8bitVariableEnergy] - 1;
_gameStateVars[0x1e] += 1;
_gameStateVars[0x1f] += 1;
executeLocalGlobalConditions(false, true, false); // Only execute "on collision" room/global conditions
Commit: 9607cb474d58f94389a6d436a4a79773f50cfcf5
https://github.com/scummvm/scummvm/commit/9607cb474d58f94389a6d436a4a79773f50cfcf5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-19T09:15:43+02:00
Commit Message:
FREESCAPE: added delay before starting the endgame
Changed paths:
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/dark/dark.cpp
engines/freescape/games/driller/driller.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 30523f3ae3f..49231f19b1f 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -191,6 +191,7 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
_avoidRenderingFrames = 0;
_endGamePlayerEndArea = false;
_endGameKeyPressed = false;
+ _endGameDelayTicks = 0;
_maxShield = 63;
_maxEnergy = 63;
@@ -762,6 +763,13 @@ Common::Error FreescapeEngine::run() {
}
void FreescapeEngine::endGame() {
+ if (_gameStateControl == kFreescapeGameStateEnd) {
+ if (_endGameDelayTicks > 0) {
+ _endGameDelayTicks--;
+ return;
+ }
+ }
+
_shootingFrames = 0;
_delayedShootObject = nullptr;
if (_gameStateControl == kFreescapeGameStateEnd && !isPlayingSound() && !_endGamePlayerEndArea) {
@@ -844,6 +852,9 @@ bool FreescapeEngine::checkIfGameEnded() {
if (!_crushedMessage.empty())
insertTemporaryMessage(_crushedMessage, _countdown - 4);
_gameStateControl = kFreescapeGameStateEnd;
+ // If the player is crushed, there are a few skipped frames
+ // so no need to wait for the end of the game
+ _endGameDelayTicks = 0;
} else if (_forceEndGame) {
playSound(_soundIndexForceEndGame, true);
@@ -873,6 +884,7 @@ uint16 FreescapeEngine::getGameBit(int index) {
void FreescapeEngine::initGameState() {
_gameStateControl = kFreescapeGameStatePlaying;
+ _endGameDelayTicks = int(2 * 60); // 2.5 seconds at 60 frames per second
for (int i = 0; i < k8bitMaxVariable; i++) // TODO: check maximum variable
_gameStateVars[i] = 0;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index a10200c9de5..a3a62683504 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -520,6 +520,7 @@ public:
uint32 _gameStateBits;
virtual bool checkIfGameEnded();
virtual void endGame();
+ int _endGameDelayTicks;
bool _endGameKeyPressed;
bool _endGamePlayerEndArea;
bool _forceEndGame;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index bcfa62b424e..164a20f574e 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -751,6 +751,9 @@ void DarkEngine::drawBinaryClock(Graphics::Surface *surface, int xPosition, int
if (_gameStateControl == kFreescapeGameStatePlaying)
number = _ticks / 2;
else if (_gameStateControl == kFreescapeGameStateEnd) {
+ if (_endGameDelayTicks > 0) // Wait until the endgame is ready
+ return;
+
if (_gameStateVars[kVariableDarkEnding] == 0)
number = (1 << 15) - 1;
else
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 19fcb86a4eb..cfc79cace25 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -301,6 +301,7 @@ void DrillerEngine::loadAssets() {
_noShieldMessage = _messagesList[15];
_noEnergyMessage = _messagesList[16];
_fallenMessage = _messagesList[17];
+ _forceEndGameMessage = _messagesList[18];
// Small extra feature: allow player to be crushed in Driller
_crushedMessage = "CRUSHED!";
}
Commit: b0665bc4642f84fe8e33a7df7067ff65be0d0e6c
https://github.com/scummvm/scummvm/commit/b0665bc4642f84fe8e33a7df7067ff65be0d0e6c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-19T09:15:43+02:00
Commit Message:
FREESCAPE: improved spacing in input selection screen
Changed paths:
engines/freescape/ui.cpp
diff --git a/engines/freescape/ui.cpp b/engines/freescape/ui.cpp
index be1030ea7ce..96bc2121632 100644
--- a/engines/freescape/ui.cpp
+++ b/engines/freescape/ui.cpp
@@ -137,23 +137,24 @@ void FreescapeEngine::borderScreen() {
if (isDOS() || isSpectrum()) {
Common::Array<Common::String> lines;
if (isDOS())
- lines.push_back(centerAndPadString("Configuration Menu", 25));
+ lines.push_back(centerAndPadString("Configuration Menu", 30));
else
- lines.push_back(centerAndPadString("Control Options", 21));
+ lines.push_back(centerAndPadString("Control Options", 25));
+ lines.push_back("");
+ lines.push_back(centerAndPadString("1: KEYBOARD ONLY ", isDOS() ? 30 : 25));
+ lines.push_back(centerAndPadString("2: IBM JOYSTICK ", isDOS() ? 30 : 25));
+ lines.push_back(centerAndPadString("3: AMSTRAD JOYSTICK", isDOS() ? 30 : 25));
lines.push_back("");
- lines.push_back("1: KEYBOARD ONLY");
- lines.push_back("2: IBM JOYSTICK");
- lines.push_back("3: AMSTRAD JOYSTICK");
lines.push_back("");
if (isDOS())
- lines.push_back(" SPACEBAR: BEGIN MISSION");
+ lines.push_back(centerAndPadString("SPACEBAR: BEGIN MISSION", 30));
else
- lines.push_back(centerAndPadString("Enter: Begin Mission", 21));
+ lines.push_back(centerAndPadString("Enter: Begin Mission", 25));
lines.push_back("");
if (isDOS())
- lines.push_back(" COPYRIGHT 1988 INCENTIVE");
+ lines.push_back(centerAndPadString("COPYRIGHT 1988 INCENTIVE", 30));
else
- lines.push_back(centerAndPadString("(c) 1988 Incentive", 22));
+ lines.push_back(centerAndPadString("(c) 1988 Incentive", 25));
lines.push_back("");
Graphics::Surface *surface = drawStringsInSurface(lines);
More information about the Scummvm-git-logs
mailing list