Upgrade SDL2 and SDL2 Image.

This commit is contained in:
2016-05-17 20:37:57 +02:00
parent 6034e21e25
commit 2c7d5cc1d6
8 changed files with 220 additions and 198 deletions

View File

@@ -40,7 +40,11 @@ impl Camera {
self.y = y;
}
pub fn to_relative_rect(&self, rect: &Rect) -> Rect {
Rect::new(rect.x() - self.x, rect.y() - self.y, rect.width(), rect.height())
}
pub fn to_rect(&self) -> Rect {
Rect::new_unwrap(self.x, self.y, self.width, self.height)
Rect::new(self.x, self.y, self.width, self.height)
}
}