123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // Created by Иван_Архипов on 23.11.2017.
- //
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <ctime>
- #include <algorithm>
- #ifdef WIN32
- #include <direct.h>
- #define mkdir(dir, mode) _mkdir(dir)
- #endif
- #include "../LotroDatPatcher.h"
- using namespace LOTRO_DAT;
- // Change these 2 variables to your path and name of .dat file
- const std::string path = "";//"E:\\SteamLibrary\\steamapps\\common\\";//Lord Of The Rings Online\\";
- 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);
- try {
- std::cout << "Starting magic...\n";
- DatFile a((path + filename).c_str(), 0);
- std::cout << "Magic number: " << a.files_number() << std::endl;
- } catch (...) {
- 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...");
- }
- fprintf(stdout, "Spent %f seconds on performing magic! Thank you for your patience!\n",
- float(clock() - begin_time) / CLOCKS_PER_SEC);
- system("pause");
- return 0;
- }
|