[Scummvm-git-logs] scummvm master -> ed1f01f4efbd94ada1571fcb39b8bb8e6cb19277
neuromancer
noreply at scummvm.org
Sat Jan 7 22:56:12 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d8efa29d8b FREESCAPE: added more detection entries for Driller C64
ed1f01f4ef FREESCAPE: implemented falling in Driller and added a cheat to avoid it
Commit: d8efa29d8b837832bed662356f211d28dd6de015
https://github.com/scummvm/scummvm/commit/d8efa29d8b837832bed662356f211d28dd6de015
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-07T19:42:00-03:00
Commit Message:
FREESCAPE: added more detection entries for Driller C64
Changed paths:
engines/freescape/detection.cpp
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index c55eb73bf78..b6cd7498823 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -132,7 +132,18 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING,
GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
},
-
+ {
+ "driller", // Commodore Force - Jan 94
+ "",
+ {
+ {"DRILLER.C64.EXTRACTED", 0, "511778d3167ff7504d905df507a03ac5", 63490},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformC64,
+ ADGF_TESTING,
+ GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
+ },
{
"driller",
"",
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index a76a437f9ce..7a12dc44213 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -554,8 +554,10 @@ void DrillerEngine::loadAssetsFullGame() {
loadGlobalObjects(&file, 0x1855);
} else if (_targetName.hasPrefix("driller")) {
file.open("driller.c64.extracted");
- load8bitBinary(&file, 0x63a6, 4);
- //load8bitBinary(&file, 0x58f4, 4);
+ loadMessagesFixedSize(&file, 0x167a - 0x400, 14, 20);
+ //loadFonts(&file, 0xae54);
+ load8bitBinary(&file, 0x8e02 - 0x400, 4);
+ loadGlobalObjects(&file, 0x1855 - 0x400);
}
} else if (_renderMode == Common::kRenderEGA) {
loadBundledImages();
Commit: ed1f01f4efbd94ada1571fcb39b8bb8e6cb19277
https://github.com/scummvm/scummvm/commit/ed1f01f4efbd94ada1571fcb39b8bb8e6cb19277
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-07T19:42:00-03:00
Commit Message:
FREESCAPE: implemented falling in Driller and added a cheat to avoid it
Changed paths:
engines/freescape/detection.cpp
engines/freescape/detection.h
engines/freescape/freescape.cpp
engines/freescape/freescape.h
engines/freescape/games/driller.cpp
engines/freescape/metaengine.cpp
engines/freescape/movement.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index b6cd7498823..eb52adab6c0 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -572,7 +572,7 @@ static const DebugChannelDef debugFlagList[] = {
class FreescapeMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
FreescapeMetaEngineDetection() : AdvancedMetaEngineDetection(Freescape::gameDescriptions, sizeof(ADGameDescription), Freescape::freescapeGames) {
- _guiOptions = GUIO5(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS, GAMEOPTION_EXTENDED_TIMER, GAMEOPTION_DISABLE_DEMO_MODE, GAMEOPTION_DISABLE_SENSORS);
+ _guiOptions = GUIO6(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS, GAMEOPTION_EXTENDED_TIMER, GAMEOPTION_DISABLE_DEMO_MODE, GAMEOPTION_DISABLE_SENSORS, GAMEOPTION_DISABLE_FALLING);
}
const char *getName() const override {
diff --git a/engines/freescape/detection.h b/engines/freescape/detection.h
index c65fbd84f13..deb59771394 100644
--- a/engines/freescape/detection.h
+++ b/engines/freescape/detection.h
@@ -27,9 +27,10 @@
#define GAMEOPTION_EXTENDED_TIMER GUIO_GAMEOPTIONS2
#define GAMEOPTION_DISABLE_DEMO_MODE GUIO_GAMEOPTIONS3
#define GAMEOPTION_DISABLE_SENSORS GUIO_GAMEOPTIONS4
+#define GAMEOPTION_DISABLE_FALLING GUIO_GAMEOPTIONS5
// Driller options
-#define GAMEOPTION_AUTOMATIC_DRILLING GUIO_GAMEOPTIONS5
+#define GAMEOPTION_AUTOMATIC_DRILLING GUIO_GAMEOPTIONS6
#endif
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 0ace1097bb5..af438a8a221 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -71,12 +71,16 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
if (!Common::parseBool(ConfMan.get("disable_sensors"), _disableSensors))
error("Failed to parse bool from disable_sensors option");
+ if (!Common::parseBool(ConfMan.get("disable_falling"), _disableFalling))
+ error("Failed to parse bool from disable_falling option");
+
_startArea = 0;
_startEntrance = 0;
_currentArea = nullptr;
_rotation = Math::Vector3d(0, 0, 0);
_position = Math::Vector3d(0, 0, 0);
_lastPosition = Math::Vector3d(0, 0, 0);
+ _hasFallen = false;
_velocity = Math::Vector3d(0, 0, 0);
_cameraFront = Math::Vector3d(0, 0, 0);
_cameraRight = Math::Vector3d(0, 0, 0);
@@ -356,6 +360,8 @@ void FreescapeEngine::processInput() {
switch (event.type) {
case Common::EVENT_KEYDOWN:
+ if (_hasFallen)
+ break;
switch (event.kbd.keycode) {
case Common::KEYCODE_o:
case Common::KEYCODE_UP:
@@ -441,6 +447,8 @@ void FreescapeEngine::processInput() {
break;
case Common::EVENT_MOUSEMOVE:
+ if (_hasFallen)
+ break;
mousePos = event.mouse;
if (_demoMode)
@@ -479,6 +487,8 @@ void FreescapeEngine::processInput() {
break;
case Common::EVENT_LBUTTONDOWN:
+ if (_hasFallen)
+ break;
shoot();
break;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 6985f1699c3..5ecf34765eb 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -186,6 +186,7 @@ public:
bool checkFloor(Math::Vector3d currentPosition);
bool tryStepUp(Math::Vector3d currentPosition);
bool tryStepDown(Math::Vector3d currentPosition);
+ bool _hasFallen;
void rotate(Common::Point lastMousePos, Common::Point mousePos);
void rotate(float xoffset, float yoffset);
@@ -338,6 +339,7 @@ public:
// Cheats
bool _useExtendedTimer;
bool _disableSensors;
+ bool _disableFalling;
// Random
Common::RandomSource *_rnd;
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 7a12dc44213..58b005e5fa2 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -1568,6 +1568,19 @@ bool DrillerEngine::checkIfGameEnded() {
gotoArea(127, 0);
}
+ if (_hasFallen) {
+ _hasFallen = false;
+ playSound(14, false);
+ insertTemporaryMessage(_messagesList[17], _countdown - 4);
+ drawBackground();
+ drawBorder();
+ drawUI();
+ _gfx->flipBuffer();
+ g_system->updateScreen();
+ g_system->delayMillis(1000);
+ gotoArea(127, 0);
+ }
+
if (_forceEndGame) {
_forceEndGame = false;
insertTemporaryMessage(_messagesList[18], _countdown - 2);
diff --git a/engines/freescape/metaengine.cpp b/engines/freescape/metaengine.cpp
index ec9386367da..f9f50cae7a9 100644
--- a/engines/freescape/metaengine.cpp
+++ b/engines/freescape/metaengine.cpp
@@ -84,6 +84,17 @@ static const ADExtraGuiOptionsMap optionsList[] = {
0
}
},
+ {
+ GAMEOPTION_DISABLE_SENSORS,
+ {
+ _s("Disable falling"),
+ _s("Player cannot fall over edges"),
+ "disable_falling",
+ false,
+ 0,
+ 0
+ }
+ },
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index f437f26af47..a6643778fc5 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -230,7 +230,8 @@ void FreescapeEngine::move(CameraMovement direction, uint8 scale, float deltaTim
fallen++;
fallen++;
if (fallen >= 67) {
- _position = _lastPosition; // error("NASTY FALL!");
+ _position = _lastPosition;
+ _hasFallen = !_disableFalling && true;
return;
}
_position.set(_position.x(), positionY - fallen, _position.z());
More information about the Scummvm-git-logs
mailing list