Browse Source

fix thing

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
743d7e3435
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      libswan/include/swan/Win.h

+ 3
- 3
libswan/include/swan/Win.h View File

@@ -44,9 +44,9 @@ public:

SDL_Rect createDestRect(Vec2 pos, Vec2 pixsize) {
return SDL_Rect{
(int)((pos.x - cam_.x) * TILE_SIZE * zoom_),
(int)((pos.y - cam_.y) * TILE_SIZE * zoom_),
(int)(pixsize.x * zoom_), (int)(pixsize.y * zoom_),
(int)floor((pos.x - cam_.x) * TILE_SIZE * zoom_),
(int)floor((pos.y - cam_.y) * TILE_SIZE * zoom_),
(int)ceil(pixsize.x * zoom_), (int)ceil(pixsize.y * zoom_),
};
}


Loading…
Cancel
Save