@@ -36,12 +36,12 @@ static const int SectorOffset[36] = {
36
36
598 , 615 , 632 , 649 , 666
37
37
};
38
38
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
45
45
};
46
46
47
47
ExtractMMC64::ExtractMMC64 (const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) {
@@ -50,12 +50,8 @@ ExtractMMC64::ExtractMMC64(const std::string &name) : Tool(name, TOOLTYPE_EXTRAC
50
50
input1.format = " *.d64" ;
51
51
_inputPaths.push_back (input1);
52
52
53
- ToolInput input2;
54
- input2.format = " *.d64" ;
55
- _inputPaths.push_back (input2);
56
-
57
53
_shorthelp = " Extract data files from the C64 version of Maniac Mansion." ;
58
- _helptext = " \n Usage: " + _name + " [-o <output dir> = out/] <disk1.d64> <disk2.d64> \n\t " + _shorthelp + " \n " ;
54
+ _helptext = " \n Usage: " + _name + " [-o <output dir> = out/] <disk1.d64>\n\t " + _shorthelp + " \n " ;
59
55
}
60
56
61
57
void ExtractMMC64::execute () {
@@ -64,31 +60,26 @@ void ExtractMMC64::execute() {
64
60
char fname[256 ];
65
61
66
62
Common::Filename inpath1 (_inputPaths[0 ].path );
67
- Common::Filename inpath2 (_inputPaths[1 ].path );
68
63
Common::Filename &outpath = _outputPath;
69
64
70
65
if (outpath.empty ())
71
66
// Standard output path
72
67
outpath.setFullPath (" out/" );
73
68
74
69
Common::File input1 (inpath1, " rb" );
75
- Common::File input2 (inpath2, " rb" );
76
70
77
71
/* check signature */
78
72
signature = input1.readUint16LE ();
79
73
if (signature != 0x0A31 )
80
74
error (" Signature not found in disk 1!" );
81
- signature = input2.readUint16LE ();
82
- if (signature != 0x0132 )
83
- error (" Signature not found in disk 2!" );
84
75
85
76
outpath.setFullName (" 00.LFL" );
86
77
Common::File output (outpath, " wb" );
87
78
output.setXorMode (0xFF );
88
79
print (" Creating 00.LFL..." );
89
80
90
81
/* write signature */
91
- output.writeUint16LE (signature );
82
+ output.writeUint16LE (0x0132 );
92
83
93
84
/* copy object flags */
94
85
for (i = 0 ; i < 256 ; i++)
@@ -127,10 +118,8 @@ void ExtractMMC64::execute() {
127
118
for (i = 0 ; i < NUM_ROOMS; i++) {
128
119
Common::File *input;
129
120
130
- if (room_disks[i] == ' 1' )
121
+ if (room_disks[i] == ' 1' || room_disks[i] == ' 2 ' )
131
122
input = &input1;
132
- else if (room_disks[i] == ' 2' )
133
- input = &input2;
134
123
else
135
124
continue ;
136
125
0 commit comments