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: boolTNM_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: boolBlocks VM execution until a runtime modal UI supplies a return value.
wipe: boolImplementations§
Source§impl VmWait
impl VmWait
pub fn block_generation(&self) -> u64
pub fn needs_runtime_poll(&self) -> bool
Sourcepub fn needs_continuous_frame(&self) -> bool
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.
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
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
pub fn wait_system_modal(&mut self)
pub fn finish_system_modal(&mut self, value: Value)
pub fn finish_system_modal_void(&mut self)
pub fn system_modal_active(&self) -> bool
pub fn wait_ms(&mut self, ms: u64)
pub fn wait_mwnd_animation(&mut self, ms: u64)
pub fn mwnd_animation_waiting(&self) -> bool
pub fn wait_next_frame(&mut self, current_frame: u64)
Sourcepub fn wait_ms_key(&mut self, ms: u64)
pub fn wait_ms_key(&mut self, ms: u64)
Wait for a duration, but allow any key/mouse press to cancel the wait.
pub fn wait_selbtn(&mut self)
pub fn set_selbtn_result(&mut self, result: i64)
pub fn wait_key(&mut self)
pub fn wait_group_selection( &mut self, form_id: u32, stage_idx: i64, group_idx: usize, )
pub fn wait_input_key(&mut self, skip_disabled: bool)
pub fn waiting_for_key(&self) -> bool
pub fn wait_message_reveal(&mut self)
pub fn wait_message_reveal_then_key(&mut self)
pub fn message_reveal_waiting(&self) -> bool
Sourcepub fn finish_message_reveal(&mut self) -> bool
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.
pub fn message_key_waiting(&self) -> bool
pub fn finish_message_key_wait(&mut self)
pub fn wait_quake(&mut self, wait: QuakeWait, key_skip: bool)
pub fn wait_audio(&mut self, w: AudioWait, key: bool)
pub fn wait_audio_with_return( &mut self, w: AudioWait, key: bool, return_value_flag: bool, )
pub fn wait_object_all_events( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, key_skip: bool, )
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, )
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, )
pub fn wait_global_movie(&mut self, key_skip: bool, return_value_flag: bool)
pub fn wait_object_movie( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, key_skip: bool, return_value_flag: bool, )
pub fn wait_object_emote( &mut self, stage_form_id: u32, stage_idx: i64, runtime_slot: usize, key_skip: bool, return_value_flag: bool, )
pub fn wait_generic_int_event( &mut self, form_id: u32, index: Option<usize>, key_skip: bool, return_value_flag: bool, )
pub fn wait_pcm_event( &mut self, form_id: u32, index: usize, key_skip: bool, return_value_flag: bool, )
pub fn wait_screen_effect( &mut self, form_id: u32, index: usize, op: i32, key_skip: bool, return_value_flag: bool, )
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, )
pub fn wait_mask_event( &mut self, form_id: u32, index: usize, op: i32, key_skip: bool, return_value_flag: bool, )
pub fn wait_fog_x_event(&mut self, key_skip: bool, return_value_flag: bool)
pub fn wait_counter( &mut self, form_id: u32, index: usize, target: i64, key_skip: bool, return_value_flag: bool, )
pub fn wait_wipe(&mut self, key_skip: bool)
pub fn wait_wipe_with_return(&mut self, key_skip: bool, return_value_flag: bool)
Sourcepub fn notify_key(
&mut self,
_globals: &mut GlobalState,
_ids: &RuntimeConstants,
) -> bool
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).
Sourcepub fn notify_movie_down_up(
&mut self,
globals: &mut GlobalState,
ids: &RuntimeConstants,
result: i64,
) -> bool
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.
Sourcepub fn take_movie_skip(&mut self) -> Option<MovieWait>
pub fn take_movie_skip(&mut self) -> Option<MovieWait>
If the current wait was skipped via key input, returns the skipped movie wait info.
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmWait
impl RefUnwindSafe for VmWait
impl Send for VmWait
impl Sync for VmWait
impl Unpin for VmWait
impl UnsafeUnpin for VmWait
impl UnwindSafe for VmWait
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.