pub struct SceneVm<'a> {
pub cfg: VmConfig,
pub ctx: CommandContext,
pub unknown_opcodes: BTreeMap<u8, u64>,
pub unknown_forms: BTreeMap<i32, u64>,
/* private fields */
}Fields§
§cfg: VmConfig§ctx: CommandContext§unknown_opcodes: BTreeMap<u8, u64>§unknown_forms: BTreeMap<i32, u64>Implementations§
Source§impl<'a> SceneVm<'a>
impl<'a> SceneVm<'a>
pub fn new(stream: SceneStream<'a>, ctx: CommandContext) -> Self
pub fn with_config( cfg: VmConfig, stream: SceneStream<'a>, ctx: CommandContext, ) -> Self
pub fn is_blocked(&mut self) -> bool
pub fn is_halted(&self) -> bool
pub fn proc_generation(&self) -> u64
pub fn last_proc_kind(&self) -> ProcKind
pub fn current_scene_name(&self) -> Option<&str>
pub fn current_line_no(&self) -> i32
pub fn current_scene_no(&self) -> Option<usize>
pub fn take_runtime_load_completed(&mut self) -> bool
pub fn call_syscom_configured_scene(&mut self, key: &str) -> Result<bool>
pub fn take_script_proc_request(&mut self) -> bool
pub fn take_script_proc_pop_request(&mut self) -> bool
pub fn tick_frame(&mut self) -> Result<()>
pub fn restart_scene_name(&mut self, scene_name: &str, z_no: i32) -> Result<()>
pub fn has_sel_point(&self) -> bool
pub fn restore_last_sel_point(&mut self) -> bool
pub fn step(&mut self) -> Result<bool>
Sourcepub fn begin_script_proc_pump(&mut self)
pub fn begin_script_proc_pump(&mut self)
Reset the infinite-loop guard for one C++-style frame_main_proc pass. This is not a scheduling quota; it only preserves SIGLUS_VM_MAX_STEPS as a hard error if a script never reaches a proc/wait boundary.
Sourcepub fn run_script_proc(&mut self) -> Result<bool>
pub fn run_script_proc(&mut self) -> Result<bool>
Execute one standalone SCRIPT proc pass. Direct callers get a fresh infinite-loop guard, while the winit shell uses run_script_proc_continue() inside its C++-style frame_main_proc loop.
Sourcepub fn run_script_proc_continue(&mut self) -> Result<bool>
pub fn run_script_proc_continue(&mut self) -> Result<bool>
Execute the current SCRIPT proc the same way the original engine’s
tnm_proc_script() does: keep stepping while the current proc is SCRIPT,
and return only when a command changes the proc, enters a wait, returns,
or stops the VM. There is no per-frame instruction quota here.
pub fn run(&mut self) -> Result<()>
Auto Trait Implementations§
impl<'a> !Freeze for SceneVm<'a>
impl<'a> !RefUnwindSafe for SceneVm<'a>
impl<'a> Send for SceneVm<'a>
impl<'a> !Sync for SceneVm<'a>
impl<'a> Unpin for SceneVm<'a>
impl<'a> UnsafeUnpin for SceneVm<'a>
impl<'a> !UnwindSafe for SceneVm<'a>
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
Mutably borrows from an owned value. Read more
§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>
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>
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)
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)
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.