Skip to content

Commit

Permalink
Merge pull request #138 from hakasapl/0.7.2release
Browse files Browse the repository at this point in the history
Last minute 0.7.2 fixes
  • Loading branch information
hakasapl authored Dec 7, 2024
2 parents 4deb672 + c42de5f commit f8c4b92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ project(${PROJECT_NAME} VERSION ${PARALLAXGEN_VERSION})
add_compile_definitions(PARALLAXGEN_VERSION="${PARALLAXGEN_VERSION}")

# Set test version (set this to 0 for prod releases)
add_compile_definitions(PARALLAXGEN_TEST_VERSION=5)
add_compile_definitions(PARALLAXGEN_TEST_VERSION=0)

# Setup Folders
set(EXTRN_BUILD_DIR ${CMAKE_BINARY_DIR}/external/blds)
Expand Down
5 changes: 0 additions & 5 deletions ParallaxGenLib/src/ParallaxGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,6 @@ auto ParallaxGen::processShape(
unordered_map<wstring, tuple<set<NIFUtil::ShapeShader>, unordered_set<wstring>>> *ConflictMods,
mutex *ConflictModsMutex) -> ParallaxGenTask::PGResult {

if (boost::icontains(NIFPath.wstring(), L"dwemerlargedoor01")) {
// skip LOD meshes
spdlog::trace("HERE");
}

auto Result = ParallaxGenTask::PGResult::SUCCESS;

// Prep
Expand Down
9 changes: 6 additions & 3 deletions ParallaxGenLib/src/patchers/PatcherShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ auto PatcherShader::getTextureSet(nifly::NiShape &NIFShape) -> array<wstring, NU
}

// get the texture slots
const auto Slots = NIFUtil::getTextureSlots(getNIF(), &NIFShape);
PatchedTextureSets[NIFShapeKey].Original = Slots;
return Slots;
return NIFUtil::getTextureSlots(getNIF(), &NIFShape);
}

auto PatcherShader::setTextureSet(nifly::NiShape &NIFShape, const array<wstring, NUM_TEXTURE_SLOTS> &Textures, bool &NIFModified) -> void {
Expand All @@ -48,6 +46,7 @@ auto PatcherShader::setTextureSet(nifly::NiShape &NIFShape, const array<wstring,
const auto NIFShapeKey = make_tuple(getNIFPath(), TextureSetBlockID);

if (PatchedTextureSets.find(NIFShapeKey) != PatchedTextureSets.end()) {
// This texture set has been patched before
uint32_t NewBlockID = 0;

// already been patched, check if it is the same
Expand Down Expand Up @@ -84,6 +83,10 @@ auto PatcherShader::setTextureSet(nifly::NiShape &NIFShape, const array<wstring,
return;
}

// set original for future use
const auto Slots = NIFUtil::getTextureSlots(getNIF(), &NIFShape);
PatchedTextureSets[NIFShapeKey].Original = Slots;

// set the texture slots for the shape like normal
NIFUtil::setTextureSlots(getNIF(), &NIFShape, Textures, NIFModified);

Expand Down

0 comments on commit f8c4b92

Please sign in to comment.