Skip to content

Commit

Permalink
Limit theme scan to the number of generated rooms
Browse files Browse the repository at this point in the history
This greatly speeds up level generation as there is no need to search for the fitness of 127 (or 256 as in the original) rooms if only 23 where created.
  • Loading branch information
AJenbo authored Mar 9, 2024
1 parent ba02a73 commit 61e915a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/levels/themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ void InitThemes()
themes[numthemes].ttype = j;
numthemes++;
}
if (i == std::numeric_limits<int8_t>::max())
if (i > TransVal)
break;
}
return;
Expand Down

0 comments on commit 61e915a

Please sign in to comment.