Skip to content

Commit

Permalink
always deploy dyncubemap file
Browse files Browse the repository at this point in the history
  • Loading branch information
hakasapl committed Dec 7, 2024
1 parent cbddc05 commit 9a2ed0a
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions ParallaxGen/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,22 @@ auto getGameTypeMapStr() -> string {
return GameTypeStr;
}

auto deployAssets(ParallaxGenDirectory *PGD, const filesystem::path &OutputDir,
auto deployAssets(const filesystem::path &OutputDir,
const filesystem::path &ExePath) -> void {
// Install default cubemap file if needed
static const filesystem::path DynCubeMapPath = "textures/cubemaps/dynamic1pxcubemap_black.dds";
if (!PGD->isFile(DynCubeMapPath)) {
spdlog::info("Installing default dynamic cubemap file");

// Create Directory
const filesystem::path OutputCubemapPath = OutputDir / DynCubeMapPath.parent_path();
filesystem::create_directories(OutputCubemapPath);
spdlog::info("Installing default dynamic cubemap file");

boost::filesystem::path AssetPath = boost::filesystem::path(ExePath) / "assets/dynamic1pxcubemap_black_ENB.dds";
boost::filesystem::path OutputPath = boost::filesystem::path(OutputDir) / DynCubeMapPath;
// Create Directory
const filesystem::path OutputCubemapPath = OutputDir / DynCubeMapPath.parent_path();
filesystem::create_directories(OutputCubemapPath);

// Move File
boost::filesystem::copy_file(AssetPath, OutputPath, boost::filesystem::copy_options::overwrite_existing);
}
boost::filesystem::path AssetPath = boost::filesystem::path(ExePath) / "assets/dynamic1pxcubemap_black_ENB.dds";
boost::filesystem::path OutputPath = boost::filesystem::path(OutputDir) / DynCubeMapPath;

// Move File
boost::filesystem::copy_file(AssetPath, OutputPath, boost::filesystem::copy_options::overwrite_existing);

spdlog::info("Installing neutral textures");

Expand Down Expand Up @@ -313,7 +312,7 @@ void mainRunner(ParallaxGenCLIArgs &Args, const filesystem::path &ExePath) {
ParallaxGenPlugin::savePlugin(Params.Output.Dir, Params.Processing.PluginESMify);
}

deployAssets(&PGD, Params.Output.Dir, ExePath);
deployAssets(Params.Output.Dir, ExePath);

// archive
if (Params.Output.Zip) {
Expand Down

0 comments on commit 9a2ed0a

Please sign in to comment.