[Scummvm-git-logs] scummvm master -> 802e97d479b9a141058ec9bdd00f9d8e30ca7860
neuromancer
noreply at scummvm.org
Sun Mar 6 20:50:35 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:
b8f233cbf7 HYPNO: removed unused function in arcade code
59fe50f0ed HYPNO: fixed objective detection code in arcade
802e97d479 HYPNO: reverted testing change in the start level in spider
Commit: b8f233cbf757d035a917c6c7cfbf4d8120f51ae3
https://github.com/scummvm/scummvm/commit/b8f233cbf757d035a917c6c7cfbf4d8120f51ae3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-03-06T21:50:27+01:00
Commit Message:
HYPNO: removed unused function in arcade code
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/hypno.h
engines/hypno/spider/arcade.cpp
engines/hypno/spider/spider.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 8f65c8ba88c..aa895786c6c 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -358,8 +358,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
if (!segments[_segmentIdx].end) { // If it is not the end segment
background.decoder->forceSeekToFrame(segments[_segmentIdx].start);
continue;
- } else
- _skipLevel = true;
+ }
}
if (segments[_segmentIdx].end || _skipLevel) {
@@ -661,10 +660,6 @@ void HypnoEngine::resetStatistics() {
_bonus = 0;
}
-bool HypnoEngine::checkArcadeLevelCompleted(MVideo &background, Segment segment) {
- return !background.decoder || background.decoder->endOfVideo() || segment.end || _skipLevel;
-}
-
bool HypnoEngine::clickedSecondaryShoot(const Common::Point &mousePos) {
return false;
}
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 64b8fd564b1..6c71e5bac63 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -235,7 +235,6 @@ public:
ShootSequence _shootSequence;
virtual void findNextSegment(ArcadeShooting *arc);
virtual void initSegment(ArcadeShooting *arc);
- virtual bool checkArcadeLevelCompleted(MVideo &background, Segment segment);
void resetStatistics();
@@ -375,7 +374,6 @@ public:
void runBeforeArcade(ArcadeShooting *arc) override;
void findNextSegment(ArcadeShooting *arc) override;
void initSegment(ArcadeShooting *arc) override;
- bool checkArcadeLevelCompleted(MVideo &background, Segment segment) override;
void drawBackToMenu(Hotspot *h) override;
void runCode(Code *code) override;
diff --git a/engines/hypno/spider/arcade.cpp b/engines/hypno/spider/arcade.cpp
index b32732f1370..c9d8c33ec99 100644
--- a/engines/hypno/spider/arcade.cpp
+++ b/engines/hypno/spider/arcade.cpp
@@ -49,7 +49,7 @@ void SpiderEngine::runBeforeArcade(ArcadeShooting *arc) {
if (_playerFrameSep == (int)_playerFrames.size()) {
debugC(1, kHypnoDebugArcade, "No player separator frame found in %s! (size: %d)", arc->player.c_str(), _playerFrames.size());
- } else
+ } else
debugC(1, kHypnoDebugArcade, "Separator frame found at %d", _playerFrameSep);
_playerFrameIdx = -1;
@@ -244,24 +244,4 @@ void SpiderEngine::drawHealth() {
drawString("block05.fgx", "ENERGY", 248, 180, 38, c);
}
-bool SpiderEngine::checkArcadeLevelCompleted(MVideo &background, Segment segment) {
- if (_skipLevel)
- return true;
-
- if (_arcadeMode == "YF") {
- if (!background.decoder || background.decoder->endOfVideo())
- _health = 0;
-
- if (_shoots.size() == 0)
- return false;
-
- for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it)
- if (!it->destroyed)
- return false;
-
- return true;
- }
- return !background.decoder || background.decoder->endOfVideo();
-}
-
} // End of namespace Hypno
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 88f81dc7b28..0d473a155db 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -124,7 +124,7 @@ void SpiderEngine::loadAssetsFullGame() {
cl = new ChangeLevel("mainmenu.mi_");
sc->hots[6].actions.push_back(cl);
- sc = (Scene *) _levels["options.mi_"];
+ sc = (Scene *) _levels["options.mi_"];
cl = new ChangeLevel("combmenu.mi_");
sc->hots[1].actions.push_back(cl);
@@ -135,7 +135,7 @@ void SpiderEngine::loadAssetsFullGame() {
cl = new ChangeLevel("<credits>");
sc->hots[5].actions.push_back(cl);
- sc = (Scene *) _levels["combmenu.mi_"];
+ sc = (Scene *) _levels["combmenu.mi_"];
cl = new ChangeLevel("options.mi_");
sc->hots[1].actions.push_back(cl);
@@ -316,7 +316,7 @@ void SpiderEngine::loadAssetsFullGame() {
cl = new ChangeLevel("<add_ingredient>");
sc->hots[3].actions.push_back(cl);
- gl = new Global("", "CLEAR");
+ gl = new Global("", "CLEAR");
sc->hots[4].actions.push_back(gl);
gl = new Global("GS_SWITCH1", "TURNON"); // hairspray
@@ -455,7 +455,7 @@ void SpiderEngine::loadAssetsFullGame() {
Code *office = new Code("<office>");
office->prefix = prefix;
_levels["<office>"] = office;
-
+
cl = new ChangeLevel("<back_roof_1>");
sc->hots[2].actions.push_back(cl);
@@ -968,7 +968,7 @@ void SpiderEngine::loadAssetsFullGame() {
_h1Area = Common::Rect(9, 45, 28, 60);
_h2Area = Common::Rect(37, 45, 56, 60);
_h3Area = Common::Rect(64, 45, 83, 60);
- _nextLevel = "<start>";
+ _nextLevel = "c6.mi_";
}
void SpiderEngine::loadAssetsDemo() {
@@ -1048,7 +1048,7 @@ void SpiderEngine::loadAssetsDemo() {
_nextLevel = "<start>";
}
-Common::String SpiderEngine::findNextLevel(const Transition *trans) {
+Common::String SpiderEngine::findNextLevel(const Transition *trans) {
if (trans->nextLevel.empty())
return _sceneState["GS_PUZZLELEVEL"] == 0 ? trans->levelEasy : trans->levelHard;
@@ -1173,7 +1173,7 @@ void SpiderEngine::drawBackToMenu(Hotspot *h) {
if (_currentLevel != "mainmenu.mi_" && _currentLevel != "options.mi_" && _currentLevel != "combmenu.mi_")
menu = decodeFrame("int_main/menu.smk", 0);
}
- }
+ }
if (menu) {
h->rect = Common::Rect(0, 0, menu->w, menu->h);
Commit: 59fe50f0ed2fbf71779ed85fe2c307efa009b260
https://github.com/scummvm/scummvm/commit/59fe50f0ed2fbf71779ed85fe2c307efa009b260
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-03-06T21:50:27+01:00
Commit Message:
HYPNO: fixed objective detection code in arcade
Changed paths:
engines/hypno/arcade.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index aa895786c6c..65466b314b7 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -364,7 +364,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
if (segments[_segmentIdx].end || _skipLevel) {
skipVideo(background);
// Objectives
- if ((_objKillsCount[_objIdx] > 0 || _objMissesCount[_objIdx] > 0) && !_skipLevel) {
+ if ((arc->objKillsRequired[_objIdx] > 0 || arc->objMissesAllowed[_objIdx] > 0) && !_skipLevel) {
if (_objKillsCount[_objIdx] < arc->objKillsRequired[_objIdx] || _objMissesCount[_objIdx] > arc->objMissesAllowed[_objIdx]) {
if (!arc->defeatMissBossVideo.empty()) {
MVideo video(arc->defeatMissBossVideo, Common::Point(0, 0), false, true, false);
Commit: 802e97d479b9a141058ec9bdd00f9d8e30ca7860
https://github.com/scummvm/scummvm/commit/802e97d479b9a141058ec9bdd00f9d8e30ca7860
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-03-06T21:50:27+01:00
Commit Message:
HYPNO: reverted testing change in the start level in spider
Changed paths:
engines/hypno/spider/spider.cpp
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 0d473a155db..f705474bcf7 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -968,7 +968,7 @@ void SpiderEngine::loadAssetsFullGame() {
_h1Area = Common::Rect(9, 45, 28, 60);
_h2Area = Common::Rect(37, 45, 56, 60);
_h3Area = Common::Rect(64, 45, 83, 60);
- _nextLevel = "c6.mi_";
+ _nextLevel = "<start>";
}
void SpiderEngine::loadAssetsDemo() {
More information about the Scummvm-git-logs
mailing list