[Scummvm-git-logs] scummvm master -> bcd4ac20582870f6ff4d95849ee1803763bc1ab1
neuromancer
noreply at scummvm.org
Wed Jun 8 19:09:09 UTC 2022
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
aa88bd8f55 HYPNO: enable explicit cheat to unlock all levels
31d4d802f0 HYPNO: enable cheat to unluck all levels in boyz
a6eb0c0fb4 HYPNO: unlock all levels using corresponding cheat in boyz
66523d947f HYPNO: more triggers in flashback mode in boyz
39bacf820e HYPNO: fixed issue highlighting items of menus in boyz
fd0632044f HYPNO: fixed crash in YS level in boyz
25635812d2 HYPNO: added pickABox implementation for level 51 in boyz
bcd4ac2058 HYPNO: complete the table of levels in boyz
Commit: aa88bd8f554949c2acd7e5b8be15466cb595ecf4
https://github.com/scummvm/scummvm/commit/aa88bd8f554949c2acd7e5b8be15466cb595ecf4
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: enable explicit cheat to unlock all levels
Changed paths:
engines/hypno/detection.cpp
engines/hypno/hypno.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/detection.cpp b/engines/hypno/detection.cpp
index 9a816c53d25..6518d606e96 100644
--- a/engines/hypno/detection.cpp
+++ b/engines/hypno/detection.cpp
@@ -277,6 +277,15 @@ static const ExtraGuiOption hypnoExtraGuiOptionInfiniteAmmoCheat = {
0
};
+static const ExtraGuiOption hypnoExtraGuiOptionUnlockAllLevels = {
+ _s("Unlock all levels"),
+ _s("All levels will be available to play."),
+ "unlockAllLevels",
+ false,
+ 0,
+ 0
+};
+
static const ExtraGuiOption hypnoExtraGuiOptionRestoredContent = {
_s("Enable restored content"),
_s("Add additional content that is not enabled the original implementation."),
@@ -321,6 +330,7 @@ const ExtraGuiOptions HypnoMetaEngineDetection::getExtraGuiOptions(const Common:
options.push_back(hypnoExtraGuiOptionInfiniteHealthCheat);
options.push_back(hypnoExtraGuiOptionInfiniteAmmoCheat);
options.push_back(hypnoExtraGuiOptionRestoredContent);
+ options.push_back(hypnoExtraGuiOptionUnlockAllLevels);
return options;
}
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index e00ae8b1b07..2dde4b125a0 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -77,6 +77,9 @@ HypnoEngine::HypnoEngine(OSystem *syst, const ADGameDescription *gd)
if (!Common::parseBool(ConfMan.get("infiniteAmmo"), _infiniteAmmoCheat))
error("Failed to parse bool from cheats options");
+ if (!Common::parseBool(ConfMan.get("unlockAllLevels"), _unlockAllLevels))
+ error("Failed to parse bool from cheats options");
+
if (!Common::parseBool(ConfMan.get("restored"), _restoredContentEnabled))
error("Failed to parse bool from restored options");
// Add quit level
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index b14dde8c202..efe7d29200f 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -96,6 +96,7 @@ public:
bool _cheatsEnabled;
bool _infiniteHealthCheat;
bool _infiniteAmmoCheat;
+ bool _unlockAllLevels;
bool _restoredContentEnabled;
Audio::SoundHandle _soundHandle;
Commit: 31d4d802f0080f3681f2895e7fce9df8f1ad10d3
https://github.com/scummvm/scummvm/commit/31d4d802f0080f3681f2895e7fce9df8f1ad10d3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: enable cheat to unluck all levels in boyz
Changed paths:
engines/hypno/boyz/boyz.cpp
engines/hypno/boyz/hard.cpp
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 1f42ab98d17..7c80b43ae2f 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -423,12 +423,18 @@ void BoyzEngine::loadAssets() {
}
sc = (Scene *) _levels["<select_t1>"];
+ gl = new Global("GS_SEQ_19", "CHECK");
+ sc->hots[7].actions.push_back(cl);
cl = new ChangeLevel("c19.mi_");
sc->hots[7].actions.push_back(cl);
+ gl = new Global("GS_SEQ_11", "CHECK");
+ sc->hots[8].actions.push_back(cl);
cl = new ChangeLevel("c11.mi_");
sc->hots[8].actions.push_back(cl);
+ gl = new Global("GS_SEQ_12", "CHECK");
+ sc->hots[9].actions.push_back(cl);
cl = new ChangeLevel("c12.mi_");
sc->hots[9].actions.push_back(cl);
@@ -458,6 +464,10 @@ void BoyzEngine::loadAssets() {
sc->hots[8].actions.push_back(cl);
sc = (Scene *) _levels["<select_t3>"];
+ hl = new Highlight("GS_SEQ_31");
+ sc->hots[7].actions.push_back(hl);
+ gl = new Global("GS_SEQ_31", "CHECK");
+ sc->hots[7].actions.push_back(gl);
cl = new ChangeLevel("c31.mi_");
sc->hots[7].actions.push_back(cl);
@@ -905,8 +915,9 @@ Common::Error BoyzEngine::loadGameStream(Common::SeekableReadStream *stream) {
_sceneState["GS_SEQ_34"] = stream->readUint32LE();
_sceneState["GS_SEQ_35"] = stream->readUint32LE();
-
- if (_ids[_lastLevel] == 3591)
+ if (_unlockAllLevels)
+ _nextLevel = "<select_t1>";
+ else if (_ids[_lastLevel] == 3591)
_nextLevel = "<select_c3>";
else if (_ids[_lastLevel] == 3592)
_nextLevel = "<select_ho>";
diff --git a/engines/hypno/boyz/hard.cpp b/engines/hypno/boyz/hard.cpp
index a876ae30dbd..456a0b80479 100644
--- a/engines/hypno/boyz/hard.cpp
+++ b/engines/hypno/boyz/hard.cpp
@@ -110,6 +110,11 @@ void BoyzEngine::runMainMenu(Code *code) {
if (!found) {
_nextLevel = code->levelIfWin;
}
+
+ if (_unlockAllLevels) {
+ _nextLevel = "<select_t1>";
+ }
+
assert(!_nextLevel.empty());
}
Commit: a6eb0c0fb423d721763f274135883a747c089d10
https://github.com/scummvm/scummvm/commit/a6eb0c0fb423d721763f274135883a747c089d10
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: unlock all levels using corresponding cheat in boyz
Changed paths:
engines/hypno/boyz/boyz.cpp
engines/hypno/boyz/hard.cpp
engines/hypno/boyz/scene.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 7c80b43ae2f..be83257b8c2 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -423,36 +423,66 @@ void BoyzEngine::loadAssets() {
}
sc = (Scene *) _levels["<select_t1>"];
+ hl = new Highlight("GS_SEQ_19");
+ sc->hots[7].actions.push_back(hl);
gl = new Global("GS_SEQ_19", "CHECK");
- sc->hots[7].actions.push_back(cl);
+ sc->hots[7].actions.push_back(gl);
cl = new ChangeLevel("c19.mi_");
sc->hots[7].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_11");
+ sc->hots[8].actions.push_back(hl);
gl = new Global("GS_SEQ_11", "CHECK");
- sc->hots[8].actions.push_back(cl);
+ sc->hots[8].actions.push_back(gl);
cl = new ChangeLevel("c11.mi_");
sc->hots[8].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_12");
+ sc->hots[9].actions.push_back(hl);
gl = new Global("GS_SEQ_12", "CHECK");
- sc->hots[9].actions.push_back(cl);
+ sc->hots[9].actions.push_back(gl);
cl = new ChangeLevel("c12.mi_");
sc->hots[9].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_13");
+ sc->hots[10].actions.push_back(hl);
+ gl = new Global("GS_SEQ_13", "CHECK");
+ sc->hots[10].actions.push_back(gl);
cl = new ChangeLevel("c13.mi_");
sc->hots[10].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_14");
+ sc->hots[11].actions.push_back(hl);
+ gl = new Global("GS_SEQ_14", "CHECK");
+ sc->hots[11].actions.push_back(gl);
cl = new ChangeLevel("c14.mi_");
sc->hots[11].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_15");
+ sc->hots[12].actions.push_back(hl);
+ gl = new Global("GS_SEQ_15", "CHECK");
+ sc->hots[12].actions.push_back(gl);
cl = new ChangeLevel("c15.mi_");
sc->hots[12].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_16");
+ sc->hots[13].actions.push_back(hl);
+ gl = new Global("GS_SEQ_16", "CHECK");
+ sc->hots[13].actions.push_back(gl);
cl = new ChangeLevel("c16.mi_");
sc->hots[13].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_17");
+ sc->hots[14].actions.push_back(hl);
+ gl = new Global("GS_SEQ_17", "CHECK");
+ sc->hots[14].actions.push_back(gl);
cl = new ChangeLevel("c17.mi_");
sc->hots[14].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_18");
+ sc->hots[15].actions.push_back(hl);
+ gl = new Global("GS_SEQ_18", "CHECK");
+ sc->hots[15].actions.push_back(gl);
cl = new ChangeLevel("c18.mi_");
sc->hots[15].actions.push_back(cl);
@@ -877,20 +907,7 @@ Common::Error BoyzEngine::saveGameStream(Common::WriteStream *stream, bool isAut
stream->writeUint32LE(_lastLevel);
- stream->writeUint32LE(_sceneState["GS_C5MAP"]);
- stream->writeUint32LE(_sceneState["GS_WONSHELLGAME"]);
- stream->writeUint32LE(_sceneState["GS_C36_READY"]);
- stream->writeUint32LE(_sceneState["GS_MINEMAP"]);
- stream->writeUint32LE(_sceneState["GS_MINEMAP_VIEWED"]);
- stream->writeUint32LE(_sceneState["GS_HOTELDONE"]);
-
- stream->writeUint32LE(_sceneState["GS_SEQ_31"]);
- stream->writeUint32LE(_sceneState["GS_SEQ_32"]);
- stream->writeUint32LE(_sceneState["GS_SEQ_33"]);
- stream->writeUint32LE(_sceneState["GS_SEQ_34"]);
- stream->writeUint32LE(_sceneState["GS_SEQ_35"]);
- stream->writeUint32LE(_sceneState["GS_SEQ_36"]);
-
+ saveSceneState(stream);
return Common::kNoError;
}
@@ -902,22 +919,11 @@ Common::Error BoyzEngine::loadGameStream(Common::SeekableReadStream *stream) {
_score = stream->readUint32LE();
_lastLevel = stream->readUint32LE();
- _sceneState["GS_C5MAP"] = stream->readUint32LE();
- _sceneState["GS_WONSHELLGAME"] = stream->readUint32LE();
- _sceneState["GS_C36_READY"] = stream->readUint32LE();
- _sceneState["GS_MINEMAP"] = stream->readUint32LE();
- _sceneState["GS_MINEMAP_VIEWED"] = stream->readUint32LE();
- _sceneState["GS_HOTELDONE"] = stream->readUint32LE();
-
- _sceneState["GS_SEQ_31"] = stream->readUint32LE();
- _sceneState["GS_SEQ_32"] = stream->readUint32LE();
- _sceneState["GS_SEQ_33"] = stream->readUint32LE();
- _sceneState["GS_SEQ_34"] = stream->readUint32LE();
- _sceneState["GS_SEQ_35"] = stream->readUint32LE();
-
- if (_unlockAllLevels)
+ loadSceneState(stream);
+ if (_unlockAllLevels) {
_nextLevel = "<select_t1>";
- else if (_ids[_lastLevel] == 3591)
+ unlockAllLevels();
+ } else if (_ids[_lastLevel] == 3591)
_nextLevel = "<select_c3>";
else if (_ids[_lastLevel] == 3592)
_nextLevel = "<select_ho>";
diff --git a/engines/hypno/boyz/hard.cpp b/engines/hypno/boyz/hard.cpp
index 456a0b80479..1ff8b91c9f6 100644
--- a/engines/hypno/boyz/hard.cpp
+++ b/engines/hypno/boyz/hard.cpp
@@ -109,9 +109,7 @@ void BoyzEngine::runMainMenu(Code *code) {
bool found = loadProfile(_name);
if (!found) {
_nextLevel = code->levelIfWin;
- }
-
- if (_unlockAllLevels) {
+ } else if (_unlockAllLevels) {
_nextLevel = "<select_t1>";
}
@@ -188,7 +186,11 @@ void BoyzEngine::runDifficultyMenu(Code *code) {
_nextLevel = "<main_menu>";
else {
saveProfile(_name, 0);
- _nextLevel = code->levelIfWin;
+ if (_unlockAllLevels) {
+ _nextLevel = "<select_t1>";
+ unlockAllLevels();
+ } else
+ _nextLevel = code->levelIfWin;
}
menu->free();
diff --git a/engines/hypno/boyz/scene.cpp b/engines/hypno/boyz/scene.cpp
index 3535141cd85..c1581f37c47 100644
--- a/engines/hypno/boyz/scene.cpp
+++ b/engines/hypno/boyz/scene.cpp
@@ -103,6 +103,32 @@ void BoyzEngine::resetSceneState() {
_intros.clear();
}
+void BoyzEngine::loadSceneState(Common::SeekableReadStream *stream) {
+ uint32 i = 0;
+ while (sceneVariablesBoyz[i]) {
+ _sceneState[sceneVariablesBoyz[i]] = stream->readUint32LE();
+ i++;
+ }
+}
+
+void BoyzEngine::saveSceneState(Common::WriteStream *stream) {
+ uint32 i = 0;
+ while (sceneVariablesBoyz[i]) {
+ stream->writeUint32LE(_sceneState[sceneVariablesBoyz[i]]);
+ i++;
+ }
+}
+
+void BoyzEngine::unlockAllLevels() {
+ uint32 i = 0;
+ while (sceneVariablesBoyz[i]) {
+ if (Common::String(sceneVariablesBoyz[i]).hasPrefix("GS_SEQ_"))
+ _sceneState[sceneVariablesBoyz[i]] = true;
+ i++;
+ }
+}
+
+
void BoyzEngine::runMenu(Hotspots *hs, bool only_menu) {
Hotspot *h = hs->begin();
assert(h->type == MakeMenu);
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index efe7d29200f..b1139c49b97 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -598,6 +598,9 @@ public:
void endCredits(Code *code);
Common::String firstLevelTerritory(const Common::String &level);
+ void loadSceneState(Common::SeekableReadStream *stream);
+ void saveSceneState(Common::WriteStream *stream);
+ void unlockAllLevels();
int _previousHealth;
Graphics::Surface _healthBar[7];
Commit: 66523d947ffece71b3a2e600cf9ffc4150e8e80c
https://github.com/scummvm/scummvm/commit/66523d947ffece71b3a2e600cf9ffc4150e8e80c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: more triggers in flashback mode in boyz
Changed paths:
engines/hypno/boyz/boyz.cpp
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index be83257b8c2..1e8b5e37497 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -487,9 +487,17 @@ void BoyzEngine::loadAssets() {
sc->hots[15].actions.push_back(cl);
sc = (Scene *) _levels["<select_t2>"];
+ hl = new Highlight("GS_SEQ_21");
+ sc->hots[7].actions.push_back(hl);
+ gl = new Global("GS_SEQ_21", "CHECK");
+ sc->hots[7].actions.push_back(gl);
cl = new ChangeLevel("c21.mi_");
sc->hots[7].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_22");
+ sc->hots[8].actions.push_back(hl);
+ gl = new Global("GS_SEQ_22", "CHECK");
+ sc->hots[8].actions.push_back(gl);
cl = new ChangeLevel("c22.mi_");
sc->hots[8].actions.push_back(cl);
@@ -501,50 +509,110 @@ void BoyzEngine::loadAssets() {
cl = new ChangeLevel("c31.mi_");
sc->hots[7].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_32");
+ sc->hots[8].actions.push_back(hl);
+ gl = new Global("GS_SEQ_32", "CHECK");
+ sc->hots[8].actions.push_back(gl);
cl = new ChangeLevel("c32.mi_");
sc->hots[8].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_33");
+ sc->hots[9].actions.push_back(hl);
+ gl = new Global("GS_SEQ_33", "CHECK");
+ sc->hots[9].actions.push_back(gl);
cl = new ChangeLevel("c33.mi_");
sc->hots[9].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_34");
+ sc->hots[10].actions.push_back(hl);
+ gl = new Global("GS_SEQ_34", "CHECK");
+ sc->hots[10].actions.push_back(gl);
cl = new ChangeLevel("c34.mi_");
sc->hots[10].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_35");
+ sc->hots[11].actions.push_back(hl);
+ gl = new Global("GS_SEQ_35", "CHECK");
+ sc->hots[11].actions.push_back(gl);
cl = new ChangeLevel("c35.mi_");
sc->hots[11].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_36");
+ sc->hots[12].actions.push_back(hl);
+ gl = new Global("GS_SEQ_36", "CHECK");
+ sc->hots[12].actions.push_back(gl);
cl = new ChangeLevel("c36.mi_");
sc->hots[12].actions.push_back(cl);
sc = (Scene *) _levels["<select_t4>"];
+ hl = new Highlight("GS_SEQ_41");
+ sc->hots[7].actions.push_back(hl);
+ gl = new Global("GS_SEQ_41", "CHECK");
+ sc->hots[7].actions.push_back(gl);
cl = new ChangeLevel("c41.mi_");
sc->hots[7].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_42");
+ sc->hots[8].actions.push_back(hl);
+ gl = new Global("GS_SEQ_42", "CHECK");
+ sc->hots[8].actions.push_back(gl);
cl = new ChangeLevel("c42.mi_");
sc->hots[8].actions.push_back(cl);
sc = (Scene *) _levels["<select_t5>"];
+ hl = new Highlight("GS_SEQ_51");
+ sc->hots[7].actions.push_back(hl);
+ gl = new Global("GS_SEQ_51", "CHECK");
+ sc->hots[7].actions.push_back(gl);
cl = new ChangeLevel("c51.mi_");
sc->hots[7].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_52");
+ sc->hots[8].actions.push_back(hl);
+ gl = new Global("GS_SEQ_52", "CHECK");
+ sc->hots[8].actions.push_back(gl);
cl = new ChangeLevel("c52.mi_");
sc->hots[8].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_53");
+ sc->hots[9].actions.push_back(hl);
+ gl = new Global("GS_SEQ_53", "CHECK");
+ sc->hots[9].actions.push_back(gl);
cl = new ChangeLevel("c53.mi_");
sc->hots[9].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_54");
+ sc->hots[10].actions.push_back(hl);
+ gl = new Global("GS_SEQ_54", "CHECK");
+ sc->hots[10].actions.push_back(gl);
cl = new ChangeLevel("c54.mi_");
sc->hots[10].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_55");
+ sc->hots[11].actions.push_back(hl);
+ gl = new Global("GS_SEQ_55", "CHECK");
+ sc->hots[11].actions.push_back(gl);
cl = new ChangeLevel("c55.mi_");
sc->hots[11].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_56");
+ sc->hots[12].actions.push_back(hl);
+ gl = new Global("GS_SEQ_56", "CHECK");
+ sc->hots[12].actions.push_back(gl);
cl = new ChangeLevel("c56.mi_");
sc->hots[12].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_57");
+ sc->hots[13].actions.push_back(hl);
+ gl = new Global("GS_SEQ_57", "CHECK");
+ sc->hots[13].actions.push_back(gl);
cl = new ChangeLevel("c57.mi_");
sc->hots[13].actions.push_back(cl);
+ hl = new Highlight("GS_SEQ_58");
+ sc->hots[14].actions.push_back(hl);
+ gl = new Global("GS_SEQ_58", "CHECK");
+ sc->hots[14].actions.push_back(gl);
cl = new ChangeLevel("c58.mi_");
sc->hots[14].actions.push_back(cl);
Commit: 39bacf820eb4084cdf3486649ed4593d200a157c
https://github.com/scummvm/scummvm/commit/39bacf820eb4084cdf3486649ed4593d200a157c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: fixed issue highlighting items of menus in boyz
Changed paths:
engines/hypno/boyz/scene.cpp
diff --git a/engines/hypno/boyz/scene.cpp b/engines/hypno/boyz/scene.cpp
index c1581f37c47..c173c5c3347 100644
--- a/engines/hypno/boyz/scene.cpp
+++ b/engines/hypno/boyz/scene.cpp
@@ -196,8 +196,8 @@ bool BoyzEngine::hoverHotspot(Common::Point mousePos) {
if (menu->type == MakeMenu && !menu->background.empty()) { // Hihghlight
Graphics::Surface sub = menu->backgroundFrames[2]->getSubArea(selected.rect);
drawImage(*menu->backgroundFrames[1], 0, 0, false);
- drawImage(sub, selected.rect.left, selected.rect.top, false);
renderHighlights(hots);
+ drawImage(sub, selected.rect.left, selected.rect.top, false);
drawScreen();
}
return true;
Commit: fd0632044fd67dc36e16b7a81cb455d01ef7d599
https://github.com/scummvm/scummvm/commit/fd0632044fd67dc36e16b7a81cb455d01ef7d599
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: fixed crash in YS level in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index d9f556b0d19..e92e6626435 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -78,6 +78,7 @@ void BoyzEngine::runAfterArcade(ArcadeShooting *arc) {
_playerFrames[i]->free();
delete _playerFrames[i];
}
+ _playerFrames.clear();
if (_health <= 0) {
@@ -142,7 +143,8 @@ void BoyzEngine::drawCursorArcade(const Common::Point &mousePos) {
void BoyzEngine::drawPlayer() {
updateFromScript();
- drawImage(_portrait[_currentActor], 0, 200 - _portrait[_currentActor].h, true);
+ if (_arcadeMode != "YS")
+ drawImage(_portrait[_currentActor], 0, 200 - _portrait[_currentActor].h, true);
}
void BoyzEngine::drawHealth() {
Commit: 25635812d2ce6411bb2a8b0f8f6fc6c71c6aee9d
https://github.com/scummvm/scummvm/commit/25635812d2ce6411bb2a8b0f8f6fc6c71c6aee9d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: added pickABox implementation for level 51 in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index e92e6626435..20eb1123f63 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -71,6 +71,7 @@ void BoyzEngine::runBeforeArcade(ArcadeShooting *arc) {
updateFromScript();
_shootsDestroyed.clear();
_health = _previousHealth;
+ _selectedCorrectBox = 0;
}
void BoyzEngine::runAfterArcade(ArcadeShooting *arc) {
@@ -242,7 +243,29 @@ bool BoyzEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting
// Objectives are never checked here, for some reason
_skipLevel = true;
} else if (_levelId == 51) {
- waitForUserClick(1);
+ if (_selectedCorrectBox == 0) {
+ _background->decoder->pauseVideo(true);
+ _background->decoder->forceSeekToFrame(ttime - 2);
+ _masks->decoder->forceSeekToFrame(ttime - 2);
+ const Graphics::Surface *frame = _background->decoder->decodeNextFrame();
+ Graphics::Surface *boxes = frame->convertTo(frame->format, _background->decoder->getPalette());
+ drawImage(*boxes, 0, 0, false);
+ drawScreen();
+ _selectedCorrectBox = pickABox();
+ if (_selectedCorrectBox == 1) {
+ _background->decoder->forceSeekToFrame(582);
+ _masks->decoder->forceSeekToFrame(582);
+ } else if (_selectedCorrectBox == -1) {
+ _background->decoder->forceSeekToFrame(525);
+ _masks->decoder->forceSeekToFrame(525);
+ } else
+ error("Invalid value for _selectedCorrectBox: %d", _selectedCorrectBox);
+ _background->decoder->pauseVideo(false);
+ updateScreen(*_background);
+ drawScreen();
+ } else if (_selectedCorrectBox == -1) {
+ _health = 0;
+ }
}
} else if (!at.video.empty()) {
_background->decoder->pauseVideo(true);
@@ -370,6 +393,55 @@ void BoyzEngine::waitForUserClick(uint32 timeout) {
}
}
+int BoyzEngine::pickABox() {
+ Common::Event event;
+
+ Common::Rect correctBox(84, 14, 135, 66);
+ Common::Rect incorrectBoxes[6];
+ incorrectBoxes[0] = Common::Rect(15, 17, 77, 66);
+ incorrectBoxes[1] = Common::Rect(2, 69, 84, 92);
+ incorrectBoxes[2] = Common::Rect(74, 108, 242, 138);
+ incorrectBoxes[3] = Common::Rect(62, 134, 245, 160);
+ incorrectBoxes[4] = Common::Rect(59, 161, 239, 190);
+ incorrectBoxes[5] = Common::Rect(135, 29, 223, 101);
+ int i;
+ while (!shouldQuit()) {
+ while (g_system->getEventManager()->pollEvent(event)) {
+ Common::Point mousePos = g_system->getEventManager()->getMousePos();
+ switch (event.type) {
+ case Common::EVENT_MOUSEMOVE:
+ if (correctBox.contains(mousePos)) {
+ changeCursor(_crosshairsTarget[_currentWeapon], _crosshairsPalette, true);
+ break;
+ }
+ for (i = 0; i < 6; i++)
+ if (incorrectBoxes[i].contains(mousePos)) {
+ changeCursor(_crosshairsTarget[_currentWeapon], _crosshairsPalette, true);
+ break;
+ }
+ if (i == 6)
+ changeCursor(_crosshairsActive[_currentWeapon], _crosshairsPalette, true);
+ break;
+
+ case Common::EVENT_LBUTTONDOWN:
+ if (correctBox.contains(mousePos))
+ return 1;
+ for (i = 0; i < 6; i++)
+ if (incorrectBoxes[i].contains(mousePos))
+ return -1;
+ break;
+
+ default:
+ break;
+ }
+ }
+ drawScreen();
+ g_system->delayMillis(10);
+ }
+ return -1;
+}
+
+
bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool secondary) {
if (_currentMode == NonInteractive) {
return false;
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 1e8b5e37497..3f17e109230 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -58,6 +58,7 @@ BoyzEngine::BoyzEngine(OSystem *syst, const ADGameDescription *gd) : HypnoEngine
_currentMode = NonInteractive;
_crosshairsPalette = nullptr;
_lastLevel = 0;
+ _selectedCorrectBox = 0;
_flashbackMode = false;
const chapterEntry *entry = rawChapterTable;
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index b1139c49b97..66d79414ae3 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -588,6 +588,8 @@ public:
private:
void renderHighlights(Hotspots *hs);
void waitForUserClick(uint32 timeout);
+ int pickABox();
+ int _selectedCorrectBox;
char selectDirection();
void runMainMenu(Code *code);
Commit: bcd4ac20582870f6ff4d95849ee1803763bc1ab1
https://github.com/scummvm/scummvm/commit/bcd4ac20582870f6ff4d95849ee1803763bc1ab1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-08T21:05:34+02:00
Commit Message:
HYPNO: complete the table of levels in boyz
Changed paths:
engines/hypno/boyz/boyz.cpp
engines/hypno/boyz/hard.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 3f17e109230..34d6256dd19 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -46,6 +46,17 @@ static const chapterEntry rawChapterTable[] = {
{3592, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
{36, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
{41, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {42, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {51, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {52, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {53, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {531, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {54, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {55, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {56, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {57, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {58, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
+ {59, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor},
{0, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0, kHypnoNoColor}
};
@@ -225,9 +236,9 @@ void BoyzEngine::loadAssets() {
loadArcadeLevel("c41.mi_", "c42.mi_", "<retry_menu>", "");
loadArcadeLevel("c42.mi_", "<select_c5>", "<retry_menu>", "");
- loadArcadeLevel("c51.mi_", "<select_c5>", "<retry_menu>", "");
- loadArcadeLevel("c52.mi_", "<select_c5>", "<retry_menu>", "");
- loadArcadeLevel("c53.mi_", "<select_c5>", "<retry_menu>", "");
+ loadArcadeLevel("c51.mi_", "<check_c5>", "<retry_menu>", "");
+ loadArcadeLevel("c52.mi_", "<check_c5>", "<retry_menu>", "");
+ loadArcadeLevel("c53.mi_", "<check_c5>", "<retry_menu>", "");
loadArcadeLevel("c54.mi_", "c55.mi_", "<retry_menu>", "");
loadArcadeLevel("c55.mi_", "c56.mi_", "<retry_menu>", "");
loadArcadeLevel("c56.mi_", "c57.mi_", "<retry_menu>", "");
@@ -377,6 +388,9 @@ void BoyzEngine::loadAssets() {
Code *check_ho = new Code("<check_ho>");
_levels["<check_ho>"] = check_ho;
+ Code *check_c5 = new Code("<check_c5>");
+ _levels["<check_c5>"] = check_c5;
+
loadSceneLevel(selectC5, "<select_c5>", "", "");
sc = (Scene *) _levels["<select_c5>"];
sc->resolution = "320x200";
@@ -961,7 +975,7 @@ Common::Error BoyzEngine::saveGameStream(Common::WriteStream *stream, bool isAut
if (isAutosave)
return Common::kNoError;
- if (_lastLevel < 0 || _lastLevel >= 20)
+ if (_lastLevel < 0 || _lastLevel >= 30)
error("Invalid last level!");
stream->writeString(_name);
@@ -996,6 +1010,8 @@ Common::Error BoyzEngine::loadGameStream(Common::SeekableReadStream *stream) {
_nextLevel = "<select_c3>";
else if (_ids[_lastLevel] == 3592)
_nextLevel = "<select_ho>";
+ else if (_ids[_lastLevel] == 531)
+ _nextLevel = "<select_c5>";
else
_nextLevel = Common::String::format("c%d.mi_", _ids[_lastLevel]);
return Common::kNoError;
diff --git a/engines/hypno/boyz/hard.cpp b/engines/hypno/boyz/hard.cpp
index 1ff8b91c9f6..ad3278505f0 100644
--- a/engines/hypno/boyz/hard.cpp
+++ b/engines/hypno/boyz/hard.cpp
@@ -40,6 +40,8 @@ void BoyzEngine::runCode(Code *code) {
runCheckC3(code);
else if (code->name == "<check_ho>")
runCheckHo(code);
+ else if (code->name == "<check_c5>")
+ runCheckC5(code);
else if (code->name == "<credits>")
endCredits(code);
else
@@ -268,6 +270,22 @@ void BoyzEngine::runRetryMenu(Code *code) {
delete menu;
}
+void BoyzEngine::runCheckC5(Code *code) {
+ Common::String nextLevel;
+ if (_sceneState["GS_SEQ_51"] &&
+ _sceneState["GS_SEQ_52"] &&\
+ _sceneState["GS_SEQ_53"]) {
+ nextLevel = "c54.mi_";
+ }
+
+ if (nextLevel.empty())
+ nextLevel = "<select_c5>";
+
+ _nextLevel = nextLevel;
+ saveProfile(_name, 531);
+}
+
+
void BoyzEngine::runCheckC3(Code *code) {
Common::String nextLevel;
if (_sceneState["GS_SEQ_31"] && _sceneState["GS_SEQ_32"] &&\
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 66d79414ae3..5f200285cb2 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -596,6 +596,7 @@ public:
void runRetryMenu(Code *code);
void runCheckC3(Code *code);
void runCheckHo(Code *code);
+ void runCheckC5(Code *code);
void runDifficultyMenu(Code *code);
void endCredits(Code *code);
Common::String firstLevelTerritory(const Common::String &level);
More information about the Scummvm-git-logs
mailing list