commit 482d4f73e604889012c9a16a682e48655e51e35a
parent 97aaa91a1f325254b6aa091be5914212819b38f2
Author: Michael Savage <mikejsavage@gmail.com>
Date: Tue, 26 Dec 2017 17:05:22 +0000
Tiny cleanup
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/clipmap.cc b/clipmap.cc
@@ -800,11 +800,12 @@ GAME_FRAME( game_frame ) {
for( u32 l = 0; l < NUM_LODS; l++ ) {
float scale = checked_cast< float >( u32( 1 ) << l );
- v2 tile_size = v2( checked_cast< float >( PATCH_RESOLUTION << l ) );
v2 snapped_pos = floorf( game->frozen_pos.xy() / scale ) * scale;
- v2 base = snapped_pos - v2( checked_cast< float >( PATCH_RESOLUTION << ( l + 1 ) ) );
// draw tiles
+ v2 tile_size = v2( checked_cast< float >( PATCH_RESOLUTION << l ) );
+ v2 base = snapped_pos - v2( checked_cast< float >( PATCH_RESOLUTION << ( l + 1 ) ) );
+
for( int x = 0; x < 4; x++ ) {
for( int y = 0; y < 4; y++ ) {
// draw a 4x4 set of tiles. cut out the middle 2x2 unless we're at the finest level