[Scummvm-git-logs] scummvm master -> a52afca14a3e3bd75f3ee71343a1dfde9ceed4ab
neuromancer
noreply at scummvm.org
Sun Feb 27 09:08:46 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:
20846a7936 HYPNO: corrected level progression in wet
a52afca14a HYPNO: implemented command to track enemy damage in wet and removed some extra spaces
Commit: 20846a7936e1a899a0916730a03494c5af704607
https://github.com/scummvm/scummvm/commit/20846a7936e1a899a0916730a03494c5af704607
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-27T10:08:48+01:00
Commit Message:
HYPNO: corrected level progression in wet
Changed paths:
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index e39882dffd7..994b7d0f2e7 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -284,9 +284,9 @@ void WetEngine::loadAssetsFullGame() {
loadArcadeLevel("c311.mi_", "c32", "<check_lives>", "");
loadArcadeLevel("c312.mi_", "c32", "<check_lives>", "");
- loadArcadeLevel("c320.mi_", "c41", "<check_lives>", "");
- loadArcadeLevel("c321.mi_", "c41", "<check_lives>", "");
- loadArcadeLevel("c322.mi_", "c41", "<check_lives>", "");
+ loadArcadeLevel("c320.mi_", "c33", "<check_lives>", "");
+ loadArcadeLevel("c321.mi_", "c33", "<check_lives>", "");
+ loadArcadeLevel("c322.mi_", "c33", "<check_lives>", "");
loadArcadeLevel("c330.mi_", "c30", "<check_lives>", "");
loadArcadeLevel("c331.mi_", "c30", "<check_lives>", "");
@@ -316,9 +316,9 @@ void WetEngine::loadAssetsFullGame() {
loadArcadeLevel("c431.mi_", "c44", "<check_lives>", "");
loadArcadeLevel("c432.mi_", "c44", "<check_lives>", "");
- loadArcadeLevel("c440.mi_", "c51", "<check_lives>", "");
- loadArcadeLevel("c441.mi_", "c51", "<check_lives>", "");
- loadArcadeLevel("c442.mi_", "c51", "<check_lives>", "");
+ loadArcadeLevel("c440.mi_", "c40", "<check_lives>", "");
+ loadArcadeLevel("c441.mi_", "c40", "<check_lives>", "");
+ loadArcadeLevel("c442.mi_", "c40", "<check_lives>", "");
loadArcadeLevel("c400.mi_", "c51", "<check_lives>", "");
arc = (ArcadeShooting*) _levels["c400.mi_"];
@@ -336,9 +336,9 @@ void WetEngine::loadAssetsFullGame() {
loadArcadeLevel("c511.mi_", "c52", "<check_lives>", "");
loadArcadeLevel("c512.mi_", "c52", "<check_lives>", "");
- loadArcadeLevel("c520.mi_", "c61", "<check_lives>", "");
- loadArcadeLevel("c521.mi_", "c61", "<check_lives>", "");
- loadArcadeLevel("c522.mi_", "c61", "<check_lives>", "");
+ loadArcadeLevel("c520.mi_", "c50", "<check_lives>", "");
+ loadArcadeLevel("c521.mi_", "c50", "<check_lives>", "");
+ loadArcadeLevel("c522.mi_", "c50", "<check_lives>", "");
loadArcadeLevel("c500.mi_", "c61", "<check_lives>", "");
arc = (ArcadeShooting*) _levels["c500.mi_"];
Commit: a52afca14a3e3bd75f3ee71343a1dfde9ceed4ab
https://github.com/scummvm/scummvm/commit/a52afca14a3e3bd75f3ee71343a1dfde9ceed4ab
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-27T10:08:48+01:00
Commit Message:
HYPNO: implemented command to track enemy damage in wet and removed some extra spaces
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/grammar.h
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
engines/hypno/wet/arcade.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 96fc520b9b7..873fcbdb968 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -506,6 +506,12 @@ void HypnoEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, MVid
if (i >= 0) {
if (!_shoots[i].hitSound.empty())
playSound(_soundPath + _shoots[i].hitSound, 1);
+
+ if (_shoots[i].timesToShoot > 1) {
+ _shoots[i].timesToShoot = _shoots[i].timesToShoot - 1;
+ return;
+ }
+
if (!_shoots[i].deathSound.empty())
playSound(_soundPath + _shoots[i].deathSound, 1);
_score = _score + _shoots[i].pointsToShoot;
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 6fc6e3e1d88..ad1085de7d3 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -372,7 +372,7 @@ public:
Shoot() {
destroyed = false;
video = nullptr;
- timesToShoot = 0;
+ timesToShoot = 1;
pointsToShoot = 0;
attackWeight = 0;
paletteOffset = 0;
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 20508c5b481..dc2b7fe0e45 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -583,8 +583,8 @@ static const yytype_int16 yyrline[] =
261, 264, 265, 266, 269, 277, 282, 287, 291, 295,
299, 303, 307, 311, 315, 319, 323, 327, 331, 335,
339, 343, 347, 351, 355, 358, 362, 367, 371, 376,
- 381, 385, 391, 392, 395, 396, 399, 403, 406, 413,
- 416
+ 381, 385, 391, 395, 398, 399, 402, 406, 409, 416,
+ 419
};
#endif
@@ -1850,51 +1850,54 @@ yyreduce:
case 72: /* bline: CTOK NUM */
#line 391 "engines/hypno/grammar_arc.y"
- { debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i)); }
-#line 1855 "engines/hypno/grammar_arc.cpp"
+ {
+ shoot->timesToShoot = (yyvsp[0].i);
+ debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i));
+ }
+#line 1858 "engines/hypno/grammar_arc.cpp"
break;
case 73: /* bline: HTOK NUM */
-#line 392 "engines/hypno/grammar_arc.y"
+#line 395 "engines/hypno/grammar_arc.y"
{
shoot->attackFrames.push_back((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 1863 "engines/hypno/grammar_arc.cpp"
+#line 1866 "engines/hypno/grammar_arc.cpp"
break;
case 74: /* bline: VTOK NUM */
-#line 395 "engines/hypno/grammar_arc.y"
+#line 398 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V %d", (yyvsp[0].i)); }
-#line 1869 "engines/hypno/grammar_arc.cpp"
+#line 1872 "engines/hypno/grammar_arc.cpp"
break;
case 75: /* bline: WTOK NUM */
-#line 396 "engines/hypno/grammar_arc.y"
+#line 399 "engines/hypno/grammar_arc.y"
{
shoot->attackWeight = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 1877 "engines/hypno/grammar_arc.cpp"
+#line 1880 "engines/hypno/grammar_arc.cpp"
break;
case 76: /* bline: DTOK NUM */
-#line 399 "engines/hypno/grammar_arc.y"
+#line 402 "engines/hypno/grammar_arc.y"
{
shoot->pointsToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i));
}
-#line 1886 "engines/hypno/grammar_arc.cpp"
+#line 1889 "engines/hypno/grammar_arc.cpp"
break;
case 77: /* bline: LTOK NUM NUM */
-#line 403 "engines/hypno/grammar_arc.y"
+#line 406 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 1894 "engines/hypno/grammar_arc.cpp"
+#line 1897 "engines/hypno/grammar_arc.cpp"
break;
case 78: /* bline: SNTOK FILENAME enc */
-#line 406 "engines/hypno/grammar_arc.y"
+#line 409 "engines/hypno/grammar_arc.y"
{
if (Common::String("S1") == (yyvsp[-2].s))
shoot->deathSound = (yyvsp[-1].s);
@@ -1902,30 +1905,30 @@ yyreduce:
shoot->hitSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 1906 "engines/hypno/grammar_arc.cpp"
+#line 1909 "engines/hypno/grammar_arc.cpp"
break;
case 79: /* bline: NTOK */
-#line 413 "engines/hypno/grammar_arc.y"
+#line 416 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 1914 "engines/hypno/grammar_arc.cpp"
+#line 1917 "engines/hypno/grammar_arc.cpp"
break;
case 80: /* bline: ZTOK */
-#line 416 "engines/hypno/grammar_arc.y"
+#line 419 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 1925 "engines/hypno/grammar_arc.cpp"
+#line 1928 "engines/hypno/grammar_arc.cpp"
break;
-#line 1929 "engines/hypno/grammar_arc.cpp"
+#line 1932 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index b3e237d48fc..53ced38ca3a 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -388,7 +388,10 @@ bline: FNTOK FILENAME {
shoot->deathPosition = Common::Point($2, $3);
debugC(1, kHypnoDebugParser, "O %d %d", $2, $3);
}
- | CTOK NUM { debugC(1, kHypnoDebugParser, "C %d", $2); }
+ | CTOK NUM {
+ shoot->timesToShoot = $2;
+ debugC(1, kHypnoDebugParser, "C %d", $2);
+ }
| HTOK NUM {
shoot->attackFrames.push_back($2);
debugC(1, kHypnoDebugParser, "H %d", $2); }
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 89c3ce54019..3bb4a5bfe7d 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -30,7 +30,7 @@ namespace Hypno {
void WetEngine::initSegment(ArcadeShooting *arc) {
if (_arcadeMode == "Y1") {
_segmentShootSequenceOffset = 0;
- _segmentShootSequenceMax = 7;
+ _segmentShootSequenceMax = 3;
} else if (_arcadeMode == "Y3") {
_segmentShootSequenceOffset = 0;
_segmentShootSequenceMax = 7;
@@ -54,7 +54,7 @@ void WetEngine::initSegment(ArcadeShooting *arc) {
if (_arcadeMode == "Y3") {
ShootInfo si;
si.name = "SP_CBREAKER_L";
- si.timestamp = 30 * (_segmentRepetitionMax + 1) - 3;
+ si.timestamp = 30 * (_segmentRepetitionMax + 1) - 3;
_shootSequence.push_back(si);
}
}
@@ -65,7 +65,7 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
Segments segments = arc->segments;
if (_segmentRepetition < _segmentRepetitionMax) {
- _segmentRepetition = _segmentRepetition + 1;
+ _segmentRepetition = _segmentRepetition + 1;
} else {
_segmentRepetition = 0;
_segmentRepetitionMax = 0;
@@ -73,7 +73,7 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
if (_arcadeMode == "Y1") {
if (_rnd->getRandomBit())
_segmentIdx = _segmentIdx + 1;
- else
+ else
_segmentIdx = _segmentIdx + 5;
} else if (_arcadeMode == "Y5") {
int r = _rnd->getRandomNumber(4);
@@ -105,14 +105,14 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
_segmentIdx = _segmentIdx + 1;
else if (mousePos.x >= 300)
_segmentIdx = _segmentIdx + 3;
- else
+ else
_segmentIdx = _segmentIdx + 2;
} else if (_arcadeMode == "Y5") {
if (mousePos.x <= 100)
_segmentIdx = _segmentIdx + 2;
else if (mousePos.x >= 300)
_segmentIdx = _segmentIdx + 3;
- else
+ else
_segmentIdx = _segmentIdx + 1;
} else
error("Invalid segment type for mode: %s", _arcadeMode.c_str());
@@ -120,17 +120,17 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
} else if (segments[_segmentIdx].type == 0xc2) {
if (mousePos.x <= 160)
_segmentIdx = _segmentIdx + 1;
- else
+ else
_segmentIdx = _segmentIdx + 2;
} else if (segments[_segmentIdx].type == 0xcc) {
if (mousePos.x <= 160)
_segmentIdx = _segmentIdx + 1;
- else
+ else
_segmentIdx = _segmentIdx + 2;
} else if (segments[_segmentIdx].type == 'Y') {
if (mousePos.x <= 160)
_segmentIdx = _segmentIdx + 2;
- else
+ else
_segmentIdx = _segmentIdx + 1;
} else {
@@ -172,10 +172,10 @@ void WetEngine::findNextSegment(ArcadeShooting *arc) {
ShootInfo si;
if (_segmentOffset == 0)
si.name = "SP_CBREAKER_L";
- else
+ else
si.name = "SP_CBREAKER_U";
- si.timestamp = 30 * (_segmentRepetitionMax + 1) - 3;
+ si.timestamp = 30 * (_segmentRepetitionMax + 1) - 3;
_shootSequence.push_back(si);
}
}
@@ -243,7 +243,7 @@ void WetEngine::runBeforeArcade(ArcadeShooting *arc) {
if (arc->mode == "Y4" || arc->mode == "Y5") { // These images are flipped, for some reason
for (Frames::iterator it = _playerFrames.begin(); it != _playerFrames.end(); ++it) {
- for (int i = 0 ; i < (*it)->w ; i++)
+ for (int i = 0 ; i < (*it)->w ; i++)
for (int j = 0 ; j < (*it)->h/2 ; j++) {
uint32 p1 = (*it)->getPixel(i, j);
uint32 p2 = (*it)->getPixel(i, (*it)->h - j - 1);
@@ -267,7 +267,7 @@ void WetEngine::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());
//_playerFrameSep = -1;
- } else
+ } else
debugC(1, kHypnoDebugArcade, "Separator frame found at %d", _playerFrameSep);
_playerFrameIdx = -1;
More information about the Scummvm-git-logs
mailing list