medfall

A super great game engine
Log | Files | Refs

commit 606020eb4a4abb090db7e63717066c24c7b600c6
parent d4b4db5ecf192a14671af0f903768912ce617596
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Mon Apr 17 23:48:23 +0300

ggformat fixes

Diffstat:
terrain_manager.cc | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/terrain_manager.cc b/terrain_manager.cc @@ -246,20 +246,19 @@ void terrain_init( tm->arena = arena; tm->background_tasks = background_tasks; - char dims_path[ 256 ]; - sprintf( dims_path, "%s/dims.txt", tiles_dir ); + str< 512 > dims_path( "{}/dims.txt", tiles_dir ); - FILE * dims = fopen( dims_path, "r" ); + FILE * dims = fopen( dims_path.c_str(), "r" ); ASSERT( dims != NULL ); fscanf( dims, "%d %d", &tm->width, &tm->height ); fclose( dims ); for( u32 ty = 0; ty < tm->height / TILE_SIZE; ty++ ) { for( u32 tx = 0; tx < tm->width / TILE_SIZE; tx++ ) { - 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 ); - str< 512 > quadtree_path( "%s/%d_%d_quadtree.lz4", tiles_dir, tx, ty ); + str< 512 > heightmap_path( "{}/{}_{}_heightmap.lz4", tiles_dir, tx, ty ); + str< 512 > normalmap_path( "{}/{}_{}_normals.lz4", tiles_dir, tx, ty ); + str< 512 > horizonmap_path( "{}/{}_{}_horizons.lz4", tiles_dir, tx, ty ); + str< 512 > quadtree_path( "{}/{}_{}_quadtree.lz4", tiles_dir, tx, ty ); CompressedTile & ct = tm->compressed_tiles[ tx ][ ty ]; ct.heightmap = file_get_array< char >( heightmap_path.c_str() );