pub struct World {Show 21 fields
pub map_name: String,
pub sectors: Vec<Sector>,
pub walls: Vec<Wall>,
pub sprites: Vec<Sprite>,
pub rt: Vec<SpriteRt>,
pub xsectors: Vec<XSector>,
pub xwalls: Vec<XWall>,
pub xsprites: Vec<XSprite>,
pub sky_offsets: Vec<i16>,
pub sky_bits: i32,
pub visibility: i32,
pub song_id: i32,
pub base_floor: Vec<i32>,
pub base_ceil: Vec<i32>,
pub base_wall_xy: Vec<(i32, i32)>,
pub base_sprite_xy: Vec<(i32, i32, i32)>,
pub base_floor_shade: Vec<i8>,
pub base_ceil_shade: Vec<i8>,
pub base_wall_shade: Vec<i8>,
pub links: Vec<Ror>,
pub ror_view: Vec<Ror>,
}Fields§
§map_name: String§sectors: Vec<Sector>§walls: Vec<Wall>§sprites: Vec<Sprite>§rt: Vec<SpriteRt>§xsectors: Vec<XSector>§xwalls: Vec<XWall>§xsprites: Vec<XSprite>§sky_offsets: Vec<i16>§sky_bits: i32§visibility: i32§song_id: i32§base_floor: Vec<i32>Original floor/ceiling heights, used by movers.
base_ceil: Vec<i32>§base_wall_xy: Vec<(i32, i32)>Original wall vertices, used by sliding/rotating sectors.
base_sprite_xy: Vec<(i32, i32, i32)>§base_floor_shade: Vec<i8>Original shades, used by sector lighting effects.
base_ceil_shade: Vec<i8>§base_wall_shade: Vec<i8>§links: Vec<Ror>Floor/ceiling links between stacked rooms (all marker kinds, used for movement).
ror_view: Vec<Ror>The subset of links you can see through (stacks and generic links; water is opaque).
Implementations§
Source§impl World
impl World
pub fn from_map(name: &str, m: Map) -> Self
pub fn xsector(&self, s: usize) -> Option<&XSector>
pub fn xsector_mut(&mut self, s: usize) -> Option<&mut XSector>
pub fn xwall(&self, w: usize) -> Option<&XWall>
pub fn xwall_mut(&mut self, w: usize) -> Option<&mut XWall>
pub fn xsprite(&self, s: usize) -> Option<&XSprite>
pub fn xsprite_mut(&mut self, s: usize) -> Option<&mut XSprite>
pub fn zs_at(&self, sect: usize, x: f64, y: f64) -> (f64, f64)
pub fn sector_walls(&self, s: usize) -> Range<usize> ⓘ
Sourcepub fn spawn(&mut self, s: Sprite) -> usize
pub fn spawn(&mut self, s: Sprite) -> usize
Spawns a new sprite (reusing freed slots) and returns its index.
pub fn delete_sprite(&mut self, i: usize)
Sourcepub fn build_links(&mut self)
pub fn build_links(&mut self)
Pairs Blood’s room-over-room markers. Odd types (7 link, 9 water, 11 stack, 13 goo)
sit in the upper room and make its floor a portal; the even partner (6, 10, 12, 14)
sits in the lower room and makes its ceiling a portal. Partners share data1.
pub fn player_start(&self, player: i32) -> Option<&Sprite>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for World
impl<'de> Deserialize<'de> for World
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for World
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnsafeUnpin for World
impl UnwindSafe for World
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more