mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 04:25:00 +01:00
Fix screen offset calculation when drawing tiles
This commit is contained in:
parent
2a2c8f721c
commit
cc7a0d8b9b
2 changed files with 7 additions and 5 deletions
|
|
@ -22,10 +22,12 @@ impl ScreenRes {
|
|||
|
||||
// We assume this game won't be played above 32767*32767 resolution
|
||||
pub struct ScreenPos {
|
||||
pub x: i16,
|
||||
pub y: i16,
|
||||
pub x: ScreenPosScalar,
|
||||
pub y: ScreenPosScalar,
|
||||
}
|
||||
|
||||
pub type ScreenPosScalar = i16;
|
||||
|
||||
impl ScreenPos {
|
||||
pub fn to_sf_vec(&self) -> Vector2f {
|
||||
Vector2f::new(self.x.into(), self.y.into())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue