ScummVM
Glk::Glulxe::Glulxe Class Reference

Glulxe game interpreter. More...

#include <glulxe.h>

Inheritance diagram for Glk::Glulxe::Glulxe:
Collaboration diagram for Glk::Glulxe::Glulxe:

Public Member Functions

 Glulxe (OSystem *syst, const GlkGameDescription &gameDesc)
 Constructor. More...
 
void runGame ()
 Run the game. More...
 
virtual InterpreterType getInterpreterType () const override
 Returns the running interpreter type. More...
 
virtual Common::Error readSaveData (Common::SeekableReadStream *rs) override
 Load a savegame from the passed Quetzal file chunk stream. More...
 
virtual Common::Error writeGameData (Common::WriteStream *ws) override
 Save the game. More...
 
void NORETURN_PRE fatal_error_handler (const char *str, const char *arg, bool useVal, int val)
 Display an error in the error window, and then exit. More...
 
void nonfatal_warning_handler (const char *str, const char *arg, bool useVal, int val)
 Display a warning in the error window, and then continue. More...
 
bool is_gamefile_valid ()
 Validates the game file, and if it's invalid, displays an error dialog. More...
 
void setup_vm ()
 Read in the game file and build the machine, allocating all the memory necessary. More...
 
void finalize_vm ()
 Deallocate all the memory and shut down the machine. More...
 
void vm_restart ()
 Put the VM into a state where it's ready to begin executing the game. More...
 
uint change_memsize (uint newlen, bool internal)
 Change the size of the memory map. More...
 
uintpop_arguments (uint count, uint addr)
 If addr is 0, pop N arguments off the stack, and put them in an array. More...
 
void verify_address (uint addr, uint count)
 Make sure that count bytes beginning with addr all fall within the current memory map. More...
 
void verify_address_write (uint addr, uint count)
 Make sure that count bytes beginning with addr all fall within RAM. More...
 
void verify_array_addresses (uint addr, uint count, uint size)
 Make sure that an array of count elements (size bytes each), starting at addr, does not fall outside the memory map. More...
 
void execute_loop ()
 The main interpreter loop. More...
 
void init_operands ()
 Set up the fast-lookup array of operandlists. More...
 
const operandlist_tlookup_operandlist (uint opcode)
 Return the operandlist for a given opcode. More...
 
void parse_operands (oparg_t *opargs, const operandlist_t *oplist)
 Read the list of operands of an instruction, and put the values in args. More...
 
void store_operand (uint desttype, uint destaddr, uint storeval)
 Store a result value, according to the desttype and destaddress given. More...
 
void store_operand_s (uint desttype, uint destaddr, uint storeval)
 
void store_operand_b (uint desttype, uint destaddr, uint storeval)
 
void enter_function (uint addr, uint argc, uint *argv)
 This writes a new call frame onto the stack, at stackptr. More...
 
void leave_function ()
 Pop the current call frame off the stack. More...
 
void push_callstub (uint desttype, uint destaddr)
 Push the magic four values on the stack: result destination, PC, and frameptr. More...
 
void pop_callstub (uint returnvalue)
 Remove the magic four values from the stack, and use them. More...
 
uint pop_callstub_string (int *bitnum)
 Remove the magic four values, but interpret them as a string restart state. More...
 
void heap_clear ()
 Set the heap state to inactive, and free the block lists. More...
 
int heap_is_active () const
 Returns whether the heap is active. More...
 
uint heap_get_start () const
 Returns the start address of the heap, or 0 if the heap is not active. More...
 
uint heap_alloc (uint len)
 Allocate a block. More...
 
void heap_free (uint addr)
 Free a heap block. More...
 
int heap_get_summary (uint *valcount, uint **summary)
 Create an array of words, in the VM serialization format: More...
 
int heap_apply_summary (uint valcount, uint *summary)
 Given an array of words in the above format, set up the heap to contain it. More...
 
uint linear_search (uint key, uint keysize, uint start, uint structsize, uint numstructs, uint keyoffset, uint options)
 An array of data structures is stored in memory, beginning at start, each structure being structsize bytes. More...
 
uint binary_search (uint key, uint keysize, uint start, uint structsize, uint numstructs, uint keyoffset, uint options)
 An array of data structures is in memory, as above. More...
 
uint linked_search (uint key, uint keysize, uint start, uint keyoffset, uint nextoffset, uint options)
 The structures may be anywhere in memory, in any order. More...
 
voidglulx_malloc (uint len)
 
voidglulx_realloc (void *ptr, uint len)
 
void glulx_free (void *ptr)
 
void glulx_setrandom (uint32 seed)
 
uint glulx_random ()
 
void glulx_sort (void *addr, int count, int size, int(*comparefunc)(const void *p1, const void *p2))
 
uint do_gestalt (uint val, uint val2)
 
void glkopInit ()
 glkop section initialization More...
 
void set_library_select_hook (void(*func)(uint))
 
bool init_dispatch ()
 Set up the class hash tables and other startup-time stuff. More...
 
gidispatch_rock_t glulxe_classtable_register (void *obj, uint objclass)
 The object registration/unregistration callbacks that the library calls to keep the hash tables up to date. More...
 
gidispatch_rock_t glulxe_classtable_register_existing (void *obj, uint objclass, uint dispid)
 
void glulxe_classtable_unregister (void *obj, uint objclass, gidispatch_rock_t objrock)
 
gidispatch_rock_t glulxe_retained_register (void *array, uint len, const char *typecode)
 
void glulxe_retained_unregister (void *array, uint len, const char *typecode, gidispatch_rock_t objrock)
 
uint perform_glk (uint funcnum, uint numargs, uint *arglist)
 Turn a list of Glulx arguments into a list of Glk arguments, dispatch the function call, and return the result. More...
 
const char * read_prefix (const char *cx, int *isref, int *isarray, int *passin, int *passout, int *nullok, int *isretained, int *isreturn)
 Read the prefixes of an argument string – the "<>&+:#!" chars. More...
 
strid_t find_stream_by_id (uint objid)
 This is used by some interpreter code which has to, well, find a Glk stream given its ID. More...
 
uint find_id_for_window (winid_t win)
 Return the ID of a given Glk window. More...
 
uint find_id_for_stream (strid_t str)
 Return the ID of a given Glk stream. More...
 
uint find_id_for_fileref (frefid_t fref)
 Return the ID of a given Glk fileref. More...
 
uint find_id_for_schannel (schanid_t schan)
 Return the ID of a given Glk schannel. More...
 
void setup_profile (strid_t stream, char *filename)
 
int init_profile ()
 
void profile_set_call_counts (int flag)
 
void profile_tick ()
 
void profile_profiling_active ()
 
void profile_in (uint addr, uint stackuse, int accel)
 
void profile_out (uint stackuse)
 
void profile_fail (const char *reason)
 
void profile_quit ()
 
void debugger_tick ()
 
void debugger_check_story_file ()
 
void debugger_setup_start_state ()
 
void debugger_check_func_breakpoint (uint addr)
 
void debugger_handle_crash (const char *msg)
 
acceleration_func accel_find_func (uint index)
 
acceleration_func accel_get_func (uint addr)
 
void accel_set_func (uint index, uint addr)
 
void accel_set_param (uint index, uint val)
 
uint accel_get_param_count () const
 
uint accel_get_param (uint index) const
 
void accel_iterate_funcs (void(*func)(uint index, uint addr))
 Iterate the entire acceleration table, calling the callback for each (non-nullptr) entry. More...
 
bool init_serial ()
 Set up the undo chain and anything else that needs to be set up. More...
 
void final_serial ()
 Clean up memory when the VM shuts down. More...
 
uint perform_saveundo ()
 Add a state pointer to the undo chain. More...
 
uint perform_restoreundo ()
 Pull a state pointer from the undo chain. More...
 
uint perform_verify ()
 
void stream_num (int val, int inmiddle, int charnum)
 Write a signed integer to the current output stream. More...
 
void stream_string (uint addr, int inmiddle, int bitnum)
 Write a Glulx string object to the current output stream. More...
 
uint stream_get_table ()
 Get the current table address. More...
 
void stream_set_table (uint addr)
 Set the current table address, and rebuild decoding cache. More...
 
void stream_get_iosys (uint *mode, uint *rock)
 
void stream_set_iosys (uint mode, uint rock)
 
char * make_temp_string (uint addr)
 
uint32make_temp_ustring (uint addr)
 
void free_temp_string (char *str)
 
void free_temp_ustring (uint32 *str)
 
- Public Member Functions inherited from Glk::GlkAPI
 GlkAPI (OSystem *syst, const GlkGameDescription &gameDesc)
 Constructor. More...
 
virtual ~GlkAPI ()
 
void glk_exit (void)
 
void glk_set_interrupt_handler (void(*func)(void))
 
void glk_tick (void)
 
uint glk_gestalt (uint id, uint val)
 
uint glk_gestalt_ext (uint id, uint val, uint *arr, uint arrlen)
 
unsigned char glk_char_to_lower (unsigned char ch)
 
unsigned char glk_char_to_upper (unsigned char ch)
 
winid_t glk_window_get_root (void) const
 Get the root window of the window hierarchy. More...
 
winid_t glk_window_open (winid_t split, uint method, uint size, uint wintype, uint rock=0) const
 Open a new window. More...
 
void glk_window_close (winid_t win, stream_result_t *result=nullptr)
 
void glk_window_get_size (winid_t win, uint *width, uint *height)
 
void glk_window_set_arrangement (winid_t win, uint method, uint size, winid_t keyWin)
 
void glk_window_get_arrangement (winid_t win, uint *method, uint *size, winid_t *keyWin)
 
winid_t glk_window_iterate (winid_t win, uint *rock=0)
 
uint glk_window_get_rock (winid_t win)
 
uint glk_window_get_type (winid_t win)
 
winid_t glk_window_get_parent (winid_t win)
 
winid_t glk_window_get_sibling (winid_t win)
 
void glk_window_clear (winid_t win)
 
void glk_window_move_cursor (winid_t win, uint xpos, uint ypos)
 
strid_t glk_window_get_stream (winid_t win)
 
void glk_window_set_echo_stream (winid_t win, strid_t str)
 
strid_t glk_window_get_echo_stream (winid_t win)
 
void glk_set_window (winid_t win)
 
strid_t glk_stream_open_file (frefid_t fileref, FileMode fmode, uint rock=0)
 
strid_t glk_stream_open_memory (char *buf, uint buflen, FileMode fmode, uint rock=0)
 
void glk_stream_close (strid_t str, stream_result_t *result=nullptr)
 
strid_t glk_stream_iterate (strid_t str, uint *rockptr) const
 
uint glk_stream_get_rock (strid_t str) const
 
void glk_stream_set_position (strid_t str, int pos, uint seekMode)
 
uint glk_stream_get_position (strid_t str) const
 
void glk_stream_set_current (strid_t str)
 
strid_t glk_stream_get_current (void)
 
void glk_put_char (unsigned char ch)
 
void glk_put_char_stream (strid_t str, unsigned char ch)
 
void glk_put_string (const char *s)
 
void glk_put_string_stream (strid_t str, const char *s)
 
void glk_put_buffer (const char *buf, uint len)
 
void glk_put_buffer_stream (strid_t str, const char *buf, uint len)
 
void glk_set_style (uint styl)
 
void glk_set_style_stream (strid_t str, uint styl)
 
int glk_get_char_stream (strid_t str)
 
uint glk_get_line_stream (strid_t str, char *buf, uint len)
 
uint glk_get_buffer_stream (strid_t str, char *buf, uint len)
 
void glk_stylehint_set (uint wintype, uint styl, uint hint, int val)
 
void glk_stylehint_clear (uint wintype, uint style, uint hint)
 
uint glk_style_distinguish (winid_t win, uint style1, uint style2)
 
bool glk_style_measure (winid_t win, uint style, uint hint, uint *result)
 
frefid_t glk_fileref_create_temp (uint usage, uint rock=0)
 
frefid_t glk_fileref_create_by_name (uint usage, const char *name, uint rock=0)
 
frefid_t glk_fileref_create_by_prompt (uint usage, FileMode fmode, uint rock=0)
 
frefid_t glk_fileref_create_from_fileref (uint usage, frefid_t fref, uint rock=0)
 
void glk_fileref_destroy (frefid_t fref)
 
frefid_t glk_fileref_iterate (frefid_t fref, uint *rockptr)
 
uint glk_fileref_get_rock (frefid_t fref)
 
void glk_fileref_delete_file (frefid_t fref)
 
uint glk_fileref_does_file_exist (frefid_t fref)
 
void glk_select (event_t *event)
 
void glk_select_poll (event_t *event)
 
void glk_request_timer_events (uint millisecs)
 
void glk_request_line_event (winid_t win, char *buf, uint maxlen, uint initlen)
 
void glk_request_char_event (winid_t win)
 
void glk_request_mouse_event (winid_t win)
 
void glk_cancel_line_event (winid_t win, event_t *event)
 
void glk_cancel_char_event (winid_t win)
 
void glk_cancel_mouse_event (winid_t win)
 
uint glk_buffer_to_lower_case_uni (uint32 *buf, uint len, uint numchars)
 
uint glk_buffer_to_upper_case_uni (uint32 *buf, uint len, uint numchars)
 
uint glk_buffer_to_title_case_uni (uint32 *buf, uint len, uint numchars, uint lowerrest)
 
void glk_put_char_uni (uint32 ch)
 
void glk_put_string_uni (const uint32 *s)
 
void glk_put_buffer_uni (const uint32 *buf, uint len)
 
void glk_put_char_stream_uni (strid_t str, uint32 ch)
 
void glk_put_string_stream_uni (strid_t str, const uint32 *s)
 
void glk_put_buffer_stream_uni (strid_t str, const uint32 *buf, uint len)
 
int glk_get_char_stream_uni (strid_t str)
 
uint glk_get_buffer_stream_uni (strid_t str, uint32 *buf, uint len)
 
uint glk_get_line_stream_uni (strid_t str, uint32 *buf, uint len)
 
strid_t glk_stream_open_file_uni (frefid_t fileref, FileMode fmode, uint rock=0)
 
strid_t glk_stream_open_memory_uni (uint32 *buf, uint buflen, FileMode fmode, uint rock=0)
 
void glk_request_char_event_uni (winid_t win)
 
void glk_request_line_event_uni (winid_t win, uint32 *buf, uint maxlen, uint initlen)
 
const char * garglk_fileref_get_name (frefid_t fref) const
 
void garglk_set_program_name (const char *name)
 
void garglk_set_program_info (const char *info)
 
void garglk_set_story_name (const char *name)
 
void garglk_set_story_title (const char *title)
 
void garglk_set_config (const char *name)
 
void garglk_unput_string (const char *str)
 Removes the specified string from the end of the output buffer, if indeed it is there. More...
 
void garglk_unput_string_uni (const uint32 *str)
 Removes the specified string from the end of the output buffer, if indeed it is there. More...
 
void garglk_set_zcolors (uint fg, uint bg)
 
void garglk_set_zcolors_stream (strid_t str, uint fg, uint bg)
 
void garglk_set_reversevideo (uint reverse)
 
void garglk_set_reversevideo_stream (strid_t str, uint reverse)
 
void garglk_window_get_cursor (winid_t win, uint *xpos, uint *ypos)
 
void garglk_window_get_cursor_current (uint *xpos, uint *ypos)
 
void gidispatch_set_object_registry (gidispatch_rock_t(*regi)(void *obj, uint objclass), void(*unregi)(void *obj, uint objclass, gidispatch_rock_t objrock))
 
void gidispatch_set_retained_registry (gidispatch_rock_t(*regi)(void *array, uint len, const char *typecode), void(*unregi)(void *array, uint len, const char *typecode, gidispatch_rock_t objrock))
 
uint32 gidispatch_count_classes () const
 
const gidispatch_intconst_tgidispatch_get_class (uint32 index) const
 
uint32 gidispatch_count_intconst () const
 
const gidispatch_intconst_tgidispatch_get_intconst (uint32 index) const
 
const char * gidispatch_prototype (uint32 funcnum) const
 
void gidispatch_call (uint32 funcnum, uint32 numargs, gluniversal_t *arglist)
 
gidispatch_rock_t gidispatch_get_objrock (void *obj, uint objclass)
 
- Public Member Functions inherited from Glk::GlkEngine
 GlkEngine (OSystem *syst, const GlkGameDescription &gameDesc)
 
virtual ~GlkEngine ()
 
virtual bool canLoadGameStateCurrently () override
 Returns true if a savegame can be loaded. More...
 
virtual bool canSaveGameStateCurrently () override
 Returns true if the game can be saved. More...
 
Common::Language getLanguage () const
 Returns the language. More...
 
const Common::StringgetGameID () const
 Returns the game's Id. More...
 
const Common::StringgetGameMD5 () const
 Returns the game's md5. More...
 
const Common::StringgetFilename () const
 Returns the primary filename for the game. More...
 
uint getOptions () const
 Returns any options returned with the game's detection entry. More...
 
const Common::StringgetTargetName () const
 Return the game engine's target name. More...
 
Common::String getSaveName (uint slot) const
 Return the filename for a given save slot. More...
 
Common::Error loadGame ()
 Prompt the user for a savegame to load, and then load it. More...
 
Common::Error saveGame ()
 Prompt the user to save their game, and then save it. More...
 
virtual Common::Error loadGameState (int slot) override
 Load a savegame from a given slot. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc) override
 Save the game to a given slot. More...
 
virtual void syncSoundSettings () override
 Updates sound settings. More...
 
void beep ()
 Generate a beep. More...
 
uint getRandomNumber (uint max)
 Get a random number. More...
 
void setRandomNumberSeed (uint seed)
 Set a random number seed. More...
 
void quitGame ()
 Flags to quit the game. More...
 
bool shouldQuit () const
 Returns true if the game should be quit. More...
 
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
virtual void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

Protected Member Functions

void accel_error (const char *msg)
 
uint func_1_z__region (uint argc, uint *argv)
 
uint func_2_cp__tab (uint argc, uint *argv)
 The old set of accel functions (2 through 7) are deprecated; they behave badly if the Inform 6 NUM_ATTR_BYTES option (parameter 7) is changed from its default value (7). More...
 
uint func_3_ra__pr (uint argc, uint *argv)
 
uint func_4_rl__pr (uint argc, uint *argv)
 
uint func_5_oc__cl (uint argc, uint *argv)
 
uint func_6_rv__pr (uint argc, uint *argv)
 
uint func_7_op__pr (uint argc, uint *argv)
 
uint func_8_cp__tab (uint argc, uint *argv)
 Here are the newer functions, which support changing NUM_ATTR_BYTES. More...
 
uint func_9_ra__pr (uint argc, uint *argv)
 
uint func_10_rl__pr (uint argc, uint *argv)
 
uint func_11_oc__cl (uint argc, uint *argv)
 
uint func_12_rv__pr (uint argc, uint *argv)
 
uint func_13_op__pr (uint argc, uint *argv)
 
int obj_in_class (uint obj)
 
uint get_prop (uint obj, uint id)
 Look up a property entry. More...
 
uint get_prop_new (uint obj, uint id)
 Look up a property entry. More...
 
classtable_tnew_classtable (uint firstid)
 Build a hash table to hold a set of Glk objects. More...
 
voidclasses_get (int classid, uint objid)
 Find a Glk object in the appropriate hash table. More...
 
classref_tclasses_put (int classid, void *obj, uint origid)
 Put a Glk object in the appropriate hash table. More...
 
void classes_remove (int classid, void *obj)
 Delete a Glk object from the appropriate hash table. More...
 
long glulxe_array_locate (void *array, uint len, char *typecode, gidispatch_rock_t objrock, int *elemsizeref)
 
gidispatch_rock_t glulxe_array_restore (long bufkey, uint len, char *typecode, void **arrayref)
 
char * grab_temp_c_array (uint addr, uint len, int passin)
 
void release_temp_c_array (char *arr, uint addr, uint len, int passout)
 
uintgrab_temp_i_array (uint addr, uint len, int passin)
 
void release_temp_i_array (uint *arr, uint addr, uint len, int passout)
 
void ** grab_temp_ptr_array (uint addr, uint len, int objclass, int passin)
 
void release_temp_ptr_array (void **arr, uint addr, uint len, int objclass, int passout)
 
void prepare_glk_args (const char *proto, dispatch_splot_t *splot)
 This reads through the prototype string, and pulls Floo objects off the stack. More...
 
void parse_glk_args (dispatch_splot_t *splot, const char **proto, int depth, int *argnumptr, uint subaddress, int subpassin)
 This long and unpleasant function translates a set of Floo objects into a gluniversal_t array. More...
 
void unparse_glk_args (dispatch_splot_t *splot, const char **proto, int depth, int *argnumptr, uint subaddress, int subpassout)
 This is about the reverse of parse_glk_args(). More...
 
char * get_game_id ()
 Create a string identifying this game. More...
 
uint ReadMemory (uint addr)
 
void WriteMemory (uint addr, uint val)
 
char * CaptureCArray (uint addr, uint len, int passin)
 
void ReleaseCArray (char *ptr, uint addr, uint len, int passout)
 
uintCaptureIArray (uint addr, uint len, int passin)
 
void ReleaseIArray (uint *ptr, uint addr, uint len, int passout)
 
void ** CapturePtrArray (uint addr, uint len, int objclass, int passin)
 
void ReleasePtrArray (void **ptr, uint addr, uint len, int objclass, int passout)
 
uint ReadStructField (uint addr, uint fieldnum)
 
void WriteStructField (uint addr, uint fieldnum, uint val)
 
char * DecodeVMString (uint addr)
 
void ReleaseVMString (char *ptr)
 
uint32DecodeVMUstring (uint addr)
 
void ReleaseVMUstring (uint32 *ptr)
 
void fetchkey (unsigned char *keybuf, uint key, uint keysize, uint options)
 This massages the key into a form that's easier to handle. More...
 
uint write_memstate (dest_t *dest)
 
uint write_heapstate (dest_t *dest, int portable)
 
uint write_stackstate (dest_t *dest, int portable)
 
uint read_memstate (dest_t *dest, uint chunklen)
 
uint read_heapstate (dest_t *dest, uint chunklen, int portable, uint *sumlen, uint **summary)
 
uint read_stackstate (dest_t *dest, uint chunklen, int portable)
 
uint write_heapstate_sub (uint sumlen, uint *sumarray, dest_t *dest, int portable)
 
int read_byte (dest_t *dest, byte *val)
 
int read_short (dest_t *dest, uint16 *val)
 
int read_long (dest_t *dest, uint *val)
 
int write_byte (dest_t *dest, byte val)
 
int write_short (dest_t *dest, uint16 val)
 
int write_long (dest_t *dest, uint val)
 
int read_buffer (dest_t *dest, byte *ptr, uint len)
 
int reposition_write (dest_t *dest, uint pos)
 
int write_buffer (dest_t *dest, const byte *ptr, uint len)
 
void stream_setup_unichar ()
 
void nopio_char_han (unsigned char ch)
 
void filio_char_han (unsigned char ch)
 
void nopio_unichar_han (uint32 ch)
 
void filio_unichar_han (uint32 ch)
 
void glkio_unichar_nouni_han (uint32 val)
 
void dropcache (cacheblock_t *cablist)
 
void buildcache (cacheblock_t *cablist, uint nodeaddr, int depth, int mask)
 
void dumpcache (cacheblock_t *cablist, int count, int indent)
 
- Protected Member Functions inherited from Glk::GlkEngine
virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
virtual bool hasFeature (EngineFeature f) const override
 Returns true whether a given feature is supported by the engine. More...
 
virtual void initGraphicsMode ()
 Setup the video mode. More...
 
virtual ScreencreateScreen ()
 Create the screen. More...
 
virtual DebuggercreateDebugger ()
 Creates a debugger instance. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

Static Protected Member Functions

static int sort_heap_summary (const void *p1, const void *p2)
 

Protected Attributes

void(* library_select_hook )(uint)
 The library_select_hook is called every time the VM blocks for input. More...
 
arrayref_tarrays
 
int num_classes
 The list of hash tables, for the classes. More...
 
classtable_t ** classes
 
- Protected Attributes inherited from Glk::GlkEngine
const GlkGameDescription _gameDescription
 
Common::RandomSource _random
 
int _loadSaveSlot
 
Common::File _gameFile
 
PCSpeaker_pcSpeaker
 
bool _quitFlag
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Private Attributes

CharHandler stream_char_handler
 
UnicharHandler stream_unichar_handler
 
UnicharHandler glkio_unichar_han_ptr
 
bool vm_exited_cleanly
 
uint gamefile_start
 
uint gamefile_len
 
char * init_err
 
char * init_err2
 
bytememmap
 
bytestack
 
uint ramstart
 
uint endgamefile
 
uint origendmem
 
uint stacksize
 
uint startfuncaddr
 
uint checksum
 
uint stackptr
 
uint frameptr
 
uint pc
 
uint origstringtable
 
uint stringtable
 
uint valstackbase
 
uint localsbase
 
uint endmem
 
uint protectstart
 
uint protectend
 
uint prevpc
 
void(* library_autorestore_hook )(void)
 The library_autorestore_hook is called right after the VM's initial setup. More...
 
uint classes_table
 class object array More...
 
uint indiv_prop_start
 first individual prop ID More...
 
uint class_metaclass
 "Class" class object More...
 
uint object_metaclass
 "Object" class object More...
 
uint routine_metaclass
 "Routine" class object More...
 
uint string_metaclass
 "String" class object More...
 
uint self
 address of global "self" More...
 
uint num_attr_bytes
 number of attributes / 8 More...
 
uint cpv__start
 array of common prop defaults More...
 
accelentry_t ** accelentries
 
uint heap_start
 zero for inactive heap More...
 
int alloc_count
 
heapblock_theap_head
 
heapblock_theap_tail
 
const operandlist_tfast_operandlist [0x80]
 This is a handy array in which to look up operandlists quickly. More...
 
int max_undo_level
 This can be adjusted before startup by platform-specific startup code – that is, preference code. More...
 
int undo_chain_size
 
int undo_chain_num
 
byte ** undo_chain
 
byteramcache
 This will contain a copy of RAM (ramstate to endmem) as it exists in the game file. More...
 
uint iosys_mode
 
uint iosys_rock
 
bool tablecache_valid
 The current string-decoding tables, broken out into a fast and easy-to-use form. More...
 
cacheblock_t tablecache
 
char temp_buf [STATIC_TEMP_BUFSIZE+1]
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Public Attributes inherited from Glk::GlkEngine
Blorb_blorb
 
Clipboard_clipboard
 
Conf_conf
 
Debugger_debugger
 
Events_events
 
Pictures_pictures
 
Screen_screen
 
Selection_selection
 
Streams_streams
 
Sounds_sounds
 
Windows_windows
 
bool _copySelect
 
bool _terminated
 
gidispatch_rock_t(* gli_register_obj )(void *obj, uint objclass)
 
void(* gli_unregister_obj )(void *obj, uint objclass, gidispatch_rock_t objrock)
 
gidispatch_rock_t(* gli_register_arr )(void *array, uint len, const char *typecode)
 
void(* gli_unregister_arr )(void *array, uint len, const char *typecode, gidispatch_rock_t objrock)
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Detailed Description

Glulxe game interpreter.

Definition at line 41 of file glulxe.h.

Constructor & Destructor Documentation

◆ Glulxe()

Glk::Glulxe::Glulxe::Glulxe ( OSystem syst,
const GlkGameDescription gameDesc 
)

Constructor.

Definition at line 32 of file glulxe.cpp.

Member Function Documentation

◆ getInterpreterType()

virtual InterpreterType Glk::Glulxe::Glulxe::getInterpreterType ( ) const
inlineoverridevirtual

Returns the running interpreter type.

Implements Glk::GlkEngine.

Definition at line 406 of file glulxe.h.

◆ readSaveData()

Common::Error Glk::Glulxe::Glulxe::readSaveData ( Common::SeekableReadStream rs)
overridevirtual

Load a savegame from the passed Quetzal file chunk stream.

Implements Glk::GlkEngine.

Definition at line 365 of file serial.cpp.

◆ runGame()

void Glk::Glulxe::Glulxe::runGame ( )
virtual

Run the game.

Implements Glk::GlkEngine.

Definition at line 55 of file glulxe.cpp.

◆ writeGameData()

Common::Error Glk::Glulxe::Glulxe::writeGameData ( Common::WriteStream ws)
overridevirtual

Save the game.

The passed write stream represents access to the UMem chunk in the Quetzal save file that will be created

Implements Glk::GlkEngine.

Definition at line 235 of file serial.cpp.


The documentation for this class was generated from the following files: