[−][src]Struct genie_dat::Sprite
Fields
id: SpriteID
name: String
filename: String
slp_id: Option<GraphicID>
The SLP resource ID for this sprite.
is_loaded: bool
layer: u8
The layer describes order of graphics being rendered. Possible values: 0 (lowest layer) to 40 (highest layer) Graphics on a higher layer will be rendered above graphics of a lower layer. If graphics share the same layer, graphics will be displayed dependend on their map positions.
Draw Level
0 Terrain
5 Shadows, farms
6 Rubble
10 Constructions, corpses, shadows, flowers, ruins
11 Fish
19 Rugs, craters
20 Buildings, units, damage flames, mill animation
21 Blacksmith smoke
22 Hawk
30 Projectiles, explosions
color_table: u16
transparent_selection: bool
bounding_box: (i16, i16, i16, i16)
sound_id: Option<SoundID>
num_frames: u16
Number of frames per angle animation
num_angles: u16
Number of angles tored in slp and also the number of extra structures. If there are more than 1 angle, AngleCount/2 - 1 frames will be mirrored. That means angles starting from south going clockwise to north are stored and the others will be mirrored.
base_speed: f32
If this is over 0, the speed of the unit will be replaced with this.
frame_rate: f32
Frame rate in seconds. (Delay between frames)
replay_delay: f32
Time to wait until the animation sequence is started again.
sequence_type: u8
mirror_flag: i8
deltas: Vec<SpriteDelta>
attack_sounds: Vec<SpriteAttackSound>
Implementations
impl Sprite
[src]
pub fn read_from(input: impl Read) -> Result<Self>
[src]
pub fn write_to<W: Write>(&self, output: &mut W) -> Result<()>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sprite
impl Send for Sprite
impl Sync for Sprite
impl Unpin for Sprite
impl UnwindSafe for Sprite
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,