Add support for pgchip's magic number and ice block encoding
This commit is contained in:
parent
0d35274d6a
commit
aac1e09c72
@ -63,7 +63,7 @@ const TILE_ENCODING = {
|
||||
0x35: 'bogus_player_burned',
|
||||
0x36: 'wall_invisible', // unused
|
||||
0x37: 'wall_invisible', // unused
|
||||
0x38: 'wall_invisible', // unused
|
||||
0x38: 'ice_block', // unused, but co-opted by pgchip
|
||||
0x39: 'bogus_player_win',
|
||||
0x3a: 'bogus_player_win',
|
||||
0x3b: 'bogus_player_win',
|
||||
@ -352,6 +352,10 @@ export function parse_game(buf) {
|
||||
// OK
|
||||
// TODO tile world convention, use lynx rules
|
||||
}
|
||||
else if (magic === 0x0003aaac) {
|
||||
// OK
|
||||
// TODO add in ice block i guess???
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unrecognized magic number ${magic.toString(16)}`);
|
||||
}
|
||||
|
||||
@ -3137,7 +3137,14 @@ class Conductor {
|
||||
stored_game = c2g.wrap_individual_level(buf);
|
||||
identifier = null;
|
||||
}
|
||||
else if (magic === '\xac\xaa\x02\x00' || magic == '\xac\xaa\x02\x01') {
|
||||
else if (
|
||||
// standard mscc DAT
|
||||
magic === '\xac\xaa\x02\x00' ||
|
||||
// tile world i think
|
||||
magic === '\xac\xaa\x02\x01' ||
|
||||
// pgchip, which adds ice blocks
|
||||
magic === '\xac\xaa\x03\x00')
|
||||
{
|
||||
stored_game = dat.parse_game(buf);
|
||||
}
|
||||
else if (magic === 'PK\x03\x04') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user