MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DDSConvertMain

Function DDSConvertMain

Source/Main/altmain.cpp:193–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191#include "Graphics/converttexture.h"
192
193int DDSConvertMain(int argc, char* argv[], const char* overloaded_write_dir, const char* overloaded_working_dir) {
194 SetUpEnvironment(argv[0], overloaded_write_dir, overloaded_working_dir);
195
196 printf("Running DDS converter...\n");
197
198 for (int i = 2; i < argc; ++i) {
199 printf("Loading path: %s\n", argv[i]);
200 std::string src = argv[i];
201 std::string dst = src + "_converted.dds";
202 std::string temp = GetTempDDSPath(dst, true, 0);
203 ConvertImage(src, dst, temp, TextureData::Nice);
204 printf("Converted.\n");
205 }
206 if (argc <= 2) {
207 printf("No path found.\n");
208 }
209 printf("Press any key to exit...\n");
210 getchar();
211
212 DisposeEnvironment();
213
214 return 0;
215}

Callers 1

mainFunction · 0.85

Calls 4

GetTempDDSPathFunction · 0.85
ConvertImageFunction · 0.85
DisposeEnvironmentFunction · 0.85
SetUpEnvironmentFunction · 0.50

Tested by

no test coverage detected