[Scummvm-git-logs] scummvm master -> 6cc8ce961d5a6fdc10b29d6e9b185039b03b541f
neuromancer
noreply at scummvm.org
Wed Feb 2 19:14:26 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
40eb083663 HYPNO: improved arcade death animations
6cc8ce961d HYPNO: added detection of german release of spider
Commit: 40eb0836630ccd836e8fb6f7d60d0dfd97b27d42
https://github.com/scummvm/scummvm/commit/40eb0836630ccd836e8fb6f7d60d0dfd97b27d42
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-02T20:14:26+01:00
Commit Message:
HYPNO: improved arcade death animations
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/grammar.h
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index fbfb92ab8fc..48f2bf3b277 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -64,6 +64,9 @@ void HypnoEngine::parseArcadeShooting(const Common::String &prefix, const Common
g_parsedArc->player.clear();
g_parsedArc->shoots.clear();
g_parsedArc->intros.clear();
+ g_parsedArc->defeatNoEnergyFirstVideo.clear();
+ g_parsedArc->defeatMissBossVideo.clear();
+ g_parsedArc->defeatNoEnergySecondVideo.clear();
}
ShootSequence HypnoEngine::parseShootList(const Common::String &filename, const Common::String &data) {
@@ -327,6 +330,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
s.video = new MVideo(it->animation, it->position, true, false, false);
playVideo(*s.video);
s.video->currentFrame = s.video->decoder->decodeNextFrame(); // Skip the first frame
+ if (s.attackFrames.size() == 0)
+ s.attackFrames.push_back(s.explosionFrames.back()-3);
loadPalette(s.video->decoder->getPalette() + 3*s.paletteOffset, s.paletteOffset, s.paletteSize);
_shoots.push_back(s);
playSound(_soundPath + arc->enemySound, 1);
@@ -341,14 +346,17 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it) {
if (it->video && it->video->decoder) {
+ uint32 attackFrame = it->attackFrames.front();
int frame = it->video->decoder->getCurFrame();
- if (frame > 0 && frame >= (int)(it->attackFrame) && !it->destroyed) {
+ if (frame > 0 && frame >= (int)(attackFrame - 1) && !it->destroyed) {
_health = _health - it->attackWeight;
hitPlayer();
- it->attackFrame = it->video->decoder->getFrameCount() + 1; // It will never attack again
+ it->attackFrames.pop_front();
}
- if (frame > 0 && frame >= (int)(it->explosionFrame - 3) && !it->destroyed) {
+ uint32 explosionFrame = it->explosionFrames.back();
+ if (frame > 0 && frame >= (int)(explosionFrame - 3) && !it->destroyed) {
+ // No need to pop attackFrames or explosionFrames
skipVideo(*it->video);
} else if (frame > 0 && frame >= (int)(it->video->decoder->getFrameCount() - 2)) {
skipVideo(*it->video);
@@ -444,7 +452,16 @@ void HypnoEngine::shoot(const Common::Point &mousePos) {
int w = _shoots[i].video->decoder->getWidth();
int h = _shoots[i].video->decoder->getHeight();
_shoots[i].video->position = Common::Point(mousePos.x - w / 2, mousePos.y - h / 2);
- _shoots[i].video->decoder->forceSeekToFrame(_shoots[i].explosionFrame + 2);
+
+ uint32 explosionFrame = *_shoots[i].explosionFrames.begin();
+ int currentFrame = _shoots[i].video->decoder->getCurFrame();
+ for (Common::List<uint32>::iterator it = _shoots[i].explosionFrames.begin(); it != _shoots[i].explosionFrames.end(); ++it) {
+ if (int(explosionFrame) >= currentFrame)
+ break;
+ explosionFrame = *it;
+ }
+
+ _shoots[i].video->decoder->forceSeekToFrame(explosionFrame + 2);
} else {
byte p[3] = {0x00, 0x00, 0x00}; // Always black?
assert(_shoots[i].paletteSize == 1 || _shoots[i].paletteSize == 0);
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 9ed77c1bceb..92e0af712ae 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -359,8 +359,6 @@ public:
attackWeight = 0;
paletteOffset = 0;
paletteSize = 0;
- attackFrame = 0;
- explosionFrame = 0;
obj1KillsCount = 0;
obj1MissesCount = 0;
animation = "NONE";
@@ -388,8 +386,8 @@ public:
Filename hitSound;
MVideo *video;
- uint32 attackFrame;
- uint32 explosionFrame;
+ Common::List<uint32> attackFrames;
+ Common::List<uint32> explosionFrames;
Filename explosionAnimation;
bool destroyed;
};
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 31857ba0eeb..37f6a77aafd 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -577,8 +577,8 @@ static const yytype_int16 yyrline[] =
167, 170, 177, 178, 181, 182, 183, 186, 194, 199,
204, 208, 212, 216, 220, 224, 228, 232, 236, 240,
244, 248, 252, 256, 260, 264, 268, 271, 275, 280,
- 281, 282, 288, 292, 295, 296, 299, 302, 306, 313,
- 314
+ 281, 282, 286, 290, 293, 294, 297, 300, 304, 311,
+ 312
};
#endif
@@ -1657,64 +1657,62 @@ yyreduce:
case 61: /* bline: KNTOK NUM NUM */
#line 282 "engines/hypno/grammar_arc.y"
{
- shoot->explosionFrame = (yyvsp[0].i);
- if (shoot->attackFrame == 0) // Override attack frame if it is not specified
- shoot->attackFrame = (yyvsp[0].i) - 4;
+ shoot->explosionFrames.push_front((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "KN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 1666 "engines/hypno/grammar_arc.cpp"
+#line 1664 "engines/hypno/grammar_arc.cpp"
break;
case 62: /* bline: P0TOK NUM NUM */
-#line 288 "engines/hypno/grammar_arc.y"
+#line 286 "engines/hypno/grammar_arc.y"
{
shoot->paletteSize = (yyvsp[-1].i);
shoot->paletteOffset = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "P0 %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1675 "engines/hypno/grammar_arc.cpp"
+#line 1673 "engines/hypno/grammar_arc.cpp"
break;
case 63: /* bline: OTOK NUM NUM */
-#line 292 "engines/hypno/grammar_arc.y"
+#line 290 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "O %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 1683 "engines/hypno/grammar_arc.cpp"
+#line 1681 "engines/hypno/grammar_arc.cpp"
break;
case 64: /* bline: CTOK NUM */
-#line 295 "engines/hypno/grammar_arc.y"
+#line 293 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i)); }
-#line 1689 "engines/hypno/grammar_arc.cpp"
+#line 1687 "engines/hypno/grammar_arc.cpp"
break;
case 65: /* bline: HTOK NUM */
-#line 296 "engines/hypno/grammar_arc.y"
+#line 294 "engines/hypno/grammar_arc.y"
{
- shoot->attackFrame = (yyvsp[0].i);
+ shoot->attackFrames.push_back((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 1697 "engines/hypno/grammar_arc.cpp"
+#line 1695 "engines/hypno/grammar_arc.cpp"
break;
case 66: /* bline: WTOK NUM */
-#line 299 "engines/hypno/grammar_arc.y"
+#line 297 "engines/hypno/grammar_arc.y"
{
shoot->attackWeight = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 1705 "engines/hypno/grammar_arc.cpp"
+#line 1703 "engines/hypno/grammar_arc.cpp"
break;
case 67: /* bline: DTOK NUM */
-#line 302 "engines/hypno/grammar_arc.y"
+#line 300 "engines/hypno/grammar_arc.y"
{
shoot->pointsToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i));
}
-#line 1714 "engines/hypno/grammar_arc.cpp"
+#line 1712 "engines/hypno/grammar_arc.cpp"
break;
case 68: /* bline: SNTOK FILENAME enc */
-#line 306 "engines/hypno/grammar_arc.y"
+#line 304 "engines/hypno/grammar_arc.y"
{
if (Common::String("S1") == (yyvsp[-2].s))
shoot->deathSound = (yyvsp[-1].s);
@@ -1722,28 +1720,28 @@ yyreduce:
shoot->hitSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 1726 "engines/hypno/grammar_arc.cpp"
+#line 1724 "engines/hypno/grammar_arc.cpp"
break;
case 69: /* bline: NTOK */
-#line 313 "engines/hypno/grammar_arc.y"
+#line 311 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "N"); }
-#line 1732 "engines/hypno/grammar_arc.cpp"
+#line 1730 "engines/hypno/grammar_arc.cpp"
break;
case 70: /* bline: ZTOK */
-#line 314 "engines/hypno/grammar_arc.y"
+#line 312 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 1743 "engines/hypno/grammar_arc.cpp"
+#line 1741 "engines/hypno/grammar_arc.cpp"
break;
-#line 1747 "engines/hypno/grammar_arc.cpp"
+#line 1745 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 94b1fd1e2ae..3cbc0c1e854 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -280,9 +280,7 @@ bline: FNTOK FILENAME {
| R0TOK NUM NUM { debugC(1, kHypnoDebugParser, "R0 %d %d", $2, $3); }
| BNTOK NUM NUM { debugC(1, kHypnoDebugParser, "BN %d %d", $2, $3); }
| KNTOK NUM NUM {
- shoot->explosionFrame = $3;
- if (shoot->attackFrame == 0) // Override attack frame if it is not specified
- shoot->attackFrame = $3 - 4;
+ shoot->explosionFrames.push_front($3);
debugC(1, kHypnoDebugParser, "KN %d %d", $2, $3);
}
| P0TOK NUM NUM {
@@ -294,7 +292,7 @@ bline: FNTOK FILENAME {
}
| CTOK NUM { debugC(1, kHypnoDebugParser, "C %d", $2); }
| HTOK NUM {
- shoot->attackFrame = $2;
+ shoot->attackFrames.push_back($2);
debugC(1, kHypnoDebugParser, "H %d", $2); }
| WTOK NUM {
shoot->attackWeight = $2;
Commit: 6cc8ce961d5a6fdc10b29d6e9b185039b03b541f
https://github.com/scummvm/scummvm/commit/6cc8ce961d5a6fdc10b29d6e9b185039b03b541f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-02T20:14:26+01:00
Commit Message:
HYPNO: added detection of german release of spider
Changed paths:
engines/hypno/detection.cpp
diff --git a/engines/hypno/detection.cpp b/engines/hypno/detection.cpp
index 50647e841fe..24a8d43e7a7 100644
--- a/engines/hypno/detection.cpp
+++ b/engines/hypno/detection.cpp
@@ -69,6 +69,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING,
GUIO1(GUIO_NOMIDI)
},
+ {
+ "sinistersix", // DE release
+ nullptr,
+ AD_ENTRY2s("Setup1.Sax", "86b6ae45f45a8273ef3116be6bac01f5", 9591164,
+ "MISSIONS.LIB", "585704e26094cbaf14fbee90798e8d5d", 119945),
+ Common::DE_DEU,
+ Common::kPlatformDOS,
+ ADGF_TESTING,
+ GUIO1(GUIO_NOMIDI)
+ },
{
"sinistersix", // HE release
nullptr,
More information about the Scummvm-git-logs
mailing list