[Scummvm-git-logs] scummvm master -> e4c3bb4f3029b84ba4778abb93044b321edf2c97
neuromancer
noreply at scummvm.org
Fri Nov 18 11:59:18 UTC 2022
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2ad2980d7c FREESCAPE: make sure local/global conditions are executed in the same area
e917641e97 FREESCAPE: correctly render end of game area in driller
421ceda78c FREESCAPE: show number of cleared areas at the end of the game in driller
223a1252e0 FREESCAPE: inject a small script in the last area to end the game in driller
e4c3bb4f30 FREESCAPE: comment script that force ending in driller
Commit: 2ad2980d7c762d823941e8ac3443f61859bd94f2
https://github.com/scummvm/scummvm/commit/2ad2980d7c762d823941e8ac3443f61859bd94f2
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-18T13:00:17+01:00
Commit Message:
FREESCAPE: make sure local/global conditions are executed in the same area
Changed paths:
engines/freescape/language/instruction.cpp
diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index d2d35e13545..40a2abd9623 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -78,9 +78,12 @@ void FreescapeEngine::executeLocalGlobalConditions(bool shot, bool collided) {
if (isCastle())
return;
debugC(1, kFreescapeDebugCode, "Executing room conditions");
- for (uint i = 0; i < _currentArea->_conditions.size(); i++) {
- debugC(1, kFreescapeDebugCode, "%s", _currentArea->_conditionSources[i].c_str());
- executeCode(_currentArea->_conditions[i], shot, collided);
+ Common::Array<FCLInstructionVector> conditions = _currentArea->_conditions;
+ Common::Array<Common::String> conditionSources = _currentArea->_conditionSources;
+
+ for (uint i = 0; i < conditions.size(); i++) {
+ debugC(1, kFreescapeDebugCode, "%s", conditionSources[i].c_str());
+ executeCode(conditions[i], shot, collided);
}
debugC(1, kFreescapeDebugCode, "Executing global conditions (%d)", _conditions.size());
Commit: e917641e975068d54abe591c8d3b2da8bd8988c9
https://github.com/scummvm/scummvm/commit/e917641e975068d54abe591c8d3b2da8bd8988c9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-18T13:00:17+01:00
Commit Message:
FREESCAPE: correctly render end of game area in driller
Changed paths:
engines/freescape/games/driller.cpp
engines/freescape/movement.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index ffb93be0a35..6fdedeb18ea 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -100,6 +100,13 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
}
_lastPosition = _position;
+ if (areaID == _startArea) {
+ _yaw = 280;
+ } else if (areaID == 127) {
+ _yaw = 90;
+ _pitch = 335;
+ }
+
debugC(1, kFreescapeDebugMove, "starting player position: %f, %f, %f", _position.x(), _position.y(), _position.z());
playSound(5, false);
// Ignore sky/ground fields
@@ -738,7 +745,14 @@ void DrillerEngine::initGameState() {
}
bool DrillerEngine::checkIfGameEnded() {
+ bool endGame = false;
+
if (_gameStateVars[k8bitVariableShield] == 0) {
+ insertTemporaryMessage(_messagesList[15], _countdown - 2);
+ endGame = true;
+ }
+
+ if (endGame) {
_flyMode = true;
gotoArea(127, 0);
drawFrame();
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 13f2169f602..b045203ef44 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -38,9 +38,7 @@ void FreescapeEngine::traverseEntrance(uint16 entranceID) {
Math::Vector3d rotation = entrance->getRotation();
_position = entrance->getOrigin();
_pitch = rotation.x();
- if (_lastPosition == Math::Vector3d(0, 0, 0))
- _yaw = rotation.y() + 110; // TODO: check why Driller needs this when it starts
- else if (ABS(diff.x()) > ABS(diff.z()))
+ if (ABS(diff.x()) > ABS(diff.z()))
_yaw = rotation.y() - 90;
else
_yaw = rotation.y() + 90;
Commit: 421ceda78c6af1d447ab626962739d469df2c789
https://github.com/scummvm/scummvm/commit/421ceda78c6af1d447ab626962739d469df2c789
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-18T13:00:17+01:00
Commit Message:
FREESCAPE: show number of cleared areas at the end of the game in driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 6fdedeb18ea..e1aec6d8d69 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -754,6 +754,9 @@ bool DrillerEngine::checkIfGameEnded() {
if (endGame) {
_flyMode = true;
+ Common::String clearedMessage = _areaMap[127]->_name;
+ int cleared = _gameStateVars[32];
+ _areaMap[127]->_name.replace(0, 3, Common::String::format("%4d", cleared));
gotoArea(127, 0);
drawFrame();
_gfx->flipBuffer();
Commit: 223a1252e015dde48bf1450838304b99b29b48b6
https://github.com/scummvm/scummvm/commit/223a1252e015dde48bf1450838304b99b29b48b6
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-18T13:00:17+01:00
Commit Message:
FREESCAPE: inject a small script in the last area to end the game in driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index e1aec6d8d69..d5748d9704a 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -105,6 +105,9 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
} else if (areaID == 127) {
_yaw = 90;
_pitch = 335;
+ _flyMode = true; // Avoid falling
+ // Show the number of completed areas
+ _areaMap[127]->_name.replace(0, 3, Common::String::format("%4d", _gameStateVars[32]));
}
debugC(1, kFreescapeDebugMove, "starting player position: %f, %f, %f", _position.x(), _position.y(), _position.z());
@@ -336,6 +339,22 @@ void DrillerEngine::loadAssetsFullGame() {
loadFonts(&file, 0x99dd);
loadGlobalObjects(&file, 0x3b42);
load8bitBinary(&file, 0x9b40, 16);
+
+ FCLInstructionVector instructions;
+ Common::Array<uint8> conditionArray;
+
+ conditionArray.push_back(0xb);
+ conditionArray.push_back(0x20);
+ conditionArray.push_back(0x12);
+ conditionArray.push_back(0x12);
+ conditionArray.push_back(0x7f);
+ conditionArray.push_back(0x0);
+
+ Common::String conditionSource = detokenise8bitCondition(conditionArray, instructions);
+ debugC(1, kFreescapeDebugParser, "%s", conditionSource.c_str());
+ _areaMap[18]->_conditions.push_back(instructions);
+ _areaMap[18]->_conditionSources.push_back(conditionSource);
+
} else if (_renderMode == Common::kRenderCGA) {
loadBundledImages();
_title = _border;
@@ -745,19 +764,12 @@ void DrillerEngine::initGameState() {
}
bool DrillerEngine::checkIfGameEnded() {
- bool endGame = false;
-
if (_gameStateVars[k8bitVariableShield] == 0) {
insertTemporaryMessage(_messagesList[15], _countdown - 2);
- endGame = true;
+ gotoArea(127, 0);
}
- if (endGame) {
- _flyMode = true;
- Common::String clearedMessage = _areaMap[127]->_name;
- int cleared = _gameStateVars[32];
- _areaMap[127]->_name.replace(0, 3, Common::String::format("%4d", cleared));
- gotoArea(127, 0);
+ if (_currentArea->getAreaID() == 127) {
drawFrame();
_gfx->flipBuffer();
g_system->updateScreen();
Commit: e4c3bb4f3029b84ba4778abb93044b321edf2c97
https://github.com/scummvm/scummvm/commit/e4c3bb4f3029b84ba4778abb93044b321edf2c97
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-11-18T13:00:17+01:00
Commit Message:
FREESCAPE: comment script that force ending in driller
Changed paths:
engines/freescape/games/driller.cpp
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index d5748d9704a..74e70bafcbf 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -340,6 +340,14 @@ void DrillerEngine::loadAssetsFullGame() {
loadGlobalObjects(&file, 0x3b42);
load8bitBinary(&file, 0x9b40, 16);
+ /*
+ We are going to inject a small script in the
+ last area to force the game to end:
+ IF COLLIDED? THEN
+ IF VAR!=? (v32, 18) THEN END ENDIF
+ GOTO (127, 0)
+ */
+
FCLInstructionVector instructions;
Common::Array<uint8> conditionArray;
More information about the Scummvm-git-logs
mailing list