Skip to main content

GlobalState

Struct GlobalState 

Source
pub struct GlobalState {
Show 59 fields pub int_lists: HashMap<u32, Vec<i64>>, pub str_lists: HashMap<u32, Vec<String>>, pub counter_lists: HashMap<u32, Vec<Counter>>, pub pcm_event_lists: HashMap<u32, Vec<PcmEventState>>, pub int_event_roots: HashMap<u32, IntEvent>, pub int_event_lists: HashMap<u32, Vec<IntEvent>>, pub int_props: HashMap<u32, HashMap<i32, i64>>, pub str_props: HashMap<u32, HashMap<i32, String>>, pub intlist_bit_widths: HashMap<(u32, i32), i32>, pub intlist_bit_order: HashMap<u32, Vec<i32>>, pub cg_table_off: bool, pub database_off: bool, pub g00buf: Vec<Option<ImageId>>, pub g00buf_names: Vec<Option<String>>, pub rng_state: u32, pub mask_lists: HashMap<u32, MaskListState>, pub editbox_lists: HashMap<u32, EditBoxListState>, pub focused_editbox: Option<(u32, usize)>, pub change_display_mode_proc_cnt: i32, pub frame_actions: HashMap<u32, ObjectFrameActionState>, pub frame_action_lists: HashMap<u32, Vec<ObjectFrameActionState>>, pub pending_frame_action_finishes: Vec<PendingFrameActionFinish>, pub pending_button_actions: Vec<PendingButtonAction>, pub stage_forms: HashMap<u32, StageFormState>, pub focused_stage_group: Option<(u32, i64, usize)>, pub focused_stage_mwnd: Option<(u32, i64, usize)>, pub current_mwnd_no: Option<usize>, pub current_mwnd_stage_idx: i64, pub current_sel_mwnd_no: Option<usize>, pub current_sel_mwnd_stage_idx: i64, pub last_mwnd_no: Option<usize>, pub last_mwnd_stage_idx: i64, pub local_real_time: i64, pub local_game_time: i64, pub local_wipe_time: i64, pub local_flag_h: Vec<i64>, pub local_flag_i: Vec<i64>, pub local_flag_j: Vec<i64>, pub selbtn: BtnSelectRuntimeState, pub current_stage_object: Option<(i64, usize)>, pub current_object_chain: Option<Vec<i32>>, pub screen_forms: HashMap<u32, ScreenFormState>, pub msgbk_forms: HashMap<u32, MsgBackState>, pub script: ScriptRuntimeState, pub system: SystemRuntimeState, pub syscom: SyscomRuntimeState, pub mov: GlobalMovieState, pub capture_image: Option<RgbaImage>, pub capture_for_object_image: Option<RgbaImage>, pub save_thumb_capture_image: Option<RgbaImage>, pub append_dir: String, pub append_name: String, pub bgm_table_listened: HashMap<String, bool>, pub bgm_table_flags: Vec<bool>, pub bgm_table_all_flag: bool, pub wipe: Option<WipeState>, pub lights: HashMap<i32, LightState>, pub fog_global: FogGlobalState, pub render_frame: u64,
}

Fields§

§int_lists: HashMap<u32, Vec<i64>>

Generic int-list storage keyed by the global form ID.

§str_lists: HashMap<u32, Vec<String>>

Generic string-list storage keyed by the global form ID.

§counter_lists: HashMap<u32, Vec<Counter>>

Counter-list storage keyed by the global form ID.

§pcm_event_lists: HashMap<u32, Vec<PcmEventState>>

PCM-event lists keyed by the global form ID.

§int_event_roots: HashMap<u32, IntEvent>

Generic integer-event roots keyed by the form ID.

§int_event_lists: HashMap<u32, Vec<IntEvent>>

Generic integer-event lists keyed by the form ID.

§int_props: HashMap<u32, HashMap<i32, i64>>

Generic int properties keyed by (form_id -> op_id).

§str_props: HashMap<u32, HashMap<i32, String>>

Generic string properties keyed by (form_id -> op_id).

§intlist_bit_widths: HashMap<(u32, i32), i32>

Learned bit-width selectors for int lists (form_id/op -> bit width).

§intlist_bit_order: HashMap<u32, Vec<i32>>

First-seen ordering of bit selectors per int list form.

§cg_table_off: bool

CGTABLE global disable flag.

§database_off: bool

DATABASE global disable flag.

§g00buf: Vec<Option<ImageId>>

G00BUF slots. Each slot stores an ImageId loaded from the g00/ directory.

§g00buf_names: Vec<Option<String>>

Original C_elm_g00_buf persists file names, not texture handles.

§rng_state: u32

RNG state for MATH.RAND (xorshift32). 0 means “uninitialized”.

§mask_lists: HashMap<u32, MaskListState>

Mask subsystem state keyed by the (guessed or mapped) form id.

§editbox_lists: HashMap<u32, EditBoxListState>

EditBox subsystem state keyed by the (guessed or mapped) form id.

§focused_editbox: Option<(u32, usize)>

Currently focused editbox (form_id, index).

§change_display_mode_proc_cnt: i32

Display-mode transition counter used by editbox frame visibility.

§frame_actions: HashMap<u32, ObjectFrameActionState>

Global frame-action roots keyed by the owning form id.

§frame_action_lists: HashMap<u32, Vec<ObjectFrameActionState>>

Global frame-action channel lists keyed by the owning form id.

§pending_frame_action_finishes: Vec<PendingFrameActionFinish>

Finish callbacks queued by FRAMEACTION.START/START_REAL/END.

§pending_button_actions: Vec<PendingButtonAction>

Button decided actions queued from C_elm_object::button_event semantics.

§stage_forms: HashMap<u32, StageFormState>

Stage UI subsystem state keyed by the stage form ID.

§focused_stage_group: Option<(u32, i64, usize)>

Currently focused stage group selection (form_id, stage_idx, group_idx).

§focused_stage_mwnd: Option<(u32, i64, usize)>

Currently focused message-window selection (form_id, stage_idx, mwnd_idx).

§current_mwnd_no: Option<usize>

Current message-window handles used by GLOBAL.GET_MWND/SET_MWND. Original engine initializes these to FRONT.MWND[default_*].

§current_mwnd_stage_idx: i64§current_sel_mwnd_no: Option<usize>§current_sel_mwnd_stage_idx: i64§last_mwnd_no: Option<usize>§last_mwnd_stage_idx: i64§local_real_time: i64

Original C_tnm_timer local fields saved by C_tnm_eng::save_local().

§local_game_time: i64§local_wipe_time: i64§local_flag_h: Vec<i64>

Original extend-enable local flag lists H/I/J.

§local_flag_i: Vec<i64>§local_flag_j: Vec<i64>§selbtn: BtnSelectRuntimeState

GLOBAL.SELBTN button-selection runtime state.

§current_stage_object: Option<(i64, usize)>

Last object target touched by stage/object dispatch. Compact object-only chains in scene bytecode use this as the ambient current-object context when they omit the object index.

§current_object_chain: Option<Vec<i32>>§screen_forms: HashMap<u32, ScreenFormState>

Screen subsystem state keyed by the screen form ID.

§msgbk_forms: HashMap<u32, MsgBackState>

Message backlog (MSGBK) subsystem state keyed by the form ID.

§script: ScriptRuntimeState

Script/global runtime state translated from the original the original implementation command handlers.

§system: SystemRuntimeState

System helper runtime state.

§syscom: SyscomRuntimeState

System-command runtime state.

§mov: GlobalMovieState

Active GLOBAL.MOV direct movie player.

§capture_image: Option<RgbaImage>

Last full-screen capture made by GLOBAL.CAPTURE / CAPTURE_FROM_FILE.

§capture_for_object_image: Option<RgbaImage>

Capture buffer used by OBJECT.CREATE_CAPTURE and thumb fallback paths.

§save_thumb_capture_image: Option<RgbaImage>

Save thumbnail capture prepared before entering the save UI.

§append_dir: String

Currently selected append directory used by original file resolution helpers.

§append_name: String

Display name for the currently selected append directory.

§bgm_table_listened: HashMap<String, bool>

BGM table listened flags keyed by registered name.

§bgm_table_flags: Vec<bool>

BGM table flags indexed by original BGM registration number.

§bgm_table_all_flag: bool

Default flag applied to names not seen yet via BGMTABLE.SET_ALL_FLAG.

§wipe: Option<WipeState>

Active wipe transition (WIPE / MASK_WIPE).

§lights: HashMap<i32, LightState>

Global light manager keyed by original engine light id.

§fog_global: FogGlobalState

Global fog state.

§render_frame: u64

Monotonic frame counter used by render effects.

Implementations§

Source§

impl GlobalState

Source

pub fn start_wipe(&mut self, w: WipeState)

Source

pub fn finish_wipe(&mut self)

Source

pub fn wipe_done(&self) -> bool

Source

pub fn tick_frame(&mut self, past_game_time: i32, past_real_time: i32)

Trait Implementations§

Source§

impl Clone for GlobalState

Source§

fn clone(&self) -> GlobalState

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalState

Source§

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

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

impl Default for GlobalState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,