HYPNO: removed unused function in arcade code

This commit is contained in:
neuromancer 2022-03-06 21:04:45 +01:00
parent e645fca35d
commit b8f233cbf7
4 changed files with 9 additions and 36 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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

View File

@ -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);