[Scummvm-git-logs] scummvm master -> e6032569ced8236ac9f7a48b750b791d5bc5c0bf
neuromancer
noreply at scummvm.org
Fri May 20 07:45:53 UTC 2022
This automated email contains information about 16 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
102a63c5d9 HYPNO: improved interactions with hostile and non-hostile actors in boyz
b8fe3bf613 HYPNO: improved handling of levels where skipping frames is required in boyz
5c2aa8832e HYPNO: added more warning video filenames in boyz
cc9108b6ae HYPNO: corrected body frame length in boyz
7f59aeb0db HYPNO: play correct video when hostage is killed in boyz
b13a22a863 HYPNO: avoid playing missed animations after it is too late in boyz
a4e22c4193 HYPNO: end current level when an alarm enemy is missed in boyz
0b4f7a339d HYPNO: basic implementation of checkIfDestroyed field and fixes when jumping at the end of segments in boyz
4755dee3ee HYPNO: better detection of target during alarm sequences in boyz
9ba4326021 HYPNO: implemented basic objective checking in boyz
2af72459bf HYPNO: fixed how health is handled and added hardcoded videos in boyz
4a8ea89cd3 HYPNO: allow scenes to declare their own resolution
d4f75dc5aa HYPNO: added boat machine-gun to the list of weapon and fixed some index to access such arrays in boyz
2cb7f4ef53 HYPNO: better handling of killed animations using transitions in boyz
b00ed2fe13 HYPNO: correctly parsed warning video index in boyz
e6032569ce HYPNO: completed parsing of level c42 in boyz
Commit: 102a63c5d99a1a73dafef123832d11a98f90f6b1
https://github.com/scummvm/scummvm/commit/102a63c5d99a1a73dafef123832d11a98f90f6b1
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: improved interactions with hostile and non-hostile actors in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/grammar.h
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index 38c1163effd..c75b18af8d8 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -261,6 +261,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
if (i < 0) {
missNoTarget(arc);
} else {
+ debugC(1, kHypnoDebugArcade, "Hit target %s", _shoots[i].name.c_str());
if (_shoots[i].nonHostile && secondary) {
playSound(_soundPath + _heySound[_currentActor], 1);
@@ -268,8 +269,23 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
playSound(_soundPath + _shoots[i].animalSound, 1);
return false;
}
+ if (!_shoots[i].additionalVideo.empty()) {
+ _background->decoder->pauseVideo(true);
+ MVideo video(_shoots[i].additionalVideo, Common::Point(0, 0), false, true, false);
+ disableCursor();
+ runIntro(video);
+ loadPalette(_currentPalette);
+ _background->decoder->pauseVideo(false);
- if (_shoots[i].interactionFrame > 0) {
+ // Skip the rest of the interaction
+ _background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start + 3);
+ _masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start + 3);
+
+ updateScreen(*_background);
+ drawScreen();
+ if (!_music.empty())
+ playSound(_music, 0, arc->musicRate); // restore music
+ } else if (_shoots[i].interactionFrame > 0) {
_background->decoder->forceSeekToFrame(_shoots[i].interactionFrame);
_masks->decoder->forceSeekToFrame(_shoots[i].interactionFrame);
_additionalVideo = new MVideo(arc->missBoss2Video, Common::Point(0, 0), true, false, false);
@@ -304,12 +320,18 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
playSound(_music, 0, arc->musicRate); // restore music
hitPlayer();
-
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
return false;
} else if (!_shoots[i].nonHostile && secondary) {
- // Nothing
+ if (_shoots[i].interactionFrame > 0) {
+ _background->decoder->forceSeekToFrame(_shoots[i].interactionFrame);
+ _masks->decoder->forceSeekToFrame(_shoots[i].interactionFrame);
+ _shoots[i].destroyed = true;
+
+ updateScreen(*_background);
+ drawScreen();
+ }
return false;
}
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 9b8068644cf..87ca320d3f2 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -296,7 +296,7 @@ void BoyzEngine::loadAssets() {
loadLib("", "misc/fonts.lib", true);
loadFonts();
- _nextLevel = "<start>";
+ _nextLevel = "c31.mi_";
}
void BoyzEngine::loadFonts() {
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index f2eaf0fa62f..e65aec51959 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -466,6 +466,7 @@ public:
uint32 lastFrame;
uint32 interactionFrame;
Filename explosionAnimation;
+ Filename additionalVideo;
bool playInteractionAudio;
bool destroyed;
bool noEnemySound;
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 49e986508e2..13610d26b5d 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -626,13 +626,13 @@ static const yytype_int16 yyrline[] =
174, 179, 182, 187, 196, 201, 205, 209, 213, 216,
220, 223, 224, 252, 255, 258, 264, 269, 274, 280,
285, 290, 295, 300, 305, 312, 313, 316, 317, 320,
- 321, 322, 325, 333, 338, 341, 346, 348, 351, 356,
- 361, 365, 369, 373, 377, 381, 385, 389, 393, 397,
- 401, 405, 409, 413, 417, 421, 425, 429, 433, 437,
- 441, 445, 449, 452, 456, 461, 466, 469, 474, 479,
- 483, 489, 493, 496, 497, 498, 501, 505, 508, 513,
- 516, 517, 521, 524, 528, 539, 543, 544, 547, 551,
- 555, 558, 561, 563
+ 321, 322, 325, 335, 340, 343, 348, 350, 353, 358,
+ 363, 367, 371, 375, 379, 383, 387, 391, 395, 399,
+ 403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
+ 443, 447, 451, 454, 458, 463, 468, 471, 476, 481,
+ 485, 491, 495, 498, 499, 500, 503, 507, 510, 515,
+ 518, 519, 523, 526, 532, 543, 547, 548, 551, 555,
+ 559, 562, 565, 567
};
#endif
@@ -1740,463 +1740,467 @@ yyreduce:
shoot->animation = (yyvsp[0].s);
else if (Common::String("F4") == (yyvsp[-1].s))
shoot->explosionAnimation = (yyvsp[0].s);
+ else if (Common::String("F6") == (yyvsp[-1].s))
+ shoot->additionalVideo = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s));
}
-#line 1746 "engines/hypno/grammar_arc.cpp"
+#line 1748 "engines/hypno/grammar_arc.cpp"
break;
case 53: /* bline: AVTOK NUM */
-#line 333 "engines/hypno/grammar_arc.y"
+#line 335 "engines/hypno/grammar_arc.y"
{
assert((yyvsp[0].i) == 0);
shoot->nonHostile = true;
debugC(1, kHypnoDebugParser, "AV %d", (yyvsp[0].i));
}
-#line 1756 "engines/hypno/grammar_arc.cpp"
+#line 1758 "engines/hypno/grammar_arc.cpp"
break;
case 54: /* bline: ALTOK NUM */
-#line 338 "engines/hypno/grammar_arc.y"
+#line 340 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "AL %d", (yyvsp[0].i));
}
-#line 1764 "engines/hypno/grammar_arc.cpp"
+#line 1766 "engines/hypno/grammar_arc.cpp"
break;
case 55: /* bline: ABTOK NUM */
-#line 341 "engines/hypno/grammar_arc.y"
+#line 343 "engines/hypno/grammar_arc.y"
{
assert((yyvsp[0].i) == 1);
shoot->playInteractionAudio = true;
debugC(1, kHypnoDebugParser, "AB %d", (yyvsp[0].i));
}
-#line 1774 "engines/hypno/grammar_arc.cpp"
+#line 1776 "engines/hypno/grammar_arc.cpp"
break;
case 56: /* bline: DTOK LTOK */
-#line 346 "engines/hypno/grammar_arc.y"
+#line 348 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "D L");
}
-#line 1781 "engines/hypno/grammar_arc.cpp"
+#line 1783 "engines/hypno/grammar_arc.cpp"
break;
case 57: /* bline: J0TOK NUM */
-#line 348 "engines/hypno/grammar_arc.y"
+#line 350 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "J0 %d", (yyvsp[0].i));
}
-#line 1789 "engines/hypno/grammar_arc.cpp"
+#line 1791 "engines/hypno/grammar_arc.cpp"
break;
case 58: /* bline: FNTOK NONETOK */
-#line 351 "engines/hypno/grammar_arc.y"
+#line 353 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = "NONE";
debugC(1, kHypnoDebugParser, "FN NONE");
}
-#line 1799 "engines/hypno/grammar_arc.cpp"
+#line 1801 "engines/hypno/grammar_arc.cpp"
break;
case 59: /* bline: FTOK FILENAME */
-#line 356 "engines/hypno/grammar_arc.y"
+#line 358 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s));
}
-#line 1809 "engines/hypno/grammar_arc.cpp"
+#line 1811 "engines/hypno/grammar_arc.cpp"
break;
case 60: /* bline: ITOK NAME */
-#line 361 "engines/hypno/grammar_arc.y"
+#line 363 "engines/hypno/grammar_arc.y"
{
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1818 "engines/hypno/grammar_arc.cpp"
+#line 1820 "engines/hypno/grammar_arc.cpp"
break;
case 61: /* bline: ITOK BNTOK */
-#line 365 "engines/hypno/grammar_arc.y"
+#line 367 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == B1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1827 "engines/hypno/grammar_arc.cpp"
+#line 1829 "engines/hypno/grammar_arc.cpp"
break;
case 62: /* bline: ITOK ATOK */
-#line 369 "engines/hypno/grammar_arc.y"
+#line 371 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == A
shoot->name = "A";
debugC(1, kHypnoDebugParser, "I A");
}
-#line 1836 "engines/hypno/grammar_arc.cpp"
+#line 1838 "engines/hypno/grammar_arc.cpp"
break;
case 63: /* bline: ITOK CTOK */
-#line 373 "engines/hypno/grammar_arc.y"
+#line 375 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == C
shoot->name = "C";
debugC(1, kHypnoDebugParser, "I C");
}
-#line 1845 "engines/hypno/grammar_arc.cpp"
+#line 1847 "engines/hypno/grammar_arc.cpp"
break;
case 64: /* bline: ITOK DTOK */
-#line 377 "engines/hypno/grammar_arc.y"
+#line 379 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == D
shoot->name = "D";
debugC(1, kHypnoDebugParser, "I D");
}
-#line 1854 "engines/hypno/grammar_arc.cpp"
+#line 1856 "engines/hypno/grammar_arc.cpp"
break;
case 65: /* bline: ITOK FTOK */
-#line 381 "engines/hypno/grammar_arc.y"
+#line 383 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == F
shoot->name = "F";
debugC(1, kHypnoDebugParser, "I F");
}
-#line 1863 "engines/hypno/grammar_arc.cpp"
+#line 1865 "engines/hypno/grammar_arc.cpp"
break;
case 66: /* bline: ITOK GTOK */
-#line 385 "engines/hypno/grammar_arc.y"
+#line 387 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == G
shoot->name = "G";
debugC(1, kHypnoDebugParser, "I G");
}
-#line 1872 "engines/hypno/grammar_arc.cpp"
+#line 1874 "engines/hypno/grammar_arc.cpp"
break;
case 67: /* bline: ITOK HTOK */
-#line 389 "engines/hypno/grammar_arc.y"
+#line 391 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H
shoot->name = "H";
debugC(1, kHypnoDebugParser, "I H");
}
-#line 1881 "engines/hypno/grammar_arc.cpp"
+#line 1883 "engines/hypno/grammar_arc.cpp"
break;
case 68: /* bline: ITOK H12TOK */
-#line 393 "engines/hypno/grammar_arc.y"
+#line 395 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H1/H2
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1890 "engines/hypno/grammar_arc.cpp"
+#line 1892 "engines/hypno/grammar_arc.cpp"
break;
case 69: /* bline: ITOK ITOK */
-#line 397 "engines/hypno/grammar_arc.y"
+#line 399 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == I
shoot->name = "I";
debugC(1, kHypnoDebugParser, "I I");
}
-#line 1899 "engines/hypno/grammar_arc.cpp"
+#line 1901 "engines/hypno/grammar_arc.cpp"
break;
case 70: /* bline: ITOK JTOK */
-#line 401 "engines/hypno/grammar_arc.y"
+#line 403 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == J
shoot->name = "J";
debugC(1, kHypnoDebugParser, "I J");
}
-#line 1908 "engines/hypno/grammar_arc.cpp"
+#line 1910 "engines/hypno/grammar_arc.cpp"
break;
case 71: /* bline: ITOK KTOK */
-#line 405 "engines/hypno/grammar_arc.y"
+#line 407 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == K
shoot->name = "K";
debugC(1, kHypnoDebugParser, "I K");
}
-#line 1917 "engines/hypno/grammar_arc.cpp"
+#line 1919 "engines/hypno/grammar_arc.cpp"
break;
case 72: /* bline: ITOK NTOK */
-#line 409 "engines/hypno/grammar_arc.y"
+#line 411 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == N
shoot->name = "N";
debugC(1, kHypnoDebugParser, "I N");
}
-#line 1926 "engines/hypno/grammar_arc.cpp"
+#line 1928 "engines/hypno/grammar_arc.cpp"
break;
case 73: /* bline: ITOK OTOK */
-#line 413 "engines/hypno/grammar_arc.y"
+#line 415 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == O
shoot->name = "O";
debugC(1, kHypnoDebugParser, "I O");
}
-#line 1935 "engines/hypno/grammar_arc.cpp"
+#line 1937 "engines/hypno/grammar_arc.cpp"
break;
case 74: /* bline: ITOK PTOK */
-#line 417 "engines/hypno/grammar_arc.y"
+#line 419 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == P
shoot->name = "P";
debugC(1, kHypnoDebugParser, "I P");
}
-#line 1944 "engines/hypno/grammar_arc.cpp"
+#line 1946 "engines/hypno/grammar_arc.cpp"
break;
case 75: /* bline: ITOK QTOK */
-#line 421 "engines/hypno/grammar_arc.y"
+#line 423 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == Q
shoot->name = "Q";
debugC(1, kHypnoDebugParser, "I Q");
}
-#line 1953 "engines/hypno/grammar_arc.cpp"
+#line 1955 "engines/hypno/grammar_arc.cpp"
break;
case 76: /* bline: ITOK RTOK */
-#line 425 "engines/hypno/grammar_arc.y"
+#line 427 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == R
shoot->name = "R";
debugC(1, kHypnoDebugParser, "I R");
}
-#line 1962 "engines/hypno/grammar_arc.cpp"
+#line 1964 "engines/hypno/grammar_arc.cpp"
break;
case 77: /* bline: ITOK SNTOK */
-#line 429 "engines/hypno/grammar_arc.y"
+#line 431 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == S1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1971 "engines/hypno/grammar_arc.cpp"
+#line 1973 "engines/hypno/grammar_arc.cpp"
break;
case 78: /* bline: ITOK TTOK */
-#line 433 "engines/hypno/grammar_arc.y"
+#line 435 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == T
shoot->name = "T";
debugC(1, kHypnoDebugParser, "I T");
}
-#line 1980 "engines/hypno/grammar_arc.cpp"
+#line 1982 "engines/hypno/grammar_arc.cpp"
break;
case 79: /* bline: ITOK LTOK */
-#line 437 "engines/hypno/grammar_arc.y"
+#line 439 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == L
shoot->name = "L";
debugC(1, kHypnoDebugParser, "I L");
}
-#line 1989 "engines/hypno/grammar_arc.cpp"
+#line 1991 "engines/hypno/grammar_arc.cpp"
break;
case 80: /* bline: ITOK MTOK */
-#line 441 "engines/hypno/grammar_arc.y"
+#line 443 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == M
shoot->name = "M";
debugC(1, kHypnoDebugParser, "I M");
}
-#line 1998 "engines/hypno/grammar_arc.cpp"
+#line 2000 "engines/hypno/grammar_arc.cpp"
break;
case 81: /* bline: ITOK UTOK */
-#line 445 "engines/hypno/grammar_arc.y"
+#line 447 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == U
shoot->name = "U";
debugC(1, kHypnoDebugParser, "I U");
}
-#line 2007 "engines/hypno/grammar_arc.cpp"
+#line 2009 "engines/hypno/grammar_arc.cpp"
break;
case 82: /* bline: JTOK NUM */
-#line 449 "engines/hypno/grammar_arc.y"
+#line 451 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "J %d", (yyvsp[0].i));
}
-#line 2015 "engines/hypno/grammar_arc.cpp"
+#line 2017 "engines/hypno/grammar_arc.cpp"
break;
case 83: /* bline: A0TOK NUM NUM */
-#line 452 "engines/hypno/grammar_arc.y"
+#line 454 "engines/hypno/grammar_arc.y"
{
shoot->position = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "A0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2024 "engines/hypno/grammar_arc.cpp"
+#line 2026 "engines/hypno/grammar_arc.cpp"
break;
case 84: /* bline: RTOK NUM NUM */
-#line 456 "engines/hypno/grammar_arc.y"
+#line 458 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2034 "engines/hypno/grammar_arc.cpp"
+#line 2036 "engines/hypno/grammar_arc.cpp"
break;
case 85: /* bline: R0TOK NUM NUM */
-#line 461 "engines/hypno/grammar_arc.y"
+#line 463 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2044 "engines/hypno/grammar_arc.cpp"
+#line 2046 "engines/hypno/grammar_arc.cpp"
break;
case 86: /* bline: R1TOK NUM NUM */
-#line 466 "engines/hypno/grammar_arc.y"
+#line 468 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "R1 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2052 "engines/hypno/grammar_arc.cpp"
+#line 2054 "engines/hypno/grammar_arc.cpp"
break;
case 87: /* bline: BNTOK NUM NUM */
-#line 469 "engines/hypno/grammar_arc.y"
+#line 471 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->bodyFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "BN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2062 "engines/hypno/grammar_arc.cpp"
+#line 2064 "engines/hypno/grammar_arc.cpp"
break;
case 88: /* bline: KNTOK NUM NUM */
-#line 474 "engines/hypno/grammar_arc.y"
+#line 476 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "KN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2072 "engines/hypno/grammar_arc.cpp"
+#line 2074 "engines/hypno/grammar_arc.cpp"
break;
case 89: /* bline: P0TOK NUM NUM */
-#line 479 "engines/hypno/grammar_arc.y"
+#line 481 "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 2081 "engines/hypno/grammar_arc.cpp"
+#line 2083 "engines/hypno/grammar_arc.cpp"
break;
case 90: /* bline: OTOK NUM NUM */
-#line 483 "engines/hypno/grammar_arc.y"
+#line 485 "engines/hypno/grammar_arc.y"
{
if ((yyvsp[-1].i) == 0 && (yyvsp[0].i) == 0)
error("Invalid O command (0, 0)");
shoot->deathPosition = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "O %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2092 "engines/hypno/grammar_arc.cpp"
+#line 2094 "engines/hypno/grammar_arc.cpp"
break;
case 91: /* bline: CTOK NUM */
-#line 489 "engines/hypno/grammar_arc.y"
+#line 491 "engines/hypno/grammar_arc.y"
{
shoot->timesToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i));
}
-#line 2101 "engines/hypno/grammar_arc.cpp"
+#line 2103 "engines/hypno/grammar_arc.cpp"
break;
case 92: /* bline: HTOK NUM */
-#line 493 "engines/hypno/grammar_arc.y"
+#line 495 "engines/hypno/grammar_arc.y"
{
shoot->attackFrames.push_back((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 2109 "engines/hypno/grammar_arc.cpp"
+#line 2111 "engines/hypno/grammar_arc.cpp"
break;
case 93: /* bline: VTOK NUM */
-#line 496 "engines/hypno/grammar_arc.y"
+#line 498 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V %d", (yyvsp[0].i)); }
-#line 2115 "engines/hypno/grammar_arc.cpp"
+#line 2117 "engines/hypno/grammar_arc.cpp"
break;
case 94: /* bline: VTOK */
-#line 497 "engines/hypno/grammar_arc.y"
+#line 499 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V"); }
-#line 2121 "engines/hypno/grammar_arc.cpp"
+#line 2123 "engines/hypno/grammar_arc.cpp"
break;
case 95: /* bline: WTOK NUM */
-#line 498 "engines/hypno/grammar_arc.y"
+#line 500 "engines/hypno/grammar_arc.y"
{
shoot->attackWeight = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 2129 "engines/hypno/grammar_arc.cpp"
+#line 2131 "engines/hypno/grammar_arc.cpp"
break;
case 96: /* bline: DTOK NUM */
-#line 501 "engines/hypno/grammar_arc.y"
+#line 503 "engines/hypno/grammar_arc.y"
{
shoot->pointsToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i));
}
-#line 2138 "engines/hypno/grammar_arc.cpp"
+#line 2140 "engines/hypno/grammar_arc.cpp"
break;
case 97: /* bline: LTOK NUM NUM */
-#line 505 "engines/hypno/grammar_arc.y"
+#line 507 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2146 "engines/hypno/grammar_arc.cpp"
+#line 2148 "engines/hypno/grammar_arc.cpp"
break;
case 98: /* bline: LTOK NUM */
-#line 508 "engines/hypno/grammar_arc.y"
+#line 510 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i)-1, 0);
shoot->bodyFrames.push_back(fi);
}
-#line 2156 "engines/hypno/grammar_arc.cpp"
+#line 2158 "engines/hypno/grammar_arc.cpp"
break;
case 99: /* bline: MTOK NUM */
-#line 513 "engines/hypno/grammar_arc.y"
+#line 515 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "M %d", (yyvsp[0].i));
shoot->missedAnimation = (yyvsp[0].i);
}
-#line 2164 "engines/hypno/grammar_arc.cpp"
+#line 2166 "engines/hypno/grammar_arc.cpp"
break;
case 100: /* bline: KTOK */
-#line 516 "engines/hypno/grammar_arc.y"
+#line 518 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K"); }
-#line 2170 "engines/hypno/grammar_arc.cpp"
+#line 2172 "engines/hypno/grammar_arc.cpp"
break;
case 101: /* bline: KTOK NUM */
-#line 517 "engines/hypno/grammar_arc.y"
+#line 519 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2179 "engines/hypno/grammar_arc.cpp"
+#line 2181 "engines/hypno/grammar_arc.cpp"
break;
case 102: /* bline: KTOK NUM NUM NUM */
-#line 521 "engines/hypno/grammar_arc.y"
+#line 523 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2187 "engines/hypno/grammar_arc.cpp"
+#line 2189 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 524 "engines/hypno/grammar_arc.y"
+#line 526 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
+ fi = FrameInfo((yyvsp[0].i), 1);
+ shoot->explosionFrames.push_back(fi);
}
-#line 2196 "engines/hypno/grammar_arc.cpp"
+#line 2200 "engines/hypno/grammar_arc.cpp"
break;
case 104: /* bline: SNTOK FILENAME enc */
-#line 528 "engines/hypno/grammar_arc.y"
+#line 532 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
shoot->enemySound = (yyvsp[-1].s);
@@ -2208,85 +2212,85 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2212 "engines/hypno/grammar_arc.cpp"
+#line 2216 "engines/hypno/grammar_arc.cpp"
break;
case 105: /* bline: SNTOK */
-#line 539 "engines/hypno/grammar_arc.y"
+#line 543 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2220 "engines/hypno/grammar_arc.cpp"
+#line 2224 "engines/hypno/grammar_arc.cpp"
break;
case 106: /* bline: GTOK */
-#line 543 "engines/hypno/grammar_arc.y"
+#line 547 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2226 "engines/hypno/grammar_arc.cpp"
+#line 2230 "engines/hypno/grammar_arc.cpp"
break;
case 107: /* bline: TTOK NUM NUM NUM */
-#line 544 "engines/hypno/grammar_arc.y"
+#line 548 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2234 "engines/hypno/grammar_arc.cpp"
+#line 2238 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 547 "engines/hypno/grammar_arc.y"
+#line 551 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2243 "engines/hypno/grammar_arc.cpp"
+#line 2247 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 551 "engines/hypno/grammar_arc.y"
+#line 555 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2252 "engines/hypno/grammar_arc.cpp"
+#line 2256 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 555 "engines/hypno/grammar_arc.y"
+#line 559 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2260 "engines/hypno/grammar_arc.cpp"
+#line 2264 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 558 "engines/hypno/grammar_arc.y"
+#line 562 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2268 "engines/hypno/grammar_arc.cpp"
+#line 2272 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 561 "engines/hypno/grammar_arc.y"
+#line 565 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2275 "engines/hypno/grammar_arc.cpp"
+#line 2279 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 563 "engines/hypno/grammar_arc.y"
+#line 567 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2286 "engines/hypno/grammar_arc.cpp"
+#line 2290 "engines/hypno/grammar_arc.cpp"
break;
-#line 2290 "engines/hypno/grammar_arc.cpp"
+#line 2294 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 001eb0d2638..5dc7235f3cf 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -328,6 +328,8 @@ bline: FNTOK FILENAME {
shoot->animation = $2;
else if (Common::String("F4") == $1)
shoot->explosionAnimation = $2;
+ else if (Common::String("F6") == $1)
+ shoot->additionalVideo = $2;
debugC(1, kHypnoDebugParser, "FN %s", $2);
}
| AVTOK NUM {
@@ -524,6 +526,8 @@ bline: FNTOK FILENAME {
| KTOK NUM NUM { debugC(1, kHypnoDebugParser, "K %d %d", $2, $3);
FrameInfo fi($2, 1);
shoot->explosionFrames.push_back(fi);
+ fi = FrameInfo($3, 1);
+ shoot->explosionFrames.push_back(fi);
}
| SNTOK FILENAME enc {
if (Common::String("S0") == $1)
Commit: b8fe3bf6136c6bb12241118f8646526f556ccb7f
https://github.com/scummvm/scummvm/commit/b8fe3bf6136c6bb12241118f8646526f556ccb7f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: improved handling of levels where skipping frames is required in boyz
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index f4af4906bcd..088e742115d 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -254,7 +254,6 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
int start = segments[_segmentIdx].start;
_background->decoder->forceSeekToFrame(start);
_masks->decoder->forceSeekToFrame(start);
- segments[_segmentIdx].size -= start;
segments[_segmentIdx].start = 1;
}
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index c75b18af8d8..ddc1d2a8649 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -320,6 +320,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
playSound(_music, 0, arc->musicRate); // restore music
hitPlayer();
+
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
return false;
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 87ca320d3f2..9b8068644cf 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -296,7 +296,7 @@ void BoyzEngine::loadAssets() {
loadLib("", "misc/fonts.lib", true);
loadFonts();
- _nextLevel = "c31.mi_";
+ _nextLevel = "<start>";
}
void BoyzEngine::loadFonts() {
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 13610d26b5d..344cda5d1f9 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -631,7 +631,7 @@ static const yytype_int16 yyrline[] =
403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
443, 447, 451, 454, 458, 463, 468, 471, 476, 481,
485, 491, 495, 498, 499, 500, 503, 507, 510, 515,
- 518, 519, 523, 526, 532, 543, 547, 548, 551, 555,
+ 518, 519, 523, 528, 532, 543, 547, 548, 551, 555,
559, 562, 565, 567
};
#endif
@@ -2183,18 +2183,18 @@ yyreduce:
case 102: /* bline: KTOK NUM NUM NUM */
#line 523 "engines/hypno/grammar_arc.y"
{
+ FrameInfo fi((yyvsp[-1].i), 1);
+ shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2189 "engines/hypno/grammar_arc.cpp"
+#line 2191 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 526 "engines/hypno/grammar_arc.y"
+#line 528 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
- fi = FrameInfo((yyvsp[0].i), 1);
- shoot->explosionFrames.push_back(fi);
}
#line 2200 "engines/hypno/grammar_arc.cpp"
break;
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 5dc7235f3cf..d907cb21ec6 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -521,13 +521,13 @@ bline: FNTOK FILENAME {
shoot->explosionFrames.push_back(fi);
}
| KTOK NUM NUM NUM {
+ FrameInfo fi($3, 1);
+ shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", $2, $3, $4);
}
| KTOK NUM NUM { debugC(1, kHypnoDebugParser, "K %d %d", $2, $3);
FrameInfo fi($2, 1);
shoot->explosionFrames.push_back(fi);
- fi = FrameInfo($3, 1);
- shoot->explosionFrames.push_back(fi);
}
| SNTOK FILENAME enc {
if (Common::String("S0") == $1)
Commit: 5c2aa8832ea960461c295486afbd7ff73945b713
https://github.com/scummvm/scummvm/commit/5c2aa8832ea960461c295486afbd7ff73945b713
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: added more warning video filenames in boyz
Changed paths:
engines/hypno/boyz/boyz.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 9b8068644cf..3e3d3bebd1b 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -285,6 +285,11 @@ void BoyzEngine::loadAssets() {
_warningCivilians.push_back("warnings/w04s.smk");
_warningCivilians.push_back("warnings/w05s.smk");
+ _warningFriendlySoldiers.push_back("warnings/w06s.smk");
+ _warningFriendlySoldiers.push_back("warnings/w07s.smk");
+
+ _warningHostage = "warnings/w08s.smk";
+
// Set initial health for the team
for (int i = 0; i < 7; i++) {
_healthTeam[i] = _maxHealth;
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index ab40ae50e26..c4a786995c8 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -590,7 +590,10 @@ public:
uint32 _currentWeapon;
uint32 _civiliansShoot;
Filename _warningAnimals;
+ Filename _warningHostage;
Common::Array<Filename> _warningCivilians;
+ Common::Array<Filename> _warningFriendlySoldiers;
+
Common::BitArray _font05;
Common::BitArray _font08;
Commit: cc9108b6ae9e7a4f9c57a3934d6e33c3fb4f1210
https://github.com/scummvm/scummvm/commit/cc9108b6ae9e7a4f9c57a3934d6e33c3fb4f1210
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: corrected body frame length in boyz
Changed paths:
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 344cda5d1f9..e485e001dd8 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -631,8 +631,8 @@ static const yytype_int16 yyrline[] =
403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
443, 447, 451, 454, 458, 463, 468, 471, 476, 481,
485, 491, 495, 498, 499, 500, 503, 507, 510, 515,
- 518, 519, 523, 528, 532, 543, 547, 548, 551, 555,
- 559, 562, 565, 567
+ 518, 519, 529, 534, 538, 549, 553, 554, 557, 561,
+ 565, 568, 571, 573
};
#endif
@@ -2175,32 +2175,38 @@ yyreduce:
#line 519 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i), 1);
+ int bodyFramesSize = shoot->bodyFrames.size();
+ if ((yyvsp[0].i) > 0 && bodyFramesSize > 0) { // Correct last bodyFrame length
+ int start = shoot->bodyFrames[bodyFramesSize - 1].start;
+ assert((yyvsp[0].i) > start);
+ shoot->bodyFrames[bodyFramesSize - 1].length = (yyvsp[0].i) - start;
+ }
shoot->explosionFrames.push_back(fi);
}
-#line 2181 "engines/hypno/grammar_arc.cpp"
+#line 2187 "engines/hypno/grammar_arc.cpp"
break;
case 102: /* bline: KTOK NUM NUM NUM */
-#line 523 "engines/hypno/grammar_arc.y"
+#line 529 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2191 "engines/hypno/grammar_arc.cpp"
+#line 2197 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 528 "engines/hypno/grammar_arc.y"
+#line 534 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2200 "engines/hypno/grammar_arc.cpp"
+#line 2206 "engines/hypno/grammar_arc.cpp"
break;
case 104: /* bline: SNTOK FILENAME enc */
-#line 532 "engines/hypno/grammar_arc.y"
+#line 538 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
shoot->enemySound = (yyvsp[-1].s);
@@ -2212,85 +2218,85 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2216 "engines/hypno/grammar_arc.cpp"
+#line 2222 "engines/hypno/grammar_arc.cpp"
break;
case 105: /* bline: SNTOK */
-#line 543 "engines/hypno/grammar_arc.y"
+#line 549 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2224 "engines/hypno/grammar_arc.cpp"
+#line 2230 "engines/hypno/grammar_arc.cpp"
break;
case 106: /* bline: GTOK */
-#line 547 "engines/hypno/grammar_arc.y"
+#line 553 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2230 "engines/hypno/grammar_arc.cpp"
+#line 2236 "engines/hypno/grammar_arc.cpp"
break;
case 107: /* bline: TTOK NUM NUM NUM */
-#line 548 "engines/hypno/grammar_arc.y"
+#line 554 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2238 "engines/hypno/grammar_arc.cpp"
+#line 2244 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 551 "engines/hypno/grammar_arc.y"
+#line 557 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2247 "engines/hypno/grammar_arc.cpp"
+#line 2253 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 555 "engines/hypno/grammar_arc.y"
+#line 561 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2256 "engines/hypno/grammar_arc.cpp"
+#line 2262 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 559 "engines/hypno/grammar_arc.y"
+#line 565 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2264 "engines/hypno/grammar_arc.cpp"
+#line 2270 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 562 "engines/hypno/grammar_arc.y"
+#line 568 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2272 "engines/hypno/grammar_arc.cpp"
+#line 2278 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 565 "engines/hypno/grammar_arc.y"
+#line 571 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2279 "engines/hypno/grammar_arc.cpp"
+#line 2285 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 567 "engines/hypno/grammar_arc.y"
+#line 573 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2290 "engines/hypno/grammar_arc.cpp"
+#line 2296 "engines/hypno/grammar_arc.cpp"
break;
-#line 2294 "engines/hypno/grammar_arc.cpp"
+#line 2300 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index d907cb21ec6..f02cacbe46c 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -518,6 +518,12 @@ bline: FNTOK FILENAME {
| KTOK { debugC(1, kHypnoDebugParser, "K"); }
| KTOK NUM { debugC(1, kHypnoDebugParser, "K %d", $2);
FrameInfo fi($2, 1);
+ int bodyFramesSize = shoot->bodyFrames.size();
+ if ($2 > 0 && bodyFramesSize > 0) { // Correct last bodyFrame length
+ int start = shoot->bodyFrames[bodyFramesSize - 1].start;
+ assert($2 > start);
+ shoot->bodyFrames[bodyFramesSize - 1].length = $2 - start;
+ }
shoot->explosionFrames.push_back(fi);
}
| KTOK NUM NUM NUM {
Commit: 7f59aeb0dbd11683ed48f92214711552f7c74721
https://github.com/scummvm/scummvm/commit/7f59aeb0dbd11683ed48f92214711552f7c74721
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: play correct video when hostage is killed in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index ddc1d2a8649..57ffa56c491 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -360,6 +360,15 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
}
void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
+ if (s->name == "CAPTOR") {
+ _background->decoder->pauseVideo(true);
+ MVideo video(_warningHostage, Common::Point(0, 0), false, true, false);
+ disableCursor();
+ runIntro(video);
+ _health = 0; // TODO: not sure about this
+ return;
+ }
+
if (s->missedAnimation == 0) {
return;
} else if (s->missedAnimation == uint32(-1)) {
Commit: b13a22a863bad8df8df041b70458736cbe003180
https://github.com/scummvm/scummvm/commit/b13a22a863bad8df8df041b70458736cbe003180
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: avoid playing missed animations after it is too late in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index 57ffa56c491..a2fa8feb784 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -280,7 +280,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
// Skip the rest of the interaction
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start + 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start + 3);
-
+ _shoots[i].destroyed = true;
updateScreen(*_background);
drawScreen();
if (!_music.empty())
@@ -376,9 +376,11 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
_background->decoder->forceSeekToFrame(last);
_masks->decoder->forceSeekToFrame(last);
} else {
- s->missedAnimation = s->missedAnimation + 3;
- _background->decoder->forceSeekToFrame(s->missedAnimation);
- _masks->decoder->forceSeekToFrame(s->missedAnimation);
+ int missedAnimation = s->missedAnimation + 3;
+ if (_background->decoder->getCurFrame() > missedAnimation)
+ return; // Too late for this
+ _background->decoder->forceSeekToFrame(missedAnimation);
+ _masks->decoder->forceSeekToFrame(missedAnimation);
}
if (s->interactionFrame == 0)
hitPlayer();
Commit: a4e22c419348faee50c8a4d8c5880151128b1549
https://github.com/scummvm/scummvm/commit/a4e22c419348faee50c8a4d8c5880151128b1549
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: end current level when an alarm enemy is missed in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index a2fa8feb784..c9e6f1c9ec5 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -367,6 +367,13 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
runIntro(video);
_health = 0; // TODO: not sure about this
return;
+ } else if (s->name.contains("ALARM")) {
+ _background->decoder->pauseVideo(true);
+ MVideo video(_warningAlarmDay.front(), Common::Point(0, 0), false, true, false);
+ disableCursor();
+ runIntro(video);
+ _health = 0;
+ return;
}
if (s->missedAnimation == 0) {
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 3e3d3bebd1b..166a9edbd25 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -288,6 +288,9 @@ void BoyzEngine::loadAssets() {
_warningFriendlySoldiers.push_back("warnings/w06s.smk");
_warningFriendlySoldiers.push_back("warnings/w07s.smk");
+ _warningAlarmDay.push_back("warnings/w10s.smk");
+ _warningAlarmDay.push_back("warnings/w11s.smk");
+
_warningHostage = "warnings/w08s.smk";
// Set initial health for the team
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index e485e001dd8..bf8a6085fb5 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -631,8 +631,8 @@ static const yytype_int16 yyrline[] =
403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
443, 447, 451, 454, 458, 463, 468, 471, 476, 481,
485, 491, 495, 498, 499, 500, 503, 507, 510, 515,
- 518, 519, 529, 534, 538, 549, 553, 554, 557, 561,
- 565, 568, 571, 573
+ 518, 519, 529, 534, 538, 549, 553, 554, 558, 562,
+ 566, 569, 572, 574
};
#endif
@@ -2238,65 +2238,66 @@ yyreduce:
case 107: /* bline: TTOK NUM NUM NUM */
#line 554 "engines/hypno/grammar_arc.y"
{
+ shoot->interactionFrame = (yyvsp[-2].i);
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2244 "engines/hypno/grammar_arc.cpp"
+#line 2245 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 557 "engines/hypno/grammar_arc.y"
+#line 558 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2253 "engines/hypno/grammar_arc.cpp"
+#line 2254 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 561 "engines/hypno/grammar_arc.y"
+#line 562 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2262 "engines/hypno/grammar_arc.cpp"
+#line 2263 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 565 "engines/hypno/grammar_arc.y"
+#line 566 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2270 "engines/hypno/grammar_arc.cpp"
+#line 2271 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 568 "engines/hypno/grammar_arc.y"
+#line 569 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2278 "engines/hypno/grammar_arc.cpp"
+#line 2279 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 571 "engines/hypno/grammar_arc.y"
+#line 572 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2285 "engines/hypno/grammar_arc.cpp"
+#line 2286 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 573 "engines/hypno/grammar_arc.y"
+#line 574 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2296 "engines/hypno/grammar_arc.cpp"
+#line 2297 "engines/hypno/grammar_arc.cpp"
break;
-#line 2300 "engines/hypno/grammar_arc.cpp"
+#line 2301 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index f02cacbe46c..ee040ff078d 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -552,6 +552,7 @@ bline: FNTOK FILENAME {
| GTOK { debugC(1, kHypnoDebugParser, "G"); }
| TTOK NUM NUM NUM {
+ shoot->interactionFrame = $2;
debugC(1, kHypnoDebugParser, "T %d %d %d", $2, $3, $4);
}
| TTOK NUM {
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index c4a786995c8..f8a8feebd1b 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -593,7 +593,7 @@ public:
Filename _warningHostage;
Common::Array<Filename> _warningCivilians;
Common::Array<Filename> _warningFriendlySoldiers;
-
+ Common::Array<Filename> _warningAlarmDay;
Common::BitArray _font05;
Common::BitArray _font08;
Commit: 0b4f7a339d0c4dbddbc53831a066a9521674ab87
https://github.com/scummvm/scummvm/commit/0b4f7a339d0c4dbddbc53831a066a9521674ab87
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: basic implementation of checkIfDestroyed field and fixes when jumping at the end of segments in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/grammar.h
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index c9e6f1c9ec5..4047df93e25 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -57,6 +57,7 @@ void BoyzEngine::runBeforeArcade(ArcadeShooting *arc) {
}
updateFromScript();
+ _shootsDestroyed.clear();
}
void BoyzEngine::runAfterArcade(ArcadeShooting *arc) {
@@ -281,6 +282,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start + 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start + 3);
_shoots[i].destroyed = true;
+ _shootsDestroyed[_shoots[i].name] = true;
updateScreen(*_background);
drawScreen();
if (!_music.empty())
@@ -292,7 +294,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
playVideo(*_additionalVideo);
//_shoots[i].lastFrame = _background->decoder->getFrameCount();
_shoots[i].destroyed = true;
-
+ _shootsDestroyed[_shoots[i].name] = true;
updateScreen(*_background);
drawScreen();
}
@@ -352,6 +354,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
incScore(_shoots[i].pointsToShoot);
incBonus(_shoots[i].pointsToShoot);
_shoots[i].destroyed = true;
+ _shootsDestroyed[_shoots[i].name] = true;
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
changeCursor(_crosshairsActive[_currentWeapon], _crosshairsPalette, true);
@@ -360,6 +363,11 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
}
void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
+ if (!s->checkIfDestroyed.empty()) {
+ if (_shootsDestroyed.contains(s->checkIfDestroyed))
+ return; // Precondition was destroyed, so we ignore the missed shoot
+ }
+
if (s->name == "CAPTOR") {
_background->decoder->pauseVideo(true);
MVideo video(_warningHostage, Common::Point(0, 0), false, true, false);
@@ -379,11 +387,13 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
if (s->missedAnimation == 0) {
return;
} else if (s->missedAnimation == uint32(-1)) {
- uint32 last = _background->decoder->getFrameCount()-1;
- _background->decoder->forceSeekToFrame(last);
- _masks->decoder->forceSeekToFrame(last);
+ _skipLevel = true;
} else {
int missedAnimation = s->missedAnimation + 3;
+ if (missedAnimation > int(_background->decoder->getFrameCount()) - 1) {
+ _skipLevel = true;
+ return;
+ }
if (_background->decoder->getCurFrame() > missedAnimation)
return; // Too late for this
_background->decoder->forceSeekToFrame(missedAnimation);
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index e65aec51959..3b8ff133c4d 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -470,8 +470,12 @@ public:
bool playInteractionAudio;
bool destroyed;
bool noEnemySound;
+
+ // Soldier Boyz specific
bool nonHostile;
bool isAnimal;
+ Common::String checkIfDestroyed;
+
};
typedef Common::Array<Shoot> Shoots;
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index bf8a6085fb5..aeb3b062a74 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -626,13 +626,13 @@ static const yytype_int16 yyrline[] =
174, 179, 182, 187, 196, 201, 205, 209, 213, 216,
220, 223, 224, 252, 255, 258, 264, 269, 274, 280,
285, 290, 295, 300, 305, 312, 313, 316, 317, 320,
- 321, 322, 325, 335, 340, 343, 348, 350, 353, 358,
- 363, 367, 371, 375, 379, 383, 387, 391, 395, 399,
- 403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
- 443, 447, 451, 454, 458, 463, 468, 471, 476, 481,
- 485, 491, 495, 498, 499, 500, 503, 507, 510, 515,
- 518, 519, 529, 534, 538, 549, 553, 554, 558, 562,
- 566, 569, 572, 574
+ 321, 322, 325, 335, 340, 345, 350, 352, 355, 360,
+ 365, 369, 373, 377, 381, 385, 389, 393, 397, 401,
+ 405, 409, 413, 417, 421, 425, 429, 433, 437, 441,
+ 445, 449, 453, 456, 460, 465, 470, 473, 478, 483,
+ 487, 493, 497, 500, 501, 502, 505, 509, 512, 517,
+ 520, 521, 531, 536, 540, 551, 555, 556, 560, 564,
+ 568, 571, 574, 576
};
#endif
@@ -1760,419 +1760,421 @@ yyreduce:
case 54: /* bline: ALTOK NUM */
#line 340 "engines/hypno/grammar_arc.y"
{
+ assert(g_parsedArc->shoots.size() > 0);
+ shoot->checkIfDestroyed = g_parsedArc->shoots.back().name;
debugC(1, kHypnoDebugParser, "AL %d", (yyvsp[0].i));
}
-#line 1766 "engines/hypno/grammar_arc.cpp"
+#line 1768 "engines/hypno/grammar_arc.cpp"
break;
case 55: /* bline: ABTOK NUM */
-#line 343 "engines/hypno/grammar_arc.y"
+#line 345 "engines/hypno/grammar_arc.y"
{
assert((yyvsp[0].i) == 1);
shoot->playInteractionAudio = true;
debugC(1, kHypnoDebugParser, "AB %d", (yyvsp[0].i));
}
-#line 1776 "engines/hypno/grammar_arc.cpp"
+#line 1778 "engines/hypno/grammar_arc.cpp"
break;
case 56: /* bline: DTOK LTOK */
-#line 348 "engines/hypno/grammar_arc.y"
+#line 350 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "D L");
}
-#line 1783 "engines/hypno/grammar_arc.cpp"
+#line 1785 "engines/hypno/grammar_arc.cpp"
break;
case 57: /* bline: J0TOK NUM */
-#line 350 "engines/hypno/grammar_arc.y"
+#line 352 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "J0 %d", (yyvsp[0].i));
}
-#line 1791 "engines/hypno/grammar_arc.cpp"
+#line 1793 "engines/hypno/grammar_arc.cpp"
break;
case 58: /* bline: FNTOK NONETOK */
-#line 353 "engines/hypno/grammar_arc.y"
+#line 355 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = "NONE";
debugC(1, kHypnoDebugParser, "FN NONE");
}
-#line 1801 "engines/hypno/grammar_arc.cpp"
+#line 1803 "engines/hypno/grammar_arc.cpp"
break;
case 59: /* bline: FTOK FILENAME */
-#line 358 "engines/hypno/grammar_arc.y"
+#line 360 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s));
}
-#line 1811 "engines/hypno/grammar_arc.cpp"
+#line 1813 "engines/hypno/grammar_arc.cpp"
break;
case 60: /* bline: ITOK NAME */
-#line 363 "engines/hypno/grammar_arc.y"
+#line 365 "engines/hypno/grammar_arc.y"
{
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1820 "engines/hypno/grammar_arc.cpp"
+#line 1822 "engines/hypno/grammar_arc.cpp"
break;
case 61: /* bline: ITOK BNTOK */
-#line 367 "engines/hypno/grammar_arc.y"
+#line 369 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == B1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1829 "engines/hypno/grammar_arc.cpp"
+#line 1831 "engines/hypno/grammar_arc.cpp"
break;
case 62: /* bline: ITOK ATOK */
-#line 371 "engines/hypno/grammar_arc.y"
+#line 373 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == A
shoot->name = "A";
debugC(1, kHypnoDebugParser, "I A");
}
-#line 1838 "engines/hypno/grammar_arc.cpp"
+#line 1840 "engines/hypno/grammar_arc.cpp"
break;
case 63: /* bline: ITOK CTOK */
-#line 375 "engines/hypno/grammar_arc.y"
+#line 377 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == C
shoot->name = "C";
debugC(1, kHypnoDebugParser, "I C");
}
-#line 1847 "engines/hypno/grammar_arc.cpp"
+#line 1849 "engines/hypno/grammar_arc.cpp"
break;
case 64: /* bline: ITOK DTOK */
-#line 379 "engines/hypno/grammar_arc.y"
+#line 381 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == D
shoot->name = "D";
debugC(1, kHypnoDebugParser, "I D");
}
-#line 1856 "engines/hypno/grammar_arc.cpp"
+#line 1858 "engines/hypno/grammar_arc.cpp"
break;
case 65: /* bline: ITOK FTOK */
-#line 383 "engines/hypno/grammar_arc.y"
+#line 385 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == F
shoot->name = "F";
debugC(1, kHypnoDebugParser, "I F");
}
-#line 1865 "engines/hypno/grammar_arc.cpp"
+#line 1867 "engines/hypno/grammar_arc.cpp"
break;
case 66: /* bline: ITOK GTOK */
-#line 387 "engines/hypno/grammar_arc.y"
+#line 389 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == G
shoot->name = "G";
debugC(1, kHypnoDebugParser, "I G");
}
-#line 1874 "engines/hypno/grammar_arc.cpp"
+#line 1876 "engines/hypno/grammar_arc.cpp"
break;
case 67: /* bline: ITOK HTOK */
-#line 391 "engines/hypno/grammar_arc.y"
+#line 393 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H
shoot->name = "H";
debugC(1, kHypnoDebugParser, "I H");
}
-#line 1883 "engines/hypno/grammar_arc.cpp"
+#line 1885 "engines/hypno/grammar_arc.cpp"
break;
case 68: /* bline: ITOK H12TOK */
-#line 395 "engines/hypno/grammar_arc.y"
+#line 397 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H1/H2
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1892 "engines/hypno/grammar_arc.cpp"
+#line 1894 "engines/hypno/grammar_arc.cpp"
break;
case 69: /* bline: ITOK ITOK */
-#line 399 "engines/hypno/grammar_arc.y"
+#line 401 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == I
shoot->name = "I";
debugC(1, kHypnoDebugParser, "I I");
}
-#line 1901 "engines/hypno/grammar_arc.cpp"
+#line 1903 "engines/hypno/grammar_arc.cpp"
break;
case 70: /* bline: ITOK JTOK */
-#line 403 "engines/hypno/grammar_arc.y"
+#line 405 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == J
shoot->name = "J";
debugC(1, kHypnoDebugParser, "I J");
}
-#line 1910 "engines/hypno/grammar_arc.cpp"
+#line 1912 "engines/hypno/grammar_arc.cpp"
break;
case 71: /* bline: ITOK KTOK */
-#line 407 "engines/hypno/grammar_arc.y"
+#line 409 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == K
shoot->name = "K";
debugC(1, kHypnoDebugParser, "I K");
}
-#line 1919 "engines/hypno/grammar_arc.cpp"
+#line 1921 "engines/hypno/grammar_arc.cpp"
break;
case 72: /* bline: ITOK NTOK */
-#line 411 "engines/hypno/grammar_arc.y"
+#line 413 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == N
shoot->name = "N";
debugC(1, kHypnoDebugParser, "I N");
}
-#line 1928 "engines/hypno/grammar_arc.cpp"
+#line 1930 "engines/hypno/grammar_arc.cpp"
break;
case 73: /* bline: ITOK OTOK */
-#line 415 "engines/hypno/grammar_arc.y"
+#line 417 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == O
shoot->name = "O";
debugC(1, kHypnoDebugParser, "I O");
}
-#line 1937 "engines/hypno/grammar_arc.cpp"
+#line 1939 "engines/hypno/grammar_arc.cpp"
break;
case 74: /* bline: ITOK PTOK */
-#line 419 "engines/hypno/grammar_arc.y"
+#line 421 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == P
shoot->name = "P";
debugC(1, kHypnoDebugParser, "I P");
}
-#line 1946 "engines/hypno/grammar_arc.cpp"
+#line 1948 "engines/hypno/grammar_arc.cpp"
break;
case 75: /* bline: ITOK QTOK */
-#line 423 "engines/hypno/grammar_arc.y"
+#line 425 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == Q
shoot->name = "Q";
debugC(1, kHypnoDebugParser, "I Q");
}
-#line 1955 "engines/hypno/grammar_arc.cpp"
+#line 1957 "engines/hypno/grammar_arc.cpp"
break;
case 76: /* bline: ITOK RTOK */
-#line 427 "engines/hypno/grammar_arc.y"
+#line 429 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == R
shoot->name = "R";
debugC(1, kHypnoDebugParser, "I R");
}
-#line 1964 "engines/hypno/grammar_arc.cpp"
+#line 1966 "engines/hypno/grammar_arc.cpp"
break;
case 77: /* bline: ITOK SNTOK */
-#line 431 "engines/hypno/grammar_arc.y"
+#line 433 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == S1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1973 "engines/hypno/grammar_arc.cpp"
+#line 1975 "engines/hypno/grammar_arc.cpp"
break;
case 78: /* bline: ITOK TTOK */
-#line 435 "engines/hypno/grammar_arc.y"
+#line 437 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == T
shoot->name = "T";
debugC(1, kHypnoDebugParser, "I T");
}
-#line 1982 "engines/hypno/grammar_arc.cpp"
+#line 1984 "engines/hypno/grammar_arc.cpp"
break;
case 79: /* bline: ITOK LTOK */
-#line 439 "engines/hypno/grammar_arc.y"
+#line 441 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == L
shoot->name = "L";
debugC(1, kHypnoDebugParser, "I L");
}
-#line 1991 "engines/hypno/grammar_arc.cpp"
+#line 1993 "engines/hypno/grammar_arc.cpp"
break;
case 80: /* bline: ITOK MTOK */
-#line 443 "engines/hypno/grammar_arc.y"
+#line 445 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == M
shoot->name = "M";
debugC(1, kHypnoDebugParser, "I M");
}
-#line 2000 "engines/hypno/grammar_arc.cpp"
+#line 2002 "engines/hypno/grammar_arc.cpp"
break;
case 81: /* bline: ITOK UTOK */
-#line 447 "engines/hypno/grammar_arc.y"
+#line 449 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == U
shoot->name = "U";
debugC(1, kHypnoDebugParser, "I U");
}
-#line 2009 "engines/hypno/grammar_arc.cpp"
+#line 2011 "engines/hypno/grammar_arc.cpp"
break;
case 82: /* bline: JTOK NUM */
-#line 451 "engines/hypno/grammar_arc.y"
+#line 453 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "J %d", (yyvsp[0].i));
}
-#line 2017 "engines/hypno/grammar_arc.cpp"
+#line 2019 "engines/hypno/grammar_arc.cpp"
break;
case 83: /* bline: A0TOK NUM NUM */
-#line 454 "engines/hypno/grammar_arc.y"
+#line 456 "engines/hypno/grammar_arc.y"
{
shoot->position = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "A0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2026 "engines/hypno/grammar_arc.cpp"
+#line 2028 "engines/hypno/grammar_arc.cpp"
break;
case 84: /* bline: RTOK NUM NUM */
-#line 458 "engines/hypno/grammar_arc.y"
+#line 460 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2036 "engines/hypno/grammar_arc.cpp"
+#line 2038 "engines/hypno/grammar_arc.cpp"
break;
case 85: /* bline: R0TOK NUM NUM */
-#line 463 "engines/hypno/grammar_arc.y"
+#line 465 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2046 "engines/hypno/grammar_arc.cpp"
+#line 2048 "engines/hypno/grammar_arc.cpp"
break;
case 86: /* bline: R1TOK NUM NUM */
-#line 468 "engines/hypno/grammar_arc.y"
+#line 470 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "R1 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2054 "engines/hypno/grammar_arc.cpp"
+#line 2056 "engines/hypno/grammar_arc.cpp"
break;
case 87: /* bline: BNTOK NUM NUM */
-#line 471 "engines/hypno/grammar_arc.y"
+#line 473 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->bodyFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "BN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2064 "engines/hypno/grammar_arc.cpp"
+#line 2066 "engines/hypno/grammar_arc.cpp"
break;
case 88: /* bline: KNTOK NUM NUM */
-#line 476 "engines/hypno/grammar_arc.y"
+#line 478 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "KN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2074 "engines/hypno/grammar_arc.cpp"
+#line 2076 "engines/hypno/grammar_arc.cpp"
break;
case 89: /* bline: P0TOK NUM NUM */
-#line 481 "engines/hypno/grammar_arc.y"
+#line 483 "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 2083 "engines/hypno/grammar_arc.cpp"
+#line 2085 "engines/hypno/grammar_arc.cpp"
break;
case 90: /* bline: OTOK NUM NUM */
-#line 485 "engines/hypno/grammar_arc.y"
+#line 487 "engines/hypno/grammar_arc.y"
{
if ((yyvsp[-1].i) == 0 && (yyvsp[0].i) == 0)
error("Invalid O command (0, 0)");
shoot->deathPosition = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "O %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2094 "engines/hypno/grammar_arc.cpp"
+#line 2096 "engines/hypno/grammar_arc.cpp"
break;
case 91: /* bline: CTOK NUM */
-#line 491 "engines/hypno/grammar_arc.y"
+#line 493 "engines/hypno/grammar_arc.y"
{
shoot->timesToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i));
}
-#line 2103 "engines/hypno/grammar_arc.cpp"
+#line 2105 "engines/hypno/grammar_arc.cpp"
break;
case 92: /* bline: HTOK NUM */
-#line 495 "engines/hypno/grammar_arc.y"
+#line 497 "engines/hypno/grammar_arc.y"
{
shoot->attackFrames.push_back((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 2111 "engines/hypno/grammar_arc.cpp"
+#line 2113 "engines/hypno/grammar_arc.cpp"
break;
case 93: /* bline: VTOK NUM */
-#line 498 "engines/hypno/grammar_arc.y"
+#line 500 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V %d", (yyvsp[0].i)); }
-#line 2117 "engines/hypno/grammar_arc.cpp"
+#line 2119 "engines/hypno/grammar_arc.cpp"
break;
case 94: /* bline: VTOK */
-#line 499 "engines/hypno/grammar_arc.y"
+#line 501 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V"); }
-#line 2123 "engines/hypno/grammar_arc.cpp"
+#line 2125 "engines/hypno/grammar_arc.cpp"
break;
case 95: /* bline: WTOK NUM */
-#line 500 "engines/hypno/grammar_arc.y"
+#line 502 "engines/hypno/grammar_arc.y"
{
shoot->attackWeight = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 2131 "engines/hypno/grammar_arc.cpp"
+#line 2133 "engines/hypno/grammar_arc.cpp"
break;
case 96: /* bline: DTOK NUM */
-#line 503 "engines/hypno/grammar_arc.y"
+#line 505 "engines/hypno/grammar_arc.y"
{
shoot->pointsToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i));
}
-#line 2140 "engines/hypno/grammar_arc.cpp"
+#line 2142 "engines/hypno/grammar_arc.cpp"
break;
case 97: /* bline: LTOK NUM NUM */
-#line 507 "engines/hypno/grammar_arc.y"
+#line 509 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2148 "engines/hypno/grammar_arc.cpp"
+#line 2150 "engines/hypno/grammar_arc.cpp"
break;
case 98: /* bline: LTOK NUM */
-#line 510 "engines/hypno/grammar_arc.y"
+#line 512 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i)-1, 0);
shoot->bodyFrames.push_back(fi);
}
-#line 2158 "engines/hypno/grammar_arc.cpp"
+#line 2160 "engines/hypno/grammar_arc.cpp"
break;
case 99: /* bline: MTOK NUM */
-#line 515 "engines/hypno/grammar_arc.y"
+#line 517 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "M %d", (yyvsp[0].i));
shoot->missedAnimation = (yyvsp[0].i);
}
-#line 2166 "engines/hypno/grammar_arc.cpp"
+#line 2168 "engines/hypno/grammar_arc.cpp"
break;
case 100: /* bline: KTOK */
-#line 518 "engines/hypno/grammar_arc.y"
+#line 520 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K"); }
-#line 2172 "engines/hypno/grammar_arc.cpp"
+#line 2174 "engines/hypno/grammar_arc.cpp"
break;
case 101: /* bline: KTOK NUM */
-#line 519 "engines/hypno/grammar_arc.y"
+#line 521 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i), 1);
int bodyFramesSize = shoot->bodyFrames.size();
@@ -2183,30 +2185,30 @@ yyreduce:
}
shoot->explosionFrames.push_back(fi);
}
-#line 2187 "engines/hypno/grammar_arc.cpp"
+#line 2189 "engines/hypno/grammar_arc.cpp"
break;
case 102: /* bline: KTOK NUM NUM NUM */
-#line 529 "engines/hypno/grammar_arc.y"
+#line 531 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2197 "engines/hypno/grammar_arc.cpp"
+#line 2199 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 534 "engines/hypno/grammar_arc.y"
+#line 536 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2206 "engines/hypno/grammar_arc.cpp"
+#line 2208 "engines/hypno/grammar_arc.cpp"
break;
case 104: /* bline: SNTOK FILENAME enc */
-#line 538 "engines/hypno/grammar_arc.y"
+#line 540 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
shoot->enemySound = (yyvsp[-1].s);
@@ -2218,86 +2220,86 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2222 "engines/hypno/grammar_arc.cpp"
+#line 2224 "engines/hypno/grammar_arc.cpp"
break;
case 105: /* bline: SNTOK */
-#line 549 "engines/hypno/grammar_arc.y"
+#line 551 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2230 "engines/hypno/grammar_arc.cpp"
+#line 2232 "engines/hypno/grammar_arc.cpp"
break;
case 106: /* bline: GTOK */
-#line 553 "engines/hypno/grammar_arc.y"
+#line 555 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2236 "engines/hypno/grammar_arc.cpp"
+#line 2238 "engines/hypno/grammar_arc.cpp"
break;
case 107: /* bline: TTOK NUM NUM NUM */
-#line 554 "engines/hypno/grammar_arc.y"
+#line 556 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[-2].i);
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2245 "engines/hypno/grammar_arc.cpp"
+#line 2247 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 558 "engines/hypno/grammar_arc.y"
+#line 560 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2254 "engines/hypno/grammar_arc.cpp"
+#line 2256 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 562 "engines/hypno/grammar_arc.y"
+#line 564 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2263 "engines/hypno/grammar_arc.cpp"
+#line 2265 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 566 "engines/hypno/grammar_arc.y"
+#line 568 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2271 "engines/hypno/grammar_arc.cpp"
+#line 2273 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 569 "engines/hypno/grammar_arc.y"
+#line 571 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2279 "engines/hypno/grammar_arc.cpp"
+#line 2281 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 572 "engines/hypno/grammar_arc.y"
+#line 574 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2286 "engines/hypno/grammar_arc.cpp"
+#line 2288 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 574 "engines/hypno/grammar_arc.y"
+#line 576 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2297 "engines/hypno/grammar_arc.cpp"
+#line 2299 "engines/hypno/grammar_arc.cpp"
break;
-#line 2301 "engines/hypno/grammar_arc.cpp"
+#line 2303 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index ee040ff078d..46ecd3cbd2e 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -338,6 +338,8 @@ bline: FNTOK FILENAME {
debugC(1, kHypnoDebugParser, "AV %d", $2);
}
| ALTOK NUM {
+ assert(g_parsedArc->shoots.size() > 0);
+ shoot->checkIfDestroyed = g_parsedArc->shoots.back().name;
debugC(1, kHypnoDebugParser, "AL %d", $2);
}
| ABTOK NUM {
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index f8a8feebd1b..fbec2654274 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -594,6 +594,7 @@ public:
Common::Array<Filename> _warningCivilians;
Common::Array<Filename> _warningFriendlySoldiers;
Common::Array<Filename> _warningAlarmDay;
+ Common::HashMap<Common::String, bool> _shootsDestroyed;
Common::BitArray _font05;
Common::BitArray _font08;
Commit: 4755dee3eeb8161842abb6d8ead609995393346c
https://github.com/scummvm/scummvm/commit/4755dee3eeb8161842abb6d8ead609995393346c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: better detection of target during alarm sequences in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index 4047df93e25..efeca8a10f9 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -232,6 +232,11 @@ int BoyzEngine::detectTarget(const Common::Point &mousePos) {
int i = 0;
for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it) {
+ if (_background->decoder->getCurFrame() > int(it->bodyFrames.back().start)) {
+ i++;
+ continue; // This shoot is old!
+ }
+
if (m == it->paletteOffset && !_shoots[i].destroyed)
return i;
i++;
@@ -363,6 +368,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
}
void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
+ debugC(1, kHypnoDebugArcade, "Missed target %s!", s->name.c_str());
if (!s->checkIfDestroyed.empty()) {
if (_shootsDestroyed.contains(s->checkIfDestroyed))
return; // Precondition was destroyed, so we ignore the missed shoot
@@ -376,6 +382,8 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
_health = 0; // TODO: not sure about this
return;
} else if (s->name.contains("ALARM")) {
+ if (_background->decoder->getCurFrame() > int(s->missedAnimation))
+ return;
_background->decoder->pauseVideo(true);
MVideo video(_warningAlarmDay.front(), Common::Point(0, 0), false, true, false);
disableCursor();
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index aeb3b062a74..806e9921e49 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -631,8 +631,8 @@ static const yytype_int16 yyrline[] =
405, 409, 413, 417, 421, 425, 429, 433, 437, 441,
445, 449, 453, 456, 460, 465, 470, 473, 478, 483,
487, 493, 497, 500, 501, 502, 505, 509, 512, 517,
- 520, 521, 531, 536, 540, 551, 555, 556, 560, 564,
- 568, 571, 574, 576
+ 520, 521, 531, 537, 541, 552, 556, 557, 561, 565,
+ 569, 572, 575, 577
};
#endif
@@ -2191,24 +2191,25 @@ yyreduce:
case 102: /* bline: KTOK NUM NUM NUM */
#line 531 "engines/hypno/grammar_arc.y"
{
- FrameInfo fi((yyvsp[-1].i), 1);
+ assert((yyvsp[-1].i) > (yyvsp[-2].i));
+ FrameInfo fi((yyvsp[-2].i), (yyvsp[-1].i) - (yyvsp[-2].i));
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2199 "engines/hypno/grammar_arc.cpp"
+#line 2200 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 536 "engines/hypno/grammar_arc.y"
+#line 537 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2208 "engines/hypno/grammar_arc.cpp"
+#line 2209 "engines/hypno/grammar_arc.cpp"
break;
case 104: /* bline: SNTOK FILENAME enc */
-#line 540 "engines/hypno/grammar_arc.y"
+#line 541 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
shoot->enemySound = (yyvsp[-1].s);
@@ -2220,86 +2221,86 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2224 "engines/hypno/grammar_arc.cpp"
+#line 2225 "engines/hypno/grammar_arc.cpp"
break;
case 105: /* bline: SNTOK */
-#line 551 "engines/hypno/grammar_arc.y"
+#line 552 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2232 "engines/hypno/grammar_arc.cpp"
+#line 2233 "engines/hypno/grammar_arc.cpp"
break;
case 106: /* bline: GTOK */
-#line 555 "engines/hypno/grammar_arc.y"
+#line 556 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2238 "engines/hypno/grammar_arc.cpp"
+#line 2239 "engines/hypno/grammar_arc.cpp"
break;
case 107: /* bline: TTOK NUM NUM NUM */
-#line 556 "engines/hypno/grammar_arc.y"
+#line 557 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[-2].i);
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2247 "engines/hypno/grammar_arc.cpp"
+#line 2248 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 560 "engines/hypno/grammar_arc.y"
+#line 561 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2256 "engines/hypno/grammar_arc.cpp"
+#line 2257 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 564 "engines/hypno/grammar_arc.y"
+#line 565 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2265 "engines/hypno/grammar_arc.cpp"
+#line 2266 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 568 "engines/hypno/grammar_arc.y"
+#line 569 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2273 "engines/hypno/grammar_arc.cpp"
+#line 2274 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 571 "engines/hypno/grammar_arc.y"
+#line 572 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2281 "engines/hypno/grammar_arc.cpp"
+#line 2282 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 574 "engines/hypno/grammar_arc.y"
+#line 575 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2288 "engines/hypno/grammar_arc.cpp"
+#line 2289 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 576 "engines/hypno/grammar_arc.y"
+#line 577 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2299 "engines/hypno/grammar_arc.cpp"
+#line 2300 "engines/hypno/grammar_arc.cpp"
break;
-#line 2303 "engines/hypno/grammar_arc.cpp"
+#line 2304 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 46ecd3cbd2e..851fc3a849d 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -529,7 +529,8 @@ bline: FNTOK FILENAME {
shoot->explosionFrames.push_back(fi);
}
| KTOK NUM NUM NUM {
- FrameInfo fi($3, 1);
+ assert($3 > $2);
+ FrameInfo fi($2, $3 - $2);
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", $2, $3, $4);
}
Commit: 9ba43260218182a550c52d9b2de28206462d824d
https://github.com/scummvm/scummvm/commit/9ba43260218182a550c52d9b2de28206462d824d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: implemented basic objective checking in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index efeca8a10f9..fda6f4078f2 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -191,6 +191,10 @@ bool BoyzEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting
drawScreen();
} else if (!arc->additionalSound.empty())
playSound(arc->additionalSound, 1, arc->additionalSoundRate);
+ else if (_levelId == 36) {
+ if (!checkArcadeObjectives())
+ _health = 0;
+ }
} else if (!at.video.empty()) {
_background->decoder->pauseVideo(true);
debugC(1, kHypnoDebugArcade, "Playing transition %s", at.video.c_str());
@@ -359,6 +363,7 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
incScore(_shoots[i].pointsToShoot);
incBonus(_shoots[i].pointsToShoot);
_shoots[i].destroyed = true;
+ _objKillsCount[_objIdx] = _objKillsCount[_objIdx] + _shoots[i].objKillsCount;
_shootsDestroyed[_shoots[i].name] = true;
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
Commit: 2af72459bfa63c6bdbe35f3ddf4b8fe29320e861
https://github.com/scummvm/scummvm/commit/2af72459bfa63c6bdbe35f3ddf4b8fe29320e861
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: fixed how health is handled and added hardcoded videos 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 fda6f4078f2..5cb40c014e5 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -65,6 +65,13 @@ void BoyzEngine::runAfterArcade(ArcadeShooting *arc) {
_playerFrames[i]->free();
delete _playerFrames[i];
}
+
+ if (_healthTeam[_currentActor] <= 0) {
+ MVideo video(_deathDay[_currentActor], Common::Point(0, 0), false, true, false);
+ disableCursor();
+ runIntro(video);
+ }
+
}
void BoyzEngine::pressedKey(const int keycode) {
@@ -74,6 +81,7 @@ void BoyzEngine::pressedKey(const int keycode) {
return;
}
} else if (keycode == Common::KEYCODE_k) { // Added for testing
+ _healthTeam[_currentActor] = 0;
_health = 0;
} else if (keycode == Common::KEYCODE_ESCAPE) {
openMainMenuDialog();
@@ -152,8 +160,10 @@ void BoyzEngine::hitPlayer() {
uint32 c = kHypnoColorRed; // red
_compositeSurface->fillRect(Common::Rect(0, 0, _screenW, _screenH), c);
drawScreen();
- if (!_infiniteHealthCheat)
+ if (!_infiniteHealthCheat) {
_healthTeam[_currentActor] = _healthTeam[_currentActor] - 10;
+ _health = _healthTeam[_currentActor];
+ }
if (!_hitSound.empty())
playSound(_soundPath + _hitSound, 1, 11025);
}
@@ -192,8 +202,10 @@ bool BoyzEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting
} else if (!arc->additionalSound.empty())
playSound(arc->additionalSound, 1, arc->additionalSoundRate);
else if (_levelId == 36) {
- if (!checkArcadeObjectives())
+ if (!checkArcadeObjectives()) {
_health = 0;
+ // Not sure how to handle this
+ }
}
} else if (!at.video.empty()) {
_background->decoder->pauseVideo(true);
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 166a9edbd25..5ea7509519b 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -151,6 +151,26 @@ void BoyzEngine::loadAssets() {
_weaponReloadSound[5] = "shotload.raw";
_weaponReloadSound[6] = "glm60rl.raw";
+ _deathDay[0] = "";
+ _deathDay[1] = "preload/deathd1s.smk";
+ _deathDay[2] = "preload/deathd2s.smk";
+ _deathDay[3] = "preload/deathd3s.smk";
+ _deathDay[4] = "preload/deathd4s.smk";
+ _deathDay[5] = "preload/deathd5s.smk";
+ _deathDay[6] = "preload/deathd6s.smk";
+
+ _deathNight[0] = "";
+ _deathNight[1] = "preload/deathn2s.smk";
+ _deathNight[2] = "preload/deathn3s.smk";
+ _deathNight[3] = "preload/deathn4s.smk";
+ _deathNight[4] = "";
+ _deathNight[5] = "";
+ _deathNight[6] = "";
+
+ _deathVideo.push_back("preload/cdeath1s.smk");
+ _deathVideo.push_back("preload/cdeath2s.smk");
+ _deathVideo.push_back("preload/cdeath3s.smk");
+
_heySound[0] = "";
_heySound[1] = "lopzheys.raw";
_heySound[2] = "lambheys.raw";
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index fbec2654274..ad7354f8492 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -571,6 +571,8 @@ public:
Graphics::Surface _healthBar[7];
Graphics::Surface _ammoBar[7];
Graphics::Surface _portrait[7];
+ Filename _deathDay[7];
+ Filename _deathNight[7];
Filename _weaponShootSound[7];
Filename _weaponReloadSound[7];
@@ -594,6 +596,7 @@ public:
Common::Array<Filename> _warningCivilians;
Common::Array<Filename> _warningFriendlySoldiers;
Common::Array<Filename> _warningAlarmDay;
+ Common::Array<Filename> _deathVideo;
Common::HashMap<Common::String, bool> _shootsDestroyed;
Common::BitArray _font05;
Commit: 4a8ea89cd39a70d2f587ac5b3d628b25e8301f7b
https://github.com/scummvm/scummvm/commit/4a8ea89cd39a70d2f587ac5b3d628b25e8301f7b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: allow scenes to declare their own resolution
Changed paths:
engines/hypno/boyz/boyz.cpp
engines/hypno/grammar.h
engines/hypno/hypno.cpp
engines/hypno/scene.cpp
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 5ea7509519b..7d805bd1141 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -127,11 +127,14 @@ void BoyzEngine::loadAssets() {
loadSceneLevel(selectBoyz, "<select_boyz>", "", "");
Scene *sc = (Scene *) _levels["<select_boyz>"];
+ sc->resolution = "320x200";
ChangeLevel *cl = new ChangeLevel("c19.mi_");
sc->hots[7].actions.push_back(cl);
loadSceneLevel(selectC3, "<select_c3>", "", "");
+ sc = (Scene *) _levels["<select_c3>"];
+ sc->resolution = "320x200";
loadLib("sound/", "misc/sound.lib", true);
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 3b8ff133c4d..a012be3259f 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -367,7 +367,9 @@ class Scene : public Level {
public:
Scene() {
type = SceneLevel;
+ resolution = "640x480";
}
+ Common::String resolution;
Hotspots hots;
};
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index 86f51a34d6a..9b61abc1fae 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -204,7 +204,6 @@ void HypnoEngine::runLevel(Common::String &name) {
runCode((Code *)_levels[name]);
} else if (_levels[name]->type == SceneLevel) {
debugC(1, kHypnoDebugScene, "Executing scene level %s with next level: %s", name.c_str(), _levels[name]->levelIfWin.c_str());
- changeScreenMode("640x480");
runScene((Scene *)_levels[name]);
} else {
error("Invalid level %s", name.c_str());
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index 328ec24c966..5a2888b23f5 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -270,6 +270,7 @@ void HypnoEngine::runTransition(Transition *trans) {
}
void HypnoEngine::runScene(Scene *scene) {
+ changeScreenMode(scene->resolution);
_refreshConversation = false;
_timerStarted = false;
Common::Event event;
Commit: d4f75dc5aa0128270ee033ceae3b61306ae1967b
https://github.com/scummvm/scummvm/commit/d4f75dc5aa0128270ee033ceae3b61306ae1967b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: added boat machine-gun to the list of weapon and fixed some index to access such arrays 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 5cb40c014e5..b52580e00a1 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -143,15 +143,15 @@ void BoyzEngine::drawHealth() {
void BoyzEngine::drawAmmo() {
updateFromScript();
- float w = float(_ammoBar[_currentWeapon].w) / float(_weaponMaxAmmo[_currentWeapon]);
+ float w = float(_ammoBar[_currentActor].w) / float(_weaponMaxAmmo[_currentWeapon]);
Common::Rect ammoBarBox(320 - int(_ammoTeam[_currentActor] * w), 0, 320, _ammoBar[_currentActor].h / 2);
uint32 c = kHypnoColorGreen; // green
_compositeSurface->fillRect(ammoBarBox, c);
- drawImage(_ammoBar[_currentActor], 320 - _ammoBar[_currentWeapon].w, 0, true);
+ drawImage(_ammoBar[_currentActor], 320 - _ammoBar[_currentActor].w, 0, true);
for (int i = 1; i < _weaponMaxAmmo[_currentWeapon]; i++) {
- int x = 320 - _ammoBar[_currentWeapon].w + int (i * w);
+ int x = 320 - _ammoBar[_currentActor].w + int (i * w);
_compositeSurface->drawLine(x, 2, x, 6, 0);
}
}
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 7d805bd1141..58e58c700d4 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -145,6 +145,7 @@ void BoyzEngine::loadAssets() {
_weaponShootSound[4] = "m16fire.raw";
_weaponShootSound[5] = "shotfire.raw";
_weaponShootSound[6] = "glm60fr.raw";
+ _weaponShootSound[7] = "dblfire.raw"; // Not sure
_weaponReloadSound[0] = "";
_weaponReloadSound[1] = "pstlload.raw";
@@ -153,6 +154,7 @@ void BoyzEngine::loadAssets() {
_weaponReloadSound[4] = "m16load.raw";
_weaponReloadSound[5] = "shotload.raw";
_weaponReloadSound[6] = "glm60rl.raw";
+ _weaponReloadSound[7] = "dblload.raw"; // Not sure
_deathDay[0] = "";
_deathDay[1] = "preload/deathd1s.smk";
@@ -276,21 +278,20 @@ void BoyzEngine::loadAssets() {
cursorBox = Common::Rect(256, 66, 273, 93);
_crosshairsTarget[5].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
_crosshairsTarget[5].copyRectToSurface(*targets, 0, 0, cursorBox);
-
+ */
// Large crossair
cursorBox = Common::Rect(56, 98, 88, 125);
- _crosshairsInactive[6].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
- _crosshairsInactive[6].copyRectToSurface(*targets, 0, 0, cursorBox);
+ _crosshairsInactive[7].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crosshairsInactive[7].copyRectToSurface(*targets, 0, 0, cursorBox);
cursorBox = Common::Rect(57, 130, 88, 158);
- _crosshairsActive[6].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
- _crosshairsActive[6].copyRectToSurface(*targets, 0, 0, cursorBox);
+ _crosshairsActive[7].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crosshairsActive[7].copyRectToSurface(*targets, 0, 0, cursorBox);
cursorBox = Common::Rect(57, 162, 88, 189);
- _crosshairsTarget[6].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
- _crosshairsTarget[6].copyRectToSurface(*targets, 0, 0, cursorBox);
- */
+ _crosshairsTarget[7].create(cursorBox.width(), cursorBox.height(), _pixelFormat);
+ _crosshairsTarget[7].copyRectToSurface(*targets, 0, 0, cursorBox);
_weaponMaxAmmo[0] = 0;
_weaponMaxAmmo[1] = 10;
@@ -299,6 +300,7 @@ void BoyzEngine::loadAssets() {
_weaponMaxAmmo[4] = 6; // pistol?
_weaponMaxAmmo[5] = 6; // small shotgun
_weaponMaxAmmo[6] = 0;
+ _weaponMaxAmmo[7] = 25; // Boat machine-gun
_maxHealth = 100;
_civiliansShoot = 0;
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index ad7354f8492..0525c245bde 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -574,10 +574,10 @@ public:
Filename _deathDay[7];
Filename _deathNight[7];
- Filename _weaponShootSound[7];
- Filename _weaponReloadSound[7];
+ Filename _weaponShootSound[8];
+ Filename _weaponReloadSound[8];
Filename _heySound[7];
- int _weaponMaxAmmo[7];
+ int _weaponMaxAmmo[8];
byte *_crosshairsPalette;
Graphics::Surface _crosshairsInactive[8];
Commit: 2cb7f4ef53803be55f7a6b2e20a3e1e729bc4bd7
https://github.com/scummvm/scummvm/commit/2cb7f4ef53803be55f7a6b2e20a3e1e729bc4bd7
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:24+02:00
Commit Message:
HYPNO: better handling of killed animations using transitions in boyz
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/boyz/arcade.cpp
engines/hypno/grammar.h
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
engines/hypno/hypno.h
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 088e742115d..af9fa589ce7 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -211,7 +211,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
initSegment(arc);
// Transitions
- ArcadeTransitions transitions = arc->transitions;
+ _transitions = arc->transitions;
_levelId = arc->id;
_shootSound = arc->shootSound;
@@ -376,8 +376,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
break;
}
- if (!transitions.empty()) {
- transition = checkTransition(transitions, arc);
+ if (!_transitions.empty()) {
+ transition = checkTransition(_transitions, arc);
}
if (_background->decoder && _background->decoder->getCurFrame() >= int(segments[_segmentIdx].start + segments[_segmentIdx].size - 2)) {
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index b52580e00a1..b461816977d 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -227,6 +227,11 @@ bool BoyzEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting
drawCursorArcade(g_system->getEventManager()->getMousePos());
} else if (!at.sound.empty()) {
playSound(at.sound, 1, at.soundRate);
+ } else if (at.jumpToTime > 0) {
+ _background->decoder->forceSeekToFrame(at.jumpToTime);
+ _masks->decoder->forceSeekToFrame(at.jumpToTime);
+ } else if (at.loseLevel) {
+ _health = 0;
} else
error ("Invalid transition at %d", ttime);
@@ -346,6 +351,14 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
+
+
+ if (_shoots[i].jumpToTimeAfterKilled == -1000) {
+ ArcadeTransition at("", 0, "", 0, _shoots[i].explosionFrames[0].lastFrame() - 1);
+ at.loseLevel = true;
+ _transitions.push_front(at);
+ }
+
return false;
} else if (!_shoots[i].nonHostile && secondary) {
if (_shoots[i].interactionFrame > 0) {
@@ -380,6 +393,12 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
changeCursor(_crosshairsActive[_currentWeapon], _crosshairsPalette, true);
+
+ if (_shoots[i].jumpToTimeAfterKilled > 0) {
+ ArcadeTransition at("", 0, "", 0, _shoots[i].explosionFrames[0].lastFrame() - 1);
+ at.jumpToTime = _shoots[i].jumpToTimeAfterKilled;
+ _transitions.push_front(at);
+ }
}
return false;
}
@@ -413,6 +432,8 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
return;
} else if (s->missedAnimation == uint32(-1)) {
_skipLevel = true;
+ } else if (s->missedAnimation == uint32(-1000)) {
+ _health = 0;
} else {
int missedAnimation = s->missedAnimation + 3;
if (missedAnimation > int(_background->decoder->getFrameCount()) - 1) {
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index a012be3259f..dcd8afa3f08 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -431,6 +431,7 @@ public:
nonHostile = false;
playInteractionAudio = false;
animalSound = "";
+ jumpToTimeAfterKilled = 0;
}
Common::String name;
Filename animation;
@@ -451,7 +452,7 @@ public:
uint32 paletteOffset;
uint32 paletteSize;
- // Mask
+ // Missed animation
uint32 missedAnimation;
// Sounds
@@ -477,7 +478,7 @@ public:
bool nonHostile;
bool isAnimal;
Common::String checkIfDestroyed;
-
+ int jumpToTimeAfterKilled;
};
typedef Common::Array<Shoot> Shoots;
@@ -537,6 +538,8 @@ public:
palette = palette_;
sound = sound_;
soundRate = soundRate_;
+ loseLevel = false;
+ jumpToTime = 0;
time = time_;
}
@@ -544,6 +547,8 @@ public:
Filename palette;
Filename sound;
uint32 soundRate;
+ bool loseLevel;
+ uint32 jumpToTime;
uint32 time;
};
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 806e9921e49..15385548b81 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -631,8 +631,8 @@ static const yytype_int16 yyrline[] =
405, 409, 413, 417, 421, 425, 429, 433, 437, 441,
445, 449, 453, 456, 460, 465, 470, 473, 478, 483,
487, 493, 497, 500, 501, 502, 505, 509, 512, 517,
- 520, 521, 531, 537, 541, 552, 556, 557, 561, 565,
- 569, 572, 575, 577
+ 520, 521, 531, 538, 542, 553, 557, 558, 562, 566,
+ 570, 573, 576, 578
};
#endif
@@ -2193,23 +2193,24 @@ yyreduce:
{
assert((yyvsp[-1].i) > (yyvsp[-2].i));
FrameInfo fi((yyvsp[-2].i), (yyvsp[-1].i) - (yyvsp[-2].i));
+ shoot->jumpToTimeAfterKilled = (yyvsp[0].i);
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2200 "engines/hypno/grammar_arc.cpp"
+#line 2201 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 537 "engines/hypno/grammar_arc.y"
+#line 538 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2209 "engines/hypno/grammar_arc.cpp"
+#line 2210 "engines/hypno/grammar_arc.cpp"
break;
case 104: /* bline: SNTOK FILENAME enc */
-#line 541 "engines/hypno/grammar_arc.y"
+#line 542 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
shoot->enemySound = (yyvsp[-1].s);
@@ -2221,86 +2222,86 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2225 "engines/hypno/grammar_arc.cpp"
+#line 2226 "engines/hypno/grammar_arc.cpp"
break;
case 105: /* bline: SNTOK */
-#line 552 "engines/hypno/grammar_arc.y"
+#line 553 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2233 "engines/hypno/grammar_arc.cpp"
+#line 2234 "engines/hypno/grammar_arc.cpp"
break;
case 106: /* bline: GTOK */
-#line 556 "engines/hypno/grammar_arc.y"
+#line 557 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2239 "engines/hypno/grammar_arc.cpp"
+#line 2240 "engines/hypno/grammar_arc.cpp"
break;
case 107: /* bline: TTOK NUM NUM NUM */
-#line 557 "engines/hypno/grammar_arc.y"
+#line 558 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[-2].i);
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2248 "engines/hypno/grammar_arc.cpp"
+#line 2249 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 561 "engines/hypno/grammar_arc.y"
+#line 562 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2257 "engines/hypno/grammar_arc.cpp"
+#line 2258 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 565 "engines/hypno/grammar_arc.y"
+#line 566 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2266 "engines/hypno/grammar_arc.cpp"
+#line 2267 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 569 "engines/hypno/grammar_arc.y"
+#line 570 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2274 "engines/hypno/grammar_arc.cpp"
+#line 2275 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 572 "engines/hypno/grammar_arc.y"
+#line 573 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2282 "engines/hypno/grammar_arc.cpp"
+#line 2283 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 575 "engines/hypno/grammar_arc.y"
+#line 576 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2289 "engines/hypno/grammar_arc.cpp"
+#line 2290 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 577 "engines/hypno/grammar_arc.y"
+#line 578 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2300 "engines/hypno/grammar_arc.cpp"
+#line 2301 "engines/hypno/grammar_arc.cpp"
break;
-#line 2304 "engines/hypno/grammar_arc.cpp"
+#line 2305 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 851fc3a849d..769288bd1d1 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -531,6 +531,7 @@ bline: FNTOK FILENAME {
| KTOK NUM NUM NUM {
assert($3 > $2);
FrameInfo fi($2, $3 - $2);
+ shoot->jumpToTimeAfterKilled = $4;
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", $2, $3, $4);
}
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 0525c245bde..52fda4560d1 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -251,6 +251,7 @@ public:
Filename _currentPalette;
virtual bool availableObjectives();
virtual bool checkArcadeObjectives();
+ ArcadeTransitions _transitions;
virtual bool checkTransition(ArcadeTransitions &transitions, ArcadeShooting *arc);
virtual Common::Point getPlayerPosition(bool needsUpdate);
virtual Common::Point computeTargetPosition(const Common::Point &mousePos);
Commit: b00ed2fe13f3edadc58ba9291ba4027b31dfd604
https://github.com/scummvm/scummvm/commit/b00ed2fe13f3edadc58ba9291ba4027b31dfd604
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:25+02:00
Commit Message:
HYPNO: correctly parsed warning video index in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/grammar.h
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index b461816977d..1f1e4aab5ad 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -327,13 +327,8 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
return false;
} else if (_shoots[i].nonHostile && !secondary) {
- Common::String filename;
- if (_shoots[i].isAnimal)
- filename = _warningAnimals;
- else {
- filename = _warningCivilians[_civiliansShoot];
- _civiliansShoot++;
- }
+ Common::String filename = _warningVideosDay[_shoots[i].warningVideoIdx];
+ _civiliansShoot++;
_background->decoder->pauseVideo(true);
MVideo video(filename, Common::Point(0, 0), false, true, false);
@@ -417,11 +412,11 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
runIntro(video);
_health = 0; // TODO: not sure about this
return;
- } else if (s->name.contains("ALARM")) {
+ } else if (s->name.hasPrefix("ALARM")) {
if (_background->decoder->getCurFrame() > int(s->missedAnimation))
return;
_background->decoder->pauseVideo(true);
- MVideo video(_warningAlarmDay.front(), Common::Point(0, 0), false, true, false);
+ MVideo video(_warningAlarmVideos.front(), Common::Point(0, 0), false, true, false);
disableCursor();
runIntro(video);
_health = 0;
@@ -431,6 +426,7 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
if (s->missedAnimation == 0) {
return;
} else if (s->missedAnimation == uint32(-1)) {
+ debugC(1, kHypnoDebugArcade, "Jumping to end of level");
_skipLevel = true;
} else if (s->missedAnimation == uint32(-1000)) {
_health = 0;
@@ -442,6 +438,7 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
}
if (_background->decoder->getCurFrame() > missedAnimation)
return; // Too late for this
+ debugC(1, kHypnoDebugArcade, "Jumping to: %d", missedAnimation);
_background->decoder->forceSeekToFrame(missedAnimation);
_masks->decoder->forceSeekToFrame(missedAnimation);
}
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 58e58c700d4..9d499412982 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -304,17 +304,17 @@ void BoyzEngine::loadAssets() {
_maxHealth = 100;
_civiliansShoot = 0;
- _warningAnimals = "warnings/w01s.smk";
- _warningCivilians.push_back("warnings/w02s.smk");
- _warningCivilians.push_back("warnings/w03s.smk");
- _warningCivilians.push_back("warnings/w04s.smk");
- _warningCivilians.push_back("warnings/w05s.smk");
-
- _warningFriendlySoldiers.push_back("warnings/w06s.smk");
- _warningFriendlySoldiers.push_back("warnings/w07s.smk");
-
- _warningAlarmDay.push_back("warnings/w10s.smk");
- _warningAlarmDay.push_back("warnings/w11s.smk");
+ _warningVideosDay.push_back("");
+ _warningVideosDay.push_back("warnings/w01s.smk");
+ _warningVideosDay.push_back("warnings/w02s.smk");
+ _warningVideosDay.push_back("warnings/w03s.smk");
+ _warningVideosDay.push_back("warnings/w04s.smk");
+ _warningVideosDay.push_back("warnings/w05s.smk");
+ _warningVideosDay.push_back("warnings/w06s.smk");
+ _warningVideosDay.push_back("warnings/w07s.smk");
+
+ _warningAlarmVideos.push_back("warnings/w10s.smk");
+ _warningAlarmVideos.push_back("warnings/w11s.smk");
_warningHostage = "warnings/w08s.smk";
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index dcd8afa3f08..d73e146f11b 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -432,6 +432,7 @@ public:
playInteractionAudio = false;
animalSound = "";
jumpToTimeAfterKilled = 0;
+ warningVideoIdx = 0;
}
Common::String name;
Filename animation;
@@ -479,6 +480,7 @@ public:
bool isAnimal;
Common::String checkIfDestroyed;
int jumpToTimeAfterKilled;
+ uint32 warningVideoIdx;
};
typedef Common::Array<Shoot> Shoots;
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 15385548b81..8e849b959a6 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -626,13 +626,13 @@ static const yytype_int16 yyrline[] =
174, 179, 182, 187, 196, 201, 205, 209, 213, 216,
220, 223, 224, 252, 255, 258, 264, 269, 274, 280,
285, 290, 295, 300, 305, 312, 313, 316, 317, 320,
- 321, 322, 325, 335, 340, 345, 350, 352, 355, 360,
- 365, 369, 373, 377, 381, 385, 389, 393, 397, 401,
- 405, 409, 413, 417, 421, 425, 429, 433, 437, 441,
- 445, 449, 453, 456, 460, 465, 470, 473, 478, 483,
- 487, 493, 497, 500, 501, 502, 505, 509, 512, 517,
- 520, 521, 531, 538, 542, 553, 557, 558, 562, 566,
- 570, 573, 576, 578
+ 321, 322, 325, 335, 340, 345, 350, 352, 357, 362,
+ 367, 371, 375, 379, 383, 387, 391, 395, 399, 403,
+ 407, 411, 415, 419, 423, 427, 431, 435, 439, 443,
+ 447, 451, 455, 458, 462, 467, 472, 475, 480, 485,
+ 489, 495, 499, 502, 503, 504, 507, 511, 514, 519,
+ 522, 523, 527, 534, 538, 549, 553, 554, 558, 562,
+ 566, 569, 572, 574
};
#endif
@@ -1787,409 +1787,405 @@ yyreduce:
case 57: /* bline: J0TOK NUM */
#line 352 "engines/hypno/grammar_arc.y"
{
+ assert((yyvsp[0].i) > 0);
+ shoot->warningVideoIdx = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "J0 %d", (yyvsp[0].i));
}
-#line 1793 "engines/hypno/grammar_arc.cpp"
+#line 1795 "engines/hypno/grammar_arc.cpp"
break;
case 58: /* bline: FNTOK NONETOK */
-#line 355 "engines/hypno/grammar_arc.y"
+#line 357 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = "NONE";
debugC(1, kHypnoDebugParser, "FN NONE");
}
-#line 1803 "engines/hypno/grammar_arc.cpp"
+#line 1805 "engines/hypno/grammar_arc.cpp"
break;
case 59: /* bline: FTOK FILENAME */
-#line 360 "engines/hypno/grammar_arc.y"
+#line 362 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s));
}
-#line 1813 "engines/hypno/grammar_arc.cpp"
+#line 1815 "engines/hypno/grammar_arc.cpp"
break;
case 60: /* bline: ITOK NAME */
-#line 365 "engines/hypno/grammar_arc.y"
+#line 367 "engines/hypno/grammar_arc.y"
{
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1822 "engines/hypno/grammar_arc.cpp"
+#line 1824 "engines/hypno/grammar_arc.cpp"
break;
case 61: /* bline: ITOK BNTOK */
-#line 369 "engines/hypno/grammar_arc.y"
+#line 371 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == B1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1831 "engines/hypno/grammar_arc.cpp"
+#line 1833 "engines/hypno/grammar_arc.cpp"
break;
case 62: /* bline: ITOK ATOK */
-#line 373 "engines/hypno/grammar_arc.y"
+#line 375 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == A
shoot->name = "A";
debugC(1, kHypnoDebugParser, "I A");
}
-#line 1840 "engines/hypno/grammar_arc.cpp"
+#line 1842 "engines/hypno/grammar_arc.cpp"
break;
case 63: /* bline: ITOK CTOK */
-#line 377 "engines/hypno/grammar_arc.y"
+#line 379 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == C
shoot->name = "C";
debugC(1, kHypnoDebugParser, "I C");
}
-#line 1849 "engines/hypno/grammar_arc.cpp"
+#line 1851 "engines/hypno/grammar_arc.cpp"
break;
case 64: /* bline: ITOK DTOK */
-#line 381 "engines/hypno/grammar_arc.y"
+#line 383 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == D
shoot->name = "D";
debugC(1, kHypnoDebugParser, "I D");
}
-#line 1858 "engines/hypno/grammar_arc.cpp"
+#line 1860 "engines/hypno/grammar_arc.cpp"
break;
case 65: /* bline: ITOK FTOK */
-#line 385 "engines/hypno/grammar_arc.y"
+#line 387 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == F
shoot->name = "F";
debugC(1, kHypnoDebugParser, "I F");
}
-#line 1867 "engines/hypno/grammar_arc.cpp"
+#line 1869 "engines/hypno/grammar_arc.cpp"
break;
case 66: /* bline: ITOK GTOK */
-#line 389 "engines/hypno/grammar_arc.y"
+#line 391 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == G
shoot->name = "G";
debugC(1, kHypnoDebugParser, "I G");
}
-#line 1876 "engines/hypno/grammar_arc.cpp"
+#line 1878 "engines/hypno/grammar_arc.cpp"
break;
case 67: /* bline: ITOK HTOK */
-#line 393 "engines/hypno/grammar_arc.y"
+#line 395 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H
shoot->name = "H";
debugC(1, kHypnoDebugParser, "I H");
}
-#line 1885 "engines/hypno/grammar_arc.cpp"
+#line 1887 "engines/hypno/grammar_arc.cpp"
break;
case 68: /* bline: ITOK H12TOK */
-#line 397 "engines/hypno/grammar_arc.y"
+#line 399 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H1/H2
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1894 "engines/hypno/grammar_arc.cpp"
+#line 1896 "engines/hypno/grammar_arc.cpp"
break;
case 69: /* bline: ITOK ITOK */
-#line 401 "engines/hypno/grammar_arc.y"
+#line 403 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == I
shoot->name = "I";
debugC(1, kHypnoDebugParser, "I I");
}
-#line 1903 "engines/hypno/grammar_arc.cpp"
+#line 1905 "engines/hypno/grammar_arc.cpp"
break;
case 70: /* bline: ITOK JTOK */
-#line 405 "engines/hypno/grammar_arc.y"
+#line 407 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == J
shoot->name = "J";
debugC(1, kHypnoDebugParser, "I J");
}
-#line 1912 "engines/hypno/grammar_arc.cpp"
+#line 1914 "engines/hypno/grammar_arc.cpp"
break;
case 71: /* bline: ITOK KTOK */
-#line 409 "engines/hypno/grammar_arc.y"
+#line 411 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == K
shoot->name = "K";
debugC(1, kHypnoDebugParser, "I K");
}
-#line 1921 "engines/hypno/grammar_arc.cpp"
+#line 1923 "engines/hypno/grammar_arc.cpp"
break;
case 72: /* bline: ITOK NTOK */
-#line 413 "engines/hypno/grammar_arc.y"
+#line 415 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == N
shoot->name = "N";
debugC(1, kHypnoDebugParser, "I N");
}
-#line 1930 "engines/hypno/grammar_arc.cpp"
+#line 1932 "engines/hypno/grammar_arc.cpp"
break;
case 73: /* bline: ITOK OTOK */
-#line 417 "engines/hypno/grammar_arc.y"
+#line 419 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == O
shoot->name = "O";
debugC(1, kHypnoDebugParser, "I O");
}
-#line 1939 "engines/hypno/grammar_arc.cpp"
+#line 1941 "engines/hypno/grammar_arc.cpp"
break;
case 74: /* bline: ITOK PTOK */
-#line 421 "engines/hypno/grammar_arc.y"
+#line 423 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == P
shoot->name = "P";
debugC(1, kHypnoDebugParser, "I P");
}
-#line 1948 "engines/hypno/grammar_arc.cpp"
+#line 1950 "engines/hypno/grammar_arc.cpp"
break;
case 75: /* bline: ITOK QTOK */
-#line 425 "engines/hypno/grammar_arc.y"
+#line 427 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == Q
shoot->name = "Q";
debugC(1, kHypnoDebugParser, "I Q");
}
-#line 1957 "engines/hypno/grammar_arc.cpp"
+#line 1959 "engines/hypno/grammar_arc.cpp"
break;
case 76: /* bline: ITOK RTOK */
-#line 429 "engines/hypno/grammar_arc.y"
+#line 431 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == R
shoot->name = "R";
debugC(1, kHypnoDebugParser, "I R");
}
-#line 1966 "engines/hypno/grammar_arc.cpp"
+#line 1968 "engines/hypno/grammar_arc.cpp"
break;
case 77: /* bline: ITOK SNTOK */
-#line 433 "engines/hypno/grammar_arc.y"
+#line 435 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == S1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1975 "engines/hypno/grammar_arc.cpp"
+#line 1977 "engines/hypno/grammar_arc.cpp"
break;
case 78: /* bline: ITOK TTOK */
-#line 437 "engines/hypno/grammar_arc.y"
+#line 439 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == T
shoot->name = "T";
debugC(1, kHypnoDebugParser, "I T");
}
-#line 1984 "engines/hypno/grammar_arc.cpp"
+#line 1986 "engines/hypno/grammar_arc.cpp"
break;
case 79: /* bline: ITOK LTOK */
-#line 441 "engines/hypno/grammar_arc.y"
+#line 443 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == L
shoot->name = "L";
debugC(1, kHypnoDebugParser, "I L");
}
-#line 1993 "engines/hypno/grammar_arc.cpp"
+#line 1995 "engines/hypno/grammar_arc.cpp"
break;
case 80: /* bline: ITOK MTOK */
-#line 445 "engines/hypno/grammar_arc.y"
+#line 447 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == M
shoot->name = "M";
debugC(1, kHypnoDebugParser, "I M");
}
-#line 2002 "engines/hypno/grammar_arc.cpp"
+#line 2004 "engines/hypno/grammar_arc.cpp"
break;
case 81: /* bline: ITOK UTOK */
-#line 449 "engines/hypno/grammar_arc.y"
+#line 451 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == U
shoot->name = "U";
debugC(1, kHypnoDebugParser, "I U");
}
-#line 2011 "engines/hypno/grammar_arc.cpp"
+#line 2013 "engines/hypno/grammar_arc.cpp"
break;
case 82: /* bline: JTOK NUM */
-#line 453 "engines/hypno/grammar_arc.y"
+#line 455 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "J %d", (yyvsp[0].i));
}
-#line 2019 "engines/hypno/grammar_arc.cpp"
+#line 2021 "engines/hypno/grammar_arc.cpp"
break;
case 83: /* bline: A0TOK NUM NUM */
-#line 456 "engines/hypno/grammar_arc.y"
+#line 458 "engines/hypno/grammar_arc.y"
{
shoot->position = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "A0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2028 "engines/hypno/grammar_arc.cpp"
+#line 2030 "engines/hypno/grammar_arc.cpp"
break;
case 84: /* bline: RTOK NUM NUM */
-#line 460 "engines/hypno/grammar_arc.y"
+#line 462 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2038 "engines/hypno/grammar_arc.cpp"
+#line 2040 "engines/hypno/grammar_arc.cpp"
break;
case 85: /* bline: R0TOK NUM NUM */
-#line 465 "engines/hypno/grammar_arc.y"
+#line 467 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2048 "engines/hypno/grammar_arc.cpp"
+#line 2050 "engines/hypno/grammar_arc.cpp"
break;
case 86: /* bline: R1TOK NUM NUM */
-#line 470 "engines/hypno/grammar_arc.y"
+#line 472 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "R1 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2056 "engines/hypno/grammar_arc.cpp"
+#line 2058 "engines/hypno/grammar_arc.cpp"
break;
case 87: /* bline: BNTOK NUM NUM */
-#line 473 "engines/hypno/grammar_arc.y"
+#line 475 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->bodyFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "BN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2066 "engines/hypno/grammar_arc.cpp"
+#line 2068 "engines/hypno/grammar_arc.cpp"
break;
case 88: /* bline: KNTOK NUM NUM */
-#line 478 "engines/hypno/grammar_arc.y"
+#line 480 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "KN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2076 "engines/hypno/grammar_arc.cpp"
+#line 2078 "engines/hypno/grammar_arc.cpp"
break;
case 89: /* bline: P0TOK NUM NUM */
-#line 483 "engines/hypno/grammar_arc.y"
+#line 485 "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 2085 "engines/hypno/grammar_arc.cpp"
+#line 2087 "engines/hypno/grammar_arc.cpp"
break;
case 90: /* bline: OTOK NUM NUM */
-#line 487 "engines/hypno/grammar_arc.y"
+#line 489 "engines/hypno/grammar_arc.y"
{
if ((yyvsp[-1].i) == 0 && (yyvsp[0].i) == 0)
error("Invalid O command (0, 0)");
shoot->deathPosition = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "O %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2096 "engines/hypno/grammar_arc.cpp"
+#line 2098 "engines/hypno/grammar_arc.cpp"
break;
case 91: /* bline: CTOK NUM */
-#line 493 "engines/hypno/grammar_arc.y"
+#line 495 "engines/hypno/grammar_arc.y"
{
shoot->timesToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i));
}
-#line 2105 "engines/hypno/grammar_arc.cpp"
+#line 2107 "engines/hypno/grammar_arc.cpp"
break;
case 92: /* bline: HTOK NUM */
-#line 497 "engines/hypno/grammar_arc.y"
+#line 499 "engines/hypno/grammar_arc.y"
{
shoot->attackFrames.push_back((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 2113 "engines/hypno/grammar_arc.cpp"
+#line 2115 "engines/hypno/grammar_arc.cpp"
break;
case 93: /* bline: VTOK NUM */
-#line 500 "engines/hypno/grammar_arc.y"
+#line 502 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V %d", (yyvsp[0].i)); }
-#line 2119 "engines/hypno/grammar_arc.cpp"
+#line 2121 "engines/hypno/grammar_arc.cpp"
break;
case 94: /* bline: VTOK */
-#line 501 "engines/hypno/grammar_arc.y"
+#line 503 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V"); }
-#line 2125 "engines/hypno/grammar_arc.cpp"
+#line 2127 "engines/hypno/grammar_arc.cpp"
break;
case 95: /* bline: WTOK NUM */
-#line 502 "engines/hypno/grammar_arc.y"
+#line 504 "engines/hypno/grammar_arc.y"
{
shoot->attackWeight = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 2133 "engines/hypno/grammar_arc.cpp"
+#line 2135 "engines/hypno/grammar_arc.cpp"
break;
case 96: /* bline: DTOK NUM */
-#line 505 "engines/hypno/grammar_arc.y"
+#line 507 "engines/hypno/grammar_arc.y"
{
shoot->pointsToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i));
}
-#line 2142 "engines/hypno/grammar_arc.cpp"
+#line 2144 "engines/hypno/grammar_arc.cpp"
break;
case 97: /* bline: LTOK NUM NUM */
-#line 509 "engines/hypno/grammar_arc.y"
+#line 511 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2150 "engines/hypno/grammar_arc.cpp"
+#line 2152 "engines/hypno/grammar_arc.cpp"
break;
case 98: /* bline: LTOK NUM */
-#line 512 "engines/hypno/grammar_arc.y"
+#line 514 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i)-1, 0);
shoot->bodyFrames.push_back(fi);
}
-#line 2160 "engines/hypno/grammar_arc.cpp"
+#line 2162 "engines/hypno/grammar_arc.cpp"
break;
case 99: /* bline: MTOK NUM */
-#line 517 "engines/hypno/grammar_arc.y"
+#line 519 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "M %d", (yyvsp[0].i));
shoot->missedAnimation = (yyvsp[0].i);
}
-#line 2168 "engines/hypno/grammar_arc.cpp"
+#line 2170 "engines/hypno/grammar_arc.cpp"
break;
case 100: /* bline: KTOK */
-#line 520 "engines/hypno/grammar_arc.y"
+#line 522 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K"); }
-#line 2174 "engines/hypno/grammar_arc.cpp"
+#line 2176 "engines/hypno/grammar_arc.cpp"
break;
case 101: /* bline: KTOK NUM */
-#line 521 "engines/hypno/grammar_arc.y"
+#line 523 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i), 1);
- int bodyFramesSize = shoot->bodyFrames.size();
- if ((yyvsp[0].i) > 0 && bodyFramesSize > 0) { // Correct last bodyFrame length
- int start = shoot->bodyFrames[bodyFramesSize - 1].start;
- assert((yyvsp[0].i) > start);
- shoot->bodyFrames[bodyFramesSize - 1].length = (yyvsp[0].i) - start;
- }
shoot->explosionFrames.push_back(fi);
}
-#line 2189 "engines/hypno/grammar_arc.cpp"
+#line 2185 "engines/hypno/grammar_arc.cpp"
break;
case 102: /* bline: KTOK NUM NUM NUM */
-#line 531 "engines/hypno/grammar_arc.y"
+#line 527 "engines/hypno/grammar_arc.y"
{
assert((yyvsp[-1].i) > (yyvsp[-2].i));
FrameInfo fi((yyvsp[-2].i), (yyvsp[-1].i) - (yyvsp[-2].i));
@@ -2197,20 +2193,20 @@ yyreduce:
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2201 "engines/hypno/grammar_arc.cpp"
+#line 2197 "engines/hypno/grammar_arc.cpp"
break;
case 103: /* bline: KTOK NUM NUM */
-#line 538 "engines/hypno/grammar_arc.y"
+#line 534 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2210 "engines/hypno/grammar_arc.cpp"
+#line 2206 "engines/hypno/grammar_arc.cpp"
break;
case 104: /* bline: SNTOK FILENAME enc */
-#line 542 "engines/hypno/grammar_arc.y"
+#line 538 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
shoot->enemySound = (yyvsp[-1].s);
@@ -2222,86 +2218,86 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2226 "engines/hypno/grammar_arc.cpp"
+#line 2222 "engines/hypno/grammar_arc.cpp"
break;
case 105: /* bline: SNTOK */
-#line 553 "engines/hypno/grammar_arc.y"
+#line 549 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2234 "engines/hypno/grammar_arc.cpp"
+#line 2230 "engines/hypno/grammar_arc.cpp"
break;
case 106: /* bline: GTOK */
-#line 557 "engines/hypno/grammar_arc.y"
+#line 553 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2240 "engines/hypno/grammar_arc.cpp"
+#line 2236 "engines/hypno/grammar_arc.cpp"
break;
case 107: /* bline: TTOK NUM NUM NUM */
-#line 558 "engines/hypno/grammar_arc.y"
+#line 554 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[-2].i);
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2249 "engines/hypno/grammar_arc.cpp"
+#line 2245 "engines/hypno/grammar_arc.cpp"
break;
case 108: /* bline: TTOK NUM */
-#line 562 "engines/hypno/grammar_arc.y"
+#line 558 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2258 "engines/hypno/grammar_arc.cpp"
+#line 2254 "engines/hypno/grammar_arc.cpp"
break;
case 109: /* bline: TTOK */
-#line 566 "engines/hypno/grammar_arc.y"
+#line 562 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2267 "engines/hypno/grammar_arc.cpp"
+#line 2263 "engines/hypno/grammar_arc.cpp"
break;
case 110: /* bline: MTOK */
-#line 570 "engines/hypno/grammar_arc.y"
+#line 566 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2275 "engines/hypno/grammar_arc.cpp"
+#line 2271 "engines/hypno/grammar_arc.cpp"
break;
case 111: /* bline: NTOK */
-#line 573 "engines/hypno/grammar_arc.y"
+#line 569 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2283 "engines/hypno/grammar_arc.cpp"
+#line 2279 "engines/hypno/grammar_arc.cpp"
break;
case 112: /* bline: NRTOK */
-#line 576 "engines/hypno/grammar_arc.y"
+#line 572 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2290 "engines/hypno/grammar_arc.cpp"
+#line 2286 "engines/hypno/grammar_arc.cpp"
break;
case 113: /* bline: ZTOK */
-#line 578 "engines/hypno/grammar_arc.y"
+#line 574 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
//delete shoot;
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2301 "engines/hypno/grammar_arc.cpp"
+#line 2297 "engines/hypno/grammar_arc.cpp"
break;
-#line 2305 "engines/hypno/grammar_arc.cpp"
+#line 2301 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 769288bd1d1..e9665a0eab7 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -350,6 +350,8 @@ bline: FNTOK FILENAME {
| DTOK LTOK { debugC(1, kHypnoDebugParser, "D L");
}
| J0TOK NUM {
+ assert($2 > 0);
+ shoot->warningVideoIdx = $2;
debugC(1, kHypnoDebugParser, "J0 %d", $2);
}
| FNTOK NONETOK {
@@ -520,12 +522,6 @@ bline: FNTOK FILENAME {
| KTOK { debugC(1, kHypnoDebugParser, "K"); }
| KTOK NUM { debugC(1, kHypnoDebugParser, "K %d", $2);
FrameInfo fi($2, 1);
- int bodyFramesSize = shoot->bodyFrames.size();
- if ($2 > 0 && bodyFramesSize > 0) { // Correct last bodyFrame length
- int start = shoot->bodyFrames[bodyFramesSize - 1].start;
- assert($2 > start);
- shoot->bodyFrames[bodyFramesSize - 1].length = $2 - start;
- }
shoot->explosionFrames.push_back(fi);
}
| KTOK NUM NUM NUM {
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 52fda4560d1..4df9fd83eae 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -592,11 +592,11 @@ public:
uint32 _currentActor;
uint32 _currentWeapon;
uint32 _civiliansShoot;
- Filename _warningAnimals;
+ Common::Array<Filename> _warningVideosDay;
+ Common::Array<Filename> _warningVideosNight;
+ Common::Array<Filename> _warningAlarmVideos;
Filename _warningHostage;
- Common::Array<Filename> _warningCivilians;
- Common::Array<Filename> _warningFriendlySoldiers;
- Common::Array<Filename> _warningAlarmDay;
+
Common::Array<Filename> _deathVideo;
Common::HashMap<Common::String, bool> _shootsDestroyed;
Commit: e6032569ced8236ac9f7a48b750b791d5bc5c0bf
https://github.com/scummvm/scummvm/commit/e6032569ced8236ac9f7a48b750b791d5bc5c0bf
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-20T09:45:25+02:00
Commit Message:
HYPNO: completed parsing of level c42 in boyz
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/grammar_arc.cpp
engines/hypno/grammar_arc.y
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index af9fa589ce7..6fdaa6e4489 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -31,14 +31,16 @@ namespace Hypno {
extern int parse_arc(const char *);
void HypnoEngine::splitArcadeFile(const Common::String &filename, Common::String &arc, Common::String &list) {
+ debugC(1, kHypnoDebugParser, "Splitting %s", filename.c_str());
Common::File file;
if (!file.open(filename.c_str()))
error("Failed to open %s", filename.c_str());
while (!file.eos()) {
byte x = file.readByte();
+ byte p = arc.lastChar();
arc += x;
- if (x == 'X') {
+ if (x == 'X' && p == '\n') {
while (!file.eos()) {
x = file.readByte();
if (x == 'Y' && list.size() > 0 && list[list.size()-1] == '\n')
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index 9d499412982..c387311a5f7 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -113,7 +113,7 @@ void BoyzEngine::loadAssets() {
loadArcadeLevel("c355.mi_", "c36.mi_", "??", "");
loadArcadeLevel("c36.mi_", "c41.mi_", "??", "");
loadArcadeLevel("c41.mi_", "c42.mi_", "??", "");
- //loadArcadeLevel("c42.mi_", "c51.mi_", "??", "");
+ loadArcadeLevel("c42.mi_", "c51.mi_", "??", "");
loadArcadeLevel("c51.mi_", "c52.mi_", "??", "");
loadArcadeLevel("c52.mi_", "c53.mi_", "??", "");
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index 8e849b959a6..69a2d65e5db 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -557,16 +557,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 6
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 216
+#define YYLAST 217
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 60
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 9
/* YYNRULES -- Number of rules. */
-#define YYNRULES 113
+#define YYNRULES 114
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 221
+#define YYNSTATES 222
/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 314
@@ -626,13 +626,13 @@ static const yytype_int16 yyrline[] =
174, 179, 182, 187, 196, 201, 205, 209, 213, 216,
220, 223, 224, 252, 255, 258, 264, 269, 274, 280,
285, 290, 295, 300, 305, 312, 313, 316, 317, 320,
- 321, 322, 325, 335, 340, 345, 350, 352, 357, 362,
- 367, 371, 375, 379, 383, 387, 391, 395, 399, 403,
- 407, 411, 415, 419, 423, 427, 431, 435, 439, 443,
- 447, 451, 455, 458, 462, 467, 472, 475, 480, 485,
- 489, 495, 499, 502, 503, 504, 507, 511, 514, 519,
- 522, 523, 527, 534, 538, 549, 553, 554, 558, 562,
- 566, 569, 572, 574
+ 321, 322, 325, 335, 340, 345, 350, 351, 352, 357,
+ 362, 367, 371, 375, 379, 383, 387, 391, 395, 399,
+ 403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
+ 443, 447, 451, 455, 458, 462, 467, 472, 475, 480,
+ 485, 489, 495, 499, 502, 503, 504, 507, 511, 514,
+ 519, 522, 523, 527, 534, 538, 549, 553, 554, 558,
+ 562, 566, 569, 572, 574
};
#endif
@@ -681,29 +681,29 @@ yysymbol_name (yysymbol_kind_t yysymbol)
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 39, -123, 39, 11, 101, -123, -123, 15, 16, 10,
- 40, 45, 48, 135, 51, 53, 55, 101, 49, 57,
- 58, 0, 59, 2, 20, 63, 36, 64, 75, 77,
+ 46, -123, 46, 11, 101, -123, -123, 15, 16, 10,
+ 44, 48, 49, 135, 50, 51, 53, 101, 55, 56,
+ 57, 0, 59, 2, 20, 63, 36, 64, 75, 77,
81, 82, 83, 85, 84, 42, 101, -123, 19, 87,
90, -123, -123, 95, 96, 97, 98, 102, 103, 104,
105, 106, -123, 115, 128, -123, 131, 132, 91, 137,
138, 140, 141, 142, -123, 143, -123, -123, -123, -123,
- -123, -123, 144, 43, -123, -123, -123, 111, 88, -123,
- 145, 146, 147, 148, 149, 151, 152, 153, 154, 155,
- -123, -123, -123, -123, 111, 166, 167, 160, -123, -123,
- -123, 161, -4, -123, -123, -123, -123, -123, -123, -123,
- -123, -123, -123, -123, -123, 88, -123, -123, -123, 162,
- 163, 174, 168, 3, 169, 170, 171, 172, 5, 173,
- -4, 175, 176, 177, 178, 179, 180, -123, -123, 181,
- 182, 183, 54, -123, 184, 185, 186, -123, 187, 188,
- 189, 123, -4, -123, -123, 190, 88, 191, -123, -123,
- -123, -123, -123, -123, -123, -123, -123, -123, -123, 192,
- -123, 193, 194, -123, 195, 196, 197, -123, -123, -123,
+ -123, -123, 144, 73, -123, -123, -123, 111, 148, -123,
+ 146, 147, 149, 151, 152, 153, 154, 155, 157, 158,
+ -123, -123, -123, -123, 111, 169, 170, 162, -123, -123,
+ -123, 163, -4, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, -123, -123, 148, -123, -123, -123, 165,
+ 166, 176, 168, 3, 171, 172, 173, 174, 5, 175,
+ -4, 178, 177, 179, 180, 181, 182, -123, -123, 183,
+ 184, 185, 54, -123, 186, 187, 188, -123, 189, 190,
+ 191, 126, -4, -123, -123, 192, 148, 193, -123, -123,
-123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ 194, -123, 195, 196, -123, 197, 198, 199, -123, -123,
-123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
- -123, 198, 199, 200, -123, -123, -123, -123, -123, -123,
- 201, -123, -123, -123, -123, -123, 202, -123, -123, -123,
- -123
+ -123, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, 200, 201, 202, -123, -123, -123, -123, -123,
+ -123, 203, -123, -123, -123, -123, -123, 204, -123, -123,
+ -123, -123
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -723,23 +723,23 @@ static const yytype_int8 yydefact[] =
31, 11, 24, 25, 48, 0, 0, 0, 12, 15,
17, 0, 51, 33, 34, 43, 38, 44, 41, 40,
42, 39, 35, 36, 37, 46, 22, 20, 21, 0,
- 0, 105, 0, 0, 0, 0, 0, 0, 0, 0,
- 51, 0, 109, 94, 0, 0, 110, 111, 112, 0,
- 0, 0, 0, 106, 0, 0, 100, 113, 0, 0,
- 0, 0, 51, 23, 14, 0, 46, 0, 52, 58,
- 54, 53, 55, 91, 96, 56, 92, 50, 59, 108,
- 93, 0, 98, 99, 0, 0, 0, 60, 61, 77,
- 68, 63, 64, 67, 75, 74, 65, 78, 62, 73,
- 79, 80, 72, 76, 69, 66, 70, 71, 81, 82,
- 57, 101, 0, 0, 95, 3, 49, 87, 104, 88,
- 0, 90, 97, 84, 85, 86, 103, 83, 89, 107,
- 102
+ 0, 106, 0, 0, 0, 0, 0, 0, 0, 0,
+ 51, 0, 110, 95, 0, 0, 111, 112, 113, 0,
+ 0, 0, 0, 107, 0, 0, 101, 114, 0, 0,
+ 0, 0, 51, 23, 14, 0, 46, 0, 52, 59,
+ 54, 53, 55, 92, 97, 56, 57, 93, 50, 60,
+ 109, 94, 0, 99, 100, 0, 0, 0, 61, 62,
+ 78, 69, 64, 65, 68, 76, 75, 66, 79, 63,
+ 74, 80, 81, 73, 77, 70, 67, 71, 72, 82,
+ 83, 58, 102, 0, 0, 96, 3, 49, 88, 105,
+ 89, 0, 91, 98, 85, 86, 87, 104, 84, 90,
+ 108, 103
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -123, 214, -123, -8, -123, -78, -67, -122, -123
+ -123, 159, -123, -8, -123, -78, -67, -122, -123
};
/* YYDEFGOTO[NTERM-NUM]. */
@@ -753,28 +753,28 @@ static const yytype_uint8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
- 104, 120, 121, 122, 56, 123, 59, 158, 167, 52,
+ 104, 120, 121, 122, 56, 123, 59, 158, 168, 52,
103, 6, 124, 125, 126, 127, 128, 129, 164, 37,
38, 130, 75, 39, 61, 131, 132, 115, 74, 76,
- 206, 133, 134, 135, 136, 137, 138, 153, 139, 140,
- 141, 142, 165, 143, 144, 145, 146, 1, 147, 63,
- 148, 149, 150, 57, 40, 60, 159, 177, 41, 178,
- 179, 42, 53, 64, 2, 49, 180, 50, 102, 51,
- 54, 55, 58, 181, 182, 183, 62, 65, 208, 66,
- 184, 67, 185, 186, 187, 68, 69, 70, 188, 71,
- 189, 190, 191, 192, 73, 94, 193, 72, 76, 194,
- 79, 195, 196, 80, 197, 198, 7, 8, 81, 82,
+ 207, 133, 134, 135, 136, 137, 138, 153, 139, 140,
+ 141, 142, 165, 143, 144, 145, 146, 166, 147, 63,
+ 148, 149, 150, 57, 1, 60, 159, 178, 40, 179,
+ 180, 41, 42, 64, 49, 50, 181, 51, 53, 54,
+ 55, 2, 58, 182, 183, 184, 62, 65, 209, 66,
+ 185, 67, 186, 187, 188, 68, 69, 70, 189, 71,
+ 190, 191, 192, 193, 73, 94, 194, 72, 102, 195,
+ 79, 196, 197, 80, 198, 199, 7, 8, 81, 82,
83, 84, 9, 10, 75, 85, 86, 87, 88, 89,
11, 12, 13, 14, 15, 16, 17, 18, 90, 19,
20, 21, 22, 23, 24, 25, 26, 27, 43, 28,
29, 91, 30, 31, 92, 93, 32, 33, 0, 44,
- 95, 96, 34, 97, 98, 99, 100, 101, 105, 106,
- 107, 108, 109, 45, 110, 111, 112, 113, 114, 46,
- 116, 117, 47, 118, 119, 154, 155, 48, 156, 168,
- 205, 157, 160, 161, 162, 163, 166, 0, 0, 169,
- 170, 171, 172, 173, 174, 175, 176, 199, 200, 201,
- 202, 203, 204, 207, 209, 210, 211, 212, 213, 214,
- 215, 216, 217, 218, 219, 220, 5
+ 95, 96, 34, 97, 98, 99, 100, 101, 76, 105,
+ 106, 5, 107, 45, 108, 109, 110, 111, 112, 46,
+ 113, 114, 47, 116, 117, 118, 119, 48, 154, 155,
+ 156, 157, 169, 206, 160, 161, 162, 163, 167, 0,
+ 170, 0, 171, 172, 173, 174, 175, 176, 177, 200,
+ 201, 202, 203, 204, 205, 208, 210, 211, 212, 213,
+ 214, 215, 216, 217, 218, 219, 220, 221
};
static const yytype_int16 yycheck[] =
@@ -783,24 +783,24 @@ static const yytype_int16 yycheck[] =
77, 0, 16, 17, 18, 19, 20, 21, 13, 4,
4, 25, 3, 13, 4, 29, 30, 94, 36, 10,
152, 35, 36, 37, 38, 39, 40, 115, 42, 43,
- 44, 45, 37, 47, 48, 49, 50, 8, 52, 13,
- 54, 55, 56, 53, 14, 53, 53, 3, 13, 5,
- 6, 13, 13, 27, 25, 14, 12, 14, 25, 14,
- 13, 13, 13, 19, 20, 21, 13, 13, 156, 4,
+ 44, 45, 37, 47, 48, 49, 50, 42, 52, 13,
+ 54, 55, 56, 53, 8, 53, 53, 3, 14, 5,
+ 6, 13, 13, 27, 14, 14, 12, 14, 13, 13,
+ 13, 25, 13, 19, 20, 21, 13, 13, 156, 4,
26, 4, 28, 29, 30, 4, 4, 4, 34, 4,
- 36, 37, 38, 39, 52, 4, 42, 13, 10, 45,
+ 36, 37, 38, 39, 52, 4, 42, 13, 25, 45,
13, 47, 48, 13, 50, 51, 5, 6, 13, 13,
13, 13, 11, 12, 3, 13, 13, 13, 13, 13,
19, 20, 21, 22, 23, 24, 25, 26, 13, 28,
29, 30, 31, 32, 33, 34, 35, 36, 3, 38,
39, 13, 41, 42, 13, 13, 45, 46, -1, 14,
- 13, 13, 51, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 28, 13, 13, 13, 13, 13, 34,
- 4, 4, 37, 13, 13, 13, 13, 42, 4, 4,
- 57, 13, 13, 13, 13, 13, 13, -1, -1, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 51, 13, 13, 13, 13, 13, 10, 13,
+ 13, 2, 13, 28, 13, 13, 13, 13, 13, 34,
+ 13, 13, 37, 4, 4, 13, 13, 42, 13, 13,
+ 4, 13, 4, 57, 13, 13, 13, 13, 13, -1,
+ 13, -1, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 2
+ 13, 13, 13, 13, 13, 13, 13, 13
};
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
@@ -823,13 +823,13 @@ static const yytype_int8 yystos[] =
25, 29, 30, 35, 36, 37, 38, 39, 40, 42,
43, 44, 45, 47, 48, 49, 50, 52, 54, 55,
56, 67, 68, 65, 13, 13, 4, 13, 4, 53,
- 13, 13, 13, 13, 13, 37, 13, 67, 4, 13,
- 13, 13, 13, 13, 13, 13, 13, 3, 5, 6,
- 12, 19, 20, 21, 26, 28, 29, 30, 34, 36,
- 37, 38, 39, 42, 45, 47, 48, 50, 51, 13,
- 13, 13, 13, 13, 13, 57, 67, 13, 65, 13,
+ 13, 13, 13, 13, 13, 37, 42, 13, 67, 4,
+ 13, 13, 13, 13, 13, 13, 13, 13, 3, 5,
+ 6, 12, 19, 20, 21, 26, 28, 29, 30, 34,
+ 36, 37, 38, 39, 42, 45, 47, 48, 50, 51,
+ 13, 13, 13, 13, 13, 13, 57, 67, 13, 65,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13
+ 13, 13
};
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
@@ -846,7 +846,7 @@ static const yytype_int8 yyr1[] =
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
- 68, 68, 68, 68
+ 68, 68, 68, 68, 68
};
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
@@ -860,10 +860,10 @@ static const yytype_int8 yyr2[] =
2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
- 3, 2, 2, 2, 1, 2, 2, 3, 2, 2,
- 1, 2, 4, 3, 3, 1, 1, 4, 2, 1,
- 1, 1, 1, 1
+ 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
+ 3, 3, 2, 2, 2, 1, 2, 2, 3, 2,
+ 2, 1, 2, 4, 3, 3, 1, 1, 4, 2,
+ 1, 1, 1, 1, 1
};
@@ -1779,314 +1779,319 @@ yyreduce:
case 56: /* bline: DTOK LTOK */
#line 350 "engines/hypno/grammar_arc.y"
- { debugC(1, kHypnoDebugParser, "D L");
- }
-#line 1785 "engines/hypno/grammar_arc.cpp"
+ { debugC(1, kHypnoDebugParser, "D L"); }
+#line 1784 "engines/hypno/grammar_arc.cpp"
+ break;
+
+ case 57: /* bline: DTOK RTOK */
+#line 351 "engines/hypno/grammar_arc.y"
+ { debugC(1, kHypnoDebugParser, "D R"); }
+#line 1790 "engines/hypno/grammar_arc.cpp"
break;
- case 57: /* bline: J0TOK NUM */
+ case 58: /* bline: J0TOK NUM */
#line 352 "engines/hypno/grammar_arc.y"
{
assert((yyvsp[0].i) > 0);
shoot->warningVideoIdx = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "J0 %d", (yyvsp[0].i));
}
-#line 1795 "engines/hypno/grammar_arc.cpp"
+#line 1800 "engines/hypno/grammar_arc.cpp"
break;
- case 58: /* bline: FNTOK NONETOK */
+ case 59: /* bline: FNTOK NONETOK */
#line 357 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = "NONE";
debugC(1, kHypnoDebugParser, "FN NONE");
}
-#line 1805 "engines/hypno/grammar_arc.cpp"
+#line 1810 "engines/hypno/grammar_arc.cpp"
break;
- case 59: /* bline: FTOK FILENAME */
+ case 60: /* bline: FTOK FILENAME */
#line 362 "engines/hypno/grammar_arc.y"
{
shoot = new Shoot();
shoot->animation = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s));
}
-#line 1815 "engines/hypno/grammar_arc.cpp"
+#line 1820 "engines/hypno/grammar_arc.cpp"
break;
- case 60: /* bline: ITOK NAME */
+ case 61: /* bline: ITOK NAME */
#line 367 "engines/hypno/grammar_arc.y"
{
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1824 "engines/hypno/grammar_arc.cpp"
+#line 1829 "engines/hypno/grammar_arc.cpp"
break;
- case 61: /* bline: ITOK BNTOK */
+ case 62: /* bline: ITOK BNTOK */
#line 371 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == B1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1833 "engines/hypno/grammar_arc.cpp"
+#line 1838 "engines/hypno/grammar_arc.cpp"
break;
- case 62: /* bline: ITOK ATOK */
+ case 63: /* bline: ITOK ATOK */
#line 375 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == A
shoot->name = "A";
debugC(1, kHypnoDebugParser, "I A");
}
-#line 1842 "engines/hypno/grammar_arc.cpp"
+#line 1847 "engines/hypno/grammar_arc.cpp"
break;
- case 63: /* bline: ITOK CTOK */
+ case 64: /* bline: ITOK CTOK */
#line 379 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == C
shoot->name = "C";
debugC(1, kHypnoDebugParser, "I C");
}
-#line 1851 "engines/hypno/grammar_arc.cpp"
+#line 1856 "engines/hypno/grammar_arc.cpp"
break;
- case 64: /* bline: ITOK DTOK */
+ case 65: /* bline: ITOK DTOK */
#line 383 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == D
shoot->name = "D";
debugC(1, kHypnoDebugParser, "I D");
}
-#line 1860 "engines/hypno/grammar_arc.cpp"
+#line 1865 "engines/hypno/grammar_arc.cpp"
break;
- case 65: /* bline: ITOK FTOK */
+ case 66: /* bline: ITOK FTOK */
#line 387 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == F
shoot->name = "F";
debugC(1, kHypnoDebugParser, "I F");
}
-#line 1869 "engines/hypno/grammar_arc.cpp"
+#line 1874 "engines/hypno/grammar_arc.cpp"
break;
- case 66: /* bline: ITOK GTOK */
+ case 67: /* bline: ITOK GTOK */
#line 391 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == G
shoot->name = "G";
debugC(1, kHypnoDebugParser, "I G");
}
-#line 1878 "engines/hypno/grammar_arc.cpp"
+#line 1883 "engines/hypno/grammar_arc.cpp"
break;
- case 67: /* bline: ITOK HTOK */
+ case 68: /* bline: ITOK HTOK */
#line 395 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H
shoot->name = "H";
debugC(1, kHypnoDebugParser, "I H");
}
-#line 1887 "engines/hypno/grammar_arc.cpp"
+#line 1892 "engines/hypno/grammar_arc.cpp"
break;
- case 68: /* bline: ITOK H12TOK */
+ case 69: /* bline: ITOK H12TOK */
#line 399 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == H1/H2
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1896 "engines/hypno/grammar_arc.cpp"
+#line 1901 "engines/hypno/grammar_arc.cpp"
break;
- case 69: /* bline: ITOK ITOK */
+ case 70: /* bline: ITOK ITOK */
#line 403 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == I
shoot->name = "I";
debugC(1, kHypnoDebugParser, "I I");
}
-#line 1905 "engines/hypno/grammar_arc.cpp"
+#line 1910 "engines/hypno/grammar_arc.cpp"
break;
- case 70: /* bline: ITOK JTOK */
+ case 71: /* bline: ITOK JTOK */
#line 407 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == J
shoot->name = "J";
debugC(1, kHypnoDebugParser, "I J");
}
-#line 1914 "engines/hypno/grammar_arc.cpp"
+#line 1919 "engines/hypno/grammar_arc.cpp"
break;
- case 71: /* bline: ITOK KTOK */
+ case 72: /* bline: ITOK KTOK */
#line 411 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == K
shoot->name = "K";
debugC(1, kHypnoDebugParser, "I K");
}
-#line 1923 "engines/hypno/grammar_arc.cpp"
+#line 1928 "engines/hypno/grammar_arc.cpp"
break;
- case 72: /* bline: ITOK NTOK */
+ case 73: /* bline: ITOK NTOK */
#line 415 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == N
shoot->name = "N";
debugC(1, kHypnoDebugParser, "I N");
}
-#line 1932 "engines/hypno/grammar_arc.cpp"
+#line 1937 "engines/hypno/grammar_arc.cpp"
break;
- case 73: /* bline: ITOK OTOK */
+ case 74: /* bline: ITOK OTOK */
#line 419 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == O
shoot->name = "O";
debugC(1, kHypnoDebugParser, "I O");
}
-#line 1941 "engines/hypno/grammar_arc.cpp"
+#line 1946 "engines/hypno/grammar_arc.cpp"
break;
- case 74: /* bline: ITOK PTOK */
+ case 75: /* bline: ITOK PTOK */
#line 423 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == P
shoot->name = "P";
debugC(1, kHypnoDebugParser, "I P");
}
-#line 1950 "engines/hypno/grammar_arc.cpp"
+#line 1955 "engines/hypno/grammar_arc.cpp"
break;
- case 75: /* bline: ITOK QTOK */
+ case 76: /* bline: ITOK QTOK */
#line 427 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == Q
shoot->name = "Q";
debugC(1, kHypnoDebugParser, "I Q");
}
-#line 1959 "engines/hypno/grammar_arc.cpp"
+#line 1964 "engines/hypno/grammar_arc.cpp"
break;
- case 76: /* bline: ITOK RTOK */
+ case 77: /* bline: ITOK RTOK */
#line 431 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == R
shoot->name = "R";
debugC(1, kHypnoDebugParser, "I R");
}
-#line 1968 "engines/hypno/grammar_arc.cpp"
+#line 1973 "engines/hypno/grammar_arc.cpp"
break;
- case 77: /* bline: ITOK SNTOK */
+ case 78: /* bline: ITOK SNTOK */
#line 435 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == S1
shoot->name = (yyvsp[0].s);
debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s));
}
-#line 1977 "engines/hypno/grammar_arc.cpp"
+#line 1982 "engines/hypno/grammar_arc.cpp"
break;
- case 78: /* bline: ITOK TTOK */
+ case 79: /* bline: ITOK TTOK */
#line 439 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == T
shoot->name = "T";
debugC(1, kHypnoDebugParser, "I T");
}
-#line 1986 "engines/hypno/grammar_arc.cpp"
+#line 1991 "engines/hypno/grammar_arc.cpp"
break;
- case 79: /* bline: ITOK LTOK */
+ case 80: /* bline: ITOK LTOK */
#line 443 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == L
shoot->name = "L";
debugC(1, kHypnoDebugParser, "I L");
}
-#line 1995 "engines/hypno/grammar_arc.cpp"
+#line 2000 "engines/hypno/grammar_arc.cpp"
break;
- case 80: /* bline: ITOK MTOK */
+ case 81: /* bline: ITOK MTOK */
#line 447 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == M
shoot->name = "M";
debugC(1, kHypnoDebugParser, "I M");
}
-#line 2004 "engines/hypno/grammar_arc.cpp"
+#line 2009 "engines/hypno/grammar_arc.cpp"
break;
- case 81: /* bline: ITOK UTOK */
+ case 82: /* bline: ITOK UTOK */
#line 451 "engines/hypno/grammar_arc.y"
{ // Workaround for NAME == U
shoot->name = "U";
debugC(1, kHypnoDebugParser, "I U");
}
-#line 2013 "engines/hypno/grammar_arc.cpp"
+#line 2018 "engines/hypno/grammar_arc.cpp"
break;
- case 82: /* bline: JTOK NUM */
+ case 83: /* bline: JTOK NUM */
#line 455 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "J %d", (yyvsp[0].i));
}
-#line 2021 "engines/hypno/grammar_arc.cpp"
+#line 2026 "engines/hypno/grammar_arc.cpp"
break;
- case 83: /* bline: A0TOK NUM NUM */
+ case 84: /* bline: A0TOK NUM NUM */
#line 458 "engines/hypno/grammar_arc.y"
{
shoot->position = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "A0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2030 "engines/hypno/grammar_arc.cpp"
+#line 2035 "engines/hypno/grammar_arc.cpp"
break;
- case 84: /* bline: RTOK NUM NUM */
+ case 85: /* bline: RTOK NUM NUM */
#line 462 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2040 "engines/hypno/grammar_arc.cpp"
+#line 2045 "engines/hypno/grammar_arc.cpp"
break;
- case 85: /* bline: R0TOK NUM NUM */
+ case 86: /* bline: R0TOK NUM NUM */
#line 467 "engines/hypno/grammar_arc.y"
{
shoot->objKillsCount = (yyvsp[-1].i);
shoot->objMissesCount = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "R0 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2050 "engines/hypno/grammar_arc.cpp"
+#line 2055 "engines/hypno/grammar_arc.cpp"
break;
- case 86: /* bline: R1TOK NUM NUM */
+ case 87: /* bline: R1TOK NUM NUM */
#line 472 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "R1 %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2058 "engines/hypno/grammar_arc.cpp"
+#line 2063 "engines/hypno/grammar_arc.cpp"
break;
- case 87: /* bline: BNTOK NUM NUM */
+ case 88: /* bline: BNTOK NUM NUM */
#line 475 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->bodyFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "BN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2068 "engines/hypno/grammar_arc.cpp"
+#line 2073 "engines/hypno/grammar_arc.cpp"
break;
- case 88: /* bline: KNTOK NUM NUM */
+ case 89: /* bline: KNTOK NUM NUM */
#line 480 "engines/hypno/grammar_arc.y"
{
FrameInfo fi((yyvsp[0].i), (yyvsp[-1].i));
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "KN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2078 "engines/hypno/grammar_arc.cpp"
+#line 2083 "engines/hypno/grammar_arc.cpp"
break;
- case 89: /* bline: P0TOK NUM NUM */
+ case 90: /* bline: P0TOK NUM NUM */
#line 485 "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 2087 "engines/hypno/grammar_arc.cpp"
+#line 2092 "engines/hypno/grammar_arc.cpp"
break;
- case 90: /* bline: OTOK NUM NUM */
+ case 91: /* bline: OTOK NUM NUM */
#line 489 "engines/hypno/grammar_arc.y"
{
if ((yyvsp[-1].i) == 0 && (yyvsp[0].i) == 0)
@@ -2094,97 +2099,97 @@ yyreduce:
shoot->deathPosition = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "O %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2098 "engines/hypno/grammar_arc.cpp"
+#line 2103 "engines/hypno/grammar_arc.cpp"
break;
- case 91: /* bline: CTOK NUM */
+ case 92: /* bline: CTOK NUM */
#line 495 "engines/hypno/grammar_arc.y"
{
shoot->timesToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i));
}
-#line 2107 "engines/hypno/grammar_arc.cpp"
+#line 2112 "engines/hypno/grammar_arc.cpp"
break;
- case 92: /* bline: HTOK NUM */
+ case 93: /* bline: HTOK NUM */
#line 499 "engines/hypno/grammar_arc.y"
{
shoot->attackFrames.push_back((yyvsp[0].i));
debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 2115 "engines/hypno/grammar_arc.cpp"
+#line 2120 "engines/hypno/grammar_arc.cpp"
break;
- case 93: /* bline: VTOK NUM */
+ case 94: /* bline: VTOK NUM */
#line 502 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V %d", (yyvsp[0].i)); }
-#line 2121 "engines/hypno/grammar_arc.cpp"
+#line 2126 "engines/hypno/grammar_arc.cpp"
break;
- case 94: /* bline: VTOK */
+ case 95: /* bline: VTOK */
#line 503 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "V"); }
-#line 2127 "engines/hypno/grammar_arc.cpp"
+#line 2132 "engines/hypno/grammar_arc.cpp"
break;
- case 95: /* bline: WTOK NUM */
+ case 96: /* bline: WTOK NUM */
#line 504 "engines/hypno/grammar_arc.y"
{
shoot->attackWeight = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 2135 "engines/hypno/grammar_arc.cpp"
+#line 2140 "engines/hypno/grammar_arc.cpp"
break;
- case 96: /* bline: DTOK NUM */
+ case 97: /* bline: DTOK NUM */
#line 507 "engines/hypno/grammar_arc.y"
{
shoot->pointsToShoot = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i));
}
-#line 2144 "engines/hypno/grammar_arc.cpp"
+#line 2149 "engines/hypno/grammar_arc.cpp"
break;
- case 97: /* bline: LTOK NUM NUM */
+ case 98: /* bline: LTOK NUM NUM */
#line 511 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d %d", (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2152 "engines/hypno/grammar_arc.cpp"
+#line 2157 "engines/hypno/grammar_arc.cpp"
break;
- case 98: /* bline: LTOK NUM */
+ case 99: /* bline: LTOK NUM */
#line 514 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "L %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i)-1, 0);
shoot->bodyFrames.push_back(fi);
}
-#line 2162 "engines/hypno/grammar_arc.cpp"
+#line 2167 "engines/hypno/grammar_arc.cpp"
break;
- case 99: /* bline: MTOK NUM */
+ case 100: /* bline: MTOK NUM */
#line 519 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "M %d", (yyvsp[0].i));
shoot->missedAnimation = (yyvsp[0].i);
}
-#line 2170 "engines/hypno/grammar_arc.cpp"
+#line 2175 "engines/hypno/grammar_arc.cpp"
break;
- case 100: /* bline: KTOK */
+ case 101: /* bline: KTOK */
#line 522 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K"); }
-#line 2176 "engines/hypno/grammar_arc.cpp"
+#line 2181 "engines/hypno/grammar_arc.cpp"
break;
- case 101: /* bline: KTOK NUM */
+ case 102: /* bline: KTOK NUM */
#line 523 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d", (yyvsp[0].i));
FrameInfo fi((yyvsp[0].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2185 "engines/hypno/grammar_arc.cpp"
+#line 2190 "engines/hypno/grammar_arc.cpp"
break;
- case 102: /* bline: KTOK NUM NUM NUM */
+ case 103: /* bline: KTOK NUM NUM NUM */
#line 527 "engines/hypno/grammar_arc.y"
{
assert((yyvsp[-1].i) > (yyvsp[-2].i));
@@ -2193,19 +2198,19 @@ yyreduce:
shoot->explosionFrames.push_back(fi);
debugC(1, kHypnoDebugParser, "K %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2197 "engines/hypno/grammar_arc.cpp"
+#line 2202 "engines/hypno/grammar_arc.cpp"
break;
- case 103: /* bline: KTOK NUM NUM */
+ case 104: /* bline: KTOK NUM NUM */
#line 534 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "K %d %d", (yyvsp[-1].i), (yyvsp[0].i));
FrameInfo fi((yyvsp[-1].i), 1);
shoot->explosionFrames.push_back(fi);
}
-#line 2206 "engines/hypno/grammar_arc.cpp"
+#line 2211 "engines/hypno/grammar_arc.cpp"
break;
- case 104: /* bline: SNTOK FILENAME enc */
+ case 105: /* bline: SNTOK FILENAME enc */
#line 538 "engines/hypno/grammar_arc.y"
{
if (Common::String("S0") == (yyvsp[-2].s))
@@ -2218,74 +2223,74 @@ yyreduce:
shoot->animalSound = (yyvsp[-1].s);
debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 2222 "engines/hypno/grammar_arc.cpp"
+#line 2227 "engines/hypno/grammar_arc.cpp"
break;
- case 105: /* bline: SNTOK */
+ case 106: /* bline: SNTOK */
#line 549 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "SN");
}
-#line 2230 "engines/hypno/grammar_arc.cpp"
+#line 2235 "engines/hypno/grammar_arc.cpp"
break;
- case 106: /* bline: GTOK */
+ case 107: /* bline: GTOK */
#line 553 "engines/hypno/grammar_arc.y"
{ debugC(1, kHypnoDebugParser, "G"); }
-#line 2236 "engines/hypno/grammar_arc.cpp"
+#line 2241 "engines/hypno/grammar_arc.cpp"
break;
- case 107: /* bline: TTOK NUM NUM NUM */
+ case 108: /* bline: TTOK NUM NUM NUM */
#line 554 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[-2].i);
debugC(1, kHypnoDebugParser, "T %d %d %d", (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
}
-#line 2245 "engines/hypno/grammar_arc.cpp"
+#line 2250 "engines/hypno/grammar_arc.cpp"
break;
- case 108: /* bline: TTOK NUM */
+ case 109: /* bline: TTOK NUM */
#line 558 "engines/hypno/grammar_arc.y"
{
shoot->interactionFrame = (yyvsp[0].i);
debugC(1, kHypnoDebugParser, "T %d", (yyvsp[0].i));
}
-#line 2254 "engines/hypno/grammar_arc.cpp"
+#line 2259 "engines/hypno/grammar_arc.cpp"
break;
- case 109: /* bline: TTOK */
+ case 110: /* bline: TTOK */
#line 562 "engines/hypno/grammar_arc.y"
{
shoot->isAnimal = true;
debugC(1, kHypnoDebugParser, "T");
}
-#line 2263 "engines/hypno/grammar_arc.cpp"
+#line 2268 "engines/hypno/grammar_arc.cpp"
break;
- case 110: /* bline: MTOK */
+ case 111: /* bline: MTOK */
#line 566 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "M");
}
-#line 2271 "engines/hypno/grammar_arc.cpp"
+#line 2276 "engines/hypno/grammar_arc.cpp"
break;
- case 111: /* bline: NTOK */
+ case 112: /* bline: NTOK */
#line 569 "engines/hypno/grammar_arc.y"
{
shoot->noEnemySound = true;
debugC(1, kHypnoDebugParser, "N"); }
-#line 2279 "engines/hypno/grammar_arc.cpp"
+#line 2284 "engines/hypno/grammar_arc.cpp"
break;
- case 112: /* bline: NRTOK */
+ case 113: /* bline: NRTOK */
#line 572 "engines/hypno/grammar_arc.y"
{
debugC(1, kHypnoDebugParser, "NR"); }
-#line 2286 "engines/hypno/grammar_arc.cpp"
+#line 2291 "engines/hypno/grammar_arc.cpp"
break;
- case 113: /* bline: ZTOK */
+ case 114: /* bline: ZTOK */
#line 574 "engines/hypno/grammar_arc.y"
{
g_parsedArc->shoots.push_back(*shoot);
@@ -2293,11 +2298,11 @@ yyreduce:
//shoot = nullptr;
debugC(1, kHypnoDebugParser, "Z");
}
-#line 2297 "engines/hypno/grammar_arc.cpp"
+#line 2302 "engines/hypno/grammar_arc.cpp"
break;
-#line 2301 "engines/hypno/grammar_arc.cpp"
+#line 2306 "engines/hypno/grammar_arc.cpp"
default: break;
}
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index e9665a0eab7..8749e590af4 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -347,8 +347,8 @@ bline: FNTOK FILENAME {
shoot->playInteractionAudio = true;
debugC(1, kHypnoDebugParser, "AB %d", $2);
}
- | DTOK LTOK { debugC(1, kHypnoDebugParser, "D L");
- }
+ | DTOK LTOK { debugC(1, kHypnoDebugParser, "D L"); }
+ | DTOK RTOK { debugC(1, kHypnoDebugParser, "D R"); }
| J0TOK NUM {
assert($2 > 0);
shoot->warningVideoIdx = $2;
More information about the Scummvm-git-logs
mailing list