diff --git a/src/art.h b/src/art.h index 123cfa3..c537fdb 100644 --- a/src/art.h +++ b/src/art.h @@ -7,6 +7,9 @@ #include "obj_types.h" #include "proto_types.h" +#define WIN32_LEAN_AND_MEAN +#include + typedef enum Head { HEAD_INVALID, HEAD_MARCUS, diff --git a/src/audio_file.cc b/src/audio_file.cc index e090348..64a85b4 100644 --- a/src/audio_file.cc +++ b/src/audio_file.cc @@ -9,6 +9,9 @@ #include #include +#define WIN32_LEAN_AND_MEAN +#include + // 0x5108C0 AudioFileIsCompressedProc* _queryCompressedFunc_2 = _defaultCompressionFunc__; diff --git a/src/file_utils.cc b/src/file_utils.cc index de06e2c..dd48204 100644 --- a/src/file_utils.cc +++ b/src/file_utils.cc @@ -5,7 +5,8 @@ #include #include -#include + +#include // 0x452740 int fileCopyDecompressed(const char* existingFilePath, const char* newFilePath) @@ -142,8 +143,6 @@ int _gzdecompress_file(const char* existingFilePath, const char* newFilePath) void fileCopy(const char* existingFilePath, const char* newFilePath) { - std::ifstream source { existingFilePath, std::ios::binary }; - std::ofstream destination { newFilePath, std::ios::binary }; - - destination << source.rdbuf(); + std::error_code ec; + std::filesystem::copy_file(std::filesystem::path(existingFilePath), std::filesystem::path(newFilePath), ec); }