[Scummvm-git-logs] scummvm master -> 691192aef47ea5f349c15f99a649cef0f3aa8795
neuromancer
noreply at scummvm.org
Thu Nov 17 20:40:04 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:
2a2bde3ed1 FREESCAPE: do not remove the drill from the global area in driller
73c96733fb FREESCAPE: add a cheat to avoid drilling in certain positions in driller
691192aef4 FREESCAPE: avoiding executing local/global condition if the area recently changed
Commit: 2a2bde3ed10f9b833eef047298c78d714010348a
https://github.com/scummvm/scummvm/commit/2a2bde3ed10f9b833eef047298c78d714010348a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-17T21:40:59+01:00
Commit Message:
FREESCAPE: do not remove the drill from the global area in driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 978b3751238..2bd98b1eb68 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -760,6 +760,8 @@ Common::Error DrillerEngine::saveGameStreamExtended(Common::WriteStream *stream,
Common::Error DrillerEngine::loadGameStreamExtended(Common::SeekableReadStream *stream) {
for (uint i = 0; i < _areaMap.size(); i++) {
uint16 key = stream->readUint16LE();
+ if (key == 255)
+ continue;
assert(_areaMap.contains(key));
_drilledAreas[key] = stream->readUint32LE();
if (_drilledAreas[key] == kDrillerNoRig)
Commit: 73c96733fb924270d73c685fa0eaacac2b99627e
https://github.com/scummvm/scummvm/commit/73c96733fb924270d73c685fa0eaacac2b99627e
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-17T21:40:59+01:00
Commit Message:
FREESCAPE: add a cheat to avoid drilling in certain positions in driller
Changed paths:
engines/freescape/detection.cpp
engines/freescape/detection.h
engines/freescape/freescape.h
engines/freescape/games/driller.cpp
engines/freescape/metaengine.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 22ebd9d293d..20b8c45c9d9 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -252,7 +252,7 @@ static const DebugChannelDef debugFlagList[] = {
class FreescapeMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
FreescapeMetaEngineDetection() : AdvancedMetaEngineDetection(Freescape::gameDescriptions, sizeof(ADGameDescription), Freescape::freescapeGames) {
- _guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS);
+ _guiOptions = GUIO3(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS, GAMEOPTION_AUTOMATIC_DRILLING);
}
const char *getName() const override {
diff --git a/engines/freescape/detection.h b/engines/freescape/detection.h
index f48383ff3c1..76b5d0be0f9 100644
--- a/engines/freescape/detection.h
+++ b/engines/freescape/detection.h
@@ -23,5 +23,6 @@
#define FREESCAPE_DETECTION_H
#define GAMEOPTION_PRERECORDED_SOUNDS GUIO_GAMEOPTIONS1
+#define GAMEOPTION_AUTOMATIC_DRILLING GUIO_GAMEOPTIONS2
#endif
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 9ebd6cc98d7..78cea78a017 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -331,6 +331,8 @@ public:
uint32 _initialTankEnergy;
uint32 _initialTankShield;
+ bool _useAutomaticDrilling;
+
void initGameState() override;
bool checkIfGameEnded() override;
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 2bd98b1eb68..ffb93be0a35 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -19,6 +19,7 @@
*
*/
+#include "common/config-manager.h"
#include "common/events.h"
#include "common/file.h"
@@ -34,9 +35,10 @@ enum {
};
DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : FreescapeEngine(syst, gd) {
- // if (isAmiga())
- // _viewArea = Common::Rect(72, 66, 567, 269);
- // else
+
+ if (!Common::parseBool(ConfMan.get("automatic_drilling"), _useAutomaticDrilling))
+ error("Failed to parse bool from automatic_drilling option");
+
if (isDOS())
_viewArea = Common::Rect(40, 16, 280, 117);
else if (isAmiga() || isAtariST())
@@ -478,7 +480,7 @@ void DrillerEngine::pressedKey(const int keycode) {
_gameStateVars[k8bitVariableEnergy] = _gameStateVars[k8bitVariableEnergy] - 5;
const Math::Vector3d gasPocket3D(gasPocket.x, drill.y(), gasPocket.y);
float distanceToPocket = (gasPocket3D - drill).length();
- float success = 100.0 * (1.0 - distanceToPocket / _currentArea->_gasPocketRadius);
+ float success = _useAutomaticDrilling ? 100.0 : 100.0 * (1.0 - distanceToPocket / _currentArea->_gasPocketRadius);
insertTemporaryMessage(_messagesList[3], _countdown - 2);
addDrill(drill, success > 0);
if (success <= 0) {
diff --git a/engines/freescape/metaengine.cpp b/engines/freescape/metaengine.cpp
index 2b521de313a..5e3e98edc1b 100644
--- a/engines/freescape/metaengine.cpp
+++ b/engines/freescape/metaengine.cpp
@@ -36,6 +36,17 @@ static const ADExtraGuiOptionsMap optionsList[] = {
0
}
},
+ {
+ GAMEOPTION_AUTOMATIC_DRILLING,
+ {
+ _s("Automatic drilling"),
+ _s("Allow to succefully drill in any part of the area in Driller"),
+ "automatic_drilling",
+ false,
+ 0,
+ 0
+ }
+ },
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
Commit: 691192aef47ea5f349c15f99a649cef0f3aa8795
https://github.com/scummvm/scummvm/commit/691192aef47ea5f349c15f99a649cef0f3aa8795
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-17T21:40:59+01:00
Commit Message:
FREESCAPE: avoiding executing local/global condition if the area recently changed
Changed paths:
engines/freescape/movement.cpp
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 3112c6dce81..13f2169f602 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -251,7 +251,8 @@ void FreescapeEngine::move(CameraMovement direction, uint8 scale, float deltaTim
_lastPosition = _position;
debugC(1, kFreescapeDebugMove, "new player position: %f, %f, %f", _position.x(), _position.y(), _position.z());
//debugC(1, kFreescapeDebugMove, "player height: %f", _position.y() - areaScale * _playerHeight);
- executeLocalGlobalConditions(false, true); // Only execute "on collision" room/global conditions
+ if (_currentArea->getAreaID() == previousAreaID)
+ executeLocalGlobalConditions(false, true); // Only execute "on collision" room/global conditions
}
bool FreescapeEngine::checkFloor(Math::Vector3d currentPosition) {
More information about the Scummvm-git-logs
mailing list