Files
Cataclysm-DDA/tests/overmap_noise_test.cpp
ehughsbaird 09f0d83dec Add debug command to print overmap noise layers
This makes it easier to examine changes to the various noise layers.
This isn't quite accurate to how the noise layers actually work in
practice, because they are variously weighted by distance from the
overmap 0,0. In particular, this affects the ocean noise map.

In the future, the distance-based noise map adjustments should be
integrated into the noise functions.
2025-10-16 13:05:06 +00:00

28 lines
906 B
C++

#include <string>
#include "cata_catch.h"
#include "coordinates.h"
#include "map_scale_constants.h"
#include "overmap_debug.h"
#include "overmap_noise.h"
#include "point.h"
TEST_CASE( "om_noise_layer_forest_export", "[.]" )
{
const om_noise::om_noise_layer_forest f( point_abs_omt(), 1920237457 );
om_debug::export_raw_noise( "forest-map-raw.pgm", f, OMAPX, OMAPY );
}
TEST_CASE( "om_noise_layer_floodplain_export", "[.]" )
{
const om_noise::om_noise_layer_floodplain f( point_abs_omt(), 1920237457 );
om_debug::export_raw_noise( "floodplain-map-raw.pgm", f, OMAPX, OMAPY );
}
TEST_CASE( "om_noise_layer_lake_export", "[.]" )
{
const om_noise::om_noise_layer_lake f( point_abs_omt(), 1920237457 );
om_debug::export_raw_noise( "lake-map-raw.pgm", f, OMAPX * 5, OMAPY * 5 );
om_debug::export_interpreted_noise( "lake-map-interp.pgm", f, OMAPX * 5, OMAPY * 5, 0.25, false );
}