mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Actually set pattern frequencies in TilingWFC. This actually fixes the image generation problems.
This commit is contained in:
parent
89d7829c1e
commit
0a7b5c2deb
@ -379,7 +379,8 @@ bool TilingWaveFormCollapse::neighbour_data_validate_str(const String &tile_name
|
||||
|
||||
// Returns false if the given tile and orientation does not exist, or if the coordinates are not in the wave
|
||||
bool TilingWaveFormCollapse::set_tile(int tile_id, int orientation, int i, int j) {
|
||||
if (tile_id >= static_cast<int>(oriented_tile_ids.size()) || orientation >= static_cast<int>(oriented_tile_ids[tile_id].size()) ||
|
||||
if (tile_id >= static_cast<int>(oriented_tile_ids.size()) ||
|
||||
orientation >= static_cast<int>(oriented_tile_ids[tile_id].size()) ||
|
||||
i >= _wave_height || j >= _wave_width) {
|
||||
return false;
|
||||
}
|
||||
@ -538,6 +539,7 @@ bool TilingWaveFormCollapse::validate() {
|
||||
void TilingWaveFormCollapse::initialize() {
|
||||
ERR_FAIL_COND(!validate());
|
||||
|
||||
set_pattern_frequencies(get_tiles_weights(tiles));
|
||||
generate_oriented_tile_ids();
|
||||
generate_propagator();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user