HYPNO: fixed the alley scene in spider

This commit is contained in:
neuromancer 2021-11-11 23:10:45 +01:00
parent ec274fd6ac
commit 5e3ce0bb4b
4 changed files with 73 additions and 66 deletions

View File

@ -462,7 +462,7 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 3 #define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 119 #define YYLAST 118
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 50 #define YYNTOKENS 50
@ -471,7 +471,7 @@ union yyalloc
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 53 #define YYNRULES 53
/* YYNSTATES -- Number of states. */ /* YYNSTATES -- Number of states. */
#define YYNSTATES 127 #define YYNSTATES 128
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */ by yylex, with out-of-bounds checking. */
@ -561,10 +561,10 @@ static const yytype_uint16 yytoknum[] =
}; };
# endif # endif
#define YYPACT_NINF -81 #define YYPACT_NINF -82
#define yypact_value_is_default(Yystate) \ #define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-81))) (!!((Yystate) == (-82)))
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
@ -575,19 +575,19 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */ STATE-NUM. */
static const yytype_int8 yypact[] = static const yytype_int8 yypact[] =
{ {
-81, 5, 65, -81, 9, -4, 13, 14, 15, -81, -82, 5, 65, -82, 9, -4, 13, 14, 15, -82,
11, 19, 20, 22, 23, 25, 26, -81, -81, 27, 11, 19, 20, 22, 23, 26, 27, -82, -82, 28,
28, 32, -81, -81, 65, 30, 31, -81, 34, 36, 21, 31, -82, -82, 65, 25, 29, -82, 30, 32,
26, -81, 37, 38, 39, 25, 17, -81, 26, 40, 27, -82, 33, 36, 37, 26, 18, -82, 27, 38,
-81, 48, 24, -81, 42, 43, 46, 73, -81, 81, -82, 46, 24, -82, 40, 41, 42, 43, -82, 44,
-81, 85, -81, -81, -81, 86, -81, 29, 24, 24, -82, 73, -82, -82, 27, 81, -82, 71, 24, 24,
88, -81, 71, 95, 96, 24, 24, 24, 24, 24, 85, -82, 92, 94, 95, 24, 24, 24, 24, 24,
-81, 91, 92, 24, 24, -81, 35, 93, 35, -81, -82, 90, 91, 24, 24, -82, 34, 93, 34, -82,
99, 35, 99, 97, -81, -81, 98, 100, 101, 102, 97, 34, -82, 97, 96, -82, -82, 98, 99, 100,
-81, -81, -81, -81, -81, 103, 104, -81, -81, -81, 101, -82, -82, -82, -82, -82, 102, 103, -82, -82,
99, 105, 99, -81, -81, 99, -81, 106, -81, 107, -82, 97, 104, 97, -82, -82, 97, -82, 105, -82,
108, 109, 24, 24, -81, -81, 99, -81, 35, -81, 106, 107, 108, 24, 24, -82, -82, 97, -82, 34,
-81, -81, -81, -81, -81, 99, -81 -82, -82, -82, -82, -82, -82, 97, -82
}; };
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@ -600,28 +600,28 @@ static const yytype_uint8 yydefact[] =
0, 0, 28, 2, 5, 0, 0, 20, 0, 19, 0, 0, 28, 2, 5, 0, 0, 20, 0, 19,
49, 17, 0, 0, 0, 27, 0, 48, 49, 0, 49, 17, 0, 0, 0, 27, 0, 48, 49, 0,
11, 0, 47, 4, 0, 0, 0, 0, 10, 0, 11, 0, 47, 4, 0, 0, 0, 0, 10, 0,
22, 0, 26, 24, 6, 0, 13, 0, 47, 47, 22, 0, 26, 24, 49, 0, 13, 0, 47, 47,
0, 33, 0, 0, 0, 47, 47, 47, 47, 47, 0, 33, 0, 0, 0, 47, 47, 47, 47, 47,
46, 0, 0, 47, 47, 23, 53, 0, 53, 18, 46, 0, 0, 47, 47, 23, 53, 0, 53, 18,
51, 53, 51, 0, 29, 30, 0, 0, 0, 0, 51, 53, 6, 51, 0, 29, 30, 0, 0, 0,
37, 40, 41, 38, 39, 0, 0, 45, 44, 52, 0, 37, 40, 41, 38, 39, 0, 0, 45, 44,
51, 0, 51, 50, 16, 51, 14, 0, 32, 0, 52, 51, 0, 51, 50, 16, 51, 14, 0, 32,
0, 0, 47, 47, 21, 7, 51, 15, 53, 34, 0, 0, 0, 47, 47, 21, 7, 51, 15, 53,
35, 36, 42, 43, 12, 51, 31 34, 35, 36, 42, 43, 12, 51, 31
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] = static const yytype_int8 yypgoto[] =
{ {
-81, -81, -81, 6, -81, -1, -81, -58, -26, -80, -82, -82, -82, 10, -82, 69, -82, -58, -26, -81,
-75 -75
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] = static const yytype_int8 yydefgoto[] =
{ {
-1, 1, 2, 23, 24, 36, 42, 75, 38, 104, -1, 1, 2, 23, 24, 36, 42, 75, 38, 105,
100 101
}; };
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@ -629,34 +629,34 @@ static const yytype_int8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
84, 85, 106, 102, 48, 3, 105, 90, 91, 92, 85, 86, 107, 103, 48, 3, 106, 91, 92, 93,
93, 94, 54, 25, 26, 97, 98, 27, 28, 29, 94, 95, 54, 25, 26, 98, 99, 27, 28, 29,
114, 30, 116, 31, 32, 117, 33, 34, 35, 37, 115, 30, 117, 31, 32, 118, 33, 34, 82, 35,
43, 39, 53, 83, 52, 0, 124, 57, 40, 41, 37, 40, 39, 53, 43, 44, 125, 57, 41, 45,
44, 45, 99, 125, 46, 126, 47, 49, 50, 51, 46, 100, 47, 49, 126, 127, 50, 51, 55, 56,
55, 56, 76, 77, 122, 123, 78, 58, 59, 60, 76, 77, 78, 79, 80, 123, 124, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 4, 87, 5, 6, 7, 8, 71, 72, 73, 74, 4, 84, 5, 6, 7, 8,
9, 10, 11, 79, 12, 13, 14, 15, 16, 17, 9, 10, 11, 81, 12, 13, 14, 15, 16, 17,
18, 80, 19, 20, 21, 81, 82, 22, 86, 88, 18, 83, 19, 20, 21, 87, 88, 22, 89, 90,
89, 95, 96, 101, 103, 0, 0, 107, 108, 0, 96, 97, 104, 102, 52, 0, 108, 0, 109, 110,
109, 110, 111, 112, 113, 115, 118, 119, 120, 121 111, 112, 113, 114, 116, 119, 120, 121, 122
}; };
static const yytype_int8 yycheck[] = static const yytype_int8 yycheck[] =
{ {
58, 59, 82, 78, 30, 0, 81, 65, 66, 67, 58, 59, 83, 78, 30, 0, 81, 65, 66, 67,
68, 69, 38, 4, 18, 73, 74, 4, 4, 4, 68, 69, 38, 4, 18, 73, 74, 4, 4, 4,
100, 10, 102, 4, 4, 105, 4, 4, 3, 3, 101, 10, 103, 4, 4, 106, 4, 4, 54, 3,
24, 4, 15, 4, 35, -1, 116, 13, 10, 7, 3, 10, 4, 15, 24, 10, 117, 13, 7, 10,
10, 10, 7, 118, 10, 125, 10, 10, 10, 10, 10, 7, 10, 10, 119, 126, 10, 10, 10, 3,
10, 3, 10, 10, 112, 113, 10, 33, 34, 35, 10, 10, 10, 10, 10, 113, 114, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 9, 4, 11, 12, 13, 14, 46, 47, 48, 49, 9, 4, 11, 12, 13, 14,
15, 16, 17, 10, 19, 20, 21, 22, 23, 24, 15, 16, 17, 10, 19, 20, 21, 22, 23, 24,
25, 10, 27, 28, 29, 10, 10, 32, 10, 4, 25, 10, 27, 28, 29, 10, 4, 32, 4, 4,
4, 10, 10, 10, 5, -1, -1, 10, 10, -1, 10, 10, 5, 10, 35, -1, 10, -1, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10 10, 10, 10, 10, 10, 10, 10, 10, 10
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@ -671,11 +671,11 @@ static const yytype_uint8 yystos[] =
10, 10, 55, 15, 58, 10, 3, 13, 33, 34, 10, 10, 55, 15, 58, 10, 3, 13, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 57, 10, 10, 10, 10, 45, 46, 47, 48, 49, 57, 10, 10, 10, 10,
10, 10, 10, 4, 57, 57, 10, 4, 4, 4, 10, 10, 58, 10, 4, 57, 57, 10, 4, 4,
57, 57, 57, 57, 57, 10, 10, 57, 57, 7, 4, 57, 57, 57, 57, 57, 10, 10, 57, 57,
60, 10, 60, 5, 59, 60, 59, 10, 10, 10, 7, 60, 10, 60, 5, 59, 60, 59, 10, 10,
10, 10, 10, 10, 59, 10, 59, 59, 10, 10, 10, 10, 10, 10, 10, 59, 10, 59, 59, 10,
10, 10, 57, 57, 59, 60, 59 10, 10, 10, 57, 57, 59, 60, 59
}; };
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
@ -692,7 +692,7 @@ static const yytype_uint8 yyr1[] =
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] = static const yytype_uint8 yyr2[] =
{ {
0, 2, 2, 0, 2, 0, 3, 6, 1, 1, 0, 2, 2, 0, 2, 0, 4, 6, 1, 1,
3, 2, 7, 3, 5, 6, 5, 2, 4, 2, 3, 2, 7, 3, 5, 6, 5, 2, 4, 2,
2, 6, 3, 3, 3, 1, 2, 0, 0, 2, 2, 6, 3, 3, 3, 1, 2, 0, 0, 2,
2, 6, 3, 1, 4, 4, 4, 2, 2, 2, 2, 6, 3, 1, 4, 4, 4, 2, 2, 2,
@ -1387,8 +1387,8 @@ yyreduce:
case 6: case 6:
#line 89 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ #line 89 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */
{ {
Hotspot *hot = new Hotspot(MakeMenu, (yyvsp[-1].s)); Hotspot *hot = new Hotspot(MakeMenu, (yyvsp[-2].s));
debugC(1, kHypnoDebugParser, "MENU %s %s", (yyvsp[-1].s), (yyvsp[0].s)); debugC(1, kHypnoDebugParser, "MENU %s %s", (yyvsp[-2].s), (yyvsp[-1].s));
Hotspots *cur = stack->back(); Hotspots *cur = stack->back();
cur->push_back(*hot); cur->push_back(*hot);

View File

@ -86,7 +86,7 @@ lines: line lines
; ;
line: MENUTOK mflag mflag { line: MENUTOK mflag mflag mflag {
Hotspot *hot = new Hotspot(MakeMenu, $2); Hotspot *hot = new Hotspot(MakeMenu, $2);
debugC(1, kHypnoDebugParser, "MENU %s %s", $2, $3); debugC(1, kHypnoDebugParser, "MENU %s %s", $2, $3);
Hotspots *cur = stack->back(); Hotspots *cur = stack->back();

View File

@ -259,8 +259,14 @@ void HypnoEngine::runScene(Scene *scene) {
case Common::EVENT_KEYDOWN: case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == Common::KEYCODE_ESCAPE) { if (event.kbd.keycode == Common::KEYCODE_ESCAPE) {
for (Videos::iterator it = _videosPlaying.begin(); it != _videosPlaying.end(); ++it) { for (Videos::iterator it = _videosPlaying.begin(); it != _videosPlaying.end(); ++it) {
if (it->decoder) if (it->decoder) {
skipVideo(*it); skipVideo(*it);
if (it->scaled) {
runMenu(*stack.back());
drawScreen();
}
}
} }
_videosPlaying.clear(); _videosPlaying.clear();

View File

@ -82,20 +82,21 @@ void SpiderEngine::loadAssetsFullGame() {
loadSceneLevel("bank.mi_", "", prefix); loadSceneLevel("bank.mi_", "", prefix);
loadSceneLevel("busintro.mi_", "buspuz.mi_", prefix); loadSceneLevel("busintro.mi_", "buspuz.mi_", prefix);
loadSceneLevel("buspuz.mi_", "", prefix); loadSceneLevel("buspuz.mi_", "", prefix);
loadSceneLevel("alley.mi_", "", prefix);
loadArcadeLevel("c1", "", "spider"); loadArcadeLevel("c1", "", prefix);
loadArcadeLevel("c2", "", "spider"); loadArcadeLevel("c2", "", prefix);
loadArcadeLevel("c3", "", "spider"); loadArcadeLevel("c3", "", prefix);
loadArcadeLevel("c4", "", "spider"); loadArcadeLevel("c4", "", prefix);
loadArcadeLevel("c5", "", "spider"); loadArcadeLevel("c5", "", prefix);
//loadArcadeLevel("c6", "", "spider"); //loadArcadeLevel("c6", "", "spider");
// No c7 level? // No c7 level?
loadArcadeLevel("c8", "", "spider"); loadArcadeLevel("c8", "", prefix);
loadArcadeLevel("c9", "", "spider"); loadArcadeLevel("c9", "", prefix);
loadArcadeLevel("c10", "", "spider"); loadArcadeLevel("c10", "", prefix);
loadArcadeLevel("c11", "", "spider"); loadArcadeLevel("c11", "", prefix);
loadArcadeLevel("c12", "", "spider"); loadArcadeLevel("c12", "", prefix);
loadArcadeLevel("c13", "", "spider"); loadArcadeLevel("c13", "", prefix);
// start level // start level
Transition *start = new Transition(); Transition *start = new Transition();