|
@@ -22,16 +22,16 @@ const std::string filename = "client_local_English.dat";
|
|
|
// Change these variables to true if you want export catecory to files.
|
|
|
const bool exportImagesToFiles = false;
|
|
|
const bool exportFontsToFiles = false;
|
|
|
-const bool exportSoundsToFiles = true;
|
|
|
+const bool exportSoundsToFiles = false;
|
|
|
const bool exportTexturesToFiles = false;
|
|
|
const bool exportUnknownToFiles = false;
|
|
|
|
|
|
// Change these variables to true if you want export catecory to databases.
|
|
|
-const bool exportTextsToDb = false;
|
|
|
-const bool exportImagesToDb = false;
|
|
|
-const bool exportFontsToDb = false;
|
|
|
+const bool exportTextsToDb = true;
|
|
|
+const bool exportImagesToDb = true;
|
|
|
+const bool exportFontsToDb = true;
|
|
|
const bool exportSoundsToDb = true;
|
|
|
-const bool exportTexturesToDb = false;
|
|
|
+const bool exportTexturesToDb = true;
|
|
|
const bool exportUnknownToDb = false;
|
|
|
// There is no need to change anything else
|
|
|
|
|
@@ -63,37 +63,38 @@ int main() {
|
|
|
std::cout << "Beginning unpacking... Please, wait for some minutes."
|
|
|
"\nMaybe it's a good idea to have a cup of tea, while unpacker is working...\n" << std::flush;
|
|
|
|
|
|
-
|
|
|
+ Database *out = new Database("out.db");
|
|
|
if (exportImagesToDb) {
|
|
|
- Database *images = new Database(output_dir + std::string("Images.db"));
|
|
|
+ Database *images = out;//new Database(output_dir + std::string("Images.db"));
|
|
|
std::cout << "Extracted " << a.ExtractAllFilesByType(JPG, images) << " .jpg files to Images.db" << std::endl << std::flush;
|
|
|
- delete images;
|
|
|
+// delete images;
|
|
|
}
|
|
|
|
|
|
if (exportSoundsToDb) {
|
|
|
- Database *sounds = new Database(output_dir + std::string("Sounds.db"));
|
|
|
+ Database *sounds = out;//new Database(output_dir + std::string("Sounds.db"));
|
|
|
std::cout << "Extracted " << a.ExtractAllFilesByType(WAV, sounds) << " .wav files to Sounds.db" << std::endl << std::flush;
|
|
|
std::cout << "Extracted " << a.ExtractAllFilesByType(OGG, sounds) << " .ogg files to Sounds.db" << std::endl << std::flush;
|
|
|
- delete sounds;
|
|
|
+// delete sounds;
|
|
|
}
|
|
|
|
|
|
if (exportTextsToDb) {
|
|
|
- Database *texts = new Database(output_dir + std::string("Texts.db"));
|
|
|
+ Database *texts = out;//new Database(output_dir + std::string("Texts.db"));
|
|
|
std::cout << "Extracted " << a.ExtractAllFilesByType(TEXT, texts) << " text files to Texts.db" << std::endl << std::flush;
|
|
|
- delete texts;
|
|
|
+// delete texts;
|
|
|
}
|
|
|
|
|
|
if (exportFontsToDb) {
|
|
|
- Database *fonts = new Database(output_dir + std::string("Fonts.db"));
|
|
|
+ Database *fonts = out;//new Database(output_dir + std::string("Fonts.db"));
|
|
|
std::cout << "Extracted " << a.ExtractAllFilesByType(FONT, fonts) << " font files to Fonts.db" << std::endl << std::flush;
|
|
|
- delete fonts;
|
|
|
+// delete fonts;
|
|
|
}
|
|
|
|
|
|
if (exportTexturesToDb) {
|
|
|
- Database *textures = new Database(output_dir + std::string("Textures.db"));
|
|
|
+ Database *textures = out;//new Database(output_dir + std::string("Textures.db"));
|
|
|
std::cout << "Extracted " << a.ExtractAllFilesByType(DDS, textures) << " .dds files to Textures.db" << std::endl << std::flush;
|
|
|
- delete textures;
|
|
|
+// delete textures;
|
|
|
}
|
|
|
+ delete out;
|
|
|
|
|
|
if (exportUnknownToDb) {
|
|
|
Database *unknown = new Database(output_dir + std::string("Unknown.db"));
|