rust/lib-hedgewars-engine/src/render/gear.rs
author alfadur
Thu, 11 Apr 2019 01:13:29 +0300
changeset 14786 8ecdb5c6bb2a
parent 14729 6aa8080b3b39
child 15120 febccab419b1
permissions -rw-r--r--
implement info, registered only & super power messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14729
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     1
use super::atlas::AtlasCollection;
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     2
use integral_geometry::Size;
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     3
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     4
struct GearRenderer {
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     5
    atlas: AtlasCollection,
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     6
}
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     7
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     8
const ATLAS_SIZE: Size = Size::square(2048);
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
     9
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
    10
impl GearRenderer {
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
    11
    pub fn new() -> Self {
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
    12
        let atlas = AtlasCollection::new(ATLAS_SIZE);
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
    13
        Self { atlas }
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
    14
    }
6aa8080b3b39 add gear renderer module
alfadur
parents:
diff changeset
    15
}