Skip to content

Commit

Permalink
Fixed dumb error with index-only dfs
Browse files Browse the repository at this point in the history
  • Loading branch information
grunt-lucas committed Sep 9, 2023
1 parent 96d0dc7 commit 96c7fd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ std::unique_ptr<CompiledTileset> compile(PtContext &ctx, const DecompiledTileset
ctx.compilerContext.exploredNodeCounter = 0;
AssignResult assignResult = AssignResult::NO_SOLUTION_POSSIBLE;
if (ctx.compilerConfig.assignAlgorithm == AssignAlgorithm::DEPTH_FIRST) {
assignResult = assignDepthFirst(ctx, initialState, assignedPalsSolution, primaryPaletteColorSets);
assignResult = assignDepthFirstIndexOnly(ctx, initialStateIndexOnly, assignedPalsSolution, primaryPaletteColorSets,
unassignedNormPalettes);
}
else if (ctx.compilerConfig.assignAlgorithm == AssignAlgorithm::BREADTH_FIRST) {
assignResult = assignBreadthFirstIndexOnly(ctx, initialStateIndexOnly, assignedPalsSolution,
Expand Down
1 change: 0 additions & 1 deletion src/palette_assignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ AssignResult assignDepthFirstIndexOnly(PtContext &ctx, AssignStateIndexOnly &sta
std::vector<ColorSet> hardwarePalettesCopy;
std::copy(std::begin(state.hardwarePalettes), std::end(state.hardwarePalettes),
std::back_inserter(hardwarePalettesCopy));
hardwarePalettesCopy.at(i) |= toAssign;
AssignStateIndexOnly updatedState = {hardwarePalettesCopy, state.unassignedCount - 1};

AssignResult result = assignDepthFirstIndexOnly(ctx, updatedState, solution, primaryPalettes, unassigneds);
Expand Down

0 comments on commit 96c7fd3

Please sign in to comment.