medfall

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

commit 272b266fa67e3d3116ddf131f734a29f77342f69
parent 660a536979ab4771513c2b7ca2736b22038360bd
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Feb  2 19:39:55 +0000

Some line wrapping

Diffstat:
terrain_manager.cc | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/terrain_manager.cc b/terrain_manager.cc @@ -70,7 +70,8 @@ static void terrain_load_tile( CompressedTile ct = tm->compressed_tiles[ tx ][ ty ]; int width, height; - u8 * pixels = stbi_load_from_memory( ct.data, ct.len, &width, &height, NULL, 1 ); + u8 * pixels = stbi_load_from_memory( ct.data, ct.len, &width, &height, + NULL, 1 ); if( !pixels ) err( 1, "stbi_load failed (%s)", stbi_failure_reason() ); @@ -97,7 +98,8 @@ void terrain_init( for( u32 tx = 0; tx < tm->width / TILE_SIZE; tx++ ) { char tile_path[ 256 ]; // TODO: make sure this fits - sprintf( tile_path, "%s/%d_%d.tga.png", tiles_dir, tx, ty ); + sprintf( tile_path, "%s/%d_%d.tga.png", + tiles_dir, tx, ty ); size_t len; u8 * data = file_get_contents( tile_path, &len ); @@ -138,7 +140,8 @@ void terrain_teleport( TerrainManager * tm, glm::vec3 position ) { for( u32 vy = 0; vy < VIEW_SIZE; vy++ ) { for( u32 vx = 0; vx < VIEW_SIZE; vx++ ) { terrain_load_tile( tm, - vx + player_tile_x - VIEW_HALF, vy + player_tile_y - VIEW_HALF, + vx + player_tile_x - VIEW_HALF, + vy + player_tile_y - VIEW_HALF, vx, vy ); } }