@@ -154,16 +154,16 @@ int TextureClient::UnlockMutex()
154154 return RETURN_OK;
155155}
156156
157- gsl::owner<TextureFileStruct*> AddFile (TexEntry& entry, const bool compress, const std::filesystem::path& dll_path )
157+ gsl::owner<TextureFileStruct*> AddFile (TexEntry& entry, const bool compress)
158158{
159159 const auto texture_file_struct = new TextureFileStruct ();
160160 texture_file_struct->crc_hash = entry.crc_hash ;
161- const auto dds_blob = TextureFunction::ConvertToCompressedDDS (entry, compress, dll_path );
161+ const auto dds_blob = TextureFunction::ConvertToCompressedDDS (entry, compress);
162162 texture_file_struct->data .assign (static_cast <BYTE*>(dds_blob.GetBufferPointer ()), static_cast <BYTE*>(dds_blob.GetBufferPointer ()) + dds_blob.GetBufferSize ());
163163 return texture_file_struct;
164164}
165165
166- std::vector<gsl::owner<TextureFileStruct*>> ProcessModfile (const std::filesystem::path& modfile, const std::filesystem::path& dll_path, const bool compress)
166+ std::vector<gsl::owner<TextureFileStruct*>> ProcessModfile (const std::filesystem::path& modfile, const bool compress)
167167{
168168 const auto hr = CoInitializeEx (nullptr , COINIT_APARTMENTTHREADED);
169169 if (FAILED (hr)) return {};
@@ -179,7 +179,7 @@ std::vector<gsl::owner<TextureFileStruct*>> ProcessModfile(const std::filesystem
179179 texture_file_structs.reserve (entries.size ());
180180 unsigned file_bytes_loaded = 0 ;
181181 for (auto & tpf_entry : entries) {
182- const auto tex_file_struct = AddFile (tpf_entry, compress, dll_path );
182+ const auto tex_file_struct = AddFile (tpf_entry, compress);
183183 texture_file_structs.push_back (tex_file_struct);
184184 file_bytes_loaded += texture_file_structs.back ()->data .size ();
185185 }
@@ -198,6 +198,9 @@ void TextureClient::LoadModsFromModlist(std::pair<std::string, std::string> modf
198198 std::string line;
199199 std::vector<std::filesystem::path> modfiles;
200200 while (std::getline (file, line)) {
201+ if (line.starts_with (" //" ) || line.starts_with (" #" ) || line.empty ()) {
202+ continue ;
203+ }
201204 // Remove newline character
202205 line.erase (std::ranges::remove (line, ' \r ' ).begin (), line.end ());
203206 line.erase (std::ranges::remove (line, ' \n ' ).begin (), line.end ());
@@ -218,7 +221,7 @@ void TextureClient::LoadModsFromModlist(std::pair<std::string, std::string> modf
218221 }
219222 std::vector<std::future<std::vector<gsl::owner<TextureFileStruct*>>>> futures;
220223 for (const auto modfile : modfiles) {
221- futures.emplace_back (std::async (std::launch::async, ProcessModfile, modfile, dll_path, files_size > 400'000'000 ));
224+ futures.emplace_back (std::async (std::launch::async, ProcessModfile, modfile, files_size > 400'000'000 ));
222225 }
223226 auto loaded_size = 0u ;
224227 for (auto & future : futures) {
0 commit comments