[][src]Struct genie_dat::Terrain

pub struct Terrain {
    pub enabled: bool,
    pub slp_id: Option<GraphicID>,
    pub sound_id: Option<SoundID>,
    pub minimap_color_high: u8,
    pub minimap_color_medium: u8,
    pub minimap_color_low: u8,
    pub minimap_color_cliff_lt: u8,
    pub minimap_color_cliff_rt: u8,
    pub passable_terrain_id: Option<u8>,
    pub impassable_terrain_id: Option<u8>,
    pub animation: TerrainAnimation,
    pub elevation_sprites: Vec<TerrainSpriteFrame>,
    pub terrain_id_to_draw: Option<TerrainID>,
    pub borders: Vec<i16>,
    pub terrain_objects: Vec<TerrainObject>,
    // some fields omitted
}

Fields

enabled: bool

Is this terrain enabled?

slp_id: Option<GraphicID>

SLP graphic ID for this terrain.

sound_id: Option<SoundID>

The Sound ID for this terrain.

minimap_color_high: u8

The colour tiles with this terrain will have on the minimap when on a downhill slope.

minimap_color_medium: u8

The colour tiles with this terrain will have on the minimap when on a flat tile.

minimap_color_low: u8

The colour tiles with this terrain will have on the minimap when on an uphill slope.

minimap_color_cliff_lt: u8

The colour tiles with this terrain will have on the minimap when next to a cliff.

minimap_color_cliff_rt: u8

The colour tiles with this terrain will have on the minimap when next to a cliff.

passable_terrain_id: Option<u8>impassable_terrain_id: Option<u8>animation: TerrainAnimationelevation_sprites: Vec<TerrainSpriteFrame>terrain_id_to_draw: Option<TerrainID>borders: Vec<i16>terrain_objects: Vec<TerrainObject>

Implementations

impl Terrain[src]

pub fn name(&self) -> &str[src]

Get the internal name of this terrain.

pub fn read_from(
    input: impl Read,
    version: FileVersion,
    num_terrains: u16
) -> Result<Self>
[src]

Read a Terrain object from an input stream.

pub fn write_to<W: Write>(
    &self,
    output: &mut W,
    _version: FileVersion,
    num_terrains: u16
) -> Result<()>
[src]

Serialize this object to a binary output stream.

Trait Implementations

impl Clone for Terrain[src]

impl Debug for Terrain[src]

impl Default for Terrain[src]

Auto Trait Implementations

impl RefUnwindSafe for Terrain

impl Send for Terrain

impl Sync for Terrain

impl Unpin for Terrain

impl UnwindSafe for Terrain

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.