Glk::Hugo::Hugo Class Reference

Hugo game interpreter. More...

#include <hugo.h>

+ Inheritance diagram for Glk::Hugo::Hugo:
+ Collaboration diagram for Glk::Hugo::Hugo:

Public Member Functions

 Hugo (OSystem *syst, const GlkGameDescription &gameDesc)
 Constructor. More...
void runGame () override
 Run the game. More...
InterpreterType getInterpreterType () const override
 Returns the running interpreter type. More...
Common::Error readSaveData (Common::SeekableReadStream *rs) override
 Load a savegame from the passed Quetzal file chunk stream. More...
Common::Error writeGameData (Common::WriteStream *ws) override
 Save the game. More...
- Public Member Functions inherited from Glk::GlkAPI
 GlkAPI (OSystem *syst, const GlkGameDescription &gameDesc)
 Constructor. More...
 ~GlkAPI () override
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)
void glk_set_echo_line_event (winid_t win, uint val)
void glk_set_terminators_line_event (winid_t win, const uint32 *keycodes, uint count)
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)
uint glk_buffer_canon_decompose_uni (uint32 *buf, uint len, uint numchars)
uint glk_buffer_canon_normalize_uni (uint32 *buf, uint len, uint numchars)
bool glk_image_draw (winid_t win, uint image, int val1, int val2)
bool glk_image_draw_scaled (winid_t win, uint image, int val1, int val2, uint width, uint height)
bool glk_image_draw (winid_t win, const Graphics::Surface &image, uint transColor=(uint) -1, int xp=0, int yp=0)
bool glk_image_draw_scaled (winid_t win, const Graphics::Surface &image, uint transColor, int xp, int yp, uint width, uint height)
bool glk_image_get_info (uint image, uint *width, uint *height)
void glk_window_flow_break (winid_t win)
void glk_window_erase_rect (winid_t win, int left, int top, uint width, uint height)
void glk_window_fill_rect (winid_t win, uint color, int left, int top, uint width, uint height)
void glk_window_set_background_color (winid_t win, uint color)
schanid_t glk_schannel_create (uint rock=0)
void glk_schannel_destroy (schanid_t chan)
schanid_t glk_schannel_iterate (schanid_t chan, uint *rockptr)
uint glk_schannel_get_rock (schanid_t chan)
uint glk_schannel_play (schanid_t chan, uint snd)
uint glk_schannel_play_ext (schanid_t chan, uint snd, uint repeats, uint notify)
void glk_schannel_stop (schanid_t chan)
void glk_schannel_set_volume (schanid_t chan, uint vol)
void glk_sound_load_hint (uint snd, uint flag)
schanid_t glk_schannel_create_ext (uint rock, uint volume)
uint glk_schannel_play_multi (schanid_t *chanarray, uint chancount, uint *sndarray, uint soundcount, uint notify)
void glk_schannel_pause (schanid_t chan)
void glk_schannel_unpause (schanid_t chan)
void glk_schannel_set_volume_ext (schanid_t chan, uint vol, uint duration, uint notify)
void glk_set_hyperlink (uint linkval)
void glk_set_hyperlink_stream (strid_t str, uint linkval)
void glk_request_hyperlink_event (winid_t win)
void glk_cancel_hyperlink_event (winid_t win)
void glk_current_time (glktimeval_t *time)
int glk_current_simple_time (uint factor)
void glk_time_to_date_utc (const glktimeval_t *time, glkdate_t *date)
void glk_time_to_date_local (const glktimeval_t *time, glkdate_t *date)
void glk_simple_time_to_date_utc (int time, uint factor, glkdate_t *date)
void glk_simple_time_to_date_local (int time, uint factor, glkdate_t *date)
void glk_date_to_time_utc (const glkdate_t *date, glktimeval_t *time)
void glk_date_to_time_local (const glkdate_t *date, glktimeval_t *time)
int glk_date_to_simple_time_utc (const glkdate_t *date, uint factor)
int glk_date_to_simple_time_local (const glkdate_t *date, uint factor)
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)
 ~GlkEngine () override
bool canLoadGameStateCurrently () override
 Returns true if a savegame can be loaded. More...
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...
Common::Error loadGameState (int slot) override
 Load a savegame from a given slot. More...
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save the game to a given slot. More...
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
 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...
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
virtual void flipMute ()
 Flip mute all sound option. More...
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
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...
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
bool shouldPerformAutoSave (int lastSaveTime)
- Public Member Functions inherited from Glk::Hugo::HTokens
 HTokens ()
- Public Member Functions inherited from Glk::Hugo::StringFunctions
 StringFunctions ()
char * Left (char a[], int l)
char * Ltrim (char a[])
char * Mid (char a[], int pos, int n)
char * Right (char a[], int l)
char * Rtrim (char a[])
char * hugo_strcpy (char *s, const char *t)
char * strlwr (char *s)
char * strupr (char *s)

Private Member Functions

int EvalExpr (int p)
 The new-and-improved expression evaluator. More...
int GetVal ()
 Called by GetValue(); does the actual dirty work of returning a value from a simple data type. More...
int GetValue ()
 Does any reckoning for more sophisticated constructions. More...
int Increment (int a, char inctype)
 Actually performs the increment given below by IsIncrement. More...
char IsIncrement (long addr)
 If an increment/decrement is next up (i.e. More...
int Precedence (int t)
 Returns the precedence ranking of the operator represented by token[t]. More...
void SetupExpr ()
 Reads the current expression from the current code position into eval[], using the following key: More...
void TrimExpr (int ptr)
 Cuts off straggling components of eval[] after an expression or sub-expression has been successfully evaluated. More...
void hugo_init_screen ()
 Does whatever has to be done to initially set up the display. More...
void hugo_cleanup_screen ()
 Does whatever has to be done to clean up the display pre-termination. More...
void hugo_closefiles ()
int hugo_getkey () const
void hugo_getline (const char *prmpt)
 Gets a line of input from the keyboard, storing it in <buffer>. More...
int hugo_waitforkey ()
 Provided to be replaced by multitasking systems where cycling while waiting for a keystroke may not be such a hot idea. More...
int hugo_iskeywaiting ()
 Returns true if a keypress is waiting to be retrieved. More...
int hugo_timewait (int n)
 Waits for 1/n seconds. More...
void hugo_clearfullscreen ()
 Clears everything on the screen, moving the cursor to the top-left corner of the screen. More...
void hugo_clearwindow ()
 Clears the currently defined window, moving the cursor to the top-left corner of the window. More...
void hugo_settextmode ()
 This function does whatever is necessary to set the system up for a standard text display. More...
void hugo_settextwindow (int left, int top, int right, int bottom)
int heglk_get_linelength ()
 Specially accommodated in GetProp() While the engine thinks that the linelength is 0x7fff, this tells things like the display object the actual length. More...
int heglk_get_screenheight ()
 Similar to heglk_get_linelength(). More...
void hugo_settextpos (int x, int y)
void hugo_print (const char *a)
 Essentially the same as printf() without formatting, since printf() generally doesn't take into account color setting, font changes, windowing, etc. More...
void hugo_scrollwindowup ()
 Scroll the text window. More...
void hugo_font (int f)
 Set the font. More...
void hugo_settextcolor (int c)
 Set the foreground (print) color. More...
void hugo_setbackcolor (int c)
 Set the background color. More...
int hugo_color (int c)
 Color-setting functions should always pass the color through hugo_color() in order to properly set default fore/background colors. More...
int hugo_charwidth (char a) const
 Get the width of a character. More...
int hugo_textwidth (const char *a) const
 Return the width of a string. More...
int hugo_strlen (const char *a) const
 Return the length of a string. More...
void hugo_setgametitle (const char *t)
int hugo_hasvideo () const
int hugo_playvideo (HUGO_FILE infile, long reslength, char loop_flag, char background, int volume)
void hugo_stopvideo ()
void AP (const char *a)
 The all-purpose printing routine that takes care of word-wrapping. More...
int CallRoutine (unsigned int addr)
 Used whenever a routine is called, assumes the routine address and begins with the arguments (if any). More...
void ContextCommand ()
 Adds a command to the context command list. More...
unsigned int Dict ()
 Dynamically creates a new dictionary entry. More...
void FatalError (int n)
 Generates a fatal error. More...
void FileIO ()
void Flushpbuffer ()
void GetCommand ()
char * GetString (long addr)
 From any address <addr>; the segment must be defined prior to calling the function. More...
char * GetText (long textaddr)
 Get text block from position <textaddr> in the text bank. More...
char * GetWord (unsigned int w)
 From the dictionary table. More...
void HandleTailRecursion (long addr)
void InitGame ()
void LoadGame ()
void PassLocals (int n)
 Must be called before running every new routine, i.e. More...
unsigned char Peek (long a)
unsigned int PeekWord (long a)
void Poke (unsigned int a, unsigned char v)
void PokeWord (unsigned int a, unsigned int v)
void Printout (char *a, int no_scrollback_linebreak)
 Print to client display taking into account cursor relocation, font changes, color setting, and window scrolling. More...
void PromptMore ()
int RecordCommands ()
void SaveUndo (int a, int b, int c, int d, int e)
 Formats: More...
void SetStackFrame (int depth, int type, long brk, long returnaddr)
 Properly sets up the code_block structure for the current stack depth depending on if this is a called block (RUNROUTINE_BLOCK) or otherwise. More...
void SetupDisplay ()
char SpecialChar (const char *a, int *i)
 The method is passed as the string and <*i> as the position in the string. More...
int Undo ()
int loadres (HUGO_FILE infile, int reslen, int type)
int hugo_hasgraphics ()
int hugo_displaypicture (HUGO_FILE infile, long reslen)
void initsound ()
void initmusic ()
int hugo_playmusic (HUGO_FILE infile, long reslen, char loop_flag)
void hugo_musicvolume (int vol)
void hugo_stopmusic ()
int hugo_playsample (HUGO_FILE infile, long reslen, char loop_flag)
void hugo_samplevolume (int vol)
void hugo_stopsample ()
int Child (int obj)
int Children (int obj)
int Elder (int obj)
unsigned long GetAttributes (int obj, int attribute_set)
 Returns one of four sets of 32 attributes. More...
int GetProp (int obj, int p, int n, char s)
 Returns the value of '<obj>. More...
int GrandParent (int obj)
 Returns the value of the last object above <obj> in the tree before object 0. More...
void MoveObj (int obj, int p)
const char * Name (int obj)
int Parent (int obj)
unsigned int PropAddr (int obj, int p, unsigned int offset)
 Returns address of <obj>. More...
void PutAttributes (int obj, unsigned long a, int attribute_set)
 Writes (puts) one of four sets of 32 attributes. More...
void SetAttribute (int obj, int attr, int c)
 Set an attribute c = 1 for set, 0 for clear. More...
int Sibling (int obj)
int TestAttribute (int obj, int attr, int nattr)
int Youngest (int obj)
void AddAllObjects (int loc)
void AddObj (int obj)
 Adds the object <obj> to objlist[], making all related adjustments. More...
void AddPossibleObject (int obj, char type, unsigned int w)
 Adds <obj> as a contender to the possible object list, noting that it was referred to as either a noun or an adjective. More...
void AdvanceGrammar ()
 Move the address in the grammar table past the current token. More...
int AnyObjWord (int wn)
 For when it's only necessary to know if word[wn] is an object word for any object, not a particular object. More...
int Available (int obj, char non_grammar)
 The non_grammar argument is true when called from a non-grammar function such as RunEvents(). More...
void CallLibraryParse ()
int DomainObj (int obj)
 Takes into account the preset domain for checking an object's presence; <domain> is 0, -1, or an object number. More...
unsigned int FindWord (const char *a)
 Returns the dictionary address of . More...
int InList (int obj)
 Checks to see if <obj> is in objlist[]. More...
void KillWord (int a)
 Deletes word[a]. More...
int MatchCommand ()
 Here, briefly, is how MatchCommand() works: More...
bool MatchObject (int *wordnum)
 The argument is the word number we're starting matching on. More...
int MatchWord (int *wordnum)
int ObjWordType (int obj, unsigned int w, int type)
 Returns true if the specified object has the specified word as an adjective or noun (as specified by type). More...
int ObjWord (int obj, unsigned int w)
 Returns <adjective> if the word at dictionary address <w> is an adjective of <obj>, or <noun> if it is a noun. More...
int Parse ()
 Turns word[] into dictionary addresses stored in wd[]. More...
void ParseError (int e, int a)
void RemoveWord (int a)
 Deletes wd[a]. More...
void ResetFindObject ()
 Call FindObject(0, 0) to reset library's disambiguation mechanism. More...
void SeparateWords ()
 Splits <buffer> into the word[] array. More...
void SubtractObj (int obj)
 Removes object <obj> from objlist[], making all related adjustments. More...
void SubtractPossibleObject (int obj)
 Removes <obj> as a possible contender for object disambiguation. More...
void TryObj (int obj)
 Called by MatchObject() to see if <obj> is available, and add it to or subtract it from objlist[] accordingly. More...
int ValidObj (int obj)
 Checks first of all to see if an object is available, then checks if it meets all the qualifications demanded by the grammar syntax. More...
void DisplayPicture ()
void PlayMusic ()
void PlaySample ()
void PlayVideo ()
long FindResource (char *filename, char *resname)
 Assumes that filename/resname contain a resourcefile name and a resource name. More...
int GetResourceParameters (char *filename, char *resname, int restype)
 Processes resourcefile/filename (and resource, if applicable). More...
void RunDo ()
void RunEvents ()
void playGame ()
void RunIf (char override)
void RunInput ()
void RunMove ()
 (All the debugger range-checking is important because invalid memory writes due to invalid object location calculations are a good way to crash the system.) More...
void RunPrint ()
int RunRestart ()
int RestoreGameData ()
int RunRestore ()
void RunRoutine (long addr)
 This is the main loop for running each line of code in sequence; the main switch statement is based on the first token in each line. More...
int RunSave ()
int RunScriptSet ()
int RunString ()
 As in 'x = string(<array>, "<string>"[, maxlen]'. More...
int RunSystem ()
void SaveWindowData (SAVED_WINDOW_DATA *spw)
void RestoreWindowData (SAVED_WINDOW_DATA *spw)
void RunWindow ()
void RunSet (int gotvalue)
 If gotvalue is passed as -1, then no value has already been as the (potential) object, etc. More...
unsigned int GetAnonymousFunction (long addr)
int SetCompound (int t)
int hugo_fseek (Common::SeekableReadStream *s, long int offset, int whence)
int hugo_fseek (strid_t s, long int offset, int whence)
int hugo_fgetc (Common::SeekableReadStream *s)
int hugo_fgetc (strid_t s)
int hugo_fputc (int c, Common::WriteStream *s)
int hugo_fputc (int c, strid_t s)
char * hugo_fgets (char *buf, int max, Common::SeekableReadStream *s)
char * hugo_fgets (char *buf, int max, strid_t s)
size_t hugo_fread (void *ptr, size_t size, size_t count, Common::SeekableReadStream *s)
size_t hugo_fread (void *ptr, size_t size, size_t count, strid_t s)
int hugo_fprintf (Common::WriteStream *s, const char *fmt,...)
int hugo_fprintf (strid_t s, const char *fmt,...)
int hugo_fputs (const char *str, Common::WriteStream *s)
int hugo_fputs (const char *str, strid_t s)
bool hugo_ferror (Common::SeekableReadStream *s) const
bool hugo_ferror (strid_t s) const
long hugo_ftell (Common::SeekableReadStream *s)
long hugo_ftell (strid_t s)
int hugo_fclose (strid_t f)
void hugo_exit (const char *msg)
uint hugo_rand ()
char * itoa (int value, char *str, int base)
void * hugo_blockalloc (size_t num)
 Allocate memory block. More...
void hugo_blockfree (void *block)
int CheckinRange (uint v1, uint v2, const char *v3)
int CheckObjectRange (int obj)
 Shorthand since many of these object functions may call CheckinRange() if the debugger is running and runtime_warnings is set. More...
void DebugRunRoutine (long addr)
void RuntimeWarning (const char *msg)
void DebugMessageBox (const char *title, const char *msg)
bool IsBreakpoint (long loc) const
const char * RoutineName (long loc)
void AddStringtoCodeWindow (const char *str)
void SwitchtoDebugger ()
void Debugger ()
void UpdateDebugScreen ()
void SwitchtoGame ()
void DebuggerFatal (DEBUGGER_ERROR err)
void AddLinetoCodeWindow (int lineNum)
void RecoverLastGood ()
void SetupWatchEval (int num)
bool EvalWatch ()

Static Private Member Functions

static const char * PrintHex (long a)
 Returns as a hex-number string in XXXXXX format. More...

Private Attributes

int _savegameSlot
winid_t mainwin
winid_t currentwin
winid_t secondwin
winid_t auxwin
bool runtime_warnings
int dbnest
int address_scale
 address_scale refers to the factor by which addresses are multiplied to get the "real" address. More...
 expression components More...
int evalcount
 variables More...
int incdec
 value is being incremented/dec. More...
char getaddress
 true when finding &routine More...
char inexpr
 true when in expression More...
char inobj
 true when in object compound More...
int last_precedence
schanid_t mchannel
schanid_t schannel
long resids [2][MAXRES]
int numres [2]
char gamefile [255]
int game_version
int object_size
HUGO_FILE script
HUGO_FILE playback
HUGO_FILE record
char ioblock
char ioerror
char id [3]
char serial [9]
unsigned int codestart
unsigned int objtable
unsigned int eventtable
unsigned int proptable
unsigned int arraytable
unsigned int dicttable
unsigned int syntable
unsigned int initaddr
unsigned int mainaddr
unsigned int parseaddr
unsigned int parseerroraddr
unsigned int findobjectaddr
unsigned int endgameaddr
unsigned int speaktoaddr
unsigned int performaddr
int objects
int events
int dictcount
int syncount
char context_command [MAX_CONTEXT_COMMANDS][64]
int context_commands
unsigned char * mem
bool loaded_in_memory
unsigned int defseg
unsigned int gameseg
long codeptr
long codeend
char pbuffer [MAXBUFFER *2+1]
int currentpos
int currentline
int full
signed char def_fcolor
signed char def_bgcolor
signed char def_slfcolor
signed char def_slbgcolor
signed char fcolor
signed char bgcolor
signed char icolor
signed char default_bgcolor
int currentfont
char capital
unsigned int textto
int physical_windowwidth
int physical_windowheight
int physical_windowtop
int physical_windowleft
int physical_windowbottom
int physical_windowright
int inwindow
int charwidth
int lineheight
int current_text_x
int current_text_y
bool skipping_more
int undostack [MAXUNDO][5]
int undoptr
int undoturn
char undoinvalid
char undorecord
bool in_valid_window
int glk_fcolor
int glk_bgcolor
int mainwin_bgcolor
int glk_current_font
bool just_cleared_screen
int secondwin_bottom
int display_object
 i.e., non-existent (yet) More...
char display_needs_repaint
 for display object More...
int display_pointer_x
int display_pointer_y
char errbuf [MAXBUFFER+1]
 last invalid input More...
char line [1025]
 line buffer More...
int words
 parsed word count More...
char * word [MAXWORDS+1]
 breakdown into words More...
unsigned int wd [MAXWORDS+1]
 " " dict. entries More...
unsigned int parsed_number
 needed for numbers in input More...
signed char remaining
 multiple commands in input More...
char parseerr [MAXBUFFER+1]
 for passing to RunPrint, etc. More...
char parsestr [MAXBUFFER+1]
 for passing quoted string More...
char xverb
 flag; 0 = regular verb More...
char starts_with_verb
 input line; 0 = no verb word More...
unsigned int grammaraddr
 address in grammar More...
char * obj_parselist
 objects with noun/adjective More...
int domain
int odomain
 of object(s) More...
int objlist [MAXOBJLIST]
 for objects of verb More...
char objcount
 of objlist More...
char parse_allflag
 for "all" in MatchObject More...
pobject_structure pobjlist [MAXPOBJECTS]
 for possible objects More...
int pobjcount
 of pobjlist More...
int pobj
 last remaining suspect More...
int obj_match_state
 see MatchCommand() for details More...
char objword_cache [MAXWORDS]
 for MatchWord() xobject, etc. More...
char object_is_number
 number used in player command More...
unsigned int objgrammar
 for 2nd pass More...
int objstart
 " " " More...
int objfinish
 " " " More...
bool addflag
 true if adding to objlist[] More...
int speaking
 if command is addressed to obj. More...
char oops [MAXBUFFER+1]
 illegal word More...
int oopscount
char parse_called_twice
char reparse_everything
char punc_string [64]
 punctuation string More...
byte full_buffer
char recursive_call
 to MatchObject() Necessary for proper disambiguation when addressing a character; i.e., when 'held' doesn't refer to held by the player, etc. More...
int parse_location
 usually var[location] More...
HUGO_FILE resource_file
int extra_param
char loaded_filename [MAX_RES_PATH]
char loaded_resname [MAX_RES_PATH]
char resource_type
int passlocal [MAXLOCALS]
 locals passed to routine More...
int arguments_passed
 when calling routine More...
int ret
 return value and returning flag More...
char retflag
bool during_player_input
char override_full
bool game_reset
 for restore, undo, etc. More...
int stack_depth
int tail_recursion
long tail_recursion_addr
int last_window_top
int last_window_bottom
int last_window_left
int last_window_right
int lowest_windowbottom
 in text lines More...
int physical_lowest_windowbottom
 in pixels or text lines More...
bool just_left_window
char game_title [MAX_GAME_TITLE]
char arrexpr
 true when assigning array More...
char multiprop
 true in multiple prop. assign. More...
int set_value
char debug_line [MAX_DEBUG_LINE]
bool debug_eval
bool debug_eval_error
bool debugger_step_over
bool debugger_finish
bool debugger_run
bool debugger_interrupt
bool debugger_skip
bool runtime_error
uint currentroutine
bool complex_prop_breakpoint
bool trace_complex_prop_routine
char * objectname [MAX_OBJECT]
char * propertyname [MAX_PROPERTY]
int routines
int properties
WINDOW window [9]
int codeline [9][100]
char localname [9][100]
int current_locals
long this_codeptr
int debug_workspace
int attributes
int original_dictcount
int buffered_code_lines
bool debugger_has_stepped_back
bool debugger_step_back
int debugger_collapsing
int runaway_counter
int history_count
int active_screen
int step_nest
int code_history [MAX_CODE_HISTORY]
int dbnest_history [MAX_CODE_HISTORY]
int history_last

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 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 MetaEnginegetMetaEngine ()
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
- Public Attributes inherited from Glk::GlkEngine
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
- Static Public Attributes inherited from Glk::Hugo::HTokens
static const char *const token []
static int token_hash []
- Protected Member Functions inherited from Glk::GlkEngine
Common::Error run () override
 Init the engine and start its main loop. More...
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...
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
- Protected Attributes inherited from Glk::GlkEngine
const GlkGameDescription _gameDescription
Common::RandomSource _random
int _loadSaveSlot
Common::File _gameFile
bool _quitFlag
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Hugo game interpreter.

Definition at line 42 of file hugo.h.

Constructor & Destructor Documentation

◆ Hugo()

Glk::Hugo::Hugo::Hugo ( OSystem syst,
const GlkGameDescription gameDesc 


Definition at line 29 of file hugo.cpp.

Member Function Documentation

◆ AddLinetoCodeWindow()

void Glk::Hugo::Hugo::AddLinetoCodeWindow ( int  lineNum)

Definition at line 1171 of file hugo.h.

◆ AddStringtoCodeWindow()

void Glk::Hugo::Hugo::AddStringtoCodeWindow ( const char *  str)

Definition at line 1159 of file hugo.h.

◆ CheckinRange()

int Glk::Hugo::Hugo::CheckinRange ( uint  v1,
uint  v2,
const char *  v3 

Definition at line 1141 of file hugo.h.

◆ CheckObjectRange()

int Glk::Hugo::Hugo::CheckObjectRange ( int  obj)

Shorthand since many of these object functions may call CheckinRange() if the debugger is running and runtime_warnings is set.

Definition at line 30 of file heobject.cpp.

◆ Debugger()

void Glk::Hugo::Hugo::Debugger ( )

Definition at line 1163 of file hugo.h.

◆ DebuggerFatal()

void Glk::Hugo::Hugo::DebuggerFatal ( DEBUGGER_ERROR  err)

Definition at line 1169 of file hugo.h.

◆ DebugMessageBox()

void Glk::Hugo::Hugo::DebugMessageBox ( const char *  title,
const char *  msg 

Definition at line 1153 of file hugo.h.

◆ DebugRunRoutine()

void Glk::Hugo::Hugo::DebugRunRoutine ( long  addr)

Definition at line 1149 of file hugo.h.

◆ EvalWatch()

bool Glk::Hugo::Hugo::EvalWatch ( )

Definition at line 1177 of file hugo.h.

◆ getInterpreterType()

InterpreterType Glk::Hugo::Hugo::getInterpreterType ( ) const

Returns the running interpreter type.

Implements Glk::GlkEngine.

Definition at line 1193 of file hugo.h.

◆ hugo_blockalloc()

void* Glk::Hugo::Hugo::hugo_blockalloc ( size_t  num)

Allocate memory block.

Definition at line 1136 of file hugo.h.

◆ hugo_blockfree()

void Glk::Hugo::Hugo::hugo_blockfree ( void *  block)

Definition at line 1138 of file hugo.h.

◆ IsBreakpoint()

bool Glk::Hugo::Hugo::IsBreakpoint ( long  loc) const

Definition at line 1155 of file hugo.h.

◆ readSaveData()

Common::Error Glk::Hugo::Hugo::readSaveData ( Common::SeekableReadStream rs)

Load a savegame from the passed Quetzal file chunk stream.

Implements Glk::GlkEngine.

Definition at line 157 of file hugo.cpp.

◆ RecoverLastGood()

void Glk::Hugo::Hugo::RecoverLastGood ( )

Definition at line 1173 of file hugo.h.

◆ RoutineName()

const char* Glk::Hugo::Hugo::RoutineName ( long  loc)

Definition at line 1157 of file hugo.h.

◆ runGame()

void Glk::Hugo::Hugo::runGame ( )

Run the game.

Implements Glk::GlkEngine.

◆ RuntimeWarning()

void Glk::Hugo::Hugo::RuntimeWarning ( const char *  msg)

Definition at line 1151 of file hugo.h.

◆ SetupWatchEval()

void Glk::Hugo::Hugo::SetupWatchEval ( int  num)

Definition at line 1175 of file hugo.h.

◆ SwitchtoDebugger()

void Glk::Hugo::Hugo::SwitchtoDebugger ( )

Definition at line 1161 of file hugo.h.

◆ SwitchtoGame()

void Glk::Hugo::Hugo::SwitchtoGame ( )

Definition at line 1167 of file hugo.h.

◆ UpdateDebugScreen()

void Glk::Hugo::Hugo::UpdateDebugScreen ( )

Definition at line 1165 of file hugo.h.

◆ writeGameData()

Common::Error Glk::Hugo::Hugo::writeGameData ( Common::WriteStream ws)

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 244 of file hugo.cpp.

Member Data Documentation

◆ _savegameSlot

int Glk::Hugo::Hugo::_savegameSlot

Definition at line 44 of file hugo.h.

◆ active_screen

int Glk::Hugo::Hugo::active_screen

Definition at line 261 of file hugo.h.

◆ addflag

bool Glk::Hugo::Hugo::addflag

true if adding to objlist[]

Definition at line 177 of file hugo.h.

◆ address_scale

int Glk::Hugo::Hugo::address_scale

address_scale refers to the factor by which addresses are multiplied to get the "real" address.

In this way, a 16-bit integer can reference 64K * 16 = 1024K of memory.

Definition at line 55 of file hugo.h.

◆ arguments_passed

int Glk::Hugo::Hugo::arguments_passed

when calling routine

Definition at line 205 of file hugo.h.

◆ arraytable

unsigned int Glk::Hugo::Hugo::arraytable

Definition at line 89 of file hugo.h.

◆ arrexpr

char Glk::Hugo::Hugo::arrexpr

true when assigning array

Definition at line 225 of file hugo.h.

◆ attributes

int Glk::Hugo::Hugo::attributes

Definition at line 253 of file hugo.h.

◆ auxwin

winid_t Glk::Hugo::Hugo::auxwin

Definition at line 46 of file hugo.h.

◆ bgcolor

signed char Glk::Hugo::Hugo::bgcolor

Definition at line 117 of file hugo.h.

◆ breakpoint

BREAKPOINT Glk::Hugo::Hugo::breakpoint[MAXBREAKPOINTS]

Definition at line 263 of file hugo.h.

◆ buffer

char Glk::Hugo::Hugo::buffer[MAXBUFFER+MAXWORDS]

Definition at line 148 of file hugo.h.

◆ buffered_code_lines

int Glk::Hugo::Hugo::buffered_code_lines

Definition at line 255 of file hugo.h.

◆ call

CALL Glk::Hugo::Hugo::call[MAXCALLS]

Definition at line 244 of file hugo.h.

◆ capital

char Glk::Hugo::Hugo::capital

Definition at line 119 of file hugo.h.

◆ charwidth

int Glk::Hugo::Hugo::charwidth

Definition at line 126 of file hugo.h.

◆ code_block

CODE_BLOCK Glk::Hugo::Hugo::code_block[MAXSTACKDEPTH]

Definition at line 212 of file hugo.h.

◆ code_history

int Glk::Hugo::Hugo::code_history[MAX_CODE_HISTORY]

Definition at line 265 of file hugo.h.

◆ codeend

long Glk::Hugo::Hugo::codeend

Definition at line 111 of file hugo.h.

◆ codeline

int Glk::Hugo::Hugo::codeline[9][100]

Definition at line 248 of file hugo.h.

◆ codeptr

long Glk::Hugo::Hugo::codeptr

Definition at line 110 of file hugo.h.

◆ codestart

unsigned int Glk::Hugo::Hugo::codestart

Definition at line 85 of file hugo.h.

◆ complex_prop_breakpoint

bool Glk::Hugo::Hugo::complex_prop_breakpoint

Definition at line 240 of file hugo.h.

◆ context_command

char Glk::Hugo::Hugo::context_command[MAX_CONTEXT_COMMANDS][64]

Definition at line 104 of file hugo.h.

◆ context_commands

int Glk::Hugo::Hugo::context_commands

Definition at line 105 of file hugo.h.

◆ current_locals

int Glk::Hugo::Hugo::current_locals

Definition at line 250 of file hugo.h.

◆ current_text_x

int Glk::Hugo::Hugo::current_text_x

Definition at line 127 of file hugo.h.

◆ current_text_y

int Glk::Hugo::Hugo::current_text_y

Definition at line 127 of file hugo.h.

◆ currentfont

int Glk::Hugo::Hugo::currentfont

Definition at line 118 of file hugo.h.

◆ currentline

int Glk::Hugo::Hugo::currentline

Definition at line 114 of file hugo.h.

◆ currentpos

int Glk::Hugo::Hugo::currentpos

Definition at line 113 of file hugo.h.

◆ currentroutine

uint Glk::Hugo::Hugo::currentroutine

Definition at line 239 of file hugo.h.

◆ currentwin

winid_t Glk::Hugo::Hugo::currentwin

Definition at line 45 of file hugo.h.

◆ dbnest

int Glk::Hugo::Hugo::dbnest

Definition at line 48 of file hugo.h.

◆ dbnest_history

int Glk::Hugo::Hugo::dbnest_history[MAX_CODE_HISTORY]

Definition at line 266 of file hugo.h.

◆ debug_eval

bool Glk::Hugo::Hugo::debug_eval

Definition at line 231 of file hugo.h.

◆ debug_eval_error

bool Glk::Hugo::Hugo::debug_eval_error

Definition at line 232 of file hugo.h.

◆ debug_line

char Glk::Hugo::Hugo::debug_line[MAX_DEBUG_LINE]

Definition at line 230 of file hugo.h.

◆ debug_workspace

int Glk::Hugo::Hugo::debug_workspace

Definition at line 252 of file hugo.h.

◆ debugger_collapsing

int Glk::Hugo::Hugo::debugger_collapsing

Definition at line 258 of file hugo.h.

◆ debugger_finish

bool Glk::Hugo::Hugo::debugger_finish

Definition at line 234 of file hugo.h.

◆ debugger_has_stepped_back

bool Glk::Hugo::Hugo::debugger_has_stepped_back

Definition at line 256 of file hugo.h.

◆ debugger_interrupt

bool Glk::Hugo::Hugo::debugger_interrupt

Definition at line 236 of file hugo.h.

◆ debugger_run

bool Glk::Hugo::Hugo::debugger_run

Definition at line 235 of file hugo.h.

◆ debugger_skip

bool Glk::Hugo::Hugo::debugger_skip

Definition at line 237 of file hugo.h.

◆ debugger_step_back

bool Glk::Hugo::Hugo::debugger_step_back

Definition at line 257 of file hugo.h.

◆ debugger_step_over

bool Glk::Hugo::Hugo::debugger_step_over

Definition at line 233 of file hugo.h.

◆ def_bgcolor

signed char Glk::Hugo::Hugo::def_bgcolor

Definition at line 116 of file hugo.h.

◆ def_fcolor

signed char Glk::Hugo::Hugo::def_fcolor

Definition at line 116 of file hugo.h.

◆ def_slbgcolor

signed char Glk::Hugo::Hugo::def_slbgcolor

Definition at line 116 of file hugo.h.

◆ def_slfcolor

signed char Glk::Hugo::Hugo::def_slfcolor

Definition at line 116 of file hugo.h.

◆ default_bgcolor

signed char Glk::Hugo::Hugo::default_bgcolor

Definition at line 117 of file hugo.h.

◆ defseg

unsigned int Glk::Hugo::Hugo::defseg

Definition at line 108 of file hugo.h.

◆ dictcount

int Glk::Hugo::Hugo::dictcount

Definition at line 102 of file hugo.h.

◆ dicttable

unsigned int Glk::Hugo::Hugo::dicttable

Definition at line 90 of file hugo.h.

◆ display_needs_repaint

char Glk::Hugo::Hugo::display_needs_repaint

for display object

Definition at line 144 of file hugo.h.

◆ display_object

int Glk::Hugo::Hugo::display_object

i.e., non-existent (yet)

Definition at line 143 of file hugo.h.

◆ display_pointer_x

int Glk::Hugo::Hugo::display_pointer_x

Definition at line 145 of file hugo.h.

◆ display_pointer_y

int Glk::Hugo::Hugo::display_pointer_y

Definition at line 145 of file hugo.h.

◆ domain

int Glk::Hugo::Hugo::domain

Definition at line 164 of file hugo.h.

◆ during_player_input

bool Glk::Hugo::Hugo::during_player_input

Definition at line 208 of file hugo.h.

◆ endgameaddr

unsigned int Glk::Hugo::Hugo::endgameaddr

Definition at line 97 of file hugo.h.

◆ errbuf

char Glk::Hugo::Hugo::errbuf[MAXBUFFER+1]

last invalid input

Definition at line 149 of file hugo.h.

◆ eval

int Glk::Hugo::Hugo::eval[MAX_EVAL_ELEMENTS]

expression components

Definition at line 58 of file hugo.h.

◆ evalcount

int Glk::Hugo::Hugo::evalcount

of expr. components

Definition at line 59 of file hugo.h.

◆ events

int Glk::Hugo::Hugo::events

Definition at line 101 of file hugo.h.

◆ eventtable

unsigned int Glk::Hugo::Hugo::eventtable

Definition at line 87 of file hugo.h.

◆ extra_param

int Glk::Hugo::Hugo::extra_param

Definition at line 198 of file hugo.h.

◆ fcolor

signed char Glk::Hugo::Hugo::fcolor

Definition at line 117 of file hugo.h.

◆ findobjectaddr

unsigned int Glk::Hugo::Hugo::findobjectaddr

Definition at line 96 of file hugo.h.


int Glk::Hugo::Hugo::FIXEDCHARWIDTH

Definition at line 126 of file hugo.h.


int Glk::Hugo::Hugo::FIXEDLINEHEIGHT

Definition at line 126 of file hugo.h.

◆ full

int Glk::Hugo::Hugo::full

Definition at line 115 of file hugo.h.

◆ full_buffer

byte Glk::Hugo::Hugo::full_buffer

Definition at line 186 of file hugo.h.

◆ game

Common::SeekableReadStream* Glk::Hugo::Hugo::game

Definition at line 77 of file hugo.h.

◆ game_reset

bool Glk::Hugo::Hugo::game_reset

for restore, undo, etc.

Definition at line 210 of file hugo.h.

◆ game_title

char Glk::Hugo::Hugo::game_title[MAX_GAME_TITLE]

Definition at line 224 of file hugo.h.

◆ game_version

int Glk::Hugo::Hugo::game_version

Definition at line 75 of file hugo.h.

◆ gamefile

char Glk::Hugo::Hugo::gamefile[255]

Definition at line 74 of file hugo.h.

◆ gameseg

unsigned int Glk::Hugo::Hugo::gameseg

Definition at line 109 of file hugo.h.

◆ getaddress

char Glk::Hugo::Hugo::getaddress

true when finding &routine

Definition at line 62 of file hugo.h.

◆ glk_bgcolor

int Glk::Hugo::Hugo::glk_bgcolor

Definition at line 136 of file hugo.h.

◆ glk_current_font

int Glk::Hugo::Hugo::glk_current_font

Definition at line 138 of file hugo.h.

◆ glk_fcolor

int Glk::Hugo::Hugo::glk_fcolor

Definition at line 136 of file hugo.h.

◆ grammaraddr

unsigned int Glk::Hugo::Hugo::grammaraddr

address in grammar

Definition at line 162 of file hugo.h.

◆ history_count

int Glk::Hugo::Hugo::history_count

Definition at line 260 of file hugo.h.

◆ history_last

int Glk::Hugo::Hugo::history_last

Definition at line 267 of file hugo.h.

◆ icolor

signed char Glk::Hugo::Hugo::icolor

Definition at line 117 of file hugo.h.

◆ id

char Glk::Hugo::Hugo::id[3]

Definition at line 83 of file hugo.h.

◆ in_valid_window

bool Glk::Hugo::Hugo::in_valid_window

Definition at line 135 of file hugo.h.

◆ incdec

int Glk::Hugo::Hugo::incdec

value is being incremented/dec.

Definition at line 61 of file hugo.h.

◆ inexpr

char Glk::Hugo::Hugo::inexpr

true when in expression

Definition at line 63 of file hugo.h.

◆ initaddr

unsigned int Glk::Hugo::Hugo::initaddr

Definition at line 92 of file hugo.h.

◆ inobj

char Glk::Hugo::Hugo::inobj

true when in object compound

Definition at line 64 of file hugo.h.

◆ inwindow

int Glk::Hugo::Hugo::inwindow

Definition at line 125 of file hugo.h.

◆ io

HUGO_FILE Glk::Hugo::Hugo::io

Definition at line 81 of file hugo.h.

◆ ioblock

char Glk::Hugo::Hugo::ioblock

Definition at line 81 of file hugo.h.

◆ ioerror

char Glk::Hugo::Hugo::ioerror

Definition at line 81 of file hugo.h.

◆ just_cleared_screen

bool Glk::Hugo::Hugo::just_cleared_screen

Definition at line 139 of file hugo.h.

◆ just_left_window

bool Glk::Hugo::Hugo::just_left_window

Definition at line 221 of file hugo.h.

◆ last_precedence

int Glk::Hugo::Hugo::last_precedence

Definition at line 65 of file hugo.h.

◆ last_window_bottom

int Glk::Hugo::Hugo::last_window_bottom

Definition at line 218 of file hugo.h.

◆ last_window_left

int Glk::Hugo::Hugo::last_window_left

Definition at line 218 of file hugo.h.

◆ last_window_right

int Glk::Hugo::Hugo::last_window_right

Definition at line 218 of file hugo.h.

◆ last_window_top

int Glk::Hugo::Hugo::last_window_top

Definition at line 218 of file hugo.h.

◆ line

char Glk::Hugo::Hugo::line[1025]

line buffer

Definition at line 150 of file hugo.h.

◆ lineheight

int Glk::Hugo::Hugo::lineheight

Definition at line 126 of file hugo.h.

◆ loaded_filename

char Glk::Hugo::Hugo::loaded_filename[MAX_RES_PATH]

Definition at line 199 of file hugo.h.

◆ loaded_in_memory

bool Glk::Hugo::Hugo::loaded_in_memory

Definition at line 107 of file hugo.h.

◆ loaded_resname

char Glk::Hugo::Hugo::loaded_resname[MAX_RES_PATH]

Definition at line 200 of file hugo.h.

◆ localname

char Glk::Hugo::Hugo::localname[9][100]

Definition at line 249 of file hugo.h.

◆ lowest_windowbottom

int Glk::Hugo::Hugo::lowest_windowbottom

in text lines

Definition at line 219 of file hugo.h.

◆ mainaddr

unsigned int Glk::Hugo::Hugo::mainaddr

Definition at line 93 of file hugo.h.

◆ mainwin

winid_t Glk::Hugo::Hugo::mainwin

Definition at line 45 of file hugo.h.

◆ mainwin_bgcolor

int Glk::Hugo::Hugo::mainwin_bgcolor

Definition at line 137 of file hugo.h.

◆ mchannel

schanid_t Glk::Hugo::Hugo::mchannel

Definition at line 68 of file hugo.h.

◆ mem

unsigned char* Glk::Hugo::Hugo::mem

Definition at line 106 of file hugo.h.

◆ multiprop

char Glk::Hugo::Hugo::multiprop

true in multiple prop. assign.

Definition at line 226 of file hugo.h.

◆ numres

int Glk::Hugo::Hugo::numres[2]

Definition at line 71 of file hugo.h.

◆ obj_match_state

int Glk::Hugo::Hugo::obj_match_state

see MatchCommand() for details

Definition at line 171 of file hugo.h.

◆ obj_parselist

char* Glk::Hugo::Hugo::obj_parselist

objects with noun/adjective

Definition at line 163 of file hugo.h.

◆ objcount

char Glk::Hugo::Hugo::objcount

of objlist

Definition at line 166 of file hugo.h.

◆ object_is_number

char Glk::Hugo::Hugo::object_is_number

number used in player command

Definition at line 173 of file hugo.h.

◆ object_size

int Glk::Hugo::Hugo::object_size

Definition at line 76 of file hugo.h.

◆ objectname

char* Glk::Hugo::Hugo::objectname[MAX_OBJECT]

Definition at line 242 of file hugo.h.

◆ objects

int Glk::Hugo::Hugo::objects

Definition at line 100 of file hugo.h.

◆ objfinish

int Glk::Hugo::Hugo::objfinish

" " "

Definition at line 176 of file hugo.h.

◆ objgrammar

unsigned int Glk::Hugo::Hugo::objgrammar

for 2nd pass

Definition at line 174 of file hugo.h.

◆ objlist

int Glk::Hugo::Hugo::objlist[MAXOBJLIST]

for objects of verb

Definition at line 165 of file hugo.h.

◆ objstart

int Glk::Hugo::Hugo::objstart

" " "

Definition at line 175 of file hugo.h.

◆ objtable

unsigned int Glk::Hugo::Hugo::objtable

Definition at line 86 of file hugo.h.

◆ objword_cache

char Glk::Hugo::Hugo::objword_cache[MAXWORDS]

for MatchWord() xobject, etc.

Definition at line 172 of file hugo.h.

◆ odomain

int Glk::Hugo::Hugo::odomain

of object(s)

Definition at line 164 of file hugo.h.

◆ oops

char Glk::Hugo::Hugo::oops[MAXBUFFER+1]

illegal word

Definition at line 180 of file hugo.h.

◆ oopscount

int Glk::Hugo::Hugo::oopscount

of corrections in a row

Definition at line 181 of file hugo.h.

◆ original_dictcount

int Glk::Hugo::Hugo::original_dictcount

Definition at line 254 of file hugo.h.

◆ override_full

char Glk::Hugo::Hugo::override_full

Definition at line 209 of file hugo.h.

◆ parse_allflag

char Glk::Hugo::Hugo::parse_allflag

for "all" in MatchObject

Definition at line 167 of file hugo.h.

◆ parse_called_twice

char Glk::Hugo::Hugo::parse_called_twice

Definition at line 183 of file hugo.h.

◆ parse_location

int Glk::Hugo::Hugo::parse_location

usually var[location]

Definition at line 194 of file hugo.h.

◆ parseaddr

unsigned int Glk::Hugo::Hugo::parseaddr

Definition at line 94 of file hugo.h.

◆ parsed_number

unsigned int Glk::Hugo::Hugo::parsed_number

needed for numbers in input

Definition at line 155 of file hugo.h.

◆ parseerr

char Glk::Hugo::Hugo::parseerr[MAXBUFFER+1]

for passing to RunPrint, etc.

Definition at line 158 of file hugo.h.

◆ parseerroraddr

unsigned int Glk::Hugo::Hugo::parseerroraddr

Definition at line 95 of file hugo.h.

◆ parsestr

char Glk::Hugo::Hugo::parsestr[MAXBUFFER+1]

for passing quoted string

Definition at line 159 of file hugo.h.

◆ passlocal

int Glk::Hugo::Hugo::passlocal[MAXLOCALS]

locals passed to routine

Definition at line 204 of file hugo.h.

◆ pbuffer

char Glk::Hugo::Hugo::pbuffer[MAXBUFFER *2+1]

Definition at line 112 of file hugo.h.

◆ performaddr

unsigned int Glk::Hugo::Hugo::performaddr

Definition at line 99 of file hugo.h.

◆ physical_lowest_windowbottom

int Glk::Hugo::Hugo::physical_lowest_windowbottom

in pixels or text lines

Definition at line 219 of file hugo.h.

◆ physical_windowbottom

int Glk::Hugo::Hugo::physical_windowbottom

Definition at line 122 of file hugo.h.

◆ physical_windowheight

int Glk::Hugo::Hugo::physical_windowheight

Definition at line 122 of file hugo.h.

◆ physical_windowleft

int Glk::Hugo::Hugo::physical_windowleft

Definition at line 122 of file hugo.h.

◆ physical_windowright

int Glk::Hugo::Hugo::physical_windowright

Definition at line 122 of file hugo.h.

◆ physical_windowtop

int Glk::Hugo::Hugo::physical_windowtop

Definition at line 122 of file hugo.h.

◆ physical_windowwidth

int Glk::Hugo::Hugo::physical_windowwidth

Definition at line 122 of file hugo.h.

◆ playback

HUGO_FILE Glk::Hugo::Hugo::playback

Definition at line 79 of file hugo.h.

◆ pobj

int Glk::Hugo::Hugo::pobj

last remaining suspect

Definition at line 170 of file hugo.h.

◆ pobjcount

int Glk::Hugo::Hugo::pobjcount

of pobjlist

Definition at line 169 of file hugo.h.

◆ pobjlist

pobject_structure Glk::Hugo::Hugo::pobjlist[MAXPOBJECTS]

for possible objects

Definition at line 168 of file hugo.h.

◆ properties

int Glk::Hugo::Hugo::properties

Definition at line 246 of file hugo.h.

◆ propertyname

char* Glk::Hugo::Hugo::propertyname[MAX_PROPERTY]

Definition at line 243 of file hugo.h.

◆ proptable

unsigned int Glk::Hugo::Hugo::proptable

Definition at line 88 of file hugo.h.

◆ punc_string

char Glk::Hugo::Hugo::punc_string[64]

punctuation string

Definition at line 185 of file hugo.h.

◆ record

HUGO_FILE Glk::Hugo::Hugo::record

Definition at line 80 of file hugo.h.

◆ recursive_call

char Glk::Hugo::Hugo::recursive_call

to MatchObject() Necessary for proper disambiguation when addressing a character; i.e., when 'held' doesn't refer to held by the player, etc.

Definition at line 193 of file hugo.h.

◆ remaining

signed char Glk::Hugo::Hugo::remaining

multiple commands in input

Definition at line 157 of file hugo.h.

◆ reparse_everything

char Glk::Hugo::Hugo::reparse_everything

Definition at line 184 of file hugo.h.

◆ resids

long Glk::Hugo::Hugo::resids[2][MAXRES]

Definition at line 70 of file hugo.h.

◆ resource_file

HUGO_FILE Glk::Hugo::Hugo::resource_file

Definition at line 197 of file hugo.h.

◆ resource_type

char Glk::Hugo::Hugo::resource_type

Definition at line 201 of file hugo.h.

◆ ret

int Glk::Hugo::Hugo::ret

return value and returning flag

Definition at line 206 of file hugo.h.

◆ retflag

char Glk::Hugo::Hugo::retflag

Definition at line 207 of file hugo.h.

◆ routines

int Glk::Hugo::Hugo::routines

Definition at line 245 of file hugo.h.

◆ runaway_counter

int Glk::Hugo::Hugo::runaway_counter

Definition at line 259 of file hugo.h.

◆ runtime_error

bool Glk::Hugo::Hugo::runtime_error

Definition at line 238 of file hugo.h.

◆ runtime_warnings

bool Glk::Hugo::Hugo::runtime_warnings

Definition at line 47 of file hugo.h.

◆ schannel

schanid_t Glk::Hugo::Hugo::schannel

Definition at line 69 of file hugo.h.


int Glk::Hugo::Hugo::SCREENHEIGHT

Definition at line 121 of file hugo.h.


int Glk::Hugo::Hugo::SCREENWIDTH

Definition at line 121 of file hugo.h.

◆ script

HUGO_FILE Glk::Hugo::Hugo::script

Definition at line 78 of file hugo.h.

◆ secondwin

winid_t Glk::Hugo::Hugo::secondwin

Definition at line 46 of file hugo.h.

◆ secondwin_bottom

int Glk::Hugo::Hugo::secondwin_bottom

Definition at line 140 of file hugo.h.

◆ serial

char Glk::Hugo::Hugo::serial[9]

Definition at line 84 of file hugo.h.

◆ set_value

int Glk::Hugo::Hugo::set_value

Definition at line 227 of file hugo.h.

◆ skipping_more

bool Glk::Hugo::Hugo::skipping_more

Definition at line 128 of file hugo.h.

◆ speaking

int Glk::Hugo::Hugo::speaking

if command is addressed to obj.

Definition at line 178 of file hugo.h.

◆ speaktoaddr

unsigned int Glk::Hugo::Hugo::speaktoaddr

Definition at line 98 of file hugo.h.

◆ stack_depth

int Glk::Hugo::Hugo::stack_depth

Definition at line 213 of file hugo.h.

◆ starts_with_verb

char Glk::Hugo::Hugo::starts_with_verb

input line; 0 = no verb word

Definition at line 161 of file hugo.h.

◆ step_nest

int Glk::Hugo::Hugo::step_nest

Definition at line 262 of file hugo.h.

◆ syncount

int Glk::Hugo::Hugo::syncount

Definition at line 103 of file hugo.h.

◆ syntable

unsigned int Glk::Hugo::Hugo::syntable

Definition at line 91 of file hugo.h.

◆ tail_recursion

int Glk::Hugo::Hugo::tail_recursion

Definition at line 214 of file hugo.h.

◆ tail_recursion_addr

long Glk::Hugo::Hugo::tail_recursion_addr

Definition at line 215 of file hugo.h.

◆ textto

unsigned int Glk::Hugo::Hugo::textto

Definition at line 120 of file hugo.h.

◆ this_codeptr

long Glk::Hugo::Hugo::this_codeptr

Definition at line 251 of file hugo.h.

◆ trace_complex_prop_routine

bool Glk::Hugo::Hugo::trace_complex_prop_routine

Definition at line 241 of file hugo.h.

◆ undoinvalid

char Glk::Hugo::Hugo::undoinvalid

Definition at line 132 of file hugo.h.

◆ undoptr

int Glk::Hugo::Hugo::undoptr

Definition at line 130 of file hugo.h.

◆ undorecord

char Glk::Hugo::Hugo::undorecord

Definition at line 133 of file hugo.h.

◆ undostack

int Glk::Hugo::Hugo::undostack[MAXUNDO][5]

Definition at line 129 of file hugo.h.

◆ undoturn

int Glk::Hugo::Hugo::undoturn

Definition at line 131 of file hugo.h.

◆ var

int Glk::Hugo::Hugo::var[MAXLOCALS+MAXGLOBALS]


Definition at line 60 of file hugo.h.

◆ watch


Definition at line 264 of file hugo.h.

◆ wd

unsigned int Glk::Hugo::Hugo::wd[MAXWORDS+1]

" " dict. entries

Definition at line 154 of file hugo.h.

◆ window

WINDOW Glk::Hugo::Hugo::window[9]

Definition at line 247 of file hugo.h.

◆ word

char* Glk::Hugo::Hugo::word[MAXWORDS+1]

breakdown into words

Definition at line 153 of file hugo.h.

◆ words

int Glk::Hugo::Hugo::words

parsed word count

Definition at line 152 of file hugo.h.

◆ xverb

char Glk::Hugo::Hugo::xverb

flag; 0 = regular verb

Definition at line 160 of file hugo.h.

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