Bläddra i källkod

Some minor code improvements

Ivan Arkhipov 7 år sedan
förälder
incheckning
dee24d877e
3 ändrade filer med 4 tillägg och 21 borttagningar
  1. 0 2
      Source/DatFile.cpp
  2. 4 7
      Source/Tests/extract_test.cpp
  3. 0 12
      Source/Tests/patch_test.cpp

+ 0 - 2
Source/DatFile.cpp

@@ -233,8 +233,6 @@ namespace LOTRO_DAT {
 
     // TODO: Write description and make asserts
     bool DatFile::PatchAllDatabase(Database *db) {
-        //GetFileData(dictionary_[621006304]).WriteToFile("kek");
-
         SubfileData data;
         try {
             data = db->GetNextFile();

+ 4 - 7
Source/Tests/extract_test.cpp

@@ -28,10 +28,10 @@ const bool exportUnknownToFiles = false;
 
 // Change these variables to true if you want export catecory to databases.
 const bool exportTextsToDb = true;
-const bool exportImagesToDb = false;
-const bool exportFontsToDb = false;
-const bool exportSoundsToDb = false;
-const bool exportTexturesToDb = false;
+const bool exportImagesToDb = true;
+const bool exportFontsToDb = true;
+const bool exportSoundsToDb = true;
+const bool exportTexturesToDb = true;
 const bool exportUnknownToDb = false;
 // There is no need to change anything else
 
@@ -61,9 +61,6 @@ int main() {
         DatFile a((path + filename).c_str(), 0);
         std::cout << "Total files found: " << a.files_number() << std::endl << std::flush;
 
-        std::cout << "Writing unordered dictionary:\n";
-        a.WriteUnorderedDictionary(output_dir);
-
         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;
 

+ 0 - 12
Source/Tests/patch_test.cpp

@@ -40,18 +40,6 @@ int main() {
         std::cout << "Files number: " << a->files_number() << std::endl;
         a->WriteUnorderedDictionary("");
         a->PatchAllDatabase(&db);
-
-//        SubfileData data;
-//        data.binary_data.ReadFromFile("167855806.ogg");
-//        data.options["fid"] = "167855806";
-//        data.options["ext"] = ".ogg";
-//
-//        auto i = a->dictionary_[167855806];
-//        BinaryData new_data = i->MakeForImport(a->GetFileData(i), data);
-//        new_data.WriteToFile("test_new_file");
-//
-//        BinaryData old_data = a->GetFileData(i);
-//        old_data.WriteToFile("test_old_file");
     } catch (std::exception &e) {
         fprintf(stderr, "Caught %s exception.", e.what());
         printf("Caught %s exception.", e.what());