diff --git a/include/europa/io/PakWriter.hpp b/include/europa/io/PakWriter.hpp index 07955d3..75a57bb 100644 --- a/include/europa/io/PakWriter.hpp +++ b/include/europa/io/PakWriter.hpp @@ -41,7 +41,7 @@ namespace europa::io { /// Write archive to the given output stream. /// [vec] is all files which should be packaged /// [sink] is a implementation of PakProgressReportsSink which should get events (TODO: Make this optional) - /// [sectorAlignment] controls sector alignment + /// [sectorAlignment] controls sector alignment. It is ignored unless the package's version is [structs::PakVersion::Ver5]. void Write(std::ostream& os, std::vector&& vec, PakProgressReportSink& sink, SectorAlignment sectorAlignment = SectorAlignment::DoNotAlign); private: diff --git a/src/tools/eupak/main.cpp b/src/tools/eupak/main.cpp index 9a36aba..5686645 100644 --- a/src/tools/eupak/main.cpp +++ b/src/tools/eupak/main.cpp @@ -12,6 +12,8 @@ #include #include +#include "europa/structs/Pak.hpp" + int main(int argc, char** argv) { // FIXME: At some point we should just have task classes register their arguments // and then they will deal with all that themselves. The only thing we will do here @@ -162,6 +164,12 @@ int main(int argc, char** argv) { args.sectorAligned = createParser.get("--sector-aligned"); + if(args.sectorAligned && args.pakVersion != eupak::estructs::PakVersion::Ver5) { + std::cout << "Error: --sector-aligned is only valid for creating a package with \"-V jedistarfighter\".\n" + << createParser; + return 1; + } + if(!eupak::fs::is_directory(args.inputDirectory)) { std::cout << "Error: Provided input isn't a directory\n" << createParser;