medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 29d41209fc6572caf19a53665e7387584723bc25
parent 254a4010e210768dd44d83b09c5c861f6998cca3
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Oct 18 20:58:28 +0300

Use the new str constructor

Diffstat:
terrain_manager.cc | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/terrain_manager.cc b/terrain_manager.cc @@ -229,12 +229,9 @@ void terrain_init( for( u32 ty = 0; ty < tm->height / TILE_SIZE; ty++ ) { for( u32 tx = 0; tx < tm->width / TILE_SIZE; tx++ ) { - str< 512 > heightmap_path; - heightmap_path.sprintf( "%s/%d_%d_heightmap.lz4", tiles_dir, tx, ty ); - str< 512 > normalmap_path; - normalmap_path.sprintf( "%s/%d_%d_normals.lz4", tiles_dir, tx, ty ); - str< 512 > horizonmap_path; - horizonmap_path.sprintf( "%s/%d_%d_horizons.lz4", tiles_dir, tx, ty ); + str< 512 > heightmap_path( "%s/%d_%d_heightmap.lz4", tiles_dir, tx, ty ); + str< 512 > normalmap_path( "%s/%d_%d_normals.lz4", tiles_dir, tx, ty ); + str< 512 > horizonmap_path( "%s/%d_%d_horizons.lz4", tiles_dir, tx, ty ); size_t heightmap_size, normalmap_size, horizonmap_size; u8 * heightmap = file_get_contents(