[Scummvm-git-logs] scummvm master -> c65f20e91df2aae10740eb8c819aa066063b0bee

neuromancer neuromancer at users.noreply.github.com
Thu Nov 11 18:51:23 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c65f20e91d HYPNO: improved arcade parsing grammar and added more levels in spider


Commit: c65f20e91df2aae10740eb8c819aa066063b0bee
    https://github.com/scummvm/scummvm/commit/c65f20e91df2aae10740eb8c819aa066063b0bee
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-11-11T19:50:45+01:00

Commit Message:
HYPNO: improved arcade parsing grammar and added more levels in spider

Changed paths:
    engines/hypno/arcade.cpp
    engines/hypno/grammar.h
    engines/hypno/grammar_arc.cpp
    engines/hypno/grammar_arc.y
    engines/hypno/hypno.cpp
    engines/hypno/spider/spider.cpp
    engines/hypno/wet/wet.cpp


diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index bcacf44367..b61d30aea4 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -213,8 +213,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 
 		if (_health <= 0) {
 			skipVideo(background);
-			if (!arc->defeatVideos.empty()) {
-				MVideo video(arc->defeatVideos.front(), Common::Point(0, 0), false, false, false);
+			if (!arc->defeatNoEnergyVideo.empty()) {
+				MVideo video(arc->defeatNoEnergyVideo, Common::Point(0, 0), false, false, false);
 				runIntro(video);
 			}
 			assert(!arc->levelIfLose.empty());
@@ -233,8 +233,8 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 
 		if (!background.decoder || background.decoder->endOfVideo()) {
 			skipVideo(background);
-			if (!arc->winVideos.empty()) {
-				MVideo video(arc->winVideos.front(), Common::Point(0, 0), false, false, false);
+			if (!arc->nextLevelVideo.empty()) {
+				MVideo video(arc->nextLevelVideo, Common::Point(0, 0), false, false, false);
 				runIntro(video);
 			}
 			assert(!arc->levelIfWin.empty());
@@ -252,6 +252,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 						Shoot s = *it;
 						s.video = new MVideo(it->animation, it->position, true, false, false);
 						playVideo(*s.video);
+						s.video->currentFrame = s.video->decoder->decodeNextFrame(); // Skip the first frame
 						_shoots.push_back(s);
 						playSound(_soundPath + arc->enemySound, 1);
 					}
@@ -265,13 +266,14 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 		for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it) {
 			if (it->video->decoder) {
 				int frame = it->video->decoder->getCurFrame();
-				if (frame > 0 && frame >= (int)(it->explosionFrame - 15) && !it->destroyed) {
+				if (frame > 0 && frame >= (int)(it->attackFrame) && !it->destroyed) {
+					_health = _health - it->attackWeight;
 					hitPlayer();
+					it->attackFrame = it->video->decoder->getFrameCount() + 1; // It will never attack again
 				}
 
 				if (frame > 0 && frame >= (int)(it->explosionFrame - 3) && !it->destroyed) {
 					skipVideo(*it->video);
-					_health = _health - it->damage;
 				} else if (frame > 0 && frame >= (int)(it->video->decoder->getFrameCount() - 2)) {
 					skipVideo(*it->video);
 					shootsToRemove.push_back(i);
@@ -353,10 +355,11 @@ bool HypnoEngine::clickedPrimaryShoot(const Common::Point &mousePos) { return tr
 void HypnoEngine::shoot(const Common::Point &mousePos) {
 	int i = detectTarget(mousePos);
 	if (i >= 0) {
-		playSound(_soundPath + _shoots[i].endSound, 1);
+		playSound(_soundPath + _shoots[i].hitSound, 1);
+		playSound(_soundPath + _shoots[i].deathSound, 1);
 		int w = _shoots[i].video->decoder->getWidth();
 		int h = _shoots[i].video->decoder->getHeight();
-		_score++;
+		_score = _score + _shoots[i].pointsToShoot;
 		_shoots[i].destroyed = true;
 		_shoots[i].video->position = Common::Point(mousePos.x - w / 2, mousePos.y - h / 2);
 		_shoots[i].video->decoder->forceSeekToFrame(_shoots[i].explosionFrame + 2);
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 6dc1d8b6f8..550ffe1a72 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -280,34 +280,6 @@ public:
 	Filename level;
 };
 
-class Shoot {
-public:
-	Shoot() {
-		destroyed = false;
-		video = nullptr;
-	}
-	Common::String name;
-	Filename animation;
-	Filename startSound;
-	Filename endSound;
-	Common::Point position;
-	int damage;
-	MVideo *video;
-	uint32 explosionFrame;
-	bool destroyed;
-};
-
-typedef Common::Array<Shoot> Shoots;
-
-class ShootInfo {
-public:
-	Common::String name;
-	uint32 timestamp;
-};
-
-typedef Common::List<ShootInfo> ShootSequence;
-typedef Common::Array<Common::String> Sounds;
-
 enum LevelType {
 	TransitionLevel,
 	SceneLevel,
@@ -334,24 +306,68 @@ public:
 	Hotspots hots;
 };
 
+class Shoot {
+public:
+	Shoot() {
+		destroyed = false;
+		video = nullptr;
+	}
+	Common::String name;
+	Filename animation;
+	Filename startSound;
+	Common::Point position;
+
+	uint32 timesToShoot;
+	uint32 pointsToShoot;
+	uint32 attackWeight;
+
+	// Sounds
+	Filename deathSound;
+	Filename hitSound;
+
+	MVideo *video;
+	uint32 attackFrame;
+	uint32 explosionFrame;
+	
+	bool destroyed;
+};
+
+typedef Common::Array<Shoot> Shoots;
+
+class ShootInfo {
+public:
+	Common::String name;
+	uint32 timestamp;
+};
+
+typedef Common::List<ShootInfo> ShootSequence;
+typedef Common::Array<Common::String> Sounds;
+
 class ArcadeShooting : public Level {
 public:
 	ArcadeShooting()  {
 		type = ArcadeLevel;
+		health = 100;
 	}
 	uint32 id;
 	Common::String mode;
-	Common::String levelIfWin;
-	Common::String levelIfLose;
-	Filename transitionVideo;
 	uint32 transitionTime;
-	Filenames defeatVideos;
-	Filenames winVideos;
+
+	// Videos
+	Filename transitionVideo;
+	Filename nextLevelVideo;
+	Filename defeatNoEnergyVideo;
+	Filename defeatMissBossVideo;
+
 	Filename background;
 	Filename player;
 	int health;
 	Shoots shoots;
 	ShootSequence shootSequence;
+
+	// Sounds 
+	Filename backgroundSound;
+	Filename targetSound;
 	Filename shootSound;
 	Filename enemySound;
 	Filename hitSound;
diff --git a/engines/hypno/grammar_arc.cpp b/engines/hypno/grammar_arc.cpp
index ca6feb731f..9d214e6a8f 100644
--- a/engines/hypno/grammar_arc.cpp
+++ b/engines/hypno/grammar_arc.cpp
@@ -509,11 +509,11 @@ static const yytype_uint16 yyrline[] =
 {
        0,    76,    76,    76,    77,    80,    81,    82,    85,    88,
       89,    90,    91,    92,    93,    94,    95,   100,   105,   106,
-     110,   111,   115,   116,   126,   136,   137,   138,   144,   145,
-     148,   149,   150,   153,   158,   163,   168,   172,   176,   180,
-     184,   188,   192,   196,   200,   204,   208,   212,   216,   220,
-     224,   228,   232,   235,   239,   240,   241,   246,   247,   250,
-     251,   252,   253,   257,   264,   265
+     110,   111,   115,   116,   130,   140,   141,   142,   147,   148,
+     151,   152,   153,   156,   161,   166,   171,   175,   179,   183,
+     187,   191,   195,   199,   203,   207,   211,   215,   219,   223,
+     227,   231,   235,   238,   242,   243,   244,   249,   250,   253,
+     254,   257,   260,   264,   271,   272
 };
 #endif
 
@@ -1477,18 +1477,22 @@ yyreduce:
     {
 		if (Common::String("B0") == (yyvsp[-1].s))
 			g_parsedArc->intros.push_back((yyvsp[0].s));
-		else if(Common::String("B1") == (yyvsp[-1].s) || Common::String("B2") == (yyvsp[-1].s))
-			g_parsedArc->winVideos.push_back((yyvsp[0].s));
-		else if(Common::String("B3") == (yyvsp[-1].s) || Common::String("B4") == (yyvsp[-1].s))
-			g_parsedArc->defeatVideos.push_back((yyvsp[0].s));
+		//else if (Common::String("B1") == $1) 
+		//	g_parsedArc->nextLevelVideo = $2;
+		else if (Common::String("B2") == (yyvsp[-1].s))
+			g_parsedArc->nextLevelVideo = (yyvsp[0].s);
+		else if (Common::String("B3") == (yyvsp[-1].s))
+			g_parsedArc->defeatNoEnergyVideo = (yyvsp[0].s);
+		else if (Common::String("B4") == (yyvsp[-1].s))
+			g_parsedArc->defeatMissBossVideo = (yyvsp[0].s);
 
 		debugC(1, kHypnoDebugParser, "BN %s", (yyvsp[0].s)); 
 	}
-#line 1488 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1492 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 24:
-#line 126 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 130 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     {
 		if (Common::String("S0") == (yyvsp[-2].s))
 			g_parsedArc->music = (yyvsp[-1].s);
@@ -1499,315 +1503,318 @@ yyreduce:
 
 		debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); 
 	}
-#line 1503 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1507 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 25:
-#line 136 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 140 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "HE %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1509 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1513 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 26:
-#line 137 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 141 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "HE %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1515 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1519 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 27:
-#line 138 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
-    { 
-		g_parsedArc->health = (yyvsp[-1].i);
+#line 142 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+    {
 		debugC(1, kHypnoDebugParser, "H %d %d", (yyvsp[-1].i), (yyvsp[0].i)); 
 	}
-#line 1524 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1527 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 33:
-#line 153 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 156 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		shoot = new Shoot();
 		shoot->animation = (yyvsp[0].s);
 		debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s)); 
 	}
-#line 1534 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1537 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 34:
-#line 158 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 161 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		shoot = new Shoot();
 		shoot->animation = "NONE";
 		debugC(1, kHypnoDebugParser, "FN NONE"); 
 	}
-#line 1544 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1547 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 35:
-#line 163 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 166 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		shoot = new Shoot();
 		shoot->animation = (yyvsp[0].s);
 		debugC(1, kHypnoDebugParser, "FN %s", (yyvsp[0].s)); 
 	}
-#line 1554 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1557 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 36:
-#line 168 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 171 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		shoot->name = (yyvsp[0].s);
 		debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s)); 
 	}
-#line 1563 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1566 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 37:
-#line 172 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 175 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     {  // Workaround for NAME == B1
 		shoot->name = (yyvsp[0].s);
 		debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s)); 
 	}
-#line 1572 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1575 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 38:
-#line 176 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 179 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == A
 		shoot->name = "A";
 		debugC(1, kHypnoDebugParser, "I A"); 
 	}
-#line 1581 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1584 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 39:
-#line 180 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 183 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == C
 		shoot->name = "C";
 		debugC(1, kHypnoDebugParser, "I C"); 
 	}
-#line 1590 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1593 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 40:
-#line 184 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 187 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == D
 		shoot->name = "D";
 		debugC(1, kHypnoDebugParser, "I D"); 
 	}
-#line 1599 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1602 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 41:
-#line 188 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 191 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == F
 		shoot->name = "F";
 		debugC(1, kHypnoDebugParser, "I F"); 
 	}
-#line 1608 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1611 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 42:
-#line 192 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 195 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == H
 		shoot->name = "H";
 		debugC(1, kHypnoDebugParser, "I H"); 
 	}
-#line 1617 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1620 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 43:
-#line 196 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 199 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == I
 		shoot->name = "I";
 		debugC(1, kHypnoDebugParser, "I I"); 
 	}
-#line 1626 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1629 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 44:
-#line 200 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 203 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == I
 		shoot->name = "J";
 		debugC(1, kHypnoDebugParser, "I J"); 
 	}
-#line 1635 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1638 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 45:
-#line 204 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 207 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == N
 		shoot->name = "N";
 		debugC(1, kHypnoDebugParser, "I N"); 
 	}
-#line 1644 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1647 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 46:
-#line 208 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 211 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == O
 		shoot->name = "O";
 		debugC(1, kHypnoDebugParser, "I O"); 
 	}
-#line 1653 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1656 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 47:
-#line 212 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 215 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == P
 		shoot->name = "P";
 		debugC(1, kHypnoDebugParser, "I P"); 
 	}
-#line 1662 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1665 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 48:
-#line 216 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 219 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == Q
 		shoot->name = "Q";
 		debugC(1, kHypnoDebugParser, "I Q"); 
 	}
-#line 1671 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1674 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 49:
-#line 220 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 223 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == R
 		shoot->name = "R";
 		debugC(1, kHypnoDebugParser, "I R"); 
 	}
-#line 1680 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1683 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 50:
-#line 224 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 227 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     {  // Workaround for NAME == S1
 		shoot->name = (yyvsp[0].s);
 		debugC(1, kHypnoDebugParser, "I %s", (yyvsp[0].s)); 
 	}
-#line 1689 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1692 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 51:
-#line 228 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 231 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { // Workaround for NAME == T
 		shoot->name = "T";
 		debugC(1, kHypnoDebugParser, "I T"); 
 	}
-#line 1698 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1701 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 52:
-#line 232 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 235 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     {
 		debugC(1, kHypnoDebugParser, "J %d", (yyvsp[0].i)); 
 	}
-#line 1706 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1709 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 53:
-#line 235 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 238 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		shoot->position = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
 		debugC(1, kHypnoDebugParser, "A0 %d %d", (yyvsp[-1].i), (yyvsp[0].i)); 
 	}
-#line 1715 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1718 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 54:
-#line 239 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 242 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "R %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1721 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1724 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 55:
-#line 240 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 243 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "BN %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1727 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1730 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 56:
-#line 241 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 244 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		//if (Common::String("K0") == $1)
 		shoot->explosionFrame = (yyvsp[0].i);
 		debugC(1, kHypnoDebugParser, "KN %d %d", (yyvsp[-1].i), (yyvsp[0].i));
 	}
-#line 1737 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1740 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 57:
-#line 246 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 249 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "P0 %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1743 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1746 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 58:
-#line 247 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 250 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		debugC(1, kHypnoDebugParser, "O %d %d", (yyvsp[-1].i), (yyvsp[0].i)); 
 	}
-#line 1751 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1754 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 59:
-#line 250 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 253 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "C %d", (yyvsp[0].i)); }
-#line 1757 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1760 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 60:
-#line 251 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
-    { debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
-#line 1763 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 254 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+    {
+		shoot->attackFrame = (yyvsp[0].i); 
+		debugC(1, kHypnoDebugParser, "H %d", (yyvsp[0].i)); }
+#line 1768 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 61:
-#line 252 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
-    { debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
-#line 1769 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 257 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+    {
+		shoot->attackWeight = (yyvsp[0].i);  
+		debugC(1, kHypnoDebugParser, "W %d", (yyvsp[0].i)); }
+#line 1776 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 62:
-#line 253 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
-    { 
-		shoot->damage = (yyvsp[0].i);
+#line 260 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+    {
+		shoot->pointsToShoot = (yyvsp[0].i);  
 		debugC(1, kHypnoDebugParser, "D %d", (yyvsp[0].i)); 
 	}
-#line 1778 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1785 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 63:
-#line 257 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 264 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { 
 		if (Common::String("S1") == (yyvsp[-2].s))
-			shoot->endSound = (yyvsp[-1].s);
-		//else if (Common::String("S2") == $1)
-		//	shoot->startSound = $2;
+			shoot->deathSound = (yyvsp[-1].s);
+		else if (Common::String("S2") == (yyvsp[-2].s))
+			shoot->hitSound = (yyvsp[-1].s);
 		 
 		debugC(1, kHypnoDebugParser, "SN %s", (yyvsp[-1].s)); }
-#line 1790 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1797 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 64:
-#line 264 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 271 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "N"); }
-#line 1796 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1803 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
   case 65:
-#line 265 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
+#line 272 "engines/hypno/grammar_arc.y" /* yacc.c:1646  */
     {
 		g_parsedArc->shoots.push_back(*shoot); 
 		//delete shoot; 
 		//shoot = nullptr;
 		debugC(1, kHypnoDebugParser, "Z"); 
 	}
-#line 1807 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1814 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
     break;
 
 
-#line 1811 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
+#line 1818 "engines/hypno/grammar_arc.cpp" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
diff --git a/engines/hypno/grammar_arc.y b/engines/hypno/grammar_arc.y
index 73484110db..af4e13927f 100644
--- a/engines/hypno/grammar_arc.y
+++ b/engines/hypno/grammar_arc.y
@@ -116,10 +116,14 @@ hline: 	CTOK NUM {
 	| BNTOK FILENAME {
 		if (Common::String("B0") == $1)
 			g_parsedArc->intros.push_back($2);
-		else if(Common::String("B1") == $1 || Common::String("B2") == $1)
-			g_parsedArc->winVideos.push_back($2);
-		else if(Common::String("B3") == $1 || Common::String("B4") == $1)
-			g_parsedArc->defeatVideos.push_back($2);
+		//else if (Common::String("B1") == $1) 
+		//	g_parsedArc->nextLevelVideo = $2;
+		else if (Common::String("B2") == $1)
+			g_parsedArc->nextLevelVideo = $2;
+		else if (Common::String("B3") == $1)
+			g_parsedArc->defeatNoEnergyVideo = $2;
+		else if (Common::String("B4") == $1)
+			g_parsedArc->defeatMissBossVideo = $2;
 
 		debugC(1, kHypnoDebugParser, "BN %s", $2); 
 	}
@@ -135,8 +139,7 @@ hline: 	CTOK NUM {
 	}
 	| HETOK C02TOK NUM NUM { debugC(1, kHypnoDebugParser, "HE %d %d", $3, $4); }
 	| HETOK CB3TOK NUM NUM { debugC(1, kHypnoDebugParser, "HE %d %d", $3, $4); }
-	| HTOK CB3TOK NUM NUM { 
-		g_parsedArc->health = $3;
+	| HTOK CB3TOK NUM NUM {
 		debugC(1, kHypnoDebugParser, "H %d %d", $3, $4); 
 	}
 	;
@@ -248,17 +251,21 @@ bline: FNTOK FILENAME {
 		debugC(1, kHypnoDebugParser, "O %d %d", $2, $3); 
 	}
 	| CTOK NUM  { debugC(1, kHypnoDebugParser, "C %d", $2); } 
-	| HTOK NUM  { debugC(1, kHypnoDebugParser, "H %d", $2); }
-	| WTOK NUM  { debugC(1, kHypnoDebugParser, "W %d", $2); }
-	| DTOK NUM  { 
-		shoot->damage = $2;
+	| HTOK NUM  {
+		shoot->attackFrame = $2; 
+		debugC(1, kHypnoDebugParser, "H %d", $2); }
+	| WTOK NUM  {
+		shoot->attackWeight = $2;  
+		debugC(1, kHypnoDebugParser, "W %d", $2); }
+	| DTOK NUM  {
+		shoot->pointsToShoot = $2;  
 		debugC(1, kHypnoDebugParser, "D %d", $2); 
 	}
 	| SNTOK FILENAME enc { 
 		if (Common::String("S1") == $1)
-			shoot->endSound = $2;
-		//else if (Common::String("S2") == $1)
-		//	shoot->startSound = $2;
+			shoot->deathSound = $2;
+		else if (Common::String("S2") == $1)
+			shoot->hitSound = $2;
 		 
 		debugC(1, kHypnoDebugParser, "SN %s", $2); }
 	| NTOK { debugC(1, kHypnoDebugParser, "N"); }
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index fa3d914697..123ac9c0e3 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -189,7 +189,7 @@ void HypnoEngine::runIntros(Videos &videos) {
 	debugC(1, kHypnoDebugScene, "Starting run intros with %d videos!", videos.size());
 	Common::Event event;
 	stopSound();
-	defaultCursor();
+	//defaultCursor();
 
 	for (Videos::iterator it = videos.begin(); it != videos.end(); ++it) {
 		playVideo(*it);
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 7dea2ece18..37e82a2e6c 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -114,6 +114,9 @@ void SpiderEngine::loadAssetsFullGame() {
 	cl = new ChangeLevel("combmenu.mi_");
 	sc->hots[1].actions.push_back(cl);
 
+	cl = new ChangeLevel("mainmenu.mi_");
+	sc->hots[4].actions.push_back(cl);
+
 	sc = (Scene *) _levels["combmenu.mi_"]; 
 
 	cl = new ChangeLevel("options.mi_");
@@ -125,6 +128,12 @@ void SpiderEngine::loadAssetsFullGame() {
 	cl = new ChangeLevel("c2.mi_");
 	sc->hots[3].actions.push_back(cl);
 
+	cl = new ChangeLevel("c3.mi_");
+	sc->hots[4].actions.push_back(cl);
+
+	cl = new ChangeLevel("c4.mi_");
+	sc->hots[5].actions.push_back(cl);
+
 	cl = new ChangeLevel("c5.mi_");
 	sc->hots[6].actions.push_back(cl);
 
@@ -133,6 +142,16 @@ void SpiderEngine::loadAssetsFullGame() {
 	
 	cl = new ChangeLevel("c9.mi_");
 	sc->hots[8].actions.push_back(cl);
+
+	cl = new ChangeLevel("c10.mi_");
+	sc->hots[9].actions.push_back(cl);
+
+	cl = new ChangeLevel("c11.mi_");
+	sc->hots[10].actions.push_back(cl);
+
+	cl = new ChangeLevel("c12.mi_");
+	sc->hots[11].actions.push_back(cl);
+
 }
 
 void SpiderEngine::loadAssetsDemo() {
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index d0ece40356..eef68dd46f 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -136,7 +136,9 @@ void WetEngine::loadAssetsDemoDisc() {
 	_levels["<movies>"] = movies;
 
 	loadArcadeLevel("c31", "c52", "wetlands");
+	_levels["c31.mi_"]->levelIfLose = "c52.mi_";
 	loadArcadeLevel("c52", "<gameover>", "wetlands");
+	_levels["c52.mi_"]->levelIfLose = "<gameover>";
 
 	Transition *over = new Transition();
 	over->level = "<quit>";




More information about the Scummvm-git-logs mailing list