[Scummvm-git-logs] scummvm master -> 29a6d38179c44509bd7ad7eb67a41f55c4b885e5
neuromancer
neuromancer at users.noreply.github.com
Sat Nov 6 19:08:13 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
db08a11883 HYPNO: reenabled arcade level loading for spider-man
29a6d38179 HYPNO: correct handling of WALL0/WALL1 commands
Commit: db08a11883d6733a54f91d08be0cafa6aa484058
https://github.com/scummvm/scummvm/commit/db08a11883d6733a54f91d08be0cafa6aa484058
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-11-06T20:07:35+01:00
Commit Message:
HYPNO: reenabled arcade level loading for spider-man
Changed paths:
engines/hypno/spider/spider.cpp
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index e6cb07d5e4..4cc839df12 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -68,14 +68,14 @@ void SpiderEngine::loadAssetsFullGame() {
loadSceneLevel("decide1.mi_", "", prefix);
// _levels["decide1.mi_"].scene.prefix = "spider";
- // loadArcadeLevel("c1", "", "spider");
- // loadArcadeLevel("c2", "", "spider");
- // loadArcadeLevel("c3", "", "spider");
- // loadArcadeLevel("c4", "", "spider");
- // loadArcadeLevel("c5", "", "spider");
- // //loadArcadeLevel("c6", "", "spider");
- // loadArcadeLevel("c8", "", "spider");
- // loadArcadeLevel("c9", "", "spider");
+ loadArcadeLevel("c1", "", "spider");
+ loadArcadeLevel("c2", "", "spider");
+ loadArcadeLevel("c3", "", "spider");
+ loadArcadeLevel("c4", "", "spider");
+ loadArcadeLevel("c5", "", "spider");
+ //loadArcadeLevel("c6", "", "spider");
+ loadArcadeLevel("c8", "", "spider");
+ loadArcadeLevel("c9", "", "spider");
// start level
Level start;
Commit: 29a6d38179c44509bd7ad7eb67a41f55c4b885e5
https://github.com/scummvm/scummvm/commit/29a6d38179c44509bd7ad7eb67a41f55c4b885e5
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-11-06T20:07:35+01:00
Commit Message:
HYPNO: correct handling of WALL0/WALL1 commands
Changed paths:
engines/hypno/actions.cpp
engines/hypno/grammar.h
engines/hypno/grammar_mis.cpp
engines/hypno/grammar_mis.y
engines/hypno/hypno.h
engines/hypno/lexer_mis.cpp
engines/hypno/lexer_mis.l
engines/hypno/scene.cpp
engines/hypno/spider/spider.cpp
engines/hypno/spider/talk.cpp
engines/hypno/tokens_mis.h
diff --git a/engines/hypno/actions.cpp b/engines/hypno/actions.cpp
index 5268294e2b..e8647d9231 100644
--- a/engines/hypno/actions.cpp
+++ b/engines/hypno/actions.cpp
@@ -93,8 +93,10 @@ void HypnoEngine::runMice(Mice *a) {
changeCursor(a->path, a->index);
}
-void HypnoEngine::runEscape(Escape *a) {
+void HypnoEngine::runEscape() {
_nextHotsToRemove = stack.back();
+ _nextSequentialVideoToPlay = _escapeSequentialVideoToPlay;
+ _escapeSequentialVideoToPlay.clear();
}
void HypnoEngine::runCutscene(Cutscene *a) {
@@ -149,11 +151,13 @@ void HypnoEngine::runAmbient(Ambient *a) {
void HypnoEngine::runWalN(WalN *a) {
if (a->condition.size() > 0 && !_sceneState[a->condition])
return;
- if (a->flag == "/BITMAP")
- loadImage(a->path, a->origin.x, a->origin.y, false);
- else {
+
+ if (a->wn == "WAL0")
_nextSequentialVideoToPlay.push_back(MVideo(a->path, a->origin, false, false, false));
- }
+ else if (a->wn == "WAL1")
+ _escapeSequentialVideoToPlay.push_back(MVideo(a->path, a->origin, false, false, false));
+ else
+ error("Invalid WALN command: %s", a->wn.c_str());
}
void HypnoEngine::runQuit(Quit *a) {
@@ -165,10 +169,6 @@ void HypnoEngine::runChangeLevel(ChangeLevel *a) {
}
void HypnoEngine::runTalk(Talk *a) {
- //_videosPlaying.clear();
- //_nextParallelVideoToPlay.clear();
- //_nextSequentialVideoToPlay.clear();
-
_conversation.push_back(a);
_refreshConversation = true;
}
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 2d9af09bea..290d3bb7a2 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -215,13 +215,15 @@ public:
class WalN : public Action {
public:
- WalN(Filename path_, Common::Point origin_, Common::String condition_, Common::String flag_) {
+ WalN(Common::String wn_, Filename path_, Common::Point origin_, Common::String condition_, Common::String flag_) {
+ wn = wn_;
type = WalNAction;
path = path_;
origin = origin_;
condition = condition_;
flag = flag_;
}
+ Common::String wn;
Filename path;
Common::Point origin;
Common::String condition;
@@ -257,6 +259,7 @@ public:
}
TalkCommands commands;
bool active;
+ bool escape;
Filename background;
Common::Point backgroundPos;
Common::Rect rect;
diff --git a/engines/hypno/grammar_mis.cpp b/engines/hypno/grammar_mis.cpp
index 9aa8f2bf42..4fb15de429 100644
--- a/engines/hypno/grammar_mis.cpp
+++ b/engines/hypno/grammar_mis.cpp
@@ -149,17 +149,17 @@ extern int HYPNO_MIS_debug;
COMMENT = 261,
GSSWITCH = 262,
COMMAND = 263,
- NUM = 264,
- HOTSTOK = 265,
- CUTSTOK = 266,
- BACKTOK = 267,
- INTRTOK = 268,
- RETTOK = 269,
- TIMETOK = 270,
- PALETOK = 271,
- BBOXTOK = 272,
- OVERTOK = 273,
- WALNTOK = 274,
+ WALNTOK = 264,
+ NUM = 265,
+ HOTSTOK = 266,
+ CUTSTOK = 267,
+ BACKTOK = 268,
+ INTRTOK = 269,
+ RETTOK = 270,
+ TIMETOK = 271,
+ PALETOK = 272,
+ BBOXTOK = 273,
+ OVERTOK = 274,
MICETOK = 275,
PLAYTOK = 276,
ENDTOK = 277,
@@ -461,7 +461,7 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 112
+#define YYLAST 114
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 49
@@ -523,9 +523,9 @@ static const yytype_uint16 yyrline[] =
{
0, 74, 74, 77, 82, 83, 87, 99, 105, 120,
126, 127, 134, 141, 147, 153, 159, 166, 173, 180,
- 186, 192, 198, 204, 207, 213, 216, 217, 221, 222,
- 223, 227, 228, 229, 235, 236, 242, 248, 254, 261,
- 268, 274, 279, 280, 283, 284, 287, 288, 291, 292
+ 186, 192, 198, 204, 207, 214, 217, 218, 222, 223,
+ 226, 230, 231, 232, 238, 239, 245, 251, 257, 264,
+ 271, 277, 282, 283, 286, 287, 290, 291, 294, 295
};
#endif
@@ -535,8 +535,8 @@ static const yytype_uint16 yyrline[] =
static const char *const yytname[] =
{
"$end", "error", "$undefined", "NAME", "FILENAME", "FLAG", "COMMENT",
- "GSSWITCH", "COMMAND", "NUM", "HOTSTOK", "CUTSTOK", "BACKTOK", "INTRTOK",
- "RETTOK", "TIMETOK", "PALETOK", "BBOXTOK", "OVERTOK", "WALNTOK",
+ "GSSWITCH", "COMMAND", "WALNTOK", "NUM", "HOTSTOK", "CUTSTOK", "BACKTOK",
+ "INTRTOK", "RETTOK", "TIMETOK", "PALETOK", "BBOXTOK", "OVERTOK",
"MICETOK", "PLAYTOK", "ENDTOK", "MENUTOK", "SMENTOK", "ESCPTOK", "NRTOK",
"AMBITOK", "GLOBTOK", "TONTOK", "TOFFTOK", "TALKTOK", "INACTOK", "FDTOK",
"BOXXTOK", "ESCAPETOK", "SECONDTOK", "INTROTOK", "DEFAULTTOK", "PG",
@@ -573,18 +573,18 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int8 yypact[] =
{
- -75, 5, 63, -75, -11, 8, 9, 10, -75, 11,
- 13, 14, 15, 18, 19, 12, 25, -75, -75, 23,
- 22, -75, -75, 63, 21, -75, 28, 29, -75, -75,
- 30, 31, 33, 34, -75, -75, 25, 35, 43, 24,
- -75, 38, 39, 40, 41, 42, -75, 44, -75, 71,
- -75, 27, 24, 24, 80, -75, 48, 88, 89, 24,
- 24, 24, 24, 24, -75, 86, 87, 24, 24, -75,
- 90, 26, -75, 92, 26, 26, 92, 91, -75, -75,
- 93, 94, 95, 96, -75, -75, -75, -75, -75, 97,
- 98, -75, -75, 99, -75, 92, -75, -75, 92, 92,
- -75, 100, -75, 101, 102, 103, 24, 24, -75, 92,
- -75, -75, 26, -75, -75, -75, -75, -75, -75, 92,
+ -75, 4, 64, -75, 1, -6, 9, 10, 13, -75,
+ 8, 15, 17, 19, 20, 11, 25, -75, -75, 23,
+ 22, -75, -75, 64, 21, 28, -75, 29, 30, -75,
+ -75, 31, 32, 34, -75, -75, 25, 36, 27, 24,
+ -75, 37, 38, 39, 40, 41, -75, 42, -75, 43,
+ -75, 70, 24, 24, 72, -75, 86, 89, 90, 24,
+ 24, 24, 24, 24, -75, 87, 88, 24, 24, -75,
+ 26, 91, 26, -75, 94, 26, 94, 92, -75, -75,
+ 93, 95, 96, 97, -75, -75, -75, -75, -75, 98,
+ 99, -75, -75, -75, 94, 100, 94, -75, -75, 94,
+ -75, 101, -75, 102, 103, 104, 24, 24, -75, -75,
+ 94, -75, 26, -75, -75, -75, -75, -75, -75, 94,
-75
};
@@ -593,31 +593,31 @@ static const yytype_int8 yypact[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 3, 0, 5, 1, 0, 0, 0, 0, 23, 0,
+ 3, 0, 5, 1, 0, 0, 0, 0, 0, 23,
0, 0, 0, 0, 0, 0, 45, 8, 9, 0,
- 0, 24, 2, 5, 0, 18, 0, 0, 10, 16,
- 0, 0, 0, 0, 22, 44, 45, 0, 0, 43,
+ 0, 24, 2, 5, 0, 0, 18, 0, 0, 10,
+ 16, 0, 0, 0, 22, 44, 45, 0, 0, 43,
4, 0, 0, 0, 0, 0, 20, 0, 6, 0,
12, 0, 43, 43, 0, 29, 0, 0, 0, 43,
43, 43, 43, 43, 42, 0, 0, 43, 43, 21,
- 0, 49, 17, 47, 49, 49, 47, 0, 25, 26,
+ 49, 0, 49, 17, 47, 49, 47, 0, 25, 26,
0, 0, 0, 0, 33, 36, 37, 34, 35, 0,
- 0, 41, 40, 0, 48, 47, 46, 15, 47, 47,
- 13, 0, 28, 0, 0, 0, 43, 43, 7, 47,
- 19, 14, 49, 30, 31, 32, 38, 39, 11, 47,
+ 0, 41, 40, 48, 47, 0, 47, 46, 15, 47,
+ 13, 0, 28, 0, 0, 0, 43, 43, 19, 7,
+ 47, 14, 49, 30, 31, 32, 38, 39, 11, 47,
27
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -75, -75, -75, 75, -75, -75, -52, -4, -74, -71
+ -75, -75, -75, 12, -75, -75, -52, -4, -74, -69
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 1, 2, 22, 23, 39, 69, 36, 97, 95
+ -1, 1, 2, 22, 23, 39, 69, 36, 98, 94
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -625,52 +625,52 @@ static const yytype_int8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
- 78, 79, 100, 98, 99, 3, 24, 84, 85, 86,
- 87, 88, 25, 26, 27, 91, 92, 29, 30, 31,
- 28, 109, 32, 33, 110, 111, 34, 37, 35, 38,
- 41, 77, 48, 94, 0, 118, 51, 42, 43, 44,
- 45, 119, 46, 47, 49, 120, 50, 70, 71, 72,
- 73, 74, 81, 75, 116, 117, 52, 53, 54, 55,
+ 78, 79, 100, 96, 3, 24, 99, 84, 85, 86,
+ 87, 88, 25, 26, 27, 91, 92, 28, 29, 30,
+ 108, 31, 110, 32, 33, 111, 34, 37, 35, 38,
+ 50, 41, 48, 93, 0, 40, 118, 51, 42, 43,
+ 44, 45, 46, 119, 47, 120, 49, 70, 71, 72,
+ 73, 74, 75, 76, 116, 117, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 4, 5, 6, 7, 8, 9, 10,
- 76, 11, 12, 13, 14, 15, 16, 17, 18, 80,
- 19, 20, 82, 83, 21, 89, 90, 96, 40, 93,
- 101, 0, 102, 103, 104, 105, 106, 107, 108, 112,
- 113, 114, 115
+ 66, 67, 68, 4, 77, 5, 6, 7, 8, 9,
+ 10, 11, 80, 12, 13, 14, 15, 16, 17, 18,
+ 81, 19, 20, 82, 83, 21, 0, 89, 90, 97,
+ 0, 95, 101, 102, 0, 103, 104, 105, 106, 107,
+ 109, 112, 113, 114, 115
};
static const yytype_int8 yycheck[] =
{
- 52, 53, 76, 74, 75, 0, 17, 59, 60, 61,
- 62, 63, 4, 4, 4, 67, 68, 4, 4, 4,
- 9, 95, 4, 4, 98, 99, 14, 4, 3, 7,
- 9, 4, 36, 7, -1, 109, 12, 9, 9, 9,
- 9, 112, 9, 9, 9, 119, 3, 9, 9, 9,
- 9, 9, 4, 9, 106, 107, 32, 33, 34, 35,
+ 52, 53, 76, 72, 0, 4, 75, 59, 60, 61,
+ 62, 63, 18, 4, 4, 67, 68, 4, 10, 4,
+ 94, 4, 96, 4, 4, 99, 15, 4, 3, 7,
+ 3, 10, 36, 7, -1, 23, 110, 13, 10, 10,
+ 10, 10, 10, 112, 10, 119, 10, 10, 10, 10,
+ 10, 10, 10, 10, 106, 107, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 10, 11, 12, 13, 14, 15, 16,
- 9, 18, 19, 20, 21, 22, 23, 24, 25, 9,
- 27, 28, 4, 4, 31, 9, 9, 5, 23, 9,
- 9, -1, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9
+ 46, 47, 48, 9, 4, 11, 12, 13, 14, 15,
+ 16, 17, 10, 19, 20, 21, 22, 23, 24, 25,
+ 4, 27, 28, 4, 4, 31, -1, 10, 10, 5,
+ -1, 10, 10, 10, -1, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 50, 51, 0, 10, 11, 12, 13, 14, 15,
- 16, 18, 19, 20, 21, 22, 23, 24, 25, 27,
- 28, 31, 52, 53, 17, 4, 4, 4, 9, 4,
- 4, 4, 4, 4, 14, 3, 56, 4, 7, 54,
- 52, 9, 9, 9, 9, 9, 9, 9, 56, 9,
- 3, 12, 32, 33, 34, 35, 36, 37, 38, 39,
+ 0, 50, 51, 0, 9, 11, 12, 13, 14, 15,
+ 16, 17, 19, 20, 21, 22, 23, 24, 25, 27,
+ 28, 31, 52, 53, 4, 18, 4, 4, 4, 10,
+ 4, 4, 4, 4, 15, 3, 56, 4, 7, 54,
+ 52, 10, 10, 10, 10, 10, 10, 10, 56, 10,
+ 3, 13, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 55,
- 9, 9, 9, 9, 9, 9, 9, 4, 55, 55,
- 9, 4, 4, 4, 55, 55, 55, 55, 55, 9,
- 9, 55, 55, 9, 7, 58, 5, 57, 58, 58,
- 57, 9, 9, 9, 9, 9, 9, 9, 9, 57,
- 57, 57, 9, 9, 9, 9, 55, 55, 57, 58,
+ 10, 10, 10, 10, 10, 10, 10, 4, 55, 55,
+ 10, 4, 4, 4, 55, 55, 55, 55, 55, 10,
+ 10, 55, 55, 7, 58, 10, 58, 5, 57, 58,
+ 57, 10, 10, 10, 10, 10, 10, 10, 57, 10,
+ 57, 57, 10, 10, 10, 10, 55, 55, 57, 58,
57
};
@@ -1537,7 +1537,7 @@ yyreduce:
case 19:
#line 180 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
- WalN *a = new WalN((yyvsp[-4].s), Common::Point((yyvsp[-3].i), (yyvsp[-2].i)), (yyvsp[-1].s), (yyvsp[0].s));
+ WalN *a = new WalN((yyvsp[-5].s), (yyvsp[-4].s), Common::Point((yyvsp[-3].i), (yyvsp[-2].i)), (yyvsp[-1].s), (yyvsp[0].s));
Hotspots *cur = stack.back();
Hotspot *hot = &cur->back();
hot->actions.push_back(a);
@@ -1589,119 +1589,122 @@ yyreduce:
{
assert(talk_action == nullptr);
talk_action = new Talk();
+ talk_action->escape = false;
talk_action->active = true;
}
-#line 1595 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1596 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 25:
-#line 213 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 214 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
talk_action->active = false;
debugC(1, kHypnoDebugParser, "inactive"); }
-#line 1603 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1604 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 26:
-#line 216 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 217 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ debugC(1, kHypnoDebugParser, "inactive"); }
-#line 1609 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1610 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 27:
-#line 217 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 218 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
talk_action->background = (yyvsp[-4].s);
talk_action->backgroundPos = Common::Point((yyvsp[-3].i), (yyvsp[-2].i));
debugC(1, kHypnoDebugParser, "BACK in TALK"); }
-#line 1618 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1619 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 28:
-#line 221 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 222 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ debugC(1, kHypnoDebugParser, "BOXX %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1624 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1625 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 29:
-#line 222 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
- { debugC(1, kHypnoDebugParser, "ESCAPE"); }
-#line 1630 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 223 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+ {
+ talk_action->escape = true;
+ debugC(1, kHypnoDebugParser, "ESCAPE"); }
+#line 1633 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 30:
-#line 223 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 226 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
talk_action->second = (yyvsp[-2].s);
talk_action->secondPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
debugC(1, kHypnoDebugParser, "SECOND %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1639 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1642 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 31:
-#line 227 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 230 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ debugC(1, kHypnoDebugParser, "INTRO %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1645 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1648 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 32:
-#line 228 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 231 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ debugC(1, kHypnoDebugParser, "DEFAULT %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1651 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1654 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 33:
-#line 229 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 232 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "G";
talk_cmd.path = (yyvsp[-1].s)+2;
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); }
-#line 1662 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1665 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 34:
-#line 235 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 238 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); }
-#line 1668 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1671 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 35:
-#line 236 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 239 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "F";
talk_cmd.num = atoi((yyvsp[-1].s)+2)-1;
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); }
-#line 1679 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1682 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 36:
-#line 242 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 245 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "A";
talk_cmd.num = atoi((yyvsp[-1].s)+2)-1;
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "|A%d", talk_cmd.num); }
-#line 1690 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1693 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 37:
-#line 248 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 251 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "D";
talk_cmd.num = atoi((yyvsp[-1].s)+2)-1;
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); }
-#line 1701 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1704 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 38:
-#line 254 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 257 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "P";
@@ -1709,11 +1712,11 @@ yyreduce:
talk_cmd.position = Common::Point((yyvsp[-2].i), (yyvsp[-1].i));
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "%s %d %d", (yyvsp[-3].s), (yyvsp[-2].i), (yyvsp[-1].i)); }
-#line 1713 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1716 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 39:
-#line 261 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 264 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "I";
@@ -1721,74 +1724,74 @@ yyreduce:
talk_cmd.position = Common::Point((yyvsp[-2].i), (yyvsp[-1].i));
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "%s %d %d", (yyvsp[-3].s), (yyvsp[-2].i), (yyvsp[-1].i)); }
-#line 1725 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1728 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 40:
-#line 268 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 271 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "S";
talk_cmd.variable = (yyvsp[-1].s)+2;
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); }
-#line 1736 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1739 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 41:
-#line 274 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 277 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{
TalkCommand talk_cmd;
talk_cmd.command = "L";
talk_action->commands.push_back(talk_cmd);
debugC(1, kHypnoDebugParser, "|L"); }
-#line 1746 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1749 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 42:
-#line 279 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 282 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ debugC(1, kHypnoDebugParser, "|E"); }
-#line 1752 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1755 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 44:
-#line 283 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 286 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "name: %s", (yyvsp[0].s)); }
-#line 1758 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1761 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 45:
-#line 284 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 287 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ (yyval.s) = scumm_strdup(""); }
-#line 1764 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1767 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 46:
-#line 287 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 290 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "flag: %s", (yyvsp[0].s)); }
-#line 1770 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1773 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 47:
-#line 288 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 291 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ (yyval.s) = scumm_strdup(""); }
-#line 1776 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1779 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 48:
-#line 291 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 294 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "switch %s", (yyvsp[0].s)); }
-#line 1782 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1785 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
case 49:
-#line 292 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
+#line 295 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ (yyval.s) = scumm_strdup(""); }
-#line 1788 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1791 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
break;
-#line 1792 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
+#line 1795 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
diff --git a/engines/hypno/grammar_mis.y b/engines/hypno/grammar_mis.y
index ac6d363693..4ddc617c8e 100644
--- a/engines/hypno/grammar_mis.y
+++ b/engines/hypno/grammar_mis.y
@@ -59,9 +59,9 @@ using namespace Hypno;
int i; /* integer value */
}
-%token<s> NAME FILENAME FLAG COMMENT GSSWITCH COMMAND
+%token<s> NAME FILENAME FLAG COMMENT GSSWITCH COMMAND WALNTOK
%token<i> NUM
-%token HOTSTOK CUTSTOK BACKTOK INTRTOK RETTOK TIMETOK PALETOK BBOXTOK OVERTOK WALNTOK MICETOK PLAYTOK ENDTOK
+%token HOTSTOK CUTSTOK BACKTOK INTRTOK RETTOK TIMETOK PALETOK BBOXTOK OVERTOK MICETOK PLAYTOK ENDTOK
%token MENUTOK SMENTOK ESCPTOK NRTOK AMBITOK
%token GLOBTOK TONTOK TOFFTOK
%token TALKTOK INACTOK FDTOK BOXXTOK ESCAPETOK SECONDTOK INTROTOK DEFAULTTOK
@@ -178,7 +178,7 @@ line: MENUTOK mflag mflag {
debugC(1, kHypnoDebugParser, "CUTS %s", $2);
}
| WALNTOK FILENAME NUM NUM gsswitch flag {
- WalN *a = new WalN($2, Common::Point($3, $4), $5, $6);
+ WalN *a = new WalN($1, $2, Common::Point($3, $4), $5, $6);
Hotspots *cur = stack.back();
Hotspot *hot = &cur->back();
hot->actions.push_back(a);
@@ -207,6 +207,7 @@ line: MENUTOK mflag mflag {
alloctalk: {
assert(talk_action == nullptr);
talk_action = new Talk();
+ talk_action->escape = false;
talk_action->active = true;
}
@@ -219,7 +220,9 @@ talk: INACTOK talk {
talk_action->backgroundPos = Common::Point($3, $4);
debugC(1, kHypnoDebugParser, "BACK in TALK"); }
| BOXXTOK NUM NUM { debugC(1, kHypnoDebugParser, "BOXX %d %d", $2, $3); }
- | ESCAPETOK { debugC(1, kHypnoDebugParser, "ESCAPE"); }
+ | ESCAPETOK {
+ talk_action->escape = true;
+ debugC(1, kHypnoDebugParser, "ESCAPE"); }
| SECONDTOK FILENAME NUM NUM {
talk_action->second = $2;
talk_action->secondPos = Common::Point($3, $4);
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index faa0cea08e..dd64f1c749 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -138,7 +138,7 @@ public:
void runBackground(Background *a);
void runOverlay(Overlay *a);
void runMice(Mice *a);
- void runEscape(Escape *a);
+ void runEscape();
void runQuit(Quit *a);
void runCutscene(Cutscene *a);
void runPlay(Play *a);
@@ -175,6 +175,7 @@ public:
Videos _nextSequentialVideoToPlay;
Videos _nextParallelVideoToPlay;
Videos _nextLoopingVideoToPlay;
+ Videos _escapeSequentialVideoToPlay;
Videos _videosPlaying;
// Sounds
diff --git a/engines/hypno/lexer_mis.cpp b/engines/hypno/lexer_mis.cpp
index 86114b7e18..a47782d0ab 100644
--- a/engines/hypno/lexer_mis.cpp
+++ b/engines/hypno/lexer_mis.cpp
@@ -651,15 +651,15 @@ static const flex_int16_t yy_accept[144] =
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
0, 0, 35, 0, 0, 0, 0, 36, 0, 0,
- 2, 39, 0, 40, 40, 40, 40, 40, 12, 40,
+ 2, 39, 0, 40, 40, 40, 40, 40, 11, 40,
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
40, 40, 40, 40, 40, 32, 33, 34, 28, 31,
- 30, 29, 27, 39, 0, 4, 5, 21, 6, 40,
- 40, 16, 7, 37, 9, 40, 25, 3, 11, 14,
- 8, 17, 40, 15, 18, 13, 10, 39, 20, 40,
- 40, 40, 24, 40, 38, 40, 22, 40, 23, 26,
- 40, 19, 0
+ 30, 29, 27, 39, 0, 4, 5, 20, 6, 40,
+ 40, 15, 7, 37, 9, 40, 24, 3, 10, 13,
+ 8, 16, 40, 14, 17, 12, 26, 39, 19, 40,
+ 40, 40, 23, 40, 38, 40, 21, 40, 22, 25,
+ 40, 18, 0
} ;
static const YY_CHAR yy_ec[256] =
@@ -1207,87 +1207,87 @@ return HOTSTOK;
case 10:
YY_RULE_SETUP
#line 52 "engines/hypno/lexer_mis.l"
-return WALNTOK;
+return MICETOK;
YY_BREAK
case 11:
YY_RULE_SETUP
#line 53 "engines/hypno/lexer_mis.l"
-return MICETOK;
+return ENDTOK;
YY_BREAK
case 12:
YY_RULE_SETUP
#line 54 "engines/hypno/lexer_mis.l"
-return ENDTOK;
+return TIMETOK;
YY_BREAK
case 13:
YY_RULE_SETUP
#line 55 "engines/hypno/lexer_mis.l"
-return TIMETOK;
+return OVERTOK;
YY_BREAK
case 14:
YY_RULE_SETUP
#line 56 "engines/hypno/lexer_mis.l"
-return OVERTOK;
+return SMENTOK;
YY_BREAK
case 15:
YY_RULE_SETUP
#line 57 "engines/hypno/lexer_mis.l"
-return SMENTOK;
+return ESCPTOK;
YY_BREAK
case 16:
YY_RULE_SETUP
#line 58 "engines/hypno/lexer_mis.l"
-return ESCPTOK;
+return PLAYTOK;
YY_BREAK
case 17:
YY_RULE_SETUP
#line 59 "engines/hypno/lexer_mis.l"
-return PLAYTOK;
+return TALKTOK;
YY_BREAK
case 18:
YY_RULE_SETUP
#line 60 "engines/hypno/lexer_mis.l"
-return TALKTOK;
+return INACTOK;
YY_BREAK
case 19:
YY_RULE_SETUP
#line 61 "engines/hypno/lexer_mis.l"
-return INACTOK;
+return FDTOK;
YY_BREAK
case 20:
YY_RULE_SETUP
#line 62 "engines/hypno/lexer_mis.l"
-return FDTOK;
+return BOXXTOK;
YY_BREAK
case 21:
YY_RULE_SETUP
#line 63 "engines/hypno/lexer_mis.l"
-return BOXXTOK;
+return ESCAPETOK;
YY_BREAK
case 22:
YY_RULE_SETUP
#line 64 "engines/hypno/lexer_mis.l"
-return ESCAPETOK;
+return SECONDTOK;
YY_BREAK
case 23:
YY_RULE_SETUP
#line 65 "engines/hypno/lexer_mis.l"
-return SECONDTOK;
+return INTROTOK;
YY_BREAK
case 24:
YY_RULE_SETUP
#line 66 "engines/hypno/lexer_mis.l"
-return INTROTOK;
+return INTRTOK;
YY_BREAK
case 25:
YY_RULE_SETUP
#line 67 "engines/hypno/lexer_mis.l"
-return INTRTOK;
+return DEFAULTTOK;
YY_BREAK
case 26:
YY_RULE_SETUP
#line 68 "engines/hypno/lexer_mis.l"
-return DEFAULTTOK;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK;
YY_BREAK
case 27:
YY_RULE_SETUP
diff --git a/engines/hypno/lexer_mis.l b/engines/hypno/lexer_mis.l
index 171010b59b..7d33487966 100644
--- a/engines/hypno/lexer_mis.l
+++ b/engines/hypno/lexer_mis.l
@@ -49,7 +49,6 @@ CUTS return CUTSTOK;
GLOB return GLOBTOK;
PALE return PALETOK;
HOTS return HOTSTOK;
-WAL[0-1] return WALNTOK;
MICE return MICETOK;
END return ENDTOK;
TIME return TIMETOK;
@@ -66,6 +65,7 @@ SECOND return SECONDTOK;
INTRO return INTROTOK;
INTR return INTRTOK;
DEFAULT return DEFAULTTOK;
+WAL[0-1] HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK;
\|S[A-Za-z_0-9\\\.]+ HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PS;
\|G[A-Za-z_0-9\\\.]+ HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PG;
\|P[A-Za-z_0-9\\\.]+ HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PP;
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index 019c6caf49..37509c44fe 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -140,7 +140,7 @@ void HypnoEngine::clickedHotspot(Common::Point mousePos) {
break;
case EscapeAction:
- runEscape((Escape *)action);
+ runEscape();
break;
case CutsceneAction:
@@ -332,7 +332,6 @@ void HypnoEngine::runScene(Scene &scene) {
}
// Movies
-
if (!_nextParallelVideoToPlay.empty()) {
for (Videos::iterator it = _nextParallelVideoToPlay.begin(); it != _nextParallelVideoToPlay.end(); ++it) {
playVideo(*it);
@@ -392,6 +391,7 @@ void HypnoEngine::runScene(Scene &scene) {
if (!_videosPlaying.empty() || !_nextSequentialVideoToPlay.empty()) {
drawScreen();
+ debug("videosPlaying size: %d, _nextSequentialVideoToPlay size: %d", _videosPlaying.size(), _nextSequentialVideoToPlay.size());
continue;
}
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 4cc839df12..31656fdcbf 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -141,7 +141,7 @@ void SpiderEngine::loadAssetsDemo() {
loadLib("sixdemo/demo/sound.lib/", "sixdemo/demo/sound.lib", true);
// Read assets from mis files
- loadSceneLevel("mis/demo.mis", "", "sixdemo");
+ loadSceneLevel("sixdemo/mis/demo.mis", "", "sixdemo");
ChangeLevel *cl = new ChangeLevel("c1.mi_");
_levels["sixdemo/mis/demo.mis"].scene.hots[1].actions.push_back(cl);
@@ -158,17 +158,17 @@ void SpiderEngine::loadAssetsDemo() {
_levels["sixdemo/mis/demo.mis"].scene.hots[5].actions.push_back(cl);
_levels["sixdemo/mis/demo.mis"].scene.sound = "demo/sound.lib/menu_mus.raw";
- loadSceneLevel("mis/order.mis", "", "sixdemo");
+ loadSceneLevel("sixdemo/mis/order.mis", "", "sixdemo");
cl = new ChangeLevel("<quit>");
_levels["sixdemo/mis/order.mis"].scene.hots[1].actions.push_back(cl);
- loadSceneLevel("mis/alley.mis", "", "sixdemo");
+ loadSceneLevel("sixdemo/mis/alley.mis", "", "sixdemo");
_levels["sixdemo/mis/alley.mis"].scene.intro = "demo/aleyc01s.smk";
_levels["sixdemo/mis/alley.mis"].scene.sound = "demo/sound.lib/alleymus.raw";
_levels["sixdemo/mis/alley.mis"].scene.levelIfWin = "sixdemo/mis/demo.mis";
_levels["sixdemo/mis/alley.mis"].scene.levelIfLose = "sixdemo/mis/demo.mis";
- loadSceneLevel("mis/shoctalk.mis", "", "sixdemo");
+ loadSceneLevel("sixdemo/mis/shoctalk.mis", "", "sixdemo");
Level matrix;
matrix.code.name = "sixdemo/puz_matr";
diff --git a/engines/hypno/spider/talk.cpp b/engines/hypno/spider/talk.cpp
index e678556723..977367b56d 100644
--- a/engines/hypno/spider/talk.cpp
+++ b/engines/hypno/spider/talk.cpp
@@ -63,6 +63,8 @@ void SpiderEngine::showConversation() {
Talk *a = (Talk *)*it;
if (!a->second.empty())
_nextParallelVideoToPlay.push_back(MVideo(a->second, a->secondPos, false, false, false));
+ if (a->escape)
+ runEscape();
}
debugC(1, kHypnoDebugScene, "Clearing conversation");
_conversation.clear();
diff --git a/engines/hypno/tokens_mis.h b/engines/hypno/tokens_mis.h
index a5d61d7156..ebfa8d9d9a 100644
--- a/engines/hypno/tokens_mis.h
+++ b/engines/hypno/tokens_mis.h
@@ -59,17 +59,17 @@ extern int HYPNO_MIS_debug;
COMMENT = 261,
GSSWITCH = 262,
COMMAND = 263,
- NUM = 264,
- HOTSTOK = 265,
- CUTSTOK = 266,
- BACKTOK = 267,
- INTRTOK = 268,
- RETTOK = 269,
- TIMETOK = 270,
- PALETOK = 271,
- BBOXTOK = 272,
- OVERTOK = 273,
- WALNTOK = 274,
+ WALNTOK = 264,
+ NUM = 265,
+ HOTSTOK = 266,
+ CUTSTOK = 267,
+ BACKTOK = 268,
+ INTRTOK = 269,
+ RETTOK = 270,
+ TIMETOK = 271,
+ PALETOK = 272,
+ BBOXTOK = 273,
+ OVERTOK = 274,
MICETOK = 275,
PLAYTOK = 276,
ENDTOK = 277,
More information about the Scummvm-git-logs
mailing list