[Scummvm-git-logs] scummvm master -> 32fd2816428cc8fd46bec8b6bbc41b1952ddb00d
neuromancer
noreply at scummvm.org
Tue Apr 12 19:37:37 UTC 2022
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a884340fd2 HYPNO: allow to select different target colors per level or target name
7fdd4ddcec HYPNO: workaround to allow to finish level c33 in wet
18964d0b89 HYPNO: make level c50 completable in wet
32fd281642 HYPNO: fix sounds path in wet demo
Commit: a884340fd29a5f6bf6577a21b18f6df58d9418f6
https://github.com/scummvm/scummvm/commit/a884340fd29a5f6bf6577a21b18f6df58d9418f6
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-12T21:36:56+02:00
Commit Message:
HYPNO: allow to select different target colors per level or target name
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/hypno.h
engines/hypno/spider/arcade.cpp
engines/hypno/wet/arcade.cpp
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 0db30aa2538..830d0fb1b56 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -170,6 +170,8 @@ void HypnoEngine::runAfterArcade(ArcadeShooting *arc) {}
void HypnoEngine::initSegment(ArcadeShooting *arc) { error("Function \"%s\" not implemented", __FUNCTION__); }
void HypnoEngine::findNextSegment(ArcadeShooting *arc) { error("Function \"%s\" not implemented", __FUNCTION__); }
+byte *HypnoEngine::getTargetColor(Common::String name, int levelId) { error("Function \"%s\" not implemented", __FUNCTION__); }
+
void HypnoEngine::runArcade(ArcadeShooting *arc) {
_arcadeMode = arc->mode;
Common::Point mousePos;
@@ -463,7 +465,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
_health = _health - it->attackWeight;
hitPlayer();
}
- byte *c = getPalette(kHypnoColorRed);
+ byte *c = getTargetColor(it->name, _levelId);
assert(s.paletteSize == 1 || s.paletteSize == 0);
loadPalette(c, s.paletteOffset, s.paletteSize);
_shoots.push_back(s);
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index bc29e28b746..9bcda0cefdd 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -70,10 +70,13 @@ enum PlayerPosition {
// Common colors
enum HypnoColors {
+ kHypnoNoColor = -1,
kHypnoColorRed = 250,
kHypnoColorGreen = 251,
kHypnoColorWhite = 252,
kHypnoColorYellow = 253,
+ kHypnoColorBlack = 254,
+ kHypnoColorCyan = 255
};
// Spider colors
@@ -248,6 +251,7 @@ public:
virtual void hitPlayer();
virtual void missedTarget(Shoot *s, ArcadeShooting *arc, MVideo &background);
virtual void missNoTarget(ArcadeShooting *arc, MVideo &background);
+ virtual byte *getTargetColor(Common::String name, int levelId);
// Segments
uint32 _segmentIdx;
@@ -342,6 +346,7 @@ struct chapterEntry {
int energyPos[2];
int scorePos[2];
int objectivesPos[2];
+ int targetColor;
};
class WetEngine : public HypnoEngine {
@@ -386,6 +391,7 @@ public:
void runAfterArcade(ArcadeShooting *arc) override;
void findNextSegment(ArcadeShooting *arc) override;
void initSegment(ArcadeShooting *arc) override;
+ byte *getTargetColor(Common::String name, int levelId) override;
private:
void runMainMenu(Code *code);
@@ -421,6 +427,7 @@ public:
void runAfterArcade(ArcadeShooting *arc) override;
void findNextSegment(ArcadeShooting *arc) override;
void initSegment(ArcadeShooting *arc) override;
+ byte *getTargetColor(Common::String name, int levelId) 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 6df9bdb9e83..ae5be4d7076 100644
--- a/engines/hypno/spider/arcade.cpp
+++ b/engines/hypno/spider/arcade.cpp
@@ -282,5 +282,8 @@ void SpiderEngine::drawHealth() {
drawString("block05.fgx", "ENERGY", 248, 180, 38, c);
}
+byte *SpiderEngine::getTargetColor(Common::String name, int levelId) {
+ return getPalette(kHypnoColorRed);
+}
} // End of namespace Hypno
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 12dd96858ad..422382748dd 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -621,4 +621,14 @@ void WetEngine::drawHealth() {
}
}
+byte *WetEngine::getTargetColor(Common::String name, int levelId) {
+ if (name == "BOSS1" || name == "BOSS2" || name == "BOSS3" || name == "BOSS4")
+ return getPalette(kHypnoColorGreen);
+
+ const chapterEntry *entry = _chapterTable[levelId];
+ if (entry->targetColor < 0)
+ error ("No target color specified for level %d", levelId);
+ return getPalette(entry->targetColor);
+}
+
} // End of namespace Hypno
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index a0829d5085a..81b800ad036 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -28,27 +28,27 @@
namespace Hypno {
static const chapterEntry rawChapterTable[] = {
- {11, {44, 172}, {218, 172}, {0, 0}}, // c11
- {10, {19, 3}, {246, 3}, {246, 11}}, // c10
- {21, {70, 160}, {180, 160}, {220, 185}}, // c21
- {22, {70, 160}, {180, 160}, {220, 185}}, // c22
- {23, {70, 160}, {180, 160}, {220, 185}}, // c23
- {20, {128, 150}, {238, 150},{0, 0}}, // c20
- {31, {70, 160}, {180, 160}, {220, 185}}, // c31
- {32, {70, 160}, {180, 160}, {220, 185}}, // c32
- {33, {70, 160}, {180, 160}, {220, 185}}, // c33
- {30, {19, 3}, {246, 3}, {246, 11}}, // c30
- {41, {70, 160}, {180, 160}, {220, 185}}, // c41
- {42, {70, 160}, {180, 160}, {220, 185}}, // c42
- {43, {70, 160}, {180, 160}, {220, 185}}, // c43
- {44, {70, 160}, {180, 160}, {220, 185}}, // c44
- {40, {19, 3}, {246, 3}, {246, 11}}, // c40
- {51, {60, 167}, {190, 167}, {135, 187}}, // c51
- {52, {60, 167}, {190, 167}, {135, 187}}, // c52
- {50, {19, 3}, {246, 3}, {246, 11}}, // c50 (fixed)
- {61, {63, 167}, {187, 167}, {192, 188}}, // c61
- {60, {63, 167}, {187, 167}, {192, 188}}, // c60
- {0, {0, 0}, {0, 0}, {0, 0}} // NULL
+ {11, {44, 172}, {218, 172}, {0, 0}, kHypnoColorRed}, // c11
+ {10, {19, 3}, {246, 3}, {246, 11}, kHypnoNoColor}, // c10
+ {21, {70, 160}, {180, 160}, {220, 185}, kHypnoColorYellow}, // c21
+ {22, {70, 160}, {180, 160}, {220, 185}, kHypnoColorGreen}, // c22
+ {23, {70, 160}, {180, 160}, {220, 185}, kHypnoColorCyan}, // c23
+ {20, {128, 150}, {238, 150},{0, 0}, kHypnoColorCyan}, // c20
+ {31, {70, 160}, {180, 160}, {220, 185}, kHypnoColorGreen}, // c31
+ {32, {70, 160}, {180, 160}, {220, 185}, kHypnoColorRed}, // c32
+ {33, {70, 160}, {180, 160}, {220, 185}, kHypnoColorRed}, // c33
+ {30, {19, 3}, {246, 3}, {246, 11}, kHypnoColorRed}, // c30
+ {41, {70, 160}, {180, 160}, {220, 185}, kHypnoColorRed}, // c41
+ {42, {70, 160}, {180, 160}, {220, 185}, kHypnoColorRed}, // c42
+ {43, {70, 160}, {180, 160}, {220, 185}, kHypnoColorRed}, // c43
+ {44, {70, 160}, {180, 160}, {220, 185}, kHypnoColorRed}, // c44
+ {40, {19, 3}, {246, 3}, {246, 11}, kHypnoColorRed}, // c40
+ {51, {60, 167}, {190, 167}, {135, 187}, kHypnoColorRed}, // c51
+ {52, {60, 167}, {190, 167}, {135, 187}, kHypnoColorRed}, // c52
+ {50, {19, 3}, {246, 3}, {246, 11}, kHypnoColorRed}, // c50 (fixed)
+ {61, {63, 167}, {187, 167}, {192, 188}, kHypnoColorRed}, // c61
+ {60, {63, 167}, {187, 167}, {192, 188}, kHypnoColorRed}, // c60
+ {0, {0, 0}, {0, 0}, {0, 0}, kHypnoColorRed} // NULL
};
WetEngine::WetEngine(OSystem *syst, const ADGameDescription *gd) : HypnoEngine(syst, gd) {
Commit: 7fdd4ddceca395f652f7509bd902f138f40eb5d1
https://github.com/scummvm/scummvm/commit/7fdd4ddceca395f652f7509bd902f138f40eb5d1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-12T21:36:56+02:00
Commit Message:
HYPNO: workaround to allow to finish level c33 in wet
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/wet/arcade.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 830d0fb1b56..462a502ff84 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -339,7 +339,10 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
if (!arc->transitions.empty()) {
ArcadeTransition at = *arc->transitions.begin();
- if (_background->decoder->getCurFrame() > (int) at.time) {
+ int ttime = at.time;
+ if (ttime == 0)
+ _skipLevel = true;
+ else if (_background->decoder->getCurFrame() > ttime) {
transition = true;
if (_playerFrameSeps.size() == 1) {
@@ -378,7 +381,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
} else if (!at.sound.empty()) {
playSound(at.sound, 1);
} else
- error ("Invalid transition at %d", at.time);
+ error ("Invalid transition at %d", ttime);
arc->transitions.pop_front();
if (!_music.empty())
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 422382748dd..eec4dc99675 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -526,7 +526,7 @@ void WetEngine::missNoTarget(ArcadeShooting *arc, MVideo &background) {
}
void WetEngine::hitPlayer() {
- if (_arcadeMode != "Y1" && _arcadeMode != "Y2" && _arcadeMode != "Y3" && _arcadeMode != "Y4" && _arcadeMode != "Y5") {
+ if (_arcadeMode != "YT" && _arcadeMode != "Y1" && _arcadeMode != "Y2" && _arcadeMode != "Y3" && _arcadeMode != "Y4" && _arcadeMode != "Y5") {
assert( _playerFrameSep < (int)_playerFrames.size());
if (_playerFrameIdx < _playerFrameSep)
_playerFrameIdx = _playerFrameSep;
Commit: 18964d0b896048f643fe3a741a03571f3630247d
https://github.com/scummvm/scummvm/commit/18964d0b896048f643fe3a741a03571f3630247d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-12T21:36:56+02:00
Commit Message:
HYPNO: make level c50 completable in wet
Changed paths:
engines/hypno/grammar.h
engines/hypno/hypno.h
engines/hypno/wet/arcade.cpp
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 9ce195ecc59..f3da2679900 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -543,6 +543,10 @@ public:
additionalVideo.clear();
segments.clear();
script.clear();
+ objKillsRequired[0] = 0;
+ objKillsRequired[1] = 0;
+ objMissesAllowed[0] = 0;
+ objMissesAllowed[1] = 0;
}
uint32 id;
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 9bcda0cefdd..90feb17f869 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -406,6 +406,8 @@ private:
Common::Array<uint32> _c40SegmentNext;
int _c40SegmentIdx;
int _c40lastTurn;
+ int _c50LeftTurns;
+ int _c50RigthTurns;
};
class SpiderEngine : public HypnoEngine {
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index eec4dc99675..70eb8c5216d 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -34,9 +34,6 @@ void WetEngine::initSegment(ArcadeShooting *arc) {
} else if (_arcadeMode == "Y3") {
_segmentShootSequenceOffset = 0;
_segmentShootSequenceMax = 7;
- } else if (_arcadeMode == "Y5") {
- _segmentShootSequenceOffset = 1;
- _segmentShootSequenceMax = 9;
} else if (_arcadeMode == "Y4") {
_c40SegmentNext.clear();
_c40SegmentNext.push_back(2);
@@ -54,6 +51,12 @@ void WetEngine::initSegment(ArcadeShooting *arc) {
_segmentShootSequenceOffset = 0;
_segmentShootSequenceMax = 3;
+ } else if (_arcadeMode == "Y5") {
+ _c50LeftTurns = 0;
+ _c50RigthTurns = 0;
+
+ _segmentShootSequenceOffset = 1;
+ _segmentShootSequenceMax = 9;
} else {
_segmentShootSequenceOffset = 0;
_segmentShootSequenceMax = 0;
@@ -126,13 +129,23 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
_segmentIdx = _segmentIdx + 3;
else
_segmentIdx = _segmentIdx + 2;
- } else if (_arcadeMode == "Y5" || _arcadeMode == "Y4") {
+ } else if (_arcadeMode == "Y4") {
if (mousePos.x <= 100)
_segmentIdx = _segmentIdx + 2;
else if (mousePos.x >= 300)
_segmentIdx = _segmentIdx + 3;
else
_segmentIdx = _segmentIdx + 1;
+
+ } else if (_arcadeMode == "Y5") {
+ if (mousePos.x <= 100) {
+ _segmentIdx = _segmentIdx + 2;
+ _c50LeftTurns++;
+ } else if (mousePos.x >= 300) {
+ _segmentIdx = _segmentIdx + 3;
+ _c50RigthTurns++;
+ } else
+ _segmentIdx = _segmentIdx + 1;
} else
error("Invalid segment type for mode: %s at the end of segment %x", _arcadeMode.c_str(), segments[_segmentIdx].type);
@@ -202,6 +215,11 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
_c40lastTurn = int(_segmentIdx);
}
}
+ } else if (_arcadeMode == "Y5") {
+ if (_c50LeftTurns >= 1 && _c50RigthTurns >= 3) {
+ _segmentIdx = 9; // last segment
+ return;
+ }
}
_segmentIdx = _segmentOffset;
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 81b800ad036..e3b9e3aa296 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -60,6 +60,9 @@ WetEngine::WetEngine(OSystem *syst, const ADGameDescription *gd) : HypnoEngine(s
_c40SegmentIdx = -1;
_c40lastTurn = -1;
+ _c50LeftTurns = 0;
+ _c50RigthTurns = 0;
+
const chapterEntry *entry = rawChapterTable;
while (entry->id) {
_ids.push_back(entry->id);
Commit: 32fd2816428cc8fd46bec8b6bbc41b1952ddb00d
https://github.com/scummvm/scummvm/commit/32fd2816428cc8fd46bec8b6bbc41b1952ddb00d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-04-12T21:36:56+02:00
Commit Message:
HYPNO: fix sounds path in wet demo
Changed paths:
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index e3b9e3aa296..a9c76703460 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -208,7 +208,7 @@ void WetEngine::loadAssetsPCW() {
Transition *over = new Transition("<quit>");
_levels["<game_over>"] = over;
- loadLib("", "c_misc/sound.lib", false);
+ loadLib("sound/", "c_misc/sound.lib", false);
loadLib("", "c_misc/fonts.lib", true);
loadFonts();
_nextLevel = "<start>";
More information about the Scummvm-git-logs
mailing list