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

neuromancer noreply at scummvm.org
Wed Nov 24 20:52:40 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:
db785e7798 HYPNO: added new scenes and improved parsers in spider


Commit: db785e779819b014abe8fbed06783cbc66839976
    https://github.com/scummvm/scummvm/commit/db785e779819b014abe8fbed06783cbc66839976
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2021-11-24T21:51:40+01:00

Commit Message:
HYPNO: added new scenes and improved parsers in spider

Changed paths:
    engines/hypno/actions.cpp
    engines/hypno/grammar_mis.cpp
    engines/hypno/grammar_mis.y
    engines/hypno/hypno.cpp
    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/tokens_mis.h


diff --git a/engines/hypno/actions.cpp b/engines/hypno/actions.cpp
index 85fc9db633..a7e842d21a 100644
--- a/engines/hypno/actions.cpp
+++ b/engines/hypno/actions.cpp
@@ -107,6 +107,7 @@ void HypnoEngine::runCutscene(Cutscene *a) {
 }
 
 bool HypnoEngine::runGlobal(Global *a) {
+	debugC(1, kHypnoDebugScene, "Runing global with command %s and variable %s", a->command.c_str(), a->variable.c_str());
 	if (a->command == "TURNON")
 		_sceneState[a->variable] = 1;
 	else if (a->command == "TURNOFF")
@@ -169,6 +170,7 @@ void HypnoEngine::runQuit(Quit *a) {
 }
 
 void HypnoEngine::runChangeLevel(ChangeLevel *a) {
+	debugC(1, kHypnoDebugScene, "Next level is '%s'", a->level.c_str());	
 	_nextLevel = a->level;
 }
 
diff --git a/engines/hypno/grammar_mis.cpp b/engines/hypno/grammar_mis.cpp
index 144704fd0d..e13002066a 100644
--- a/engines/hypno/grammar_mis.cpp
+++ b/engines/hypno/grammar_mis.cpp
@@ -169,27 +169,28 @@ extern int HYPNO_MIS_debug;
     NRTOK = 281,
     AMBITOK = 282,
     SWPTTOK = 283,
-    GLOBTOK = 284,
-    TONTOK = 285,
-    TOFFTOK = 286,
-    TALKTOK = 287,
-    INACTOK = 288,
-    FDTOK = 289,
-    BOXXTOK = 290,
-    ESCAPETOK = 291,
-    SECONDTOK = 292,
-    INTROTOK = 293,
-    DEFAULTTOK = 294,
-    PG = 295,
-    PA = 296,
-    PD = 297,
-    PH = 298,
-    PF = 299,
-    PE = 300,
-    PP = 301,
-    PI = 302,
-    PL = 303,
-    PS = 304
+    MPTRTOK = 284,
+    GLOBTOK = 285,
+    TONTOK = 286,
+    TOFFTOK = 287,
+    TALKTOK = 288,
+    INACTOK = 289,
+    FDTOK = 290,
+    BOXXTOK = 291,
+    ESCAPETOK = 292,
+    SECONDTOK = 293,
+    INTROTOK = 294,
+    DEFAULTTOK = 295,
+    PG = 296,
+    PA = 297,
+    PD = 298,
+    PH = 299,
+    PF = 300,
+    PE = 301,
+    PP = 302,
+    PI = 303,
+    PL = 304,
+    PS = 305
   };
 #endif
 
@@ -203,7 +204,7 @@ union HYPNO_MIS_STYPE
 	char *s; /* string value */
 	int i;	 /* integer value */
 
-#line 207 "engines/hypno/grammar_mis.cpp" /* yacc.c:355  */
+#line 208 "engines/hypno/grammar_mis.cpp" /* yacc.c:355  */
 };
 
 typedef union HYPNO_MIS_STYPE HYPNO_MIS_STYPE;
@@ -220,7 +221,7 @@ int HYPNO_MIS_parse (void);
 
 /* Copy the second part of user declarations.  */
 
-#line 224 "engines/hypno/grammar_mis.cpp" /* yacc.c:358  */
+#line 225 "engines/hypno/grammar_mis.cpp" /* yacc.c:358  */
 
 #ifdef short
 # undef short
@@ -462,21 +463,21 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  3
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   120
+#define YYLAST   125
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  50
+#define YYNTOKENS  51
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  11
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  53
+#define YYNRULES  54
 /* YYNSTATES -- Number of states.  */
-#define YYNSTATES  130
+#define YYNSTATES  137
 
 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
    by yylex, with out-of-bounds checking.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   304
+#define YYMAXUTOK   305
 
 #define YYTRANSLATE(YYX)                                                \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -515,7 +516,7 @@ static const yytype_uint8 yytranslate[] =
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49
+      45,    46,    47,    48,    49,    50
 };
 
 #if HYPNO_MIS_DEBUG
@@ -524,10 +525,10 @@ static const yytype_uint16 yyrline[] =
 {
        0,    74,    74,    77,    84,    85,    89,   101,   107,   122,
      128,   129,   130,   137,   144,   150,   156,   162,   169,   176,
-     183,   190,   196,   202,   208,   214,   217,   218,   221,   228,
-     231,   232,   236,   239,   242,   246,   250,   255,   261,   262,
-     268,   274,   280,   287,   294,   300,   305,   306,   309,   310,
-     313,   314,   317,   318
+     183,   190,   196,   202,   205,   211,   217,   220,   221,   224,
+     231,   234,   235,   239,   242,   245,   249,   253,   258,   264,
+     265,   271,   277,   283,   290,   297,   303,   308,   309,   312,
+     313,   316,   317,   320,   321
 };
 #endif
 
@@ -540,11 +541,11 @@ static const char *const yytname[] =
   "GSSWITCH", "COMMAND", "WALNTOK", "NUM", "HOTSTOK", "CUTSTOK", "BACKTOK",
   "INTRTOK", "RETTOK", "TIMETOK", "PALETOK", "BBOXTOK", "OVERTOK",
   "MICETOK", "PLAYTOK", "ENDTOK", "MENUTOK", "SMENTOK", "ESCPTOK", "NRTOK",
-  "AMBITOK", "SWPTTOK", "GLOBTOK", "TONTOK", "TOFFTOK", "TALKTOK",
-  "INACTOK", "FDTOK", "BOXXTOK", "ESCAPETOK", "SECONDTOK", "INTROTOK",
-  "DEFAULTTOK", "PG", "PA", "PD", "PH", "PF", "PE", "PP", "PI", "PL", "PS",
-  "$accept", "start", "init", "lines", "line", "anything", "alloctalk",
-  "talk", "mflag", "flag", "gsswitch", YY_NULLPTR
+  "AMBITOK", "SWPTTOK", "MPTRTOK", "GLOBTOK", "TONTOK", "TOFFTOK",
+  "TALKTOK", "INACTOK", "FDTOK", "BOXXTOK", "ESCAPETOK", "SECONDTOK",
+  "INTROTOK", "DEFAULTTOK", "PG", "PA", "PD", "PH", "PF", "PE", "PP", "PI",
+  "PL", "PS", "$accept", "start", "init", "lines", "line", "anything",
+  "alloctalk", "talk", "mflag", "flag", "gsswitch", YY_NULLPTR
 };
 #endif
 
@@ -557,14 +558,15 @@ static const yytype_uint16 yytoknum[] =
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302,   303,   304
+     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
+     305
 };
 # endif
 
-#define YYPACT_NINF -82
+#define YYPACT_NINF -85
 
 #define yypact_value_is_default(Yystate) \
-  (!!((Yystate) == (-82)))
+  (!!((Yystate) == (-85)))
 
 #define YYTABLE_NINF -1
 
@@ -575,19 +577,20 @@ static const yytype_uint16 yytoknum[] =
      STATE-NUM.  */
 static const yytype_int8 yypact[] =
 {
-     -82,     5,    74,   -82,     9,    -4,    13,    14,    15,   -82,
-      11,    19,    20,    22,    23,    26,    27,   -82,   -82,    29,
-      21,    28,   -82,   -82,    74,    24,    30,   -82,    31,    32,
-      27,   -82,    37,    38,    39,    26,    35,   -82,    27,    41,
-     -82,    34,    33,   -82,    42,    43,    44,    45,   -82,    47,
-     -82,    48,   -82,   -82,    27,    49,   -82,    56,    33,    33,
-      51,   -82,    58,    59,    60,    33,    33,    33,    33,    33,
-     -82,    82,    90,    33,    33,   -82,    36,    94,    36,   -82,
-      79,    36,   -82,    79,    95,   -82,   -82,    97,    98,    99,
-     100,   -82,   -82,   -82,   -82,   -82,   101,   102,   -82,   -82,
-     -82,    79,   103,    79,   -82,   -82,    79,   -82,   104,   -82,
-     105,   106,   107,    79,    33,   -82,   -82,    79,   -82,    36,
-      79,   -82,   -82,    33,   -82,   -82,    79,   -82,   -82,   -82
+     -85,     5,    77,   -85,     9,    -4,    13,    14,    15,   -85,
+      10,    18,    20,    21,    23,    25,    27,   -85,   -85,    28,
+      26,    29,    24,   -85,   -85,    77,    30,    31,   -85,    33,
+      34,    27,   -85,    36,    40,    41,    25,    22,   -85,    27,
+      42,   -85,    43,    32,    35,   -85,    44,    45,    46,    47,
+     -85,    49,   -85,    50,   -85,   -85,    27,    51,    52,   -85,
+      59,    35,    35,    54,   -85,    61,    62,    63,    35,    35,
+      35,    35,    35,   -85,    85,    93,    35,    35,   -85,    38,
+      98,    38,   -85,    82,    38,   -85,    82,    99,   101,   -85,
+     -85,   102,   103,   104,   105,   -85,   -85,   -85,   -85,   -85,
+     106,   107,   -85,   -85,   -85,    82,   108,    82,   -85,   -85,
+      82,   -85,   109,   110,   -85,   111,   112,   113,    82,    35,
+     -85,   -85,    82,   -85,   114,    38,    82,   -85,   -85,    35,
+     -85,   -85,   -85,    82,   -85,   -85,   -85
 };
 
   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -595,33 +598,34 @@ static const yytype_int8 yypact[] =
      means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       3,     0,     5,     1,     0,     0,     0,     0,     0,    25,
-       0,     0,     0,     0,     0,    27,    49,     8,     9,     0,
-       0,     0,    28,     2,     5,     0,     0,    20,     0,    19,
-      49,    17,     0,     0,     0,    27,     0,    48,    49,     0,
-      11,     0,    47,     4,     0,     0,     0,     0,    10,     0,
-      22,     0,    26,    24,    49,     0,    13,     0,    47,    47,
-       0,    33,     0,     0,     0,    47,    47,    47,    47,    47,
-      46,     0,     0,    47,    47,    23,    53,     0,    53,    18,
-      51,    53,     6,    51,     0,    29,    30,     0,     0,     0,
-       0,    37,    40,    41,    38,    39,     0,     0,    45,    44,
-      52,    51,     0,    51,    50,    16,    51,    14,     0,    32,
-       0,     0,     0,    51,    47,    21,     7,    51,    15,    53,
-      51,    35,    36,    47,    43,    12,    51,    34,    42,    31
+       3,     0,     5,     1,     0,     0,     0,     0,     0,    26,
+       0,     0,     0,     0,     0,    28,    50,     8,     9,     0,
+       0,     0,     0,    29,     2,     5,     0,     0,    20,     0,
+      19,    50,    17,     0,     0,     0,    28,     0,    49,    50,
+       0,    11,     0,     0,    48,     4,     0,     0,     0,     0,
+      10,     0,    22,     0,    27,    25,    50,     0,     0,    13,
+       0,    48,    48,     0,    34,     0,     0,     0,    48,    48,
+      48,    48,    48,    47,     0,     0,    48,    48,    24,    54,
+       0,    54,    18,    52,    54,     6,    52,     0,     0,    30,
+      31,     0,     0,     0,     0,    38,    41,    42,    39,    40,
+       0,     0,    46,    45,    53,    52,     0,    52,    51,    16,
+      52,    14,     0,     0,    33,     0,     0,     0,    52,    48,
+      21,     7,    52,    15,     0,    54,    52,    36,    37,    48,
+      44,    12,    23,    52,    35,    43,    32
 };
 
   /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -82,   -82,   -82,    96,   -82,     3,   -82,   -58,   -26,   -81,
-     -75
+     -85,   -85,   -85,   100,   -85,     3,   -85,   -61,   -27,   -84,
+     -78
 };
 
   /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,     1,     2,    23,    24,    36,    42,    75,    38,   105,
-     101
+      -1,     1,     2,    24,    25,    37,    44,    78,    39,   109,
+     105
 };
 
   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
@@ -629,66 +633,67 @@ static const yytype_int8 yydefgoto[] =
      number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_uint8 yytable[] =
 {
-      85,    86,   107,   103,    48,     3,   106,    91,    92,    93,
-      94,    95,    54,    25,    26,    98,    99,    27,    28,    29,
-     115,    30,   117,    31,    32,   118,    33,    34,    82,    35,
-      37,    40,   123,    39,    44,    41,   125,    56,    52,   127,
-      45,    46,    47,   100,   126,   129,    57,    49,    50,    51,
-      53,    55,    76,    77,    78,    79,   124,    80,    81,    83,
-      84,    87,    88,    89,    90,   128,    58,    59,    60,    61,
+      89,    90,   111,   107,    50,     3,   110,    95,    96,    97,
+      98,    99,    56,    26,    27,   102,   103,    28,    29,    30,
+      31,   120,    32,   122,    33,    34,   123,    35,    36,    85,
+      38,    43,    40,    42,   129,    59,    41,    55,   131,    54,
+      46,    47,   134,    48,    49,   104,    51,   133,    60,   136,
+      52,    53,    57,    58,    79,    80,    81,    82,   130,    83,
+      84,    86,    87,    88,    91,    92,    93,    94,   135,    61,
       62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,     4,   104,     5,     6,     7,     8,     9,
-      10,    11,    96,    12,    13,    14,    15,    16,    17,    18,
-      97,    19,    20,    21,   102,   108,    22,   109,   110,   111,
-     112,   113,   114,   116,   119,   120,   121,   122,     0,     0,
-      43
+      72,    73,    74,    75,    76,    77,     4,   108,     5,     6,
+       7,     8,     9,    10,    11,   100,    12,    13,    14,    15,
+      16,    17,    18,   101,    19,    20,    21,    22,   106,   112,
+      23,   113,   114,   115,   116,   117,   118,   119,   121,   124,
+     125,   126,   127,   128,   132,    45
 };
 
-static const yytype_int8 yycheck[] =
+static const yytype_uint8 yycheck[] =
 {
-      58,    59,    83,    78,    30,     0,    81,    65,    66,    67,
-      68,    69,    38,     4,    18,    73,    74,     4,     4,     4,
-     101,    10,   103,     4,     4,   106,     4,     4,    54,     3,
-       3,    10,   113,     4,    10,     7,   117,     3,    35,   120,
-      10,    10,    10,     7,   119,   126,    13,    10,    10,    10,
-      15,    10,    10,    10,    10,    10,   114,    10,    10,    10,
-       4,    10,     4,     4,     4,   123,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,     9,     5,    11,    12,    13,    14,    15,
-      16,    17,    10,    19,    20,    21,    22,    23,    24,    25,
-      10,    27,    28,    29,    10,    10,    32,    10,    10,    10,
-      10,    10,    10,    10,    10,    10,    10,    10,    -1,    -1,
-      24
+      61,    62,    86,    81,    31,     0,    84,    68,    69,    70,
+      71,    72,    39,     4,    18,    76,    77,     4,     4,     4,
+      10,   105,     4,   107,     4,     4,   110,     4,     3,    56,
+       3,     7,     4,     4,   118,     3,    10,    15,   122,    36,
+      10,    10,   126,    10,    10,     7,    10,   125,    13,   133,
+      10,    10,    10,    10,    10,    10,    10,    10,   119,    10,
+      10,    10,    10,     4,    10,     4,     4,     4,   129,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,     9,     5,    11,    12,
+      13,    14,    15,    16,    17,    10,    19,    20,    21,    22,
+      23,    24,    25,    10,    27,    28,    29,    30,    10,    10,
+      33,    10,    10,    10,    10,    10,    10,    10,    10,    10,
+      10,    10,    10,    10,    10,    25
 };
 
   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
      symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    51,    52,     0,     9,    11,    12,    13,    14,    15,
+       0,    52,    53,     0,     9,    11,    12,    13,    14,    15,
       16,    17,    19,    20,    21,    22,    23,    24,    25,    27,
-      28,    29,    32,    53,    54,     4,    18,     4,     4,     4,
-      10,     4,     4,     4,     4,     3,    55,     3,    58,     4,
-      10,     7,    56,    53,    10,    10,    10,    10,    58,    10,
-      10,    10,    55,    15,    58,    10,     3,    13,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    57,    10,    10,    10,    10,
-      10,    10,    58,    10,     4,    57,    57,    10,     4,     4,
-       4,    57,    57,    57,    57,    57,    10,    10,    57,    57,
-       7,    60,    10,    60,     5,    59,    60,    59,    10,    10,
-      10,    10,    10,    10,    10,    59,    10,    59,    59,    10,
-      10,    10,    10,    59,    57,    59,    60,    59,    57,    59
+      28,    29,    30,    33,    54,    55,     4,    18,     4,     4,
+       4,    10,     4,     4,     4,     4,     3,    56,     3,    59,
+       4,    10,     4,     7,    57,    54,    10,    10,    10,    10,
+      59,    10,    10,    10,    56,    15,    59,    10,    10,     3,
+      13,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    58,    10,
+      10,    10,    10,    10,    10,    59,    10,    10,     4,    58,
+      58,    10,     4,     4,     4,    58,    58,    58,    58,    58,
+      10,    10,    58,    58,     7,    61,    10,    61,     5,    60,
+      61,    60,    10,    10,    10,    10,    10,    10,    10,    10,
+      60,    10,    60,    60,    10,    10,    10,    10,    10,    60,
+      58,    60,    10,    61,    60,    58,    60
 };
 
   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    50,    51,    52,    53,    53,    54,    54,    54,    54,
-      54,    54,    54,    54,    54,    54,    54,    54,    54,    54,
-      54,    54,    54,    54,    54,    54,    55,    55,    56,    57,
-      57,    57,    57,    57,    57,    57,    57,    57,    57,    57,
-      57,    57,    57,    57,    57,    57,    57,    57,    58,    58,
-      59,    59,    60,    60
+       0,    51,    52,    53,    54,    54,    55,    55,    55,    55,
+      55,    55,    55,    55,    55,    55,    55,    55,    55,    55,
+      55,    55,    55,    55,    55,    55,    55,    56,    56,    57,
+      58,    58,    58,    58,    58,    58,    58,    58,    58,    58,
+      58,    58,    58,    58,    58,    58,    58,    58,    58,    59,
+      59,    60,    60,    61,    61
 };
 
   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
@@ -696,10 +701,10 @@ static const yytype_uint8 yyr2[] =
 {
        0,     2,     2,     0,     2,     0,     4,     6,     1,     1,
        3,     2,     7,     3,     5,     6,     5,     2,     4,     2,
-       2,     6,     3,     3,     3,     1,     2,     0,     0,     2,
-       2,     6,     3,     1,     5,     4,     4,     2,     2,     2,
-       2,     2,     5,     4,     2,     2,     1,     0,     1,     0,
-       1,     0,     1,     0
+       2,     6,     3,     7,     3,     3,     1,     2,     0,     0,
+       2,     2,     6,     3,     1,     5,     4,     4,     2,     2,
+       2,     2,     2,     5,     4,     2,     2,     1,     0,     1,
+       0,     1,     0,     1,     0
 };
 
 
@@ -1383,7 +1388,7 @@ yyreduce:
 	stack = new Hypno::HotspotsStack();
 	stack->push_back(new Hotspots());
 }
-#line 1387 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1392 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 6:
@@ -1400,7 +1405,7 @@ yyreduce:
 		smenu_idx->pop_back();
 		smenu_idx->push_back(idx);
 	}
-#line 1404 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1409 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 7:
@@ -1411,7 +1416,7 @@ yyreduce:
 		Hotspots *cur = stack->back();
 		cur->push_back(*hot); 
 	}
-#line 1415 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1420 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 8:
@@ -1431,7 +1436,7 @@ yyreduce:
 		stack->push_back(hot->smenu);
 		debugC(1, kHypnoDebugParser, "SUBMENU"); 
 	}
-#line 1435 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1440 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 9:
@@ -1442,19 +1447,19 @@ yyreduce:
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);
 		debugC(1, kHypnoDebugParser, "ESC SUBMENU"); }
-#line 1446 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1451 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 10:
 #line 128 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "TIME %d", (yyvsp[-1].i)); }
-#line 1452 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1457 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 11:
 #line 129 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "SWPT %d", (yyvsp[0].i)); }
-#line 1458 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1463 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 12:
@@ -1466,7 +1471,7 @@ yyreduce:
 		hot->actions.push_back(a);
 		debugC(1, kHypnoDebugParser, "BACK");
 	}
-#line 1470 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1475 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 13:
@@ -1478,7 +1483,7 @@ yyreduce:
 		hot->actions.push_back(a);
 		debugC(1, kHypnoDebugParser, "GLOB"); 
 	}
-#line 1482 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1487 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 14:
@@ -1489,7 +1494,7 @@ yyreduce:
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);			
 		debugC(1, kHypnoDebugParser, "AMBI %d %d", (yyvsp[-2].i), (yyvsp[-1].i)); }
-#line 1493 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1498 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 15:
@@ -1500,7 +1505,7 @@ yyreduce:
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);		  
 		debugC(1, kHypnoDebugParser, "PLAY %s.", (yyvsp[-4].s)); }
-#line 1504 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1509 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 16:
@@ -1511,7 +1516,7 @@ yyreduce:
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);
 	}
-#line 1515 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1520 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 17:
@@ -1523,7 +1528,7 @@ yyreduce:
 		hot->actions.push_back(a);
 		debugC(1, kHypnoDebugParser, "PALE");
 	}
-#line 1527 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1532 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 18:
@@ -1535,7 +1540,7 @@ yyreduce:
 		hot->actions.push_back(a);
 		debugC(1, kHypnoDebugParser, "INTRO %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); 
 	}
-#line 1539 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1544 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 19:
@@ -1547,7 +1552,7 @@ yyreduce:
 		hot->actions.push_back(a);
 		debugC(1, kHypnoDebugParser, "INTRO %s", (yyvsp[0].s)); 
 	}
-#line 1551 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1556 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 20:
@@ -1559,7 +1564,7 @@ yyreduce:
 		hot->actions.push_back(a);		  
 		debugC(1, kHypnoDebugParser, "CUTS %s", (yyvsp[0].s)); 
 	}
-#line 1563 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1568 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 21:
@@ -1570,7 +1575,7 @@ yyreduce:
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);		  
 		debugC(1, kHypnoDebugParser, "WALN %s %d %d", (yyvsp[-4].s), (yyvsp[-3].i), (yyvsp[-2].i)); }
-#line 1574 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1579 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 22:
@@ -1581,167 +1586,175 @@ yyreduce:
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);
 	}
-#line 1585 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1590 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 23:
 #line 202 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+    {
+		debugC(1, kHypnoDebugParser, "MPTR %s %d %d %d %d %d", (yyvsp[-5].s), (yyvsp[-4].i), (yyvsp[-3].i), (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].i));
+	}
+#line 1598 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+    break;
+
+  case 24:
+#line 205 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 		Hotspots *cur = stack->back();
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(talk_action);
 		talk_action = nullptr;
 		debugC(1, kHypnoDebugParser, "TALK"); }
-#line 1596 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1609 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 24:
-#line 208 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 25:
+#line 211 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 		debugC(1, kHypnoDebugParser, "explicit END");
 		g_parsedHots = stack->back();
 		stack->pop_back();
 		smenu_idx->pop_back();
 	}
-#line 1607 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1620 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 25:
-#line 214 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 26:
+#line 217 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "implicit END"); }
-#line 1613 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1626 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 28:
-#line 221 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 29:
+#line 224 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 	assert(talk_action == nullptr);
 	talk_action = new Talk();
 	talk_action->escape = false;
 	talk_action->active = true; 
 }
-#line 1624 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1637 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 29:
-#line 228 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 30:
+#line 231 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     {
 		talk_action->active = false; 
 		debugC(1, kHypnoDebugParser, "inactive"); }
-#line 1632 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1645 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 30:
-#line 231 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 31:
+#line 234 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "inactive"); }
-#line 1638 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1651 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 31:
-#line 232 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 32:
+#line 235 "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 1647 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1660 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 32:
-#line 236 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 33:
+#line 239 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     {
 		talk_action->boxPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i)); 
 		debugC(1, kHypnoDebugParser, "BOXX %d %d", (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1655 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1668 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 33:
-#line 239 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 34:
+#line 242 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     {
 		talk_action->escape = true; 
 		debugC(1, kHypnoDebugParser, "ESCAPE"); }
-#line 1663 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1676 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 34:
-#line 242 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 35:
+#line 245 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     {
 		talk_action->second = (yyvsp[-3].s);
 		talk_action->secondPos = Common::Point((yyvsp[-2].i), (yyvsp[-1].i)); 
 		debugC(1, kHypnoDebugParser, "SECOND %s %d %d '%s'", (yyvsp[-3].s), (yyvsp[-2].i), (yyvsp[-1].i), (yyvsp[0].s)); }
-#line 1672 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1685 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 35:
-#line 246 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 36:
+#line 249 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 		talk_action->intro = (yyvsp[-2].s);
 		talk_action->introPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
 		debugC(1, kHypnoDebugParser, "INTRO %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1681 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1694 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 36:
-#line 250 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 37:
+#line 253 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 		// Unsure how this is different from second
 		talk_action->second = (yyvsp[-2].s);
 		talk_action->secondPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i));
 		debugC(1, kHypnoDebugParser, "DEFAULT %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); }
-#line 1691 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1704 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 37:
-#line 255 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 38:
+#line 258 "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 1702 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1715 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 38:
-#line 261 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 39:
+#line 264 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); }
-#line 1708 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1721 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 39:
-#line 262 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 40:
+#line 265 "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 1719 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1732 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 40:
-#line 268 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 41:
+#line 271 "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 1730 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1743 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 41:
-#line 274 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 42:
+#line 277 "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 1741 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1754 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 42:
-#line 280 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 43:
+#line 283 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 		TalkCommand talk_cmd;
 		talk_cmd.command = "P";
@@ -1749,11 +1762,11 @@ yyreduce:
 		talk_cmd.position = Common::Point((yyvsp[-3].i), (yyvsp[-2].i));
 		talk_action->commands.push_back(talk_cmd);
 		debugC(1, kHypnoDebugParser, "%s %d %d '%s'", (yyvsp[-4].s), (yyvsp[-3].i), (yyvsp[-2].i), (yyvsp[-1].s)); }
-#line 1753 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1766 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 43:
-#line 287 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 44:
+#line 290 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { 
 		TalkCommand talk_cmd;
 		talk_cmd.command = "I";
@@ -1761,74 +1774,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 1765 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1778 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 44:
-#line 294 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 45:
+#line 297 "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 1776 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1789 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 45:
-#line 300 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 46:
+#line 303 "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 1786 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1799 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
-  case 46:
-#line 305 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+  case 47:
+#line 308 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { debugC(1, kHypnoDebugParser, "|E"); }
-#line 1792 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
-    break;
-
-  case 48:
-#line 309 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
-    { (yyval.s) = (yyvsp[0].s); }
-#line 1798 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1805 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 49:
-#line 310 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
-    { (yyval.s) = scumm_strdup(""); }
-#line 1804 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 312 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+    { (yyval.s) = (yyvsp[0].s); }
+#line 1811 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 50:
 #line 313 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
-    { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "flag: %s", (yyvsp[0].s)); }
-#line 1810 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+    { (yyval.s) = scumm_strdup(""); }
+#line 1817 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 51:
-#line 314 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
-    { (yyval.s) = scumm_strdup(""); }
-#line 1816 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 316 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+    { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "flag: %s", (yyvsp[0].s)); }
+#line 1823 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 52:
 #line 317 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
-    { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "switch %s", (yyvsp[0].s)); }
-#line 1822 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+    { (yyval.s) = scumm_strdup(""); }
+#line 1829 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
   case 53:
-#line 318 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+#line 320 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
+    { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "switch %s", (yyvsp[0].s)); }
+#line 1835 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+    break;
+
+  case 54:
+#line 321 "engines/hypno/grammar_mis.y" /* yacc.c:1646  */
     { (yyval.s) = scumm_strdup(""); }
-#line 1828 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1841 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
     break;
 
 
-#line 1832 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646  */
+#line 1845 "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 d0331bcb93..90fd91f23d 100644
--- a/engines/hypno/grammar_mis.y
+++ b/engines/hypno/grammar_mis.y
@@ -62,7 +62,7 @@ using namespace Hypno;
 %token<s> NAME FILENAME FLAG COMMENT GSSWITCH COMMAND WALNTOK
 %token<i> NUM
 %token HOTSTOK CUTSTOK BACKTOK INTRTOK RETTOK TIMETOK PALETOK BBOXTOK OVERTOK MICETOK PLAYTOK ENDTOK 
-%token MENUTOK SMENTOK ESCPTOK NRTOK AMBITOK SWPTTOK
+%token MENUTOK SMENTOK ESCPTOK NRTOK AMBITOK SWPTTOK MPTRTOK
 %token GLOBTOK TONTOK TOFFTOK
 %token TALKTOK INACTOK FDTOK BOXXTOK ESCAPETOK SECONDTOK INTROTOK DEFAULTTOK
 %token<s> PG PA PD PH PF PE PP PI PL PS
@@ -199,6 +199,9 @@ line: MENUTOK mflag mflag mflag {
 		Hotspot *hot = &cur->back();
 		hot->actions.push_back(a);
 	}
+	|  MPTRTOK FILENAME NUM NUM NUM NUM NUM {
+		debugC(1, kHypnoDebugParser, "MPTR %s %d %d %d %d %d", $2, $3, $4, $5, $6, $7);
+	}
 	|  TALKTOK alloctalk talk { 
 		Hotspots *cur = stack->back();
 		Hotspot *hot = &cur->back();
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index dc41dd8685..32b53f1f22 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -171,11 +171,10 @@ void HypnoEngine::runLevel(Common::String &name) {
 		runArcade((ArcadeShooting *) _levels[name]);
 	} else if (_levels[name]->type == CodeLevel) {
 		debugC(1, kHypnoDebugScene, "Executing hardcoded level %s", name.c_str());
-		//resetSceneState(); // TODO: is this required?
 		// Resolution depends on the game
 		runCode((Code *) _levels[name]);
 	} else if (_levels[name]->type == SceneLevel) {
-		debugC(1, kHypnoDebugScene, "Executing scene level %s", name.c_str());
+		debugC(1, kHypnoDebugScene, "Executing scene level %s with next level: %s", name.c_str(), _levels[name]->levelIfWin.c_str());
 		resetSceneState();
 		changeScreenMode("640x480");
 		runScene((Scene *) _levels[name]);
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 08e8f0fe6f..0f677e779c 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -82,6 +82,7 @@ public:
 	Common::HashMap<Common::String, int> _sceneState;
 	void resetSceneState();
 	bool checkSceneCompleted();
+	bool checkLevelWon();
 	void runLevel(Common::String &name);
 	void runScene(Scene *scene);
 	void runArcade(ArcadeShooting *arc);
diff --git a/engines/hypno/lexer_mis.cpp b/engines/hypno/lexer_mis.cpp
index 0a87847f08..0aab5b18b5 100644
--- a/engines/hypno/lexer_mis.cpp
+++ b/engines/hypno/lexer_mis.cpp
@@ -527,7 +527,7 @@ struct yy_buffer_state
 /* Stack of input buffers. */
 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = nullptr; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 
 /* We provide macros for accessing buffer states in case in the
  * future we want to put the buffer states in a more general
@@ -549,7 +549,7 @@ static int yy_n_chars;		/* number of characters read into yy_ch_buf */
 int yyleng;
 
 /* Points to current character in buffer. */
-static char *yy_c_buf_p = nullptr;
+static char *yy_c_buf_p = NULL;
 static int yy_init = 0;		/* whether we need to initialize */
 static int yy_start = 0;	/* start state number */
 
@@ -606,7 +606,7 @@ void yyfree ( void *  );
 #define YY_SKIP_YYWRAP
 typedef flex_uint8_t YY_CHAR;
 
-FILE *yyin = nullptr, *yyout = nullptr;
+FILE *yyin = NULL, *yyout = NULL;
 
 typedef int yy_state_type;
 
@@ -633,8 +633,8 @@ static void yynoreturn yy_fatal_error ( const char* msg  );
 	(yy_hold_char) = *yy_cp; \
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 47
-#define YY_END_OF_BUFFER 48
+#define YY_NUM_RULES 48
+#define YY_END_OF_BUFFER 49
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -642,24 +642,24 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static const flex_int16_t yy_accept[147] =
+static const flex_int16_t yy_accept[150] =
     {   0,
-        0,    0,   48,   46,   45,   44,   44,   46,   40,   43,
-       43,   46,   41,   41,   41,   41,   41,   41,   41,   41,
-       41,   41,   41,   41,   41,   41,   41,   41,   44,   45,
-       43,    0,   40,   40,    0,    1,   42,   41,   41,   41,
-       41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
-       41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
-       41,    0,    0,   36,    0,    0,    0,    0,   37,    0,
-        0,    2,   40,    0,   41,   41,   41,   41,   41,   11,
-       41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
-       41,   41,   41,   41,   41,   41,   41,   33,   34,   35,
-
-       29,   32,   31,   30,   28,   40,    0,    4,    5,   20,
-        6,   41,   41,   15,    7,   38,    9,   41,   24,    3,
-       10,   13,    8,   16,   41,   14,   25,   17,   12,   27,
-       40,   19,   41,   41,   41,   23,   41,   39,   41,   21,
-       41,   22,   26,   41,   18,    0
+        0,    0,   49,   47,   46,   45,   45,   47,   41,   44,
+       44,   47,   42,   42,   42,   42,   42,   42,   42,   42,
+       42,   42,   42,   42,   42,   42,   42,   42,   45,   46,
+       44,    0,   41,   41,    0,    1,   43,   42,   42,   42,
+       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
+       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
+       42,   42,    0,    0,   37,    0,    0,    0,    0,   38,
+        0,    0,    2,   41,    0,   42,   42,   42,   42,   42,
+       11,   42,   42,   42,   42,   42,   42,   42,   42,   42,
+       42,   42,   42,   42,   42,   42,   42,   42,   42,   34,
+
+       35,   36,   30,   33,   32,   31,   29,   41,    0,    4,
+        5,   20,    6,   42,   42,   15,    7,   39,    9,   42,
+       25,    3,   10,   21,   13,    8,   16,   42,   14,   26,
+       17,   12,   28,   41,   19,   42,   42,   42,   24,   42,
+       40,   42,   22,   42,   23,   27,   42,   18,    0
     } ;
 
 static const YY_CHAR yy_ec[256] =
@@ -702,49 +702,49 @@ static const YY_CHAR yy_meta[40] =
         5,    5,    5,    5,    5,    5,    5,    5,    1
     } ;
 
-static const flex_int16_t yy_base[158] =
+static const flex_int16_t yy_base[161] =
     {   0,
-        0,    0,  305,  306,  302,  306,  306,   32,   36,   36,
-       39,    0,   45,   46,   47,   48,   50,  297,   51,   55,
-       52,   66,   56,   61,   71,   78,   58,    0,   93,  299,
-       84,    0,  291,   83,  281,    0,    0,  286,   54,   80,
-       63,   94,   97,  102,  101,   95,   96,   98,  113,  114,
-      121,  118,  122,  124,  126,  125,  128,  133,  137,  139,
-        0,  139,  142,  306,  145,    0,  150,    0,  306,    0,
-        0,    0,  154,  262,  158,  159,  132,  160,  162,  280,
-      163,  164,  165,  166,  168,  171,  167,  178,  179,  180,
-      174,  182,  181,  183,  188,  187,  207,  208,  211,  214,
-
-        0,  217,    0,    0,    0,  194,  246,  272,  267,  262,
-      261,  196,  206,  260,  258,  192,  257,  200,  226,  256,
-      255,  254,  253,  252,  229,  246,  245,  244,  241,  239,
-      226,  306,  230,  231,  235,  238,  233,  306,  234,  237,
-      236,  199,  186,  240,   60,  306,  266,  271,  274,   58,
-      279,  282,  285,  288,  291,  294,  297
+        0,    0,  311,  312,  308,  312,  312,   32,   36,   36,
+       39,    0,   45,   46,   47,   48,   50,  303,   51,   55,
+       52,   66,   56,   61,   71,   78,   58,    0,   93,  306,
+       92,    0,  299,   79,  289,    0,    0,  294,   54,   89,
+       57,   84,  101,   92,  110,   91,   97,  114,  116,  118,
+      120,  121,  122,  124,  125,  126,  134,  127,  130,  131,
+      136,    0,  149,  153,  312,  156,    0,  159,    0,  312,
+        0,    0,    0,  143,  270,  165,  166,  140,  143,  168,
+      288,  170,  171,  172,  173,  176,  178,  174,  182,  184,
+      186,  187,  181,  189,  188,  190,  195,  191,  194,  214,
+
+      217,  220,    0,  223,    0,    0,    0,  202,  256,  280,
+      277,  272,  267,  206,  213,  266,  264,  205,  263,  214,
+      228,  262,  261,  260,  259,  258,  257,  230,  256,  255,
+      252,  248,  246,  228,  312,  233,  236,  238,  245,  137,
+      312,  240,  244,  241,  242,  199,  243,   63,  312,  271,
+      276,  279,   61,  284,  287,  290,  293,  296,  299,  302
     } ;
 
-static const flex_int16_t yy_def[158] =
+static const flex_int16_t yy_def[161] =
     {   0,
-      146,    1,  146,  146,  146,  146,  146,  146,  147,  146,
-      146,  148,  149,  149,  149,  149,  149,  149,  149,  149,
-      149,  149,  149,  149,  149,  149,  149,  150,  146,  146,
-      146,  151,  147,  147,  146,  148,  152,  149,  149,  149,
-      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
-      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
-      150,  146,  146,  146,  146,  153,  146,  154,  146,  155,
-      156,  151,  147,  146,  149,  149,  149,  149,  149,  149,
-      149,  149,  157,  149,  149,  149,  149,  149,  149,  149,
-      149,  149,  149,  149,  149,  149,  149,  146,  146,  146,
-
-      153,  146,  154,  155,  156,  147,  146,  149,  149,  149,
-      149,  149,  149,  149,  149,  157,  149,  149,  149,  149,
-      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
-      147,  146,  149,  149,  149,  149,  149,  146,  149,  149,
-      149,  149,  149,  149,  149,    0,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146
+      149,    1,  149,  149,  149,  149,  149,  149,  150,  149,
+      149,  151,  152,  152,  152,  152,  152,  152,  152,  152,
+      152,  152,  152,  152,  152,  152,  152,  153,  149,  149,
+      149,  154,  150,  150,  149,  151,  155,  152,  152,  152,
+      152,  152,  152,  152,  152,  152,  152,  152,  152,  152,
+      152,  152,  152,  152,  152,  152,  152,  152,  152,  152,
+      152,  153,  149,  149,  149,  149,  156,  149,  157,  149,
+      158,  159,  154,  150,  149,  152,  152,  152,  152,  152,
+      152,  152,  152,  160,  152,  152,  152,  152,  152,  152,
+      152,  152,  152,  152,  152,  152,  152,  152,  152,  149,
+
+      149,  149,  156,  149,  157,  158,  159,  150,  149,  152,
+      152,  152,  152,  152,  152,  152,  152,  160,  152,  152,
+      152,  152,  152,  152,  152,  152,  152,  152,  152,  152,
+      152,  152,  152,  150,  149,  152,  152,  152,  152,  152,
+      149,  152,  152,  152,  152,  152,  152,  152,    0,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149
     } ;
 
-static const flex_int16_t yy_nxt[346] =
+static const flex_int16_t yy_nxt[352] =
     {   0,
         4,    5,    6,    7,    8,    4,    9,   10,   10,   11,
        12,    4,   13,   14,   15,   16,   17,   18,   19,   20,
@@ -752,41 +752,42 @@ static const flex_int16_t yy_nxt[346] =
        26,   18,   18,   27,   18,   18,   28,   18,   29,   31,
        31,   31,   32,   31,   31,   31,   31,   31,   31,   34,
        37,   37,   37,   37,   35,   37,   37,   37,   40,   37,
-       37,   37,   61,   37,   43,   37,   37,   75,   37,   39,
-       60,   37,   41,   53,   46,   44,   37,   49,   42,   45,
-       47,   48,   50,   37,   54,   37,   51,   55,   52,  146,
-       58,   31,   31,   31,   76,   56,   73,   77,   59,   37,
-
-       37,   37,   37,   37,   57,   62,   37,   37,   63,   64,
-       65,   66,   67,   68,   79,   81,   69,   80,   37,   37,
-       70,   82,   71,   37,   78,   85,   37,   37,   84,   37,
-       37,   37,   83,   37,   89,   88,   91,   37,   37,   87,
-       92,   93,   37,   86,   37,   90,   98,   98,   98,   99,
-       99,   99,  100,  100,  100,   94,   95,  102,  102,  102,
-      146,   96,   97,   37,   37,   37,  110,   37,   37,   37,
-       37,   37,   37,   37,  112,  113,   37,  115,  108,   37,
-      106,  109,  118,   37,   37,   37,   37,   37,   37,  111,
-      114,   37,   37,   37,  121,  117,  123,   37,  120,  119,
-
-      146,   37,   38,  129,   37,   37,  126,  122,  125,  124,
-      128,   37,   37,  127,  130,   98,   98,   98,   99,   99,
-       99,  100,  100,  100,  102,  102,  102,  133,  131,   38,
-      135,   37,  146,  134,   37,   37,   37,  138,   37,   37,
-       37,   37,   37,   37,   37,   37,   37,  140,  142,   37,
-       37,   37,  136,  139,  137,  141,  145,   37,   37,   37,
-       37,   37,   37,   37,  143,   37,   37,   37,  144,   33,
-       33,   36,   37,   36,   36,   36,   38,   37,   38,   72,
-      132,   72,   72,   72,   37,   37,   37,  101,  107,  101,
-      103,   37,  103,  104,   74,  104,  105,  146,  105,  116,
-
-       30,  116,   37,   30,  146,    3,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146
+       37,   37,   37,   37,   43,   62,   37,   76,   37,   39,
+       61,   37,   41,   54,   46,   44,   37,   49,   42,   45,
+       47,   48,   50,   37,   55,  149,   51,   56,   53,   37,
+       59,   78,   74,   52,   37,   57,   37,   37,   60,   31,
+
+       31,   31,   37,   77,   58,   63,   37,   81,   64,   65,
+       66,   67,   68,   69,   79,   37,   70,   83,   80,   37,
+       71,   37,   72,   37,   82,   37,   37,   37,   86,   37,
+       37,   37,   37,   84,   89,   37,   37,   93,   91,   37,
+       94,   37,   37,   88,   85,   37,   87,   92,   37,  149,
+       95,   90,  145,   97,   96,   98,  100,  100,  100,   99,
+      101,  101,  101,  102,  102,  102,  104,  104,  104,  108,
+       37,   37,  113,   37,  112,   37,   37,   37,   37,   37,
+      114,   37,  115,   37,  117,  110,   37,   37,  111,   37,
+      120,   37,   37,   37,   37,   37,   37,  116,  123,   37,
+
+       37,  133,  119,  126,   37,  122,  121,  132,  149,   38,
+       37,   37,  124,  129,  125,  128,  127,  131,   37,   37,
+      130,  100,  100,  100,  101,  101,  101,  102,  102,  102,
+      104,  104,  104,   37,  149,   37,  134,  136,   37,  141,
+      137,   37,   38,   37,  138,   37,   37,   37,   37,   37,
+       37,   37,  143,   37,  139,  140,  142,   37,  144,  148,
+       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
+      146,   37,   37,  147,   33,   33,   36,   37,   36,   36,
+       36,   38,   37,   38,   73,   37,   73,   73,   73,   37,
+      135,   37,  103,   37,  103,  105,  109,  105,  106,   37,
+
+      106,  107,   75,  107,  118,  149,  118,   30,   37,   30,
+      149,    3,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149
     } ;
 
-static const flex_int16_t yy_chk[346] =
+static const flex_int16_t yy_chk[352] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -794,46 +795,47 @@ static const flex_int16_t yy_chk[346] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    8,
         8,    8,    9,   10,   10,   10,   11,   11,   11,    9,
        13,   14,   15,   16,   11,   17,   19,   21,   14,   39,
-       20,   23,  150,   27,   16,  145,   24,   39,   41,   13,
+       20,   23,   41,   27,   16,  153,   24,   39,  148,   13,
        27,   22,   14,   24,   19,   17,   25,   21,   15,   17,
-       19,   20,   22,   26,   24,   40,   22,   25,   23,   34,
-       26,   31,   31,   31,   40,   25,   34,   41,   26,   42,
-
-       46,   47,   43,   48,   25,   29,   45,   44,   29,   29,
-       29,   29,   29,   29,   43,   45,   29,   44,   49,   50,
-       29,   46,   29,   52,   42,   49,   51,   53,   48,   54,
-       56,   55,   47,   57,   52,   51,   54,   77,   58,   50,
-       55,   56,   59,   49,   60,   53,   62,   62,   62,   63,
-       63,   63,   65,   65,   65,   57,   58,   67,   67,   67,
-       73,   59,   60,   75,   76,   78,   77,   79,   81,   82,
-       83,   84,   87,   85,   79,   81,   86,   82,   75,   91,
-       73,   76,   85,   88,   89,   90,   93,   92,   94,   78,
-       81,  143,   96,   95,   88,   84,   90,  116,   87,   86,
-
-      106,  112,   83,   96,  142,  118,   93,   89,   92,   91,
-       95,  113,   97,   94,   97,   98,   98,   98,   99,   99,
-       99,  100,  100,  100,  102,  102,  102,  112,  106,  116,
-      118,  119,  131,  113,  125,  133,  134,  131,  137,  139,
-      135,  141,  140,  136,  130,  144,  129,  134,  137,  128,
-      127,  126,  119,  133,  125,  135,  144,  124,  123,  122,
-      121,  120,  117,  115,  139,  114,  111,  110,  141,  147,
-      147,  148,  109,  148,  148,  148,  149,  108,  149,  151,
-      107,  151,  151,  151,  152,   80,  152,  153,   74,  153,
-      154,   38,  154,  155,   35,  155,  156,   33,  156,  157,
-
-       30,  157,   18,    5,    3,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146
+       19,   20,   22,   26,   24,   34,   22,   25,   23,   42,
+       26,   41,   34,   22,   40,   25,   46,   44,   26,   31,
+
+       31,   31,   47,   40,   25,   29,   43,   44,   29,   29,
+       29,   29,   29,   29,   42,   45,   29,   46,   43,   48,
+       29,   49,   29,   50,   45,   51,   52,   53,   49,   54,
+       55,   56,   58,   47,   51,   59,   60,   55,   53,   57,
+       56,   61,  140,   50,   48,   78,   49,   54,   79,   74,
+       57,   52,  140,   59,   58,   60,   63,   63,   63,   61,
+       64,   64,   64,   66,   66,   66,   68,   68,   68,   74,
+       76,   77,   79,   80,   78,   82,   83,   84,   85,   88,
+       80,   86,   82,   87,   83,   76,   93,   89,   77,   90,
+       86,   91,   92,   95,   94,   96,   98,   82,   89,   99,
+
+       97,   99,   85,   92,  146,   88,   87,   98,  108,   84,
+      118,  114,   90,   95,   91,   94,   93,   97,  115,  120,
+       96,  100,  100,  100,  101,  101,  101,  102,  102,  102,
+      104,  104,  104,  121,  134,  128,  108,  114,  136,  134,
+      115,  137,  118,  138,  120,  142,  144,  145,  147,  143,
+      139,  133,  137,  132,  121,  128,  136,  131,  138,  147,
+      130,  129,  127,  126,  125,  124,  123,  122,  119,  117,
+      142,  116,  113,  144,  150,  150,  151,  112,  151,  151,
+      151,  152,  111,  152,  154,  110,  154,  154,  154,  155,
+      109,  155,  156,   81,  156,  157,   75,  157,  158,   38,
+
+      158,  159,   35,  159,  160,   33,  160,   30,   18,    5,
+        3,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static const flex_int32_t yy_rule_can_match_eol[48] =
+static const flex_int32_t yy_rule_can_match_eol[49] =
     {   0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 1, 0, 0, 0,     };
+    0, 0, 0, 0, 0, 1, 0, 0, 0,     };
 
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
@@ -880,8 +882,8 @@ char *yytext;
 #include "hypno/grammar.h"
 #include "hypno/tokens_mis.h"
 
-#line 884 "engines/hypno/lexer_mis.cpp"
-#line 885 "engines/hypno/lexer_mis.cpp"
+#line 886 "engines/hypno/lexer_mis.cpp"
+#line 887 "engines/hypno/lexer_mis.cpp"
 
 #define INITIAL 0
 
@@ -1098,7 +1100,7 @@ YY_DECL
 	{
 #line 42 "engines/hypno/lexer_mis.l"
 
-#line 1102 "engines/hypno/lexer_mis.cpp"
+#line 1104 "engines/hypno/lexer_mis.cpp"
 
 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
@@ -1125,13 +1127,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 147 )
+				if ( yy_current_state >= 150 )
 					yy_c = yy_meta[yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 146 );
+		while ( yy_current_state != 149 );
 		yy_cp = (yy_last_accepting_cpos);
 		yy_current_state = (yy_last_accepting_state);
 
@@ -1264,140 +1266,145 @@ return BOXXTOK;
 case 21:
 YY_RULE_SETUP
 #line 63 "engines/hypno/lexer_mis.l"
-return ESCAPETOK;
+return MPTRTOK;
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 64 "engines/hypno/lexer_mis.l"
-return SECONDTOK;
+return ESCAPETOK;
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 65 "engines/hypno/lexer_mis.l"
-return INTROTOK;
+return SECONDTOK;
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 66 "engines/hypno/lexer_mis.l"
-return INTRTOK;
+return INTROTOK;
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 67 "engines/hypno/lexer_mis.l"
-return SWPTTOK;
+return INTRTOK;
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 68 "engines/hypno/lexer_mis.l"
-return DEFAULTTOK;
+return SWPTTOK;
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 69 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK;
+return DEFAULTTOK;
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 70 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PS;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK;
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 71 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PG;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PS;
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 72 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PP;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PG;
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 73 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PI;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PP;
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 74 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PH;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PI;
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 75 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PA;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PH;
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 76 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PD;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PA;
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 77 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PF;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PD;
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 78 "engines/hypno/lexer_mis.l"
-return PE;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PF;
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 79 "engines/hypno/lexer_mis.l"
-return PL;
+return PE;
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 80 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return GSSWITCH;
+return PL;
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 81 "engines/hypno/lexer_mis.l"
-return BBOXTOK;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return GSSWITCH;
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 82 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FLAG;
+return BBOXTOK;
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 83 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return NAME;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FLAG;
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 84 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FILENAME;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return NAME;
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 85 "engines/hypno/lexer_mis.l"
-HYPNO_MIS_lval.i = atoi(HYPNO_MIS_text); return NUM;
+HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FILENAME;
 	YY_BREAK
 case 44:
-/* rule 44 can match eol */
 YY_RULE_SETUP
 #line 86 "engines/hypno/lexer_mis.l"
-return RETTOK;
+HYPNO_MIS_lval.i = atoi(HYPNO_MIS_text); return NUM;
 	YY_BREAK
 case 45:
+/* rule 45 can match eol */
 YY_RULE_SETUP
 #line 87 "engines/hypno/lexer_mis.l"
-/* ignore whitespace */;
+return RETTOK;
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 88 "engines/hypno/lexer_mis.l"
-debugC(1, Hypno::kHypnoDebugParser, "<no match: %c>", *yytext); return *yytext;
+/* ignore whitespace */;
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 89 "engines/hypno/lexer_mis.l"
+debugC(1, Hypno::kHypnoDebugParser, "<no match: %c>", *yytext); return *yytext;
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 90 "engines/hypno/lexer_mis.l"
 ECHO;
 	YY_BREAK
-#line 1401 "engines/hypno/lexer_mis.cpp"
+#line 1408 "engines/hypno/lexer_mis.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1613,7 +1620,7 @@ static int yy_get_next_buffer (void)
 				}
 			else
 				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = nullptr;
+				b->yy_ch_buf = NULL;
 
 			if ( ! b->yy_ch_buf )
 				YY_FATAL_ERROR(
@@ -1695,7 +1702,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 147 )
+			if ( yy_current_state >= 150 )
 				yy_c = yy_meta[yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -1723,11 +1730,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 147 )
+		if ( yy_current_state >= 150 )
 			yy_c = yy_meta[yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-	yy_is_jam = (yy_current_state == 146);
+	yy_is_jam = (yy_current_state == 149);
 
 		return yy_is_jam ? 0 : yy_current_state;
 }
@@ -1917,7 +1924,7 @@ static void yy_load_buffer_state  (void)
 		return;
 
 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) nullptr;
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
 	if ( b->yy_is_our_buffer )
 		yyfree( (void *) b->yy_ch_buf  );
@@ -1988,7 +1995,7 @@ static void yy_load_buffer_state  (void)
  */
 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 {
-    	if (new_buffer == nullptr)
+    	if (new_buffer == NULL)
 		return;
 
 	yyensure_buffer_stack();
@@ -2022,7 +2029,7 @@ void yypop_buffer_state (void)
 		return;
 
 	yy_delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = nullptr;
+	YY_CURRENT_BUFFER_LVALUE = NULL;
 	if ((yy_buffer_stack_top) > 0)
 		--(yy_buffer_stack_top);
 
@@ -2092,7 +2099,7 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
 		/* They forgot to leave room for the EOB's. */
-		return nullptr;
+		return NULL;
 
 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
 	if ( ! b )
@@ -2101,7 +2108,7 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
 	b->yy_buf_pos = b->yy_ch_buf = base;
 	b->yy_is_our_buffer = 0;
-	b->yy_input_file = nullptr;
+	b->yy_input_file = NULL;
 	b->yy_n_chars = b->yy_buf_size;
 	b->yy_is_interactive = 0;
 	b->yy_at_bol = 1;
@@ -2280,10 +2287,10 @@ static int yy_init_globals (void)
     /* We do not touch yylineno unless the option is enabled. */
     yylineno =  1;
     
-    (yy_buffer_stack) = nullptr;
+    (yy_buffer_stack) = NULL;
     (yy_buffer_stack_top) = 0;
     (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = nullptr;
+    (yy_c_buf_p) = NULL;
     (yy_init) = 0;
     (yy_start) = 0;
 
@@ -2292,8 +2299,8 @@ static int yy_init_globals (void)
     yyin = stdin;
     yyout = stdout;
 #else
-    yyin = nullptr;
-    yyout = nullptr;
+    yyin = NULL;
+    yyout = NULL;
 #endif
 
     /* For future reference: Set errno on error, since we are called by
@@ -2309,13 +2316,13 @@ int yylex_destroy  (void)
     /* Pop the buffer stack, destroying each element. */
 	while(YY_CURRENT_BUFFER){
 		yy_delete_buffer( YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = nullptr;
+		YY_CURRENT_BUFFER_LVALUE = NULL;
 		yypop_buffer_state();
 	}
 
 	/* Destroy the stack itself. */
 	yyfree((yy_buffer_stack) );
-	(yy_buffer_stack) = nullptr;
+	(yy_buffer_stack) = NULL;
 
     /* Reset the globals. This is important in a non-reentrant scanner so the next time
      * yylex() is called, initialization will occur. */
@@ -2374,7 +2381,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 89 "engines/hypno/lexer_mis.l"
+#line 90 "engines/hypno/lexer_mis.l"
 
 
 namespace Hypno {
diff --git a/engines/hypno/lexer_mis.l b/engines/hypno/lexer_mis.l
index 4da468bf79..734e1f1f46 100644
--- a/engines/hypno/lexer_mis.l
+++ b/engines/hypno/lexer_mis.l
@@ -60,6 +60,7 @@ TALK						return TALKTOK;
 INACTIVE					return INACTOK;
 4DBOX						return FDTOK;
 BOXX						return BOXXTOK;
+MPTR						return MPTRTOK;
 ESCAPE						return ESCAPETOK;
 SECOND						return SECONDTOK;
 INTRO						return INTROTOK;
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index ab7765a2c2..a3e2a6fb8f 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -93,7 +93,11 @@ void HypnoEngine::resetSceneState() {
 }
 
 bool HypnoEngine::checkSceneCompleted() {
-	return _sceneState["GS_LEVELCOMPLETE"];
+	return _sceneState["GS_LEVELCOMPLETE"] || _sceneState["GS_LEVELWON"];
+}
+
+bool HypnoEngine::checkLevelWon() {
+	return _sceneState["GS_LEVELWON"];
 }
 
 // Hotspots
@@ -238,11 +242,6 @@ void HypnoEngine::runTransition(Transition *trans) {
 
 
 void HypnoEngine::runScene(Scene *scene) {
-	_nextLoopingVideoToPlay.clear();
-	_nextParallelVideoToPlay.clear();
-	_nextSequentialVideoToPlay.clear();
-	_intros.clear();
-
 	_refreshConversation = false;
 	_conversation.clear();
 	Common::Event event;
@@ -387,7 +386,14 @@ void HypnoEngine::runScene(Scene *scene) {
 			}
 		}
 
-		if (checkSceneCompleted()) {
+		if (checkSceneCompleted() || checkLevelWon()) {
+			if(!checkLevelWon() && stack.size() > 1) {
+				debug("Executing escape instead of ending the scene");
+				runEscape();
+				_sceneState["GS_LEVELCOMPLETE"] = 0;
+				continue;
+			}
+
 			// Make sure all the videos are played before we finish
 			enableLoopingVideos = false;
 			if (_conversation.empty() && 
@@ -436,6 +442,27 @@ void HypnoEngine::runScene(Scene *scene) {
 		if (it->decoder)
 			skipVideo(*it);
 	}
+
+	for (Videos::iterator it = _nextParallelVideoToPlay.begin(); it != _nextParallelVideoToPlay.end(); ++it) {
+		if (it->decoder)
+			skipVideo(*it);
+	}
+
+	for (Videos::iterator it = _nextSequentialVideoToPlay.begin(); it != _nextSequentialVideoToPlay.end(); ++it) {
+		if (it->decoder)
+			skipVideo(*it);
+	}
+
+	for (Videos::iterator it = _escapeSequentialVideoToPlay.begin(); it != _escapeSequentialVideoToPlay.end(); ++it) {
+		if (it->decoder)
+			skipVideo(*it);
+	}
+
+	_nextLoopingVideoToPlay.clear();
+	_nextParallelVideoToPlay.clear();
+	_nextSequentialVideoToPlay.clear();
+	_escapeSequentialVideoToPlay.clear();
+	_intros.clear();
 }
 
 void HypnoEngine::showConversation() { error("Not implemented"); }
diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp
index 9c6fd318ec..b584fe1770 100644
--- a/engines/hypno/spider/spider.cpp
+++ b/engines/hypno/spider/spider.cpp
@@ -141,7 +141,48 @@ void SpiderEngine::loadAssetsFullGame() {
 	loadSceneLevel("buspuz.mi_", "decide3.mi_", prefix);
 	loadSceneLevel("decide3.mi_", "", prefix);
 
+	sc = (Scene *) _levels["decide3.mi_"];
+	cl = new ChangeLevel("alofintr.mi_");
+	sc->hots[2].actions.push_back(cl);
+	cl = new ChangeLevel("c2"); // depens on the difficulty
+	sc->hots[4].actions.push_back(cl);
+
 	loadSceneLevel("int_roof.mi_", "", prefix);
+	sc = (Scene *) _levels["int_roof.mi_"];
+	Overlay *over = (Overlay*) sc->hots[0].actions[2];
+	over->path = "int_alof\\ROOFB1.SMK"; // seems to be a bug?
+
+	loadSceneLevel("alofintr.mi_", "<boil_selector>", prefix);
+	
+	Transition *boil_selector = new Transition("boiler.mi_", "boilhard.mi_");
+	_levels["<boil_selector>"] = boil_selector;
+
+	loadSceneLevel("boiler.mi_", "", prefix);
+	sc = (Scene *) _levels["boiler.mi_"];
+	over = (Overlay*) sc->hots[0].actions[2];
+	over->path = "int_alof\\BOILB1.SMK"; // seems to be a bug?
+	
+	cl = new ChangeLevel("int_roof.mi_");
+	sc->hots[2].actions.push_back(cl);
+
+	loadSceneLevel("boilhard.mi_", "", prefix);
+	sc = (Scene *) _levels["boilhard.mi_"];
+	over = (Overlay*) sc->hots[0].actions[2];
+	over->path = "int_alof\\BOILB1.SMK"; // seems to be a bug?
+
+	cl = new ChangeLevel("int_roof.mi_");
+	sc->hots[2].actions.push_back(cl);
+
+	loadSceneLevel("alverofh.mi_", "", prefix);
+	loadSceneLevel("intercom.mi_", "", prefix);
+	loadSceneLevel("recept.mi_", "", prefix);
+
+	sc = (Scene *) _levels["recept.mi_"];
+	over = (Overlay*) sc->hots[0].actions[2];
+	over->path = "int_alof\\rec0B1.SMK"; // seems to be a bug?
+
+	loadSceneLevel("alveroff.mi_", "", prefix);
+
 	loadSceneLevel("ball1.mi_", "<note>", prefix);
 	loadSceneLevel("ball2.mi_", "balcony.mi_", prefix);
 	loadSceneLevel("balcony.mi_", "", prefix);
diff --git a/engines/hypno/tokens_mis.h b/engines/hypno/tokens_mis.h
index fc601d5c87..61417f36de 100644
--- a/engines/hypno/tokens_mis.h
+++ b/engines/hypno/tokens_mis.h
@@ -79,27 +79,28 @@ extern int HYPNO_MIS_debug;
     NRTOK = 281,
     AMBITOK = 282,
     SWPTTOK = 283,
-    GLOBTOK = 284,
-    TONTOK = 285,
-    TOFFTOK = 286,
-    TALKTOK = 287,
-    INACTOK = 288,
-    FDTOK = 289,
-    BOXXTOK = 290,
-    ESCAPETOK = 291,
-    SECONDTOK = 292,
-    INTROTOK = 293,
-    DEFAULTTOK = 294,
-    PG = 295,
-    PA = 296,
-    PD = 297,
-    PH = 298,
-    PF = 299,
-    PE = 300,
-    PP = 301,
-    PI = 302,
-    PL = 303,
-    PS = 304
+    MPTRTOK = 284,
+    GLOBTOK = 285,
+    TONTOK = 286,
+    TOFFTOK = 287,
+    TALKTOK = 288,
+    INACTOK = 289,
+    FDTOK = 290,
+    BOXXTOK = 291,
+    ESCAPETOK = 292,
+    SECONDTOK = 293,
+    INTROTOK = 294,
+    DEFAULTTOK = 295,
+    PG = 296,
+    PA = 297,
+    PD = 298,
+    PH = 299,
+    PF = 300,
+    PE = 301,
+    PP = 302,
+    PI = 303,
+    PL = 304,
+    PS = 305
   };
 #endif
 
@@ -113,7 +114,7 @@ union HYPNO_MIS_STYPE
 	char *s; /* string value */
 	int i;	 /* integer value */
 
-#line 117 "engines/hypno/tokens_mis.h" /* yacc.c:1909  */
+#line 118 "engines/hypno/tokens_mis.h" /* yacc.c:1909  */
 };
 
 typedef union HYPNO_MIS_STYPE HYPNO_MIS_STYPE;




More information about the Scummvm-git-logs mailing list