File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -394,11 +394,11 @@ QuadStrip get_triangle_strip(
394394 // source_position and destination_position are in TILE_SIZE cordinates.
395395 // TILE_SIZE default is 16x16. So we pass in the scaled up source_tile_size
396396 // and destination_tile_size and do the conversion.
397- constexpr static auto tile_size = static_cast <float >(map_group::TILE_SIZE);
398- const glm::vec2 aligned_source = glm::floor ( source_position / tile_size) ;
397+ constexpr static auto tile_size = static_cast <float >(map_group::TILE_SIZE);
398+ const glm::vec2 base_source = source_position / tile_size;
399399 return { .uv_min
400- = (aligned_source * source_tile_size) / source_texture_size,
401- .uv_max = ((aligned_source + glm::vec2 (1 )) * source_tile_size)
400+ = (base_source * source_tile_size) / source_texture_size,
401+ .uv_max = ((base_source + glm::vec2 (1 )) * source_tile_size)
402402 / source_texture_size,
403403 .draw_pos
404404 = (destination_position / tile_size) * destination_tile_size };
@@ -576,4 +576,4 @@ void save_modified_map(
576576 path,
577577 " " );
578578}
579- }// namespace ff_8
579+ }// namespace ff_8
You can’t perform that action at this time.
0 commit comments