Skip to content

Commit 6704a3e

Browse files
committed
wip
1 parent 5851639 commit 6704a3e

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

engines/scumm/extract_mm_c64.cpp

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ static const int SectorOffset[36] = {
3636
598, 615, 632, 649, 666
3737
};
3838
static const int ResourcesPerFile[NUM_ROOMS] = {
39-
0, 11, 1, 3, 9, 12, 1, 13, 10, 6,
40-
4, 1, 7, 1, 1, 2, 7, 8, 19, 9,
41-
6, 9, 2, 6, 8, 4, 16, 8, 3, 3,
42-
12, 12, 2, 8, 1, 1, 2, 1, 9, 1,
43-
3, 7, 3, 3, 13, 5, 4, 3, 1, 1,
44-
3, 10, 1, 0, 0
39+
0, 12, 0, 2, 1, 12, 1, 13, 6, 0,
40+
31, 0, 1, 0, 0, 0, 0, 1, 1, 1,
41+
0, 1, 0, 0, 2, 0, 0, 1, 0, 0,
42+
2, 7, 1, 11, 0, 0, 5, 1, 0, 0,
43+
1, 0, 1, 3, 4, 3, 1, 0, 0, 1,
44+
2, 2, 0, 0, 0
4545
};
4646

4747
ExtractMMC64::ExtractMMC64(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) {
@@ -50,12 +50,8 @@ ExtractMMC64::ExtractMMC64(const std::string &name) : Tool(name, TOOLTYPE_EXTRAC
5050
input1.format = "*.d64";
5151
_inputPaths.push_back(input1);
5252

53-
ToolInput input2;
54-
input2.format = "*.d64";
55-
_inputPaths.push_back(input2);
56-
5753
_shorthelp = "Extract data files from the C64 version of Maniac Mansion.";
58-
_helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.d64> <disk2.d64>\n\t" + _shorthelp + "\n";
54+
_helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.d64>\n\t" + _shorthelp + "\n";
5955
}
6056

6157
void ExtractMMC64::execute() {
@@ -64,31 +60,26 @@ void ExtractMMC64::execute() {
6460
char fname[256];
6561

6662
Common::Filename inpath1(_inputPaths[0].path);
67-
Common::Filename inpath2(_inputPaths[1].path);
6863
Common::Filename &outpath = _outputPath;
6964

7065
if (outpath.empty())
7166
// Standard output path
7267
outpath.setFullPath("out/");
7368

7469
Common::File input1(inpath1, "rb");
75-
Common::File input2(inpath2, "rb");
7670

7771
/* check signature */
7872
signature = input1.readUint16LE();
7973
if (signature != 0x0A31)
8074
error("Signature not found in disk 1!");
81-
signature = input2.readUint16LE();
82-
if (signature != 0x0132)
83-
error("Signature not found in disk 2!");
8475

8576
outpath.setFullName("00.LFL");
8677
Common::File output(outpath, "wb");
8778
output.setXorMode(0xFF);
8879
print("Creating 00.LFL...");
8980

9081
/* write signature */
91-
output.writeUint16LE(signature);
82+
output.writeUint16LE(0x0132);
9283

9384
/* copy object flags */
9485
for (i = 0; i < 256; i++)
@@ -127,10 +118,8 @@ void ExtractMMC64::execute() {
127118
for (i = 0; i < NUM_ROOMS; i++) {
128119
Common::File *input;
129120

130-
if (room_disks[i] == '1')
121+
if (room_disks[i] == '1' || room_disks[i] == '2')
131122
input = &input1;
132-
else if (room_disks[i] == '2')
133-
input = &input2;
134123
else
135124
continue;
136125

0 commit comments

Comments
 (0)