#[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
impl tile
Important safety note
Please see the safety note of DungeonEntity
. It also applies to this impl.
sourcepub fn get_terrain(&self) -> Option<TerrainType>
pub fn get_terrain(&self) -> Option<TerrainType>
Gets the terrain type of a tile. Returns None if the terrain type is invalid.
sourcepub fn set_terrain_obstacle_checked(
&mut self,
secondary_terrain: bool,
room_index: u8
)
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.
sourcepub fn set_secondary_terrain_on_wall(&mut self)
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.
sourcepub fn bind_trap(&mut self, trap: &mut DungeonEntity, is_visible: bool)
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
impl tile
pub fn terrain_type(&self) -> Type
pub fn set_terrain_type(&mut self, val: Type)
pub fn f_corner_cuttable(&self) -> bool_
pub fn set_f_corner_cuttable(&mut self, val: bool_)
pub fn f_natural_junction(&self) -> bool_
pub fn set_f_natural_junction(&mut self, val: bool_)
pub fn f_impassable_wall(&self) -> bool_
pub fn set_f_impassable_wall(&mut self, val: bool_)
pub fn f_in_kecleon_shop(&self) -> bool_
pub fn set_f_in_kecleon_shop(&mut self, val: bool_)
pub fn f_in_monster_house(&self) -> bool_
pub fn set_f_in_monster_house(&mut self, val: bool_)
pub fn terrain_flags_unk7(&self) -> u16
pub fn set_terrain_flags_unk7(&mut self, val: u16)
pub fn f_unbreakable(&self) -> bool_
pub fn set_f_unbreakable(&mut self, val: bool_)
pub fn f_stairs(&self) -> bool_
pub fn set_f_stairs(&mut self, val: bool_)
pub fn terrain_flags_unk10(&self) -> u16
pub fn set_terrain_flags_unk10(&mut self, val: u16)
pub fn f_key_door(&self) -> bool_
pub fn set_f_key_door(&mut self, val: bool_)
pub fn f_key_door_key_locked(&self) -> bool_
pub fn set_f_key_door_key_locked(&mut self, val: bool_)
pub fn f_key_door_escort_locked(&self) -> bool_
pub fn set_f_key_door_escort_locked(&mut self, val: bool_)
pub fn terrain_flags_unk14(&self) -> u16
pub fn set_terrain_flags_unk14(&mut self, val: u16)
pub fn f_unreachable_from_stairs(&self) -> bool_
pub fn set_f_unreachable_from_stairs(&mut self, val: bool_)
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,
impl<T> Any for Twhere T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
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>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere U: From<T>,
source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
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>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere U: Into<T>,
§impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.