ZMachine class

This is a partial-interpreter for the Z-Machine. It handles most interpreter activites except actual IO, which is deferred to the IOConfig provider.

The IOConfig handles tasks for whatever presentation platform is in use by the application.

Mixed in types

Constructors

ZMachine()
factory

Properties

engine Engine
Represents the underlying interpreter engine used to run the game (different versions require different engines).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
inBreak bool
getter/setter pair
inInterrupt bool
getter/setter pair
io IOProvider
This field must be set so that the interpeter has a place to send commands and receive results from those commands (if any).
getter/setter pair
isLoaded bool
getter/setter pair
log Logger
Gets the log for output.
no setterinherited
logName String
Sets the logger and name for this Loggable mixin instance.
no getterinherited
memoryStreams List<int?>
final
mostRecentInput String
getter/setter pair
quit bool
getter/setter pair
rawBytes List<int>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sbuff StringBuffer
getter/setter pair
ver zMachineVersions?
getter/setter pair

Methods

callAsync(dynamic func()) → void
load(List<int>? storyBytes) → void
Loads the given Z-Machine story file storyBytes into the interpreter memory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printBuffer() → void
run([Engine? machineOverride]) → void
Runs the Z-Machine using the detected machine version from the story file. This can be overridden by passing machineOverride to the function. Doing so will cause given Engine to be used for execution.
runIt() → void
sendIO(Map<String, dynamic> ioData) Future
softReset() → void
Reset Z-Machine to state at first load */
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

intToVer(int ver) zMachineVersions
Converts given int to a zMachineVersions
verToInt(zMachineVersions v) int