pub struct GitSoundCommon {
pub generated_type: u32,
pub object_id: Option<ObjectId>,
pub x_position: f32,
pub y_position: f32,
pub z_position: f32,
}Expand description
The part of a sound entry that is what every sound entry carries, whichever form it takes.
Both arms flatten it and the list’s element is it, so the labels here are one declaration reached from both forms rather than two copies.
Fields§
§generated_type: u32Generated type (GeneratedType). Values > 255 are truncated and wrapped to an 8-bit byte on save by the engine.
object_id: Option<ObjectId>Runtime object ID (ObjectId). Save-game only.
Runtime object id (ObjectId), which only a saved form carries.
The area-level dispatcher reads it once per element ahead of the static-versus-saved branch, so the engine reads it on both forms and the liveness below is right. What it does not do is author it: every element the engine saves carries one and no element the toolset shipped does. Held as the absence so writing a static placement back does not invent a runtime id for it.
x_position: f32X position (XPosition).
y_position: f32Y position (YPosition).
z_position: f32Z position (ZPosition).
Implementations§
Source§impl GitSoundCommon
impl GitSoundCommon
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Sourcepub fn read_element(structure: &GffStruct) -> Self
pub fn read_element(structure: &GffStruct) -> Self
Reads one element of a list of this type.
Sourcepub fn write_element(&self, structure: &mut GffStruct)
pub fn write_element(&self, structure: &mut GffStruct)
Writes one element of a list of this type.
Trait Implementations§
Source§impl Clone for GitSoundCommon
impl Clone for GitSoundCommon
Source§fn clone(&self) -> GitSoundCommon
fn clone(&self) -> GitSoundCommon
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GitSoundCommon
impl Debug for GitSoundCommon
Source§impl Default for GitSoundCommon
impl Default for GitSoundCommon
Source§impl HasSchema for GitSoundCommon
impl HasSchema for GitSoundCommon
Source§impl PartialEq for GitSoundCommon
impl PartialEq for GitSoundCommon
Source§fn eq(&self, other: &GitSoundCommon) -> bool
fn eq(&self, other: &GitSoundCommon) -> bool
self and other values to be equal, and is used by ==.