This repository has been archived by the owner on Mar 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
168 lines (165 loc) · 6.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<html>
<head>
<title>Flashback: the Quest for Identity - DPoly.js</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body style="margin: 0px auto; text-align: center; padding: 0px 0px; width: 780px; background: #e5e5e5; font-family: Arial; font-size: 14px;">
<div align="center" style="background-color: #fff; padding-top: 10px; width: 780px; text-align: center;">
<h1>Flashback: the Quest for Identity</h1>
<div align="center">
<div align="center" style="font-family: Arial; font-size: 14px; width: 640px; text-align: left;">
<p>
This page allows to playback some cutscenes from the game Flashback made by Delphine Software.
</p>
<p>
The code is based on the engine rewrite <a href="http://cyxdown.free.fr/reminiscence">REminiscence</a>.
The original game code (in 1992) used to render polygons via a pure 68000 software routine. MOD tracker
based files were driving the music. The cutscenes on this page are now played via the <tt><canvas/></tt>
and <tt><audio/></tt> HTML5 tags.
</p>
<p>
There are some obvious glitches due to the low resolution (240x128) the cutscenes were originally
designed for. For more pixel accurate rendering, animated .gif files are available <a href="https://imgur.com/a/u1hPix7">here</a>.
</p>
</div>
<div align="center" style="width: 480px;">
<audio id="music"></audio>
<canvas id="screen" width="480" height="256"></canvas>
<div style="float: left;">
<select onchange="onLanguageChange()" id="languageSelect">
<option>English</option>
<option>French</option>
<option>German</option>
<option>Italian</option>
<option>Spanish</option>
</select>
<input type="checkbox" onclick="onClippingClick()" id="clippingCheckbox">240x128 (no clipping)</input>
</div>
<div style="float: right;">
<select onchange="onCutsceneChange()" id="nameSelect">
<option>caillou</option>
<option>cdfiles</option>
<option>chute</option>
<option>debut</option>
<option>desinteg</option>
<option>espions</option>
<option>fin</option>
<option>gen</option>
<option>genexp</option>
<option>holocube</option>
<option>intro</option>
<option>jupiter</option>
<option>logos</option>
<option>mecha</option>
<option>memo</option>
<option>over</option>
<option>pont</option>
<option>taxi</option>
<option>teleport</option>
<option>voyage</option>
</select>
<input type="button" value="Play" onclick="onPlayButtonPressed()" id="playButton" />
</div>
</div>
<br>
</div>
<div style="background-color: #eeeeee; margin: 20px 0px 0px 0px; padding: 8px;">
<strong>dpoly.js</strong> code is available on <a href="http://github.com/cyxx/dpoly_js">github.com</a>.
</div>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create','UA-100340326-5','auto');
ga('send','pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script type="text/javascript" src="dpoly.min.js"></script>
<script type="text/javascript">
var CUTSCENES = [
{ data : "caillou.set.txt", music : null, offset : 0x5E4, player : player_set },
{ data : "cdfiles.set.txt", music : null, offset : 0x2B14, player : player_set },
{ data : "chute.cmp.txt", music : "ceinture.ogg", offset : 1, player : player_cmp },
{ data : "debut.cmp.txt", music : "debut.ogg", offset : 0, player : player_cmp },
{ data : "desinteg.cmp.txt", music : "desinteg.ogg", offset : 0, player : player_cmp },
{ data : "espions.cmp.txt", music : "reunion.ogg", offset : 0, player : player_cmp },
{ data : "fin.cmp.txt", music : null, offset : 0, player : player_cmp },
{ data : "gen.cmp.txt", music : null, offset : 0, player : player_cmp },
{ data : "genexp.cmp.txt", music : null, offset : 0, player : player_cmp },
{ data : "holoseq.cmp.txt", music : "holocube.ogg", offset : 0, player : player_cmp },
{ data : "intro.cmp.txt", music : "intro.ogg", offset : 0, player : player_cmp },
{ data : "jupiter.set.txt", music : null, offset : 0x3385, player : player_set },
{ data : "logos.cmp.txt", music : "logo.ogg", offset : 0, player : player_cmp },
{ data : "mecha.set.txt", music : null, offset : 0x822A, player : player_set },
{ data : "memo.cmp.txt", music : "memoire.ogg", offset : 0, player : player_cmp },
{ data : "over.cmp.txt", music : null, offset : 0, player : player_cmp },
{ data : "pont.cmp.txt", music : null, offset : 0, player : player_cmp },
{ data : "taxi.cmp.txt", music : "taxi.ogg", offset : 0, player : player_cmp },
{ data : "teleport.cmp.txt", music : null, offset : 0, player : player_cmp },
{ data : "voyage.cmp.txt", music : "voyage.ogg", offset : 0, player : player_cmp }
];
var cutscene = 10;
var player = null;
nameSelect.selectedIndex = cutscene;
player_cmp.init( "screen" );
player_set.init( "screen" );
fetchCutscene( );
function fetchCutscene( ) {
music.pause( );
if ( player ) {
player.stop( );
}
player = CUTSCENES[ cutscene ].player;
disablePlayButton( true );
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if ( xhr.readyState == 4 && xhr.status == 200 ) {
disablePlayButton( false );
player.decode( atob( xhr.responseText ), CUTSCENES[ cutscene ].offset );
playCutscene( );
}
}
xhr.open("GET", "cine/" + CUTSCENES[ cutscene ].data, true);
xhr.send();
}
function disablePlayButton( loading ) {
playButton.disabled = loading;
if ( loading ) {
playButton.value = "Loading...";
} else {
playButton.value = "Play";
}
}
function onCutsceneChange( ) {
cutscene = nameSelect.selectedIndex;
fetchCutscene( );
}
function onPlayButtonPressed() {
if ( player ) {
player.stop( );
}
playCutscene( );
}
function playCutscene( ) {
player.start( CUTSCENES[ cutscene ].offset );
if ( CUTSCENES[ cutscene ].data == "taxi.cmp.txt" ) {
// Amiga uses a buggy (blue-ish) palette, fixed with DOS data file
player.setTaxiPalette( );
}
if ( CUTSCENES[ cutscene ].data == "espions.cmp.txt" ) {
player.fixUpEspions( );
}
if ( CUTSCENES[ cutscene ].music ) {
music.src = "music/" + CUTSCENES[ cutscene ].music;
music.play( );
}
}
function onLanguageChange( ) {
player_cmp.set_language( languageSelect.selectedIndex );
}
function onClippingClick( ) {
player_cmp.set_clipping( clippingCheckbox.checked );
player_set.set_clipping( clippingCheckbox.checked );
}
</script>
</div>
</body>
</html>