Struct eos_rs::ffi::tile

source ·
#[repr(C)]
pub struct tile { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2]>, pub spawn_or_visibility_flags: spawn_or_visibility_flags, pub texture_id: u16, pub field_0x6: undefined, pub room: u8, pub walkable_neighbor_flags: [u8; 4], pub monster: *mut entity, pub object: *mut entity, }

Fields§

§_bitfield_align_1: [u8; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 2]>§spawn_or_visibility_flags: spawn_or_visibility_flags§texture_id: u16§field_0x6: undefined§room: u8§walkable_neighbor_flags: [u8; 4]§monster: *mut entity§object: *mut entity

Implementations§

source§

impl tile

Important safety note

Please see the safety note of DungeonEntity. It also applies to this impl.

source

pub fn init(&mut self)

Initializes the tile struct.

source

pub fn get_terrain(&self) -> Option<TerrainType>

Gets the terrain type of a tile. Returns None if the terrain type is invalid.

source

pub fn set_terrain_obstacle_checked( &mut self, secondary_terrain: bool, room_index: u8 )

Set the terrain of a specific tile to be an obstacle (wall or secondary terrain).

If secondary_terrain is true, secondary terrain will be placed, otherwise wall.

Secondary terrain (water/lava) can only be placed in the specified room. If the tile room index does not match, a wall will be placed instead.

source

pub fn set_secondary_terrain_on_wall(&mut self)

Set a specific tile to have secondary terrain (water/lava), but only if it’s a passable wall.

source

pub fn bind_trap(&mut self, trap: &mut DungeonEntity, is_visible: bool)

Sets this tile’s associated object to be the given trap, and sets the visibility of the trap.

source§

impl tile

source

pub fn terrain_type(&self) -> Type

source

pub fn set_terrain_type(&mut self, val: Type)

source

pub fn f_corner_cuttable(&self) -> bool_

source

pub fn set_f_corner_cuttable(&mut self, val: bool_)

source

pub fn f_natural_junction(&self) -> bool_

source

pub fn set_f_natural_junction(&mut self, val: bool_)

source

pub fn f_impassable_wall(&self) -> bool_

source

pub fn set_f_impassable_wall(&mut self, val: bool_)

source

pub fn f_in_kecleon_shop(&self) -> bool_

source

pub fn set_f_in_kecleon_shop(&mut self, val: bool_)

source

pub fn f_in_monster_house(&self) -> bool_

source

pub fn set_f_in_monster_house(&mut self, val: bool_)

source

pub fn terrain_flags_unk7(&self) -> u16

source

pub fn set_terrain_flags_unk7(&mut self, val: u16)

source

pub fn f_unbreakable(&self) -> bool_

source

pub fn set_f_unbreakable(&mut self, val: bool_)

source

pub fn f_stairs(&self) -> bool_

source

pub fn set_f_stairs(&mut self, val: bool_)

source

pub fn terrain_flags_unk10(&self) -> u16

source

pub fn set_terrain_flags_unk10(&mut self, val: u16)

source

pub fn f_key_door(&self) -> bool_

source

pub fn set_f_key_door(&mut self, val: bool_)

source

pub fn f_key_door_key_locked(&self) -> bool_

source

pub fn set_f_key_door_key_locked(&mut self, val: bool_)

source

pub fn f_key_door_escort_locked(&self) -> bool_

source

pub fn set_f_key_door_escort_locked(&mut self, val: bool_)

source

pub fn terrain_flags_unk14(&self) -> u16

source

pub fn set_terrain_flags_unk14(&mut self, val: u16)

source

pub fn f_unreachable_from_stairs(&self) -> bool_

source

pub fn set_f_unreachable_from_stairs(&mut self, val: bool_)

source

pub fn new_bitfield_1( terrain_type: Type, f_corner_cuttable: bool_, f_natural_junction: bool_, f_impassable_wall: bool_, f_in_kecleon_shop: bool_, f_in_monster_house: bool_, terrain_flags_unk7: u16, f_unbreakable: bool_, f_stairs: bool_, terrain_flags_unk10: u16, f_key_door: bool_, f_key_door_key_locked: bool_, f_key_door_escort_locked: bool_, terrain_flags_unk14: u16, f_unreachable_from_stairs: bool_ ) -> __BindgenBitfieldUnit<[u8; 2]>

Auto Trait Implementations§

§

impl RefUnwindSafe for tile

§

impl !Send for tile

§

impl !Sync for tile

§

impl Unpin for tile

§

impl UnwindSafe for tile

Blanket Implementations§

§

impl<T> Any for Twhere T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dstwhere T: Cast<Dst>,

Casts the value.
§

impl<T> Borrow<T> for Twhere T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dstwhere Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for Twhere U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

source§

impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,

source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
source§

impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,

source§

fn lossy_into(self) -> Dst

Performs the conversion.
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T, U> TryFrom<U> for Twhere 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.