Skip to main content

VmWait

Struct VmWait 

Source
pub struct VmWait {
    pub until: Option<Instant>,
    pub until_frame: Option<u64>,
    pub waiting_for_key: bool,
    pub message_reveal: bool,
    pub audio: Option<AudioWait>,
    pub event: Option<EventWait>,
    pub movie: Option<MovieWait>,
    pub quake: Option<QuakeWait>,
    pub pending_value: Option<Value>,
    pub system_modal: bool,
    pub wipe: bool,
    /* private fields */
}

Fields§

§until: Option<Instant>§until_frame: Option<u64>§waiting_for_key: bool§message_reveal: bool

TNM_PROC_TYPE_MESSAGE_WAIT: block only until the typewriter has revealed the complete message. This is deliberately distinct from MESSAGE_KEY_WAIT, which waits for user input after reveal.

§audio: Option<AudioWait>§event: Option<EventWait>§movie: Option<MovieWait>§quake: Option<QuakeWait>§pending_value: Option<Value>§system_modal: bool

Blocks VM execution until a runtime modal UI supplies a return value.

§wipe: bool

Implementations§

Source§

impl VmWait

Source

pub fn block_generation(&self) -> u64

Source

pub fn needs_runtime_poll(&self) -> bool

Source

pub fn needs_continuous_frame(&self) -> bool

Whether wall-clock or frame-driven state can make this wait finish.

Pure key waits still need to be checked after an input event, but they must not keep the render loop running while the player is idle.

Source

pub fn poll( &mut self, stack: &mut Vec<Value>, bgm: &mut BgmEngine, koe: &mut KoeEngine, se: &mut SeEngine, pcm: &mut PcmEngine, globals: &mut GlobalState, ids: &RuntimeConstants, skipping: bool, ) -> bool

Source

pub fn is_blocked( &mut self, bgm: &mut BgmEngine, koe: &mut KoeEngine, se: &mut SeEngine, pcm: &mut PcmEngine, globals: &mut GlobalState, ids: &RuntimeConstants, skipping: bool, ) -> bool

Source

pub fn wait_system_modal(&mut self)

Source

pub fn finish_system_modal(&mut self, value: Value)

Source

pub fn finish_system_modal_void(&mut self)

Source

pub fn system_modal_active(&self) -> bool

Source

pub fn wait_ms(&mut self, ms: u64)

Source

pub fn wait_mwnd_animation(&mut self, ms: u64)

Source

pub fn mwnd_animation_waiting(&self) -> bool

Source

pub fn wait_next_frame(&mut self, current_frame: u64)

Source

pub fn wait_ms_key(&mut self, ms: u64)

Wait for a duration, but allow any key/mouse press to cancel the wait.

Source

pub fn wait_selbtn(&mut self)

Source

pub fn set_selbtn_result(&mut self, result: i64)

Source

pub fn wait_key(&mut self)

Source

pub fn wait_group_selection( &mut self, form_id: u32, stage_idx: i64, group_idx: usize, )

Source

pub fn wait_input_key(&mut self, skip_disabled: bool)

Source

pub fn waiting_for_key(&self) -> bool

Source

pub fn wait_message_reveal(&mut self)

Source

pub fn wait_message_reveal_then_key(&mut self)

Source

pub fn message_reveal_waiting(&self) -> bool

Source

pub fn finish_message_reveal(&mut self) -> bool

Pop MESSAGE_WAIT and expose the MESSAGE_KEY_WAIT that PP/R/PAGE had already pushed below it. Returns true when that second proc became active.

Source

pub fn message_key_waiting(&self) -> bool

Source

pub fn finish_message_key_wait(&mut self)

Source

pub fn wait_quake(&mut self, wait: QuakeWait, key_skip: bool)

Source

pub fn wait_audio(&mut self, w: AudioWait, key: bool)

Source

pub fn wait_audio_with_return( &mut self, w: AudioWait, key: bool, return_value_flag: bool, )

Source

pub fn wait_object_all_events( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, key_skip: bool, )

Source

pub fn wait_object_event( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, op: i32, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_object_event_list( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, list_op: i32, list_idx: usize, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_global_movie(&mut self, key_skip: bool, return_value_flag: bool)

Source

pub fn wait_object_movie( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_object_emote( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_generic_int_event( &mut self, form_id: u32, index: Option<usize>, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_pcm_event( &mut self, form_id: u32, index: usize, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_screen_effect( &mut self, form_id: u32, index: usize, op: i32, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_stage_effect( &mut self, stage_form_id: u32, stage_idx: i64, index: usize, op: i32, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_mask_event( &mut self, form_id: u32, index: usize, op: i32, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_fog_x_event(&mut self, key_skip: bool, return_value_flag: bool)

Source

pub fn wait_counter( &mut self, form_id: u32, index: usize, target: i64, key_skip: bool, return_value_flag: bool, )

Source

pub fn wait_wipe(&mut self, key_skip: bool)

Source

pub fn wait_wipe_with_return(&mut self, key_skip: bool, return_value_flag: bool)

Source

pub fn notify_key( &mut self, _globals: &mut GlobalState, _ids: &RuntimeConstants, ) -> bool

Notify the wait system that a key/mouse input happened.

Returns true if the input is interpreted as a wipe-skip (used by WIPE/WAIT_WIPE).

Source

pub fn notify_movie_down_up( &mut self, globals: &mut GlobalState, ids: &RuntimeConstants, result: i64, ) -> bool

Notify key-skippable waits that DECIDE/CANCEL completed a down-up pair.

This matches C++ tnm_time_wait_proc, tnm_mov_wait_proc, and tnm_obj_mov_wait_proc: TIMEWAIT_KEY and MOV_WAIT_KEY consume only VK_EX_DECIDE or VK_EX_CANCEL down-up, returning 1 or -1 respectively. Generic key/mouse events must not skip these waits.

Source

pub fn take_movie_skip(&mut self) -> Option<MovieWait>

If the current wait was skipped via key input, returns the skipped movie wait info.

Source

pub fn clear(&mut self)

Trait Implementations§

Source§

impl Clone for VmWait

Source§

fn clone(&self) -> VmWait

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 Debug for VmWait

Source§

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

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

impl Default for VmWait

Source§

fn default() -> VmWait

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 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> Downcast<T> for T

§

fn downcast(&self) -> &T

§

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

§

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

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

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

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

§

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

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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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,

§

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