Stop parsing a C2M at END; fix CC2 force floor tiles
This commit is contained in:
parent
ec872d93d2
commit
a2e1a4fd9a
@ -205,6 +205,10 @@ export function parse_level(buf) {
|
|||||||
if (next_section_start > buf.byteLength)
|
if (next_section_start > buf.byteLength)
|
||||||
throw new Error(`Section at byte ${section_start} of type '${section_type}' extends ${buf.length - next_section_start} bytes past the end of the file`);
|
throw new Error(`Section at byte ${section_start} of type '${section_type}' extends ${buf.length - next_section_start} bytes past the end of the file`);
|
||||||
|
|
||||||
|
// This chunk marks the end of the file regardless
|
||||||
|
if (section_type === 'END ')
|
||||||
|
break;
|
||||||
|
|
||||||
if (section_type === 'CC2M' || section_type === 'LOCK' || section_type === 'VERS' ||
|
if (section_type === 'CC2M' || section_type === 'LOCK' || section_type === 'VERS' ||
|
||||||
section_type === 'TITL' || section_type === 'AUTH' ||
|
section_type === 'TITL' || section_type === 'AUTH' ||
|
||||||
section_type === 'CLUE' || section_type === 'NOTE')
|
section_type === 'CLUE' || section_type === 'NOTE')
|
||||||
|
|||||||
@ -21,9 +21,9 @@ export const CC2_TILESET_LAYOUT = {
|
|||||||
ice_ne: [13, 1],
|
ice_ne: [13, 1],
|
||||||
ice_se: [11, 1],
|
ice_se: [11, 1],
|
||||||
force_floor_n: [[0, 19], [0, 20]],
|
force_floor_n: [[0, 19], [0, 20]],
|
||||||
force_floor_e: [[2, 19], [2, 20]],
|
force_floor_e: [[2, 19], [3, 19]],
|
||||||
force_floor_s: [[1, 19], [1, 20]],
|
force_floor_s: [[1, 19], [1, 20]],
|
||||||
force_floor_w: [[3, 19], [3, 20]],
|
force_floor_w: [[2, 20], [3, 20]],
|
||||||
thief_keys: [15, 21],
|
thief_keys: [15, 21],
|
||||||
thief_tools: [3, 2],
|
thief_tools: [3, 2],
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user