[Scummvm-git-logs] scummvm master -> fb53c86f34f3e2bb6725e53c153db686784289fb
neuromancer
noreply at scummvm.org
Fri Dec 2 08:34:15 UTC 2022
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:
680b507e2e FREESCAPE: show energy bar in amiga/atari driller
93b7a2f1db FREESCAPE: end the game when countdown is zero
fb53c86f34 FREESCAPE: end the game when energy is zero in driller
Commit: 680b507e2e7270ae0209e7138b4db58511e410ff
https://github.com/scummvm/scummvm/commit/680b507e2e7270ae0209e7138b4db58511e410ff
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-02T09:35:19+01:00
Commit Message:
FREESCAPE: show energy bar in amiga/atari driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 63ba1681fb5..6e2a1313c93 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -507,7 +507,7 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
drawStringInSurface(message, 188, 177, yellow, black, surface);
}
- //int energy = _gameStateVars[k8bitVariableEnergy];
+ int energy = _gameStateVars[k8bitVariableEnergy];
int shield = _gameStateVars[k8bitVariableShield];
if (shield >= 0) {
@@ -521,6 +521,18 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
shieldBar = Common::Rect(11, 180, 76 - (k8bitMaxShield - shield), 182);
surface->fillRect(shieldBar, yellow);
}
+
+ if (energy >= 0) {
+ Common::Rect energyBar;
+ energyBar = Common::Rect(11, 186, 75 - (k8bitMaxEnergy - energy), 192);
+ surface->fillRect(energyBar, brown);
+
+ energyBar = Common::Rect(11, 187, 75 - (k8bitMaxEnergy - energy), 191);
+ surface->fillRect(energyBar, brownish);
+
+ energyBar = Common::Rect(11, 188, 75 - (k8bitMaxEnergy - energy), 190);
+ surface->fillRect(energyBar, yellow);
+ }
}
Math::Vector3d getProjectionToPlane(const Math::Vector3d &vect, const Math::Vector3d normal) {
Commit: 93b7a2f1db9cc757489c4115e56659a99286eb78
https://github.com/scummvm/scummvm/commit/93b7a2f1db9cc757489c4115e56659a99286eb78
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-02T09:35:19+01:00
Commit Message:
FREESCAPE: end the game when countdown is zero
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 6e2a1313c93..65a8a2b7915 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -427,11 +427,11 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 46, 153, yellow, black, surface);
drawStringInSurface(Common::String::format("%07d", score), 238, 129, yellow, black, surface);
- int hours = _countdown / 3600;
+ int hours = _countdown <= 0 ? 0 : _countdown / 3600;
drawStringInSurface(Common::String::format("%02d", hours), 208, 8, yellow, black, surface);
- int minutes = (_countdown - hours * 3600) / 60;
+ int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
drawStringInSurface(Common::String::format("%02d", minutes), 230, 8, yellow, black, surface);
- int seconds = _countdown - hours * 3600 - minutes * 60;
+ int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
drawStringInSurface(Common::String::format("%02d", seconds), 254, 8, yellow, black, surface);
Common::String message;
@@ -482,11 +482,11 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
drawStringInSurface(_currentArea->_name, 188, 185, yellow, black, surface);
drawStringInSurface(Common::String::format("%07d", score), 240, 129, yellow, black, surface);
- int hours = _countdown / 3600;
+ int hours = _countdown <= 0 ? 0 : _countdown / 3600;
drawStringInSurface(Common::String::format("%02d:", hours), 208, 7, yellow, black, surface);
- int minutes = (_countdown - hours * 3600) / 60;
+ int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
drawStringInSurface(Common::String::format("%02d:", minutes), 230, 7, yellow, black, surface);
- int seconds = _countdown - hours * 3600 - minutes * 60;
+ int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
drawStringInSurface(Common::String::format("%02d", seconds), 254, 7, yellow, black, surface);
Common::String message;
@@ -846,6 +846,11 @@ void DrillerEngine::initGameState() {
}
bool DrillerEngine::checkIfGameEnded() {
+ if (_countdown <= 0) {
+ insertTemporaryMessage(_messagesList[14], _countdown - 2);
+ gotoArea(127, 0);
+ }
+
if (_gameStateVars[k8bitVariableShield] == 0) {
insertTemporaryMessage(_messagesList[15], _countdown - 2);
gotoArea(127, 0);
Commit: fb53c86f34f3e2bb6725e53c153db686784289fb
https://github.com/scummvm/scummvm/commit/fb53c86f34f3e2bb6725e53c153db686784289fb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-12-02T09:35:19+01:00
Commit Message:
FREESCAPE: end the game when energy is zero in driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 65a8a2b7915..cdbfbe98f5f 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -856,6 +856,11 @@ bool DrillerEngine::checkIfGameEnded() {
gotoArea(127, 0);
}
+ if (_gameStateVars[k8bitVariableEnergy] == 0) {
+ insertTemporaryMessage(_messagesList[16], _countdown - 2);
+ gotoArea(127, 0);
+ }
+
if (_currentArea->getAreaID() == 127) {
if (_gameStateVars[32] == 18) { // All areas are complete
insertTemporaryMessage(_messagesList[19], _countdown - 2);
More information about the Scummvm-git-logs
mailing list