|
@@ -12,23 +12,20 @@
|
|
|
#endif
|
|
|
|
|
|
#include "../LotroDatPatcher.h"
|
|
|
-
|
|
|
+#include "../Subfile.h"
|
|
|
using namespace LOTRO_DAT;
|
|
|
|
|
|
|
|
|
const std::string path = "";
|
|
|
const std::string filename = "client_local_English.dat";
|
|
|
|
|
|
-const std::string patch_filename = "image.jpg";
|
|
|
-const int file_id = 0;
|
|
|
-
|
|
|
int main() {
|
|
|
const clock_t begin_time = clock();
|
|
|
|
|
|
freopen("errors.log", "w", stderr);
|
|
|
|
|
|
Database db;
|
|
|
- db.InitDatabase("images.db");
|
|
|
+ db.InitDatabase("sounds.db");
|
|
|
|
|
|
DatFile *a;
|
|
|
|
|
@@ -38,15 +35,22 @@ int main() {
|
|
|
std::cout << "Files number: " << a->files_number() << std::endl;
|
|
|
a->WriteUnorderedDictionary("");
|
|
|
|
|
|
- SubfileData data = db.GetNextFile();
|
|
|
- while (data != SubfileData()) {
|
|
|
+ SubfileData data;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ data = db.GetNextFile();
|
|
|
+ while (data != SubfileData()) {
|
|
|
a->PatchFile(data);
|
|
|
data = db.GetNextFile();
|
|
|
-
|
|
|
}
|
|
|
} catch (std::exception &e) {
|
|
|
fprintf(stderr, "Caught %s exception.", e.what());
|
|
@@ -56,6 +60,7 @@ int main() {
|
|
|
printf("Some critical errors occured. Need to stop execution. See information in errors.log file");
|
|
|
fprintf(stderr, "Some critical errors occured. Need to stop execution now...");
|
|
|
}
|
|
|
+
|
|
|
delete a;
|
|
|
fprintf(stdout, "Spent %f seconds on performing magic! Thank you for your patience!\n",
|
|
|
float(clock() - begin_time) / CLOCKS_PER_SEC);
|