Skip to content

Commit

Permalink
add calc bounds and parallax flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ThyWoof committed Jul 20, 2019
1 parent 7b5f7b4 commit 4f3a800
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/nswnifopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ int main(int argc, char* argv[], char* const envp[])
bool flagRemoveEditorMarker = false;
bool flagOptimizeNIF = false;
bool flagIsHeadPart = false;
bool flagRemoveParallax = true;
bool flagCalcBounds = true;
bool flagNoRemoveParallax = false;
bool flagNoCalcBounds = false;

cxxopts::Options options(argv[0], "Zappastuff's Nintendo Switch Skyrim NIF optimizer");

Expand All @@ -307,6 +307,8 @@ int main(int argc, char* argv[], char* const envp[])
("remove-editor-marker", "Remove Editor Marker", cxxopts::value<bool>(flagRemoveEditorMarker))
("optimize-nif", "optimize NIFs", cxxopts::value<bool>(flagOptimizeNIF))
("is-head-part", "NIF is a head part", cxxopts::value<bool>(flagIsHeadPart))
("no-remove-parallax", "don't remove parallax on NIF optimize", cxxopts::value<bool>(flagNoRemoveParallax))
("no-calc-bounds", "don't calc bounds on NIF optimize", cxxopts::value<bool>(flagNoCalcBounds))
("i,input", "input file", cxxopts::value<std::string>())
("o,output", "ouptput file", cxxopts::value<std::string>());

Expand Down Expand Up @@ -352,7 +354,7 @@ int main(int argc, char* argv[], char* const envp[])
RemoveEditorMarker(nif);

if (flagOptimizeNIF)
OptimizeNIF(nif, flagIsHeadPart, flagRemoveParallax, flagCalcBounds);
OptimizeNIF(nif, flagIsHeadPart, !flagNoRemoveParallax, !flagNoCalcBounds);

nif.Save(o_filename);
return 0;
Expand Down

0 comments on commit 4f3a800

Please sign in to comment.