Skip to main content

SaveSystem

Struct SaveSystem 

Source
pub struct SaveSystem<'a> {
Show 76 fields pub scene: SaveSystemScene, pub frame_count: i32, pub graphics_name: DbStr<'a>, pub message_stretch: SystemStretch, pub font_id: SystemFont, pub switches: BitArray<'a>, pub variables: Packed<i32>, pub message_transparent: i32, pub message_position: i32, pub message_prevent_overlap: i32, pub message_continue_events: i32, pub face_name: DbStr<'a>, pub face_id: i32, pub face_right: bool, pub face_flip: bool, pub event_message_active: bool, pub music_stopping: bool, pub title_music: Music<'a>, pub battle_music: Music<'a>, pub battle_end_music: Music<'a>, pub inn_music: Music<'a>, pub current_music: Music<'a>, pub before_vehicle_music: Music<'a>, pub before_battle_music: Music<'a>, pub stored_music: Music<'a>, pub boat_music: Music<'a>, pub ship_music: Music<'a>, pub airship_music: Music<'a>, pub gameover_music: Music<'a>, pub cursor_se: Sound<'a>, pub decision_se: Sound<'a>, pub cancel_se: Sound<'a>, pub buzzer_se: Sound<'a>, pub battle_se: Sound<'a>, pub escape_se: Sound<'a>, pub enemy_attack_se: Sound<'a>, pub enemy_damaged_se: Sound<'a>, pub actor_damaged_se: Sound<'a>, pub dodge_se: Sound<'a>, pub enemy_death_se: Sound<'a>, pub item_se: Sound<'a>, pub transition_out: i8, pub transition_in: i8, pub battle_start_fadeout: i8, pub battle_start_fadein: i8, pub battle_end_fadeout: i8, pub battle_end_fadein: i8, pub teleport_allowed: bool, pub escape_allowed: bool, pub save_allowed: bool, pub menu_allowed: bool, pub background: DbStr<'a>, pub save_count: i32, pub save_slot: i32, pub atb_mode: SaveSystemAtbMode, pub maniac_strings: StrList<'a>, pub maniac_message_window_width: i32, pub maniac_message_window_height: i32, pub maniac_message_font_name: DbStr<'a>, pub maniac_message_font_size: i32, pub maniac_message_hook_flags: ManiacMessageHookFlags, pub maniac_message_face_width: i32, pub maniac_message_face_height: i32, pub maniac_message_hook_common_event_id: i32, pub maniac_message_hook_callback_system_variable: i32, pub maniac_message_hook_callback_system_string_variable: i32, pub maniac_message_hook_callback_user_variable: i32, pub maniac_message_hook_callback_user_string_variable: i32, pub maniac_battle_origin: i32, pub maniac_frameskip: i32, pub maniac_picture_limit: i32, pub maniac_options: Packed<u8>, pub maniac_joypad_bindings: Packed<u8>, pub maniac_message_spacing_char: i32, pub maniac_message_spacing_line: i32, pub unknown_chunks: UnknownChunks,
}

Fields§

§scene: SaveSystemScene§frame_count: i32§graphics_name: DbStr<'a>§message_stretch: SystemStretch§font_id: SystemFont§switches: BitArray<'a>§variables: Packed<i32>§message_transparent: i32§message_position: i32§message_prevent_overlap: i32§message_continue_events: i32§face_name: DbStr<'a>§face_id: i32§face_right: bool§face_flip: bool§event_message_active: bool§music_stopping: bool§title_music: Music<'a>§battle_music: Music<'a>§battle_end_music: Music<'a>§inn_music: Music<'a>§current_music: Music<'a>§before_vehicle_music: Music<'a>§before_battle_music: Music<'a>§stored_music: Music<'a>§boat_music: Music<'a>§ship_music: Music<'a>§airship_music: Music<'a>§gameover_music: Music<'a>§cursor_se: Sound<'a>§decision_se: Sound<'a>§cancel_se: Sound<'a>§buzzer_se: Sound<'a>§battle_se: Sound<'a>§escape_se: Sound<'a>§enemy_attack_se: Sound<'a>§enemy_damaged_se: Sound<'a>§actor_damaged_se: Sound<'a>§dodge_se: Sound<'a>§enemy_death_se: Sound<'a>§item_se: Sound<'a>§transition_out: i8§transition_in: i8§battle_start_fadeout: i8§battle_start_fadein: i8§battle_end_fadeout: i8§battle_end_fadein: i8§teleport_allowed: bool§escape_allowed: bool§save_allowed: bool§menu_allowed: bool§background: DbStr<'a>§save_count: i32§save_slot: i32§atb_mode: SaveSystemAtbMode§maniac_strings: StrList<'a>§maniac_message_window_width: i32§maniac_message_window_height: i32§maniac_message_font_name: DbStr<'a>§maniac_message_font_size: i32§maniac_message_hook_flags: ManiacMessageHookFlags§maniac_message_face_width: i32§maniac_message_face_height: i32§maniac_message_hook_common_event_id: i32§maniac_message_hook_callback_system_variable: i32§maniac_message_hook_callback_system_string_variable: i32§maniac_message_hook_callback_user_variable: i32§maniac_message_hook_callback_user_string_variable: i32§maniac_battle_origin: i32§maniac_frameskip: i32§maniac_picture_limit: i32§maniac_options: Packed<u8>§maniac_joypad_bindings: Packed<u8>§maniac_message_spacing_char: i32§maniac_message_spacing_line: i32§unknown_chunks: UnknownChunks

Chunks this schema has no field for, kept verbatim so they survive a load/save cycle. See UnknownChunk.

Trait Implementations§

Source§

impl<'a> Clone for SaveSystem<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for SaveSystem<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> IntoOwned for SaveSystem<'a>

Source§

type Owned = SaveSystem<'static>

The same shape, owning its data.
Source§

fn into_owned(self) -> Self::Owned

Copy anything still borrowed, so the result outlives the input buffer.
Source§

impl<'a> LcfStruct<'a> for SaveSystem<'a>

Source§

const NAME: &'static str = "SaveSystem"

Name used to locate diagnostics, e.g. "Actor".
Source§

fn defaults(engine: Engine) -> Self

The value every field holds before any chunk is read. Read more
Source§

fn apply_chunk( &mut self, id: u32, data: &'a [u8], ctx: &mut Ctx<'_>, ) -> Option<u32>

Apply one chunk. Read more
Source§

fn unknown_chunks(&self) -> &UnknownChunks

The chunks no field claimed, kept so they can be written back.
Source§

fn unknown_chunks_mut(&mut self) -> &mut UnknownChunks

The chunks no field claimed, mutably.
Source§

fn write_body<S: Sink>( &self, sink: &mut S, engine: Engine, ) -> Result<(), S::Error>

Append the struct’s body, excluding any terminating zero. Read more
Source§

fn body_size(&self, engine: Engine) -> u32

Encoded length of the struct’s body, excluding any terminating zero. Read more
Source§

fn read_stream(chunks: &mut ChunkIter<'a>, ctx: &mut Ctx<'_>) -> Self

Read a whole struct from a chunk stream.
Source§

impl<'a> PartialEq for SaveSystem<'a>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> Strings<'a> for SaveSystem<'a>

Source§

fn visit_strings(&self, f: &mut dyn FnMut(&'static str, &DbStr<'a>))

Call f once per string field, with the field’s name and value.
Source§

impl<'a> StructuralPartialEq for SaveSystem<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for SaveSystem<'a>

§

impl<'a> RefUnwindSafe for SaveSystem<'a>

§

impl<'a> Send for SaveSystem<'a>

§

impl<'a> Sync for SaveSystem<'a>

§

impl<'a> Unpin for SaveSystem<'a>

§

impl<'a> UnsafeUnpin for SaveSystem<'a>

§

impl<'a> UnwindSafe for SaveSystem<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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<'a, T> LcfField<'a> for T
where T: LcfStruct<'a>,

Source§

fn field_default(engine: Engine) -> T

The value this field holds when its chunk is absent and the schema gives no explicit default. Read more
Source§

fn read(data: &'a [u8], ctx: &mut Ctx<'_>, _owner: &'static str, _id: u32) -> T

Decode from a chunk payload sliced to exactly this field’s bytes. Read more
Source§

fn lcf_size(&self, engine: Engine) -> u32

Encoded length in bytes, which the two-pass writer emits as the chunk’s length prefix.
Source§

fn write<S>( &self, sink: &mut S, engine: Engine, ) -> Result<(), <S as Sink>::Error>
where S: Sink,

Append the encoded payload. Read more
Source§

fn lcf_differs(&self, other: &Self) -> bool
where Self: PartialEq,

Whether self differs from other in its written form; the writer elides a field equal to its default. Plain !=, except floats compare by bits: -0.0 == 0.0, so != would drop a stored -0.0 and break the round trip.
Source§

fn element_count(&self) -> u32

Number of elements, for array-like fields. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.