ScummVM API documentation
M4 Namespace Reference

Classes

struct  ADVScale_Globals
 
struct  Anim8
 
struct  assign_chunk
 
struct  Buffer
 
struct  ButtonDrawRec
 
struct  c_assign_chunk
 
struct  c_goto_chunk
 
struct  c_misc_chunk
 
struct  c_reply_chunk
 
struct  Catalog
 
struct  CCB
 
class  Console
 
struct  Conv
 
struct  conv_chunk
 
struct  ConvDisplayData
 
struct  Converstation_Globals
 
struct  cruncher
 
struct  DBGSequSR
 
struct  DBGWatch
 
struct  decl_chunk
 
struct  Dialog
 
struct  Dialog_Globals
 
struct  DrawRequest
 
struct  DrawRequestX
 
struct  entry_chunk
 
struct  EOSreq
 
struct  Events
 
struct  fall_chunk
 
struct  Font
 
struct  GameControl
 
struct  globalMsgReq
 
struct  goto_chunk
 
class  GrBuff
 
struct  Hag_Name_Record
 
struct  Hag_Record
 
struct  Hag_Statics
 
struct  Hash_Record
 
struct  Hotkey
 
struct  Hotkeys
 
struct  HotSpotRec
 
class  Interface
 
struct  InventoryBase
 
struct  InvObj
 
class  InvPal
 
struct  Item
 
struct  Item_Globals
 
struct  Kernel
 
struct  KernelPal_Globals
 
struct  ListItem
 
struct  lnode_chunk
 
class  M4Engine
 
struct  M4GameDescription
 
struct  M4Rect
 
struct  M4sprite
 
class  M4Surface
 
struct  machine
 
struct  matte
 
struct  mesg_chunk
 
struct  misc_chunk
 
struct  Mouse_Globals
 
struct  MouseDriverInfo
 
struct  MouseInfo
 
struct  msgRequest
 
struct  node_chunk
 
struct  noWalkRect
 
struct  onTimeReq
 
struct  pathNode
 
struct  Player
 
struct  PlayerInfo
 
struct  railNode
 
struct  Rails_Globals
 
struct  RectList
 
struct  Rend_Globals
 
struct  RendCell
 
struct  RendGrBuff
 
struct  reply_chunk
 
class  Resources
 
struct  RGB8
 
struct  RGBcolor
 
class  Room
 
struct  Scene_list
 
struct  SceneDef
 
struct  ScreenContext
 
class  Section
 
class  Sections
 
struct  Series
 
class  StreamFile
 
class  StringArray
 
struct  strmRequest
 
class  SysFile
 
class  Term
 
struct  text_chunk
 
struct  TextItem
 
struct  TextScrn
 
struct  token
 
struct  transSprite
 
struct  tree
 
struct  treeclass
 
struct  Triggers
 
class  Vars
 
struct  w_entry_chunk
 
struct  w_reply_chunk
 
class  Walker
 
struct  WS_Globals
 
struct  WSCruncher_Globals
 
struct  WSHal_Globals
 
struct  WSLoad_Globals
 
struct  WSMachine_Globals
 
struct  WSTimer_Globals
 

Typedefs

typedef char * StrngPtr
 
typedef uint32 RenderResult
 
typedef RenderResult(* RenderFunc) ()
 
typedef void(* RefreshFunc) (void *myScreen, void *theRectList, void *destBuffer, int32 destX, int32 destY)
 
typedef void(* HotkeyCB) (void *myParam, void *myContent)
 
typedef bool(* EventHandler) (void *scrnContent, int32 eventType, int32 parm1, int32 parm2, int32 parm3, bool *currScreen)
 
typedef void * Ptr
 
typedef void * Handle
 
typedef intptr frac16
 
typedef uint32 ulong
 
typedef uint32 quadchar
 
typedef uint32 trigraph
 
typedef byte Bit
 
typedef byte Bool
 
typedef byte boolean
 
typedef byte Boolean
 
typedef byte byte
 
typedef byte Byte
 
typedef uint16 word
 
typedef uint16 Word
 
typedef uint32 DWord
 
typedef void(* FuncPtr) ()
 
typedef bool(* FuncPtr_b_l) (int32)
 
typedef void(* FuncPtr_v_vv) (void *, void *)
 
typedef FuncPtr_b_l ExceptionPtr
 
typedef FuncPtr_v_vv M4CALLBACK
 
typedef void ** MemHandle
 
typedef int32 Size
 
typedef void(* MessageCB) (frac16 myMessage, struct machine *sender)
 

Enumerations

enum  {
  INSTALL_SOUND_DRIVERS = 1, INSTALL_PLAYER_BEEN_INIT = 2, INSTALL_RAIL_SYSTEM = 4, INSTALL_INVENTORY_SYSTEM = 8,
  INSTALL_INVERSE_PALETTE = 0x10, INSTALL_MININUM = 0, INSTALL_ALL = 0x1f
}
 
enum  { UNKNOWN_OBJECT = 997, BACKPACK = 998, NOWHERE = 999 }
 
enum  KernelTriggerType {
  KT_PARSE = 1, KT_DAEMON, KT_PREPARSE, KT_EXPIRE,
  KT_LOOP
}
 
enum  {
  GLB_TIME = 0, GLB_WATCH_DOG = 1, GLB_MIN_Y = 2, GLB_MAX_Y = 3,
  GLB_MIN_SCALE = 4, GLB_MAX_SCALE = 5, GLB_SCALER = 6, GLB_TEMP_1 = 7,
  GLB_TEMP_2 = 8, GLB_TEMP_3 = 9, GLB_TEMP_4 = 10, GLB_TEMP_5 = 11,
  GLB_TEMP_6 = 12, GLB_TEMP_7 = 13, GLB_TEMP_8 = 14, GLB_TEMP_9 = 15,
  GLB_TEMP_10 = 16, GLB_TEMP_11 = 17, GLB_TEMP_12 = 18, GLB_TEMP_13 = 19,
  GLB_TEMP_14 = 20, GLB_TEMP_15 = 21, GLB_TEMP_16 = 22, GLB_TEMP_17 = 23,
  GLB_TEMP_18 = 24, GLB_TEMP_19 = 25, GLB_TEMP_20 = 26, GLB_TEMP_21 = 27,
  GLB_TEMP_22 = 28, GLB_TEMP_23 = 29, GLB_TEMP_24 = 30, GLB_TEMP_25 = 31,
  GLB_TEMP_26 = 32, GLB_TEMP_27 = 33, GLB_TEMP_28 = 34, GLB_TEMP_29 = 35,
  GLB_TEMP_30 = 36, GLB_TEMP_31 = 37, GLB_TEMP_32 = 38, GLB_SCRATCH_VARS = 7,
  GLB_USER_VARS = 17
}
 
enum  cursor_states { kARROW, kLOOK, kTAKE, kUSE }
 
enum  TermMode { NO_MODE = 0, MESSAGE_MODE, MEMORY_MODE }
 
enum  M4DebugChannels { kDebugScripts = 1 << 0, kDebugMessages = 1 << 1, kDebugCore = 1 << 2 }
 
enum  M4GameType { GType_Riddle = 1, GType_Burger = 2 }
 
enum  M4GameStyle { GStyle_Game = 0, GStyle_Demo = 1, GStyle_NonInteractiveDemo = 2 }
 
enum  Features { kFeaturesNone = 0, kFeaturesCD = 1 << 0, kFeaturesDemo = 1 << 1, kFeaturesNonInteractiveDemo = 1 << 2 }
 
enum  AccessMode { UNOPENED, READ, WRITE, READ_OR_WRITE }
 
enum  FileMode { BINARY, TEXT, BINARYW, TEXTW }
 
enum  { HASH_SERIES_PLAY_MACHINE = 0, HASH_SERIES_SHOW_MACHINE = 1, HASH_STREAM_MACHINE = 6 }
 
enum  { NO_COMPRESS = 0x00, RLE8 = 0x01, SHADOW = 0x80 }
 
enum  { kEndOfLine = 0, kEndOfSprite = 1, kJumpXY = 2 }
 
enum  { TS_GIVEN = 0, TS_JUST_LEFT, TS_JUST_RIGHT, TS_CENTRE }
 
enum  { EVENT_MOUSE = 0, EVENT_KEY }
 
enum  ItemType {
  MESSAGE, PICTURE, BUTTON, LISTBOX,
  TEXTFIELD, REPEAT_BUTTON, DIALOGBOX
}
 
enum  { LIST_BY_TAG = 0, LIST_ALPH, LIST_SEQUN }
 
enum  { SCRN_DLG = 0, SCRN_BUF, SCRN_TEXT, SCRN_TRANS }
 
enum  { SCRN_ANY = 0, SCRN_ACTIVE, SCRN_INACTIVE, SCRN_UNDEFN }
 
enum  CursorChange { CURSCHANGE_NONE, CURSCHANGE_NEXT, CURSCHANGE_PREVIOUS, CURSCHANGE_TOGGLE }
 
enum  { TRIG_INV_CLICK = 32000, TRIG_RESTORE_GAME }
 
enum  MouseEvent {
  _ME_no_event, _ME_move, _ME_L_click, _ME_L_hold,
  _ME_L_drag, _ME_L_release, _ME_R_click, _ME_R_hold,
  _ME_R_drag, _ME_R_release, _ME_both_click, _ME_both_hold,
  _ME_both_drag, _ME_both_release, _ME_doubleclick, _ME_doubleclick_hold,
  _ME_doubleclick_drag, _ME_doubleclick_release
}
 
enum  mausState {
  _MS_no_event, _MS_L_clickDown, _MS_R_clickDown, _MS_both_clickDown,
  _MS_doubleclick_Down
}
 
enum  {
  KEY_CTRL_A = (Common::KBD_CTRL << 16) | Common::KEYCODE_a, KEY_CTRL_B = (Common::KBD_CTRL << 16) | Common::KEYCODE_b, KEY_CTRL_C = (Common::KBD_CTRL << 16) | Common::KEYCODE_c, KEY_CTRL_D = (Common::KBD_CTRL << 16) | Common::KEYCODE_d,
  KEY_CTRL_E = (Common::KBD_CTRL << 16) | Common::KEYCODE_e, KEY_CTRL_F = (Common::KBD_CTRL << 16) | Common::KEYCODE_f, KEY_CTRL_G = (Common::KBD_CTRL << 16) | Common::KEYCODE_g, KEY_CTRL_H = (Common::KBD_CTRL << 16) | Common::KEYCODE_h,
  KEY_CTRL_I = (Common::KBD_CTRL << 16) | Common::KEYCODE_i, KEY_CTRL_J = (Common::KBD_CTRL << 16) | Common::KEYCODE_j, KEY_CTRL_K = (Common::KBD_CTRL << 16) | Common::KEYCODE_k, KEY_CTRL_L = (Common::KBD_CTRL << 16) | Common::KEYCODE_l,
  KEY_CTRL_M = (Common::KBD_CTRL << 16) | Common::KEYCODE_m, KEY_CTRL_N = (Common::KBD_CTRL << 16) | Common::KEYCODE_n, KEY_CTRL_O = (Common::KBD_CTRL << 16) | Common::KEYCODE_o, KEY_CTRL_P = (Common::KBD_CTRL << 16) | Common::KEYCODE_p,
  KEY_CTRL_Q = (Common::KBD_CTRL << 16) | Common::KEYCODE_q, KEY_CTRL_R = (Common::KBD_CTRL << 16) | Common::KEYCODE_r, KEY_CTRL_S = (Common::KBD_CTRL << 16) | Common::KEYCODE_s, KEY_CTRL_T = (Common::KBD_CTRL << 16) | Common::KEYCODE_t,
  KEY_CTRL_U = (Common::KBD_CTRL << 16) | Common::KEYCODE_u, KEY_CTRL_V = (Common::KBD_CTRL << 16) | Common::KEYCODE_v, KEY_CTRL_W = (Common::KBD_CTRL << 16) | Common::KEYCODE_w, KEY_CTRL_X = (Common::KBD_CTRL << 16) | Common::KEYCODE_x,
  KEY_CTRL_Y = (Common::KBD_CTRL << 16) | Common::KEYCODE_y, KEY_CTRL_Z = (Common::KBD_CTRL << 16) | Common::KEYCODE_z, KEY_ALT_A = (Common::KBD_ALT << 16) | Common::KEYCODE_a, KEY_ALT_B = (Common::KBD_ALT << 16) | Common::KEYCODE_b,
  KEY_ALT_C = (Common::KBD_ALT << 16) | Common::KEYCODE_c, KEY_ALT_D = (Common::KBD_ALT << 16) | Common::KEYCODE_d, KEY_ALT_E = (Common::KBD_ALT << 16) | Common::KEYCODE_e, KEY_ALT_F = (Common::KBD_ALT << 16) | Common::KEYCODE_f,
  KEY_ALT_G = (Common::KBD_ALT << 16) | Common::KEYCODE_g, KEY_ALT_H = (Common::KBD_ALT << 16) | Common::KEYCODE_h, KEY_ALT_I = (Common::KBD_ALT << 16) | Common::KEYCODE_i, KEY_ALT_J = (Common::KBD_ALT << 16) | Common::KEYCODE_j,
  KEY_ALT_K = (Common::KBD_ALT << 16) | Common::KEYCODE_k, KEY_ALT_L = (Common::KBD_ALT << 16) | Common::KEYCODE_l, KEY_ALT_M = (Common::KBD_ALT << 16) | Common::KEYCODE_m, KEY_ALT_N = (Common::KBD_ALT << 16) | Common::KEYCODE_n,
  KEY_ALT_O = (Common::KBD_ALT << 16) | Common::KEYCODE_o, KEY_ALT_P = (Common::KBD_ALT << 16) | Common::KEYCODE_p, KEY_ALT_Q = (Common::KBD_ALT << 16) | Common::KEYCODE_q, KEY_ALT_R = (Common::KBD_ALT << 16) | Common::KEYCODE_r,
  KEY_ALT_S = (Common::KBD_ALT << 16) | Common::KEYCODE_s, KEY_ALT_T = (Common::KBD_ALT << 16) | Common::KEYCODE_t, KEY_ALT_U = (Common::KBD_ALT << 16) | Common::KEYCODE_u, KEY_ALT_V = (Common::KBD_ALT << 16) | Common::KEYCODE_v,
  KEY_ALT_W = (Common::KBD_ALT << 16) | Common::KEYCODE_w, KEY_ALT_X = (Common::KBD_ALT << 16) | Common::KEYCODE_x, KEY_ALT_Y = (Common::KBD_ALT << 16) | Common::KEYCODE_y, KEY_ALT_Z = (Common::KBD_ALT << 16) | Common::KEYCODE_z,
  KEY_ALT_0 = (Common::KBD_ALT << 16) | Common::KEYCODE_0, KEY_ALT_1 = (Common::KBD_ALT << 16) | Common::KEYCODE_1, KEY_ALT_2 = (Common::KBD_ALT << 16) | Common::KEYCODE_2, KEY_ALT_3 = (Common::KBD_ALT << 16) | Common::KEYCODE_3,
  KEY_ALT_4 = (Common::KBD_ALT << 16) | Common::KEYCODE_4, KEY_ALT_5 = (Common::KBD_ALT << 16) | Common::KEYCODE_5, KEY_ALT_6 = (Common::KBD_ALT << 16) | Common::KEYCODE_6, KEY_ALT_7 = (Common::KBD_ALT << 16) | Common::KEYCODE_7,
  KEY_ALT_8 = (Common::KBD_ALT << 16) | Common::KEYCODE_8, KEY_ALT_9 = (Common::KBD_ALT << 16) | Common::KEYCODE_9, KEY_PAD_MINUS = Common::KEYCODE_KP_MINUS, KEY_PAD_PLUS = Common::KEYCODE_KP_PLUS,
  KEY_PAD_TIMES = Common::KEYCODE_KP_MULTIPLY, KEY_PAD_DIVIDE = Common::KEYCODE_KP_DIVIDE
}
 
enum  {
  KEY_PAGE_UP = Common::KEYCODE_PAGEUP, KEY_PAGE_DOWN = Common::KEYCODE_PAGEDOWN, KEY_HOME = Common::KEYCODE_HOME, KEY_END = Common::KEYCODE_END,
  KEY_DELETE = Common::KEYCODE_DELETE, KEY_BACKSP = Common::KEYCODE_BACKSPACE, KEY_TAB = Common::KEYCODE_TAB, KEY_SHFTTAB = (Common::KBD_SHIFT << 16) | Common::KEYCODE_TAB,
  KEY_RETURN = Common::KEYCODE_RETURN, KEY_ESCAPE = Common::KEYCODE_ESCAPE, KEY_SPACE = Common::KEYCODE_SPACE, KEY_LEFT = Common::KEYCODE_LEFT,
  KEY_RIGHT = Common::KEYCODE_RIGHT, KEY_UP = Common::KEYCODE_UP, KEY_DOWN = Common::KEYCODE_DOWN, KEY_ALT_UP = (Common::KBD_ALT << 16) | Common::KEYCODE_UP,
  KEY_ALT_DOWN = (Common::KBD_ALT << 16) | Common::KEYCODE_DOWN, KEY_ALT_LEFT = (Common::KBD_ALT << 16) | Common::KEYCODE_LEFT, KEY_ALT_RIGHT = (Common::KBD_ALT << 16) | Common::KEYCODE_RIGHT, KEY_CTRL_UP = (Common::KBD_CTRL << 16) | Common::KEYCODE_UP,
  KEY_CTRL_DOWN = (Common::KBD_CTRL << 16) | Common::KEYCODE_DOWN, KEY_CTRL_LEFT = (Common::KBD_CTRL << 16) | Common::KEYCODE_LEFT, KEY_CTRL_RIGHT = (Common::KBD_CTRL << 16) | Common::KEYCODE_RIGHT, KEY_F1 = Common::KEYCODE_F1,
  KEY_F2 = Common::KEYCODE_F2, KEY_F3 = Common::KEYCODE_F3, KEY_F4 = Common::KEYCODE_F4, KEY_F5 = Common::KEYCODE_F5,
  KEY_F6 = Common::KEYCODE_F6, KEY_F7 = Common::KEYCODE_F7, KEY_F8 = Common::KEYCODE_F8, KEY_F9 = Common::KEYCODE_F9,
  KEY_F10 = Common::KEYCODE_F10, KEY_F11 = Common::KEYCODE_F11, KEY_F12 = Common::KEYCODE_F12
}
 
enum  {
  NOSEPICK = 0, STARTWALK = 1, WALKSEQ = 2, ENDWALK = 3,
  DEMAND_FACING = 4, DEMAND_LOCATION = 5, TERMINATE = 6, PLAYER_HIDE = 7,
  PLAYER_UNHIDE = 8, TURN_TO_FACE = 9, ACTION_11 = 11, ACTION_12 = 12,
  ACTION_13 = 13, ACTION_14 = 14, ACTION_15 = 15, ACTION_17 = 17,
  ACTION_18 = 18, ACTION_19 = 19, ACTION_20 = 20, ACTION_21 = 21,
  ACTION_22 = 22, ACTION_23 = 23, ACTION_24 = 24, ACTION_25 = 25,
  ACTION_26 = 26, ACTION_27 = 27, ACTION_28 = 28, ACTION_29 = 29,
  ACTION_30 = 30, ACTION_31 = 31, ACTION_32 = 32, ACTION_33 = 33,
  ACTION_666 = 666
}
 
enum  {
  IDX_TIMER = 0, IDX_TAG = 1, IDX_LAYER = 2, IDX_W = 3,
  IDX_H = 4, IDX_X = 5, IDX_Y = 6, IDX_S = 7,
  IDX_R = 8, IDX_CELS_HASH = 9, IDX_CELS_INDEX = 10, IDX_CELS_COUNT = 11,
  IDX_CELS_FRAME_RATE = 12, IDX_CELS_PIX_SPEED = 13, IDX_TARG_S = 14, IDX_TARG_R = 15,
  IDX_TARG_X = 16, IDX_TARG_Y = 17, IDX_DELTA_S = 18, IDX_DELTA_R = 19,
  IDX_DELTA_X = 20, IDX_DELTA_Y = 21, IDX_VELOCITY = 22, IDX_THETA = 23,
  IDX_ZTEMP1 = 24, IDX_ZTEMP2 = 25, IDX_ZTEMP3 = 26, IDX_ZTEMP4 = 27,
  IDX_ZTEMP5 = 28, IDX_ZTEMP6 = 29, IDX_ZTEMP7 = 30, IDX_ZTEMP8 = 31,
  IDX_MACH_ID = 32
}
 

Functions

bool read_catalog ()
 
char * db_get_catalog ()
 
char * db_rmlst_get_asset_room_path (const char *s, char *result, int32 *sceneCode)
 
void adv_freeCodes ()
 
void adv_freeBackground ()
 
bool adv_restoreBackground ()
 
bool adv_restoreCodes ()
 
bool player_been_init (int16 num_scenes)
 
void player_been_shutdown ()
 
void player_reset_been (void)
 
void player_been_sync (Common::Serializer &s)
 
bool player_enters_scene (int16 scene_num)
 
void player_forgets_scene (int16 scene_num)
 
bool player_been_here (int16 scene_num)
 
int db_def_chk_read (int16 room_code, SceneDef *rdef)
 
bool kernel_section_startup ()
 
void player_set_commands_allowed (bool t_or_f)
 
void game_pause (bool flag)
 
bool this_is_a_walkcode (int32 x, int32 y)
 
int32 get_screen_depth (int32 x, int32 y)
 
int32 get_screen_color (int32 x, int32 y)
 
void update_mouse_pos_dialog ()
 
M4spritekernel_CreateThumbnail (int32 *spriteSize)
 
bool kernel_CreateSSFromGrBuff (GrBuff *myBuff, RGB8 *myPalette, bool completePal, const char *ssName)
 
bool kernel_load_room (int minPalEntry, int maxPalEntry, SceneDef *rdef, GrBuff **scr_orig_data, GrBuff **scr_orig)
 
void kernel_unload_room (SceneDef *rdef, GrBuff **code_data, GrBuff **loadBuffer)
 
int kernel_save_game (int slot, const char *desc, int32 sizeofDesc, M4sprite *thumbNail, int32 sizeofThumbData)
 
bool kernel_load_game (int slot)
 
bool kernel_save_game_exists (int32 slot)
 
int32 extract_room_num (const Common::String &name)
 
bool kernel_load_variant (const char *variant)
 
GrBuffload_codes (SysFile *code_file)
 
bool load_background (SysFile *pic_file, GrBuff **loadBuffer, RGB8 *palette)
 
bool load_picture_and_codes (SysFile *pic_file, SysFile *code_file, GrBuff **loadBuf, GrBuff **code_data, uint8 minPalEntry, uint8 maxPalEntry)
 
bool kernel_load_code_variant (SceneDef *rdef, char *variant, GrBuff **codeData)
 
void kernel_current_background_name (char *result)
 
void kernel_current_codes_name (char *result)
 
void screen_capture (RGB8 *masterPalette)
 
Common::String expand_name_2_RAW (const Common::String &name, int32 room_num)
 
HotSpotRechotspot_add_dynamic (const char *verb, const char *noun, int32 x1, int32 y1, int32 x2, int32 y2, int32 cursor, bool new_head=true, int32 walkto_x=32767, int32 walkto_y=32767, int32 facing=0)
 
HotSpotRechotspot_new (int x1, int y1, int x2, int y2)
 
HotSpotRechotspot_add (HotSpotRec *head, HotSpotRec *h, bool new_head)
 
HotSpotRechotspot_duplicate (HotSpotRec *dupMe)
 
HotSpotRechotspot_delete_record (HotSpotRec *head, HotSpotRec *h)
 
HotSpotRechotspot_unlink (HotSpotRec *head, HotSpotRec *h)
 
void hotspot_delete_all (HotSpotRec *head)
 
void hotspot_set_active (HotSpotRec *head, const char *name, bool active_or_not)
 
void hotspot_set_active (const char *name, bool active_or_not)
 
void hotspot_set_active_xy (HotSpotRec *head, const char *name, int32 x, int32 y, bool active_or_not)
 
void hotspot_set_active_xy (const char *name, int32 x, int32 y, bool active_or_not)
 
void hotspot_new_sprite (HotSpotRec *h, const char *verb)
 
void hotspot_newVerb (HotSpotRec *h, const char *verb)
 
void hotspot_newVocab (HotSpotRec *h, const char *vocab)
 
void hotspot_newPrep (HotSpotRec *h, const char *prep)
 
HotSpotRechotspot_which (HotSpotRec *head, int x, int y)
 
HotSpotRechotspot_which (int x, int y)
 
void kill_hotspot_node (HotSpotRec *h)
 
void hotspot_restore_all ()
 
void hotspot_hide_all ()
 
void hotspot_unhide_and_dump ()
 
void interface_hide ()
 
void interface_show ()
 
void track_hotspots_refresh ()
 
bool intr_EventHandler (void *bufferPtr, int32 eventType, int32 event, int32 x, int32 y, bool *z)
 
void intr_cancel_sentence ()
 
void intr_freshen_sentence ()
 
void intr_freshen_sentence (int cursor)
 
bool inv_init (int32 num_objects)
 
bool inv_register_thing (const Common::String &itemName, const Common::String &itemVerbs, int32 scene, int32 cel, int32 cursor)
 
int32 inv_where_is (const Common::String &itemName)
 
bool inv_player_has (const Common::String &itemName)
 
bool inv_put_thing_in (const Common::String &itemName, int32 scene)
 
int32 inv_get_cursor (const Common::String &itemName)
 
int32 inv_get_cel (const Common::String &itemName)
 
const char * inv_get_verbs (const Common::String &itemName)
 
void inv_give_to_player (const Common::String &itemName)
 
void inv_move_object (const Common::String &itemName, int32 scene)
 
bool inv_object_is_here (const Common::String &itemName)
 
bool inv_object_in_scene (const Common::String &itemName, int32 scene)
 
void inv_sync_game (Common::Serializer &s)
 
bool player_said (const char *w0, const char *w1=nullptr, const char *w2=nullptr)
 
bool player_said_any (const char *w0, const char *w1=nullptr, const char *w2=nullptr, const char *w3=nullptr, const char *w4=nullptr, const char *w5=nullptr, const char *w6=nullptr, const char *w7=nullptr, const char *w8=nullptr, const char *w9=nullptr)
 
void player_inform_walker_new_scale (int32 frontY, int32 backY, int32 frontS, int32 backS)
 
bool player_load_series (const char *walkerName, const char *shadowName, bool load_palette)
 
void player_first_walk (int32 x1, int32 y1, int32 f1, int32 x2, int32 y2, int32 f2, bool enable_commands_at_destination)
 
void player_set_defaults ()
 
void player_noun_becomes_verb (int32 spriteNum)
 
void player_hotspot_walk_override (int32 x, int32 y, int32 facing=-1, int32 trigger=-1)
 
void player_hotspot_walk_override_just_face (int32 facing, int32 trigger=-1)
 
bool player_commands_allowed ()
 
PlayerInfoplayer_update_info (machine *myWalker, PlayerInfo *player_info)
 
PlayerInfoplayer_update_info ()
 
void adv_kill_digi_between_rooms (bool true_or_false)
 
void player_set_facing_hotspot (int trigger=-1)
 
void player_set_facing_at (int x, int y, int trigger=-1)
 
int calc_facing (int x, int y)
 
bool InitRails ()
 
void rail_system_shutdown ()
 
void ClearRails ()
 
noWalkRectintr_add_no_walk_rect (int32 x1, int32 y1, int32 x2, int32 y2, int32 altX, int32 altY, Buffer *walkCodes)
 
noWalkRectintr_add_no_walk_rect (int32 x1, int32 y1, int32 x2, int32 y2, int32 altX, int32 altY)
 
void intr_move_no_walk_rect (noWalkRect *myRect, int32 new_x1, int32 new_y1, int32 new_x2, int32 new_y2, int32 new_altX, int32 new_altY, Buffer *walkCodes)
 
void intr_remove_no_walk_rect (noWalkRect *myRect, Buffer *walkCodes)
 
void intr_remove_no_walk_rect (noWalkRect *myRect)
 
void CreateEdge (int32 node1, int32 node2, Buffer *walkCodes)
 
void RestoreNodeEdges (int32 nodeID, Buffer *walkCodes)
 
void RestoreEdgeList (Buffer *walkCodes)
 
int32 AddRailNode (int32 x, int32 y, Buffer *walkCodes, bool restoreEdges)
 
void MoveRailNode (int32 nodeID, int32 x, int32 y, Buffer *walkCodes, bool restoreEdges)
 
bool RemoveRailNode (int32 nodeID, Buffer *walkCodes, bool restoreEdges)
 
bool RailNodeExists (int32 nodeID, int32 *nodeX, int32 *nodeY)
 
int16 GetEdgeLength (int32 node1, int32 node2)
 
bool GetShortestPath (int32 origID, int32 destID, railNode **shortPath)
 
railNodeCreateCustomPath (int coord,...)
 
void DisposePath (railNode *pathStart)
 
bool intr_LineCrossesRect (int32 line_x1, int32 line_y1, int32 line_x2, int32 line_y2, int32 rect_x1, int32 rect_y1, int32 rect_x2, int32 rect_y2)
 
bool intr_LinesCross (int32 line1_x1, int32 line1_y1, int32 line1_x2, int32 line1_y2, int32 line2_x1, int32 line2_y1, int32 line2_x2, int32 line2_y2)
 
bool intr_PathCrossesLine (int32 startX, int32 startY, railNode *pathStart, int32 line_x1, int32 line_y1, int32 line_x2, int32 line_y2)
 
void scale_editor_draw ()
 
void scale_editor_cancel ()
 
void scale_editor_toggle ()
 
int32 kernel_trigger_create (int32 trigger_num)
 
int32 kernel_trigger_create_mode (int32 trigger_num, int32 desired_mode)
 
bool kernel_trigger_dispatchx (int32 trigger_num)
 
bool kernel_trigger_dispatch_now (int32 trigger_num)
 
void kernel_timing_trigger (int32 ticks, int16 trigger, const char *name=nullptr)
 
void kernel_timing_trigger_daemon (int32 ticks, int16 trigger)
 
void kernel_timing_trigger (int32 ticks, int16 trigger, KernelTriggerType preMode, KernelTriggerType postMode)
 
void cisco_dispatch_triggers ()
 
void cisco_clear_triggers ()
 
void kernel_service_timing_trigger_q ()
 
void set_walker_scaling (SceneDef *rdef)
 
bool walker_has_walk_finished (machine *sender)
 
void ws_demand_location (machine *myWalker, int32 x, int32 y, int facing=-1)
 
void ws_demand_facing (machine *myWalker, int32 newFacing)
 
void ws_turn_to_face (machine *myWalker, int32 facing, int32 trigger=-1)
 
void ws_hide_walker (machine *myWalker)
 
void ws_unhide_walker (machine *myWalker)
 
void ws_walk (machine *myWalker, int32 x, int32 y, GrBuff **, int16 trigger, int32 finalFacing, bool complete_walk=true)
 
void ws_demand_location (int32 x, int32 y, int facing=-1)
 
void ws_demand_facing (int32 newFacing)
 
void ws_turn_to_face (int32 facing, int32 trigger=-1)
 
void ws_hide_walker ()
 
void ws_unhide_walker ()
 
void ws_walk (int32 x, int32 y, GrBuff **buffer, int16 trigger, int32 finalFacing=-1, bool complete_walk=true)
 
void ws_get_walker_info (machine *myWalker, int32 *x, int32 *y, int32 *s, int32 *layer, int32 *facing)
 
bool ws_walk_init_system ()
 
bool ws_walk_load_series (const int16 *dir_array, const char *name_array[], bool shadow_flag, bool load_palette)
 
bool ws_walk_load_walker_series (const int16 *dir_array, const char *name_array[], bool load_palette=false)
 
bool ws_walk_load_shadow_series (const int16 *dir_array, const char *name_array[])
 
void ws_walk_dump_series (int16 num_directions, int16 start_hash)
 
void ws_custom_walk (machine *myWalker, int32 finalFacing, int32 trigger, bool complete_walk=true)
 
bool adv_walker_path_exists (machine *myWalker, int32 x, int32 y)
 
void adv_hyperwalk_to_final_destination (void *, void *)
 
conv_chunkget_conv (Conv *c, int32 cSize)
 
entry_chunkget_entry (Conv *c, int32 cSize)
 
char * conv_ops_get_entry (int32 i, int32 *next, int32 *tag, Conv *c)
 
void conv_ops_unknown_chunk (int32 tag, const char *s)
 
decl_chunkget_decl (Conv *c, int32 cSize)
 
char * get_string (Conv *c, int32 cSize)
 
text_chunkget_text (Conv *c, int32 cSize)
 
int32 conv_ops_text_strlen (char *s)
 
c_assign_chunkget_c_asgn (Conv *c, int32 cSize)
 
int conv_ops_cond_successful (int32 l_op, int32 op, int32 r_op)
 
int32 conv_ops_process_asgn (int32 val, int32 oprtr, int32 opnd)
 
assign_chunkget_asgn (Conv *c, int32 cSize)
 
misc_chunkget_misc (Conv *c, int32 cSize)
 
entry_chunkget_hash_entry (Conv *c, int32 cSize)
 
c_misc_chunkget_c_misc (Conv *c, int32 cSize)
 
c_goto_chunkget_c_goto (Conv *c, int32 cSize)
 
goto_chunkget_goto (Conv *c, int32 cSize)
 
reply_chunkget_reply (Conv *c, int32 cSize)
 
lnode_chunkget_lnode (Conv *c, int32 cSize)
 
node_chunkget_node (Conv *c, int32 cSize)
 
fall_chunkget_fall (Conv *c, int32 cSize)
 
int32 get_long (Conv *c, int32 cSize)
 
c_reply_chunkget_c_reply (Conv *c, int32 cSize)
 
w_reply_chunkget_w_reply (Conv *c, int32 cSize)
 
w_entry_chunkget_w_entry (Conv *c, int32 cSize)
 
void set_dlg_rect ()
 
void conv_go (Conv *c)
 
Convconv_load (const char *filename, int x1, int y1, int32 myTrigger, bool want_box=true)
 
void conv_load_and_prepare (const char *filename, int trigger, bool ignoreIt=false)
 
void conv_unload (Conv *c)
 
void conv_unload ()
 
void conv_shutdown ()
 
Convconv_get_handle ()
 
void conv_set_handle (Conv *c)
 
void conv_resume (Conv *c)
 
void conv_resume ()
 
void conv_reset (char *filename)
 
void conv_reset_all ()
 
void conv_play (Conv *c)
 
void conv_play ()
 
const char * conv_sound_to_play ()
 
int32 conv_whos_talking ()
 
int32 conv_get_decl_val (Conv *c, decl_chunk *decl)
 
void conv_set_decl_val (Conv *c, decl_chunk *decl, int32 val)
 
void conv_export_value (Conv *c, int32 val, int index)
 
void conv_export_value_curr (int32 val, int index)
 
void conv_export_pointer (Conv *c, int32 *val, int index)
 
void conv_export_pointer_curr (int32 *val, int index)
 
void conv_set_font_spacing (int32 h, int32 v)
 
void conv_set_text_colour (int32 norm_colour, int32 hi_colour)
 
void conv_set_text_colours (int32 norm_colour, int32 norm_colour_alt1, int32 norm_colour_alt2, int32 hi_colour, int32 hi_colour_alt1, int32 hi_colour_alt2)
 
void conv_set_shading (int32 shade)
 
void conv_set_box_xy (int32 x, int32 y)
 
void conv_get_dlg_coords (int32 *x1, int32 *y1, int32 *x2, int32 *y2)
 
void conv_set_dlg_coords (int32 x1, int32 y1, int32 x2, int32 y2)
 
void conv_set_default_text_colour (int32 norm_colour, int32 hi_colour)
 
void conv_set_default_hv (int32 h, int32 v)
 
int conv_get_event ()
 
void conv_set_event (int e)
 
int conv_is_event_ready ()
 
void conv_swap_words (Conv *c)
 
int32 conv_current_node ()
 
int32 conv_current_entry ()
 
int conv_toggle_flags (entry_chunk *entry)
 
int ok_status (entry_chunk *entry)
 
int conv_get_text (int32 offset, int32 size, Conv *c)
 
void cdd_init ()
 
char * env_find (const Common::String &descName)
 
char * env_get_path (char *resultPath, int room_num, char *fileName)
 
void other_save_game_for_resurrection ()
 
bool charIsIn (char ch, char *str)
 
int16 char_IsIn (char ch, char *str)
 
int dtoi (char *string)
 
bool stringIsInt (char *str)
 
bool stringIsFloat (char *str)
 
int16 stringIsIn (char *str, char *strings[])
 
int32 cstrlen (const char *s)
 
void cstrcpy (char *dest, const char *src)
 
void cstrncpy (char *dest, const char *src, const int16 max_len)
 
char * cstrupr (char *src)
 
char * cstr_lower (char *src)
 
int xtoi (char *string)
 
int strpos (char *key, char *target)
 
void strdel (char *inp, int indx, int count)
 
void strseg (char *work, char *work2, int indx, int count)
 
void strins (char *work, char *newStr, int indx)
 
void str_purge_trailing_spaces (char *myline)
 
void str_purge_all_spaces (char *text)
 
char * str_strip_final_lf (char *mystring)
 
void str_add_final_lf (char *mystring)
 
void str_parse_init (char *instring, char delimiter)
 
char * str_parse (char *out)
 
bool cstr_isdigit (char c)
 
void NORETURN_PRE error_show (const char *filename, uint32 line, quadchar errorcode, const char *fmt,...) NORETURN_POST
 
void NORETURN_PRE error_show (const char *filename, uint32 line, quadchar errorcode) NORETURN_POST
 
void error_look_up (quadchar errorcode, char *result_string)
 
frac16 FixedMul (frac16 Multiplicand, frac16 Multiplier)
 
frac16 FixedDiv (frac16 Dividend, frac16 Divisor)
 
unsigned long sqrtul (unsigned long v)
 
int32 imath_max (int32 a, int32 b)
 
int32 imath_min (int32 a, int32 b)
 
int32 imath_abs (int32 a)
 
void imath_seed (int32 seednum)
 
uint32 imath_random ()
 
int32 imath_ranged_rand (int32 a, int32 b)
 
frac16 imath_ranged_rand16 (frac16 a, frac16 b)
 
bool imath_rand_bool (int max)
 
frac16 dist2d (int32 x1, int32 y1, int32 x2, int32 y2)
 
frac16 SqrtF16 (frac16 n)
 
frac16 ArcTan (frac16 x, frac16 y)
 
uint16 HighWord (uint32 n)
 
uint16 LowWord (uint32 n)
 
uint32 convert_intel32 (uint32 a)
 
uint16 convert_intel16 (uint16 a)
 
short abs (short a)
 
long abs (long a)
 
int16 convert_intel16 (void *src)
 
int mouse_init ()
 
void mouse_uninstall ()
 
byte * GetMousePicture ()
 
void param_init ()
 
void param_shutdown ()
 
void parse_all_flags ()
 
void term_message (const char *fmt,...)
 
bool dbg_ws_init (bool showTheScreen, Font *useThisFont, frac16 *theGlobals)
 
void dbg_ws_shutdown ()
 
void dbg_SetCurrMachInstr (machine *m, int32 pcOffset, bool isPcode)
 
void dbg_EndCurrMachInstr ()
 
void dbg_AddOpcodeToMachineInstr (int instruction)
 
void dbg_AddParamToCurrMachInstr (const char *param)
 
void dbg_AddGlobalParamToCurrMachInstr (int num, const char *prefix=nullptr)
 
void dbg_AddRegParamToCurrMachInstr (int num, const char *prefix=nullptr)
 
void dbg_ws_update ()
 
void dbg_LaunchSequence (Anim8 *myAnim8)
 
void dbg_DebugWSMach (machine *m, bool debug)
 
void dbg_DebugNextCycle ()
 
void dbg_RemoveWSMach (machine *m)
 
void dbg_SetCurrSequInstr (Anim8 *myAnim8, int32 compareCCR)
 
void dbg_WSError (Common::WriteStream *logFile, machine *m, int32 errorType, const char *errDesc, const char *errMsg, int32 pcOffset)
 
Common::String f_extension_add (const Common::String &name, const Common::String &ext)
 
Common::String f_extension_new (const Common::String &name, const Common::String &ext)
 
Common::Streamf_io_open (const Common::Path &filename, const Common::String &mode)
 
void f_io_close (Common::Stream *stream)
 
bool f_stream_Init ()
 
void f_stream_Shutdown ()
 
strmRequestf_stream_Open (SysFile *srcFile, int32 fileOffset, int32 strmMinBuffSize, int32 strmBuffSize, int32 numBlocksToRead, int32 *blockSizeArray, int32 initialRead, bool wrapStream)
 
int32 f_stream_Read (strmRequest *myStream, uint8 **dest, int32 numBytes)
 
void f_stream_Close (strmRequest *myStream)
 
void f_stream_Process (int32 numToProcess)
 
bool f_info_exists (const Common::Path &filename)
 
size_t f_info_get_file_size (const Common::Path &filename)
 
void sysfile_init (bool in_hag_mode)
 
void sysfile_shutdown ()
 
int32 gr_buffer_free (Buffer *buf)
 
byte * gr_buffer_pointer (Buffer *buf, int32 x, int32 y)
 
const byte * gr_buffer_pointer (const Buffer *buf, int32 x, int32 y)
 
int32 gr_buffer_init (Buffer *buf, const char *name, int32 w, int32 h)
 
bool gr_buffer_rect_copy_2 (const Buffer *from, Buffer *to, int32 sx, int32 sy, int32 dx, int32 dy, int32 w, int32 h)
 
bool gr_buffer_rect_copy (Buffer *from, Buffer *to, int32 x, int32 y, int32 w, int32 h)
 
int32 gr_buffer_rect_fill (Buffer *target, int32 x1, int32 y1, int32 w, int32 h)
 
void GrBuff_Show (void *s, void *r, void *b, int32 destX, int32 destY)
 
void buffer_put_pixel (Buffer *buf, int32 x, int32 y, byte c)
 
byte buffer_get_pixel (Buffer *buf, int32 x, int32 y)
 
void buffer_draw_box (Buffer *buf, int32 x1, int32 y1, int32 x2, int32 y2, byte color)
 
void buffer_draw_box_xor (Buffer *buf, int32 x1, int32 y1, int32 x2, int32 y2)
 
int32 buffer_fill (Buffer *target, byte value)
 
void gr_font_system_shutdown ()
 
void gr_font_dealloc (Font *killMe)
 
Fontgr_font_create_system_font ()
 
void gr_font_set_color (uint8 foreground)
 
Fontgr_font_get ()
 
void gr_font_set (Font *font)
 
int32 gr_font_get_height ()
 
int32 gr_font_write (Buffer *target, char *out_string, int32 x, int32 y, int32 w, int32 auto_spacing=1)
 
int32 gr_font_write (Buffer *target, const char *out_string, int32 x, int32 y, int32 w, int32 auto_spacing)
 
int32 gr_font_string_width (char *out_string, int32 auto_spacing=1)
 
int32 gr_font_string_width (const Common::String &str, int32 auto_spacing=1)
 
Fontgr_font_load (const char *fontName)
 
void font_set_colors (uint8 alt1, uint8 alt2, uint8 foreground)
 
void gr_hline (Buffer *buf, int32 x1, int32 x2, int32 y)
 
void gr_vline (Buffer *buf, int32 x, int32 y1, int32 y2)
 
void gr_hline_xor (Buffer *buf, int32 x1, int32 x2, int32 y)
 
void gr_vline_xor (Buffer *buf, int32 x, int32 y1, int32 y2)
 
void gr_line (int32 x1, int32 y1, int32 x2, int32 y2, int32 color, Buffer *screen)
 
uint8 gr_pal_get_ega_color (uint8 myColor)
 
void gr_color_create_ipl5 (uint8 *inverseColorTable, char *fname, int room_num)
 
uint8 * gr_color_load_ipl5 (const char *filename, uint8 *inverseColors)
 
void gr_color_set (int32 c)
 
byte gr_color_get_current ()
 
void gr_pal_set_range (RGB8 *pal, int first_color, int num_colors)
 
void gr_pal_set_range (int first_color, int num_colors)
 
void gr_pal_set (RGB8 *pal)
 
void gr_pal_set_RGB8 (RGB8 *entry, int r, int g, int b)
 
void gr_pal_set_entry (int32 index, RGB8 *entry)
 
void gr_pal_clear (RGB8 *palette)
 
void gr_pal_clear_range (RGB8 *palette, int first_color, int last_color)
 
uint8 gr_pal_find_best_match (RGB8 *pal, uint8 r, uint8 g, uint8 b)
 
void gr_pal_interface (RGB8 *fixpal)
 
void gr_pal_reset_ega_colors (RGB8 *pal)
 
void gr_backup_palette ()
 
void gr_restore_palette ()
 
void pal_mirror_colours (int first_color, int last_color, RGB8 *pal)
 
void pal_mirror_colours (int first_color, int last_color)
 
int32 series_load (const char *seriesName, int32 assetIndex=-1, RGB8 *myPal=nullptr)
 
void series_unload (int32 assetIndex)
 
bool series_draw_sprite (int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y)
 
bool series_show_frame (int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y)
 
machineseries_place_sprite (const char *seriesName, int32 index, int32 x, int32 y, int32 s, int32 layer)
 
machineseries_show_sprite (const char *seriesName, int32 index, int32 layer)
 
machineseries_play (const char *seriesName, frac16 layer, uint32 flags=0, int16 triggerNum=-1, int32 frameRate=6, int32 loopCount=0, int32 s=100, int32 x=0, int32 y=0, int32 firstFrame=0, int32 lastFrame=-1)
 
machineseries_simple_play (const char *seriesName, frac16 layer, bool stickWhenDone)
 
machineseries_show (const char *seriesName, frac16 layer, uint32 flags=0, int16 triggerNum=-1, int32 duration=-1, int32 index=0, int32 s=100, int32 x=0, int32 y=0)
 
machineseries_ranged_play (const char *seriesName, int32 loopCount, uint32 flags, int32 firstFrame, int32 lastFrame, int32 s, uint32 layer, int32 frameRate, int32 trigger=-1, bool stick_when_done=false)
 
machineseries_ranged_play_xy (const char *seriesName, int loopCount, int flags, int firstFrame, int lastFrame, int x, int y, int s, int layer, int frameRate, int trigger=-1, bool stick_when_done=false)
 
machineseries_plain_play (const char *seriesName, int32 loopCount, uint32 flags, int32 s, int32 layer, int32 frameRate, int32 trigger=-1, bool stickWhenDone=false)
 
machineseries_play_xy (const char *seriesName, int loopCount, int flags, int x, int y, int scale, int layer, int frameRate, int trigger)
 
machineseries_stream (const char *seriesName, int32 frameRate, int32 layer, int32 trigger)
 
bool series_stream_break_on_frame (machine *m, int32 frameNum, int32 trigger)
 
void series_set_frame_rate (machine *m, int32 newFrameRate)
 
uint32 gr_sprite_RLE8_encode (Buffer *Source, Buffer *Dest)
 
uint8 gr_sprite_draw (DrawRequest *DrawReq)
 
void pal_fade_set_start (RGB8 *origPalette, int32 percent)
 
void pal_fade_set_start (int32 percent)
 
void pal_fade_init (RGB8 *origPalette, int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum)
 
void pal_fade_init (int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum)
 
void disable_player_commands_and_fade_init (int trigger)
 
void pal_cycle_init (int32 firstPalEntry, int32 lastPalEntry, int32 delayTicks, int32 totalTicks=-1, int32 triggerNum=-1)
 
bool pal_cycle_active ()
 
void pal_cycle_stop ()
 
void pal_cycle_resume ()
 
void pal_fx_update ()
 
void DAC_tint_range (const RGB8 *tintColor, int32 percent, int32 firstPalEntry, int32 lastPalEntry, bool transparent)
 
void kernel_examine_inventory_object (const char *picName, RGB8 *pal, int steps, int delay, int32 x, int32 y, int32 trigger, const char *digiName, int32 digiTrigger)
 
void kernel_examine_inventory_object (const char *picName, int steps, int delay, int32 x, int32 y, int32 triggerNum, const char *digiName=nullptr, int32 digiTrigger=-1)
 
void kernel_unexamine_inventory_object (RGB8 *pal, int steps, int delay)
 
void remap_buffer_with_luminance_map (Buffer *src, int32 x1, int32 y1, int32 x2, int32 y2)
 
void krn_SetGreyVideoMode (int32 grey_x1, int32 grey_y1, int32 grey_x2, int32 grey_y2, int32 color_x1, int32 color_y1, int32 color_x2, int32 color_y2)
 
void krn_UnsetGreyVideoMode (void)
 
bool krn_GetGreyMode (void)
 
void krn_UpdateGreyArea (Buffer *greyOutThisBuffer, int32 scrnX, int32 scrnY, int32 greyX1, int32 greyY1, int32 greyX2, int32 greyY2)
 
void krn_ChangeBufferLuminance (Buffer *target, int32 percent)
 
void krn_pal_game_task ()
 
void krn_fade_from_grey (RGB8 *pal, int32 steps, int32 delay, int32 fadeType)
 
void krn_fade_to_grey (RGB8 *pal, int32 steps, int32 delay)
 
void GetUpdateRectangle (int32 x, int32 y, int32 hot_x, int32 hot_y, int32 scale_x, int32 scale_y, int32 Width, int32 Height, M4Rect *UpdateRect)
 
void render_sprite_to_8BBM (RendGrBuff *Destination, DrawRequestX *dr, RendCell *Frame, M4Rect *ClipRectangle, M4Rect *UpdateRect)
 
bool gui_buffer_system_init ()
 
void gui_buffer_system_shutdown ()
 
bool gui_buffer_register (int32 x1, int32 y1, Buffer *myBuf, uint32 scrnFlags, EventHandler evtHandler)
 
void gui_buffer_deregister (void *myBuf)
 
bool gui_GrBuff_register (int32 x1, int32 y1, GrBuff *myBuf, uint32 scrnFlags, EventHandler evtHandler)
 
void gui_buffer_activate (Buffer *myBuf)
 
bool gui_buffer_add_key (Buffer *myBuf, long myKey, HotkeyCB cb)
 
bool gui_buffer_set_event_handler (void *myBuf, EventHandler evtHandler)
 
bool gui_dialog_init ()
 
void gui_dialog_shutdown ()
 
DialogDialogCreateAbsolute (int32 x1, int32 y1, int32 x2, int32 y2, uint32 scrnFlags)
 
DialogDialogCreate (M4Rect *r, uint32 scrnFlags)
 
void vmng_Dialog_Destroy (Dialog *d)
 
void DialogDestroy (Dialog *d, M4Rect *r=nullptr)
 
void Dialog_Refresh (Dialog *d)
 
void Dialog_Refresh_All ()
 
void Dialog_Resize (Dialog *d, int32 newW, int32 newH)
 
bool GetDialogCoords (Dialog *d, M4Rect *r)
 
void Dialog_Configure (Dialog *d, int32 defaultTag, int32 returnTag, int32 cancelTag)
 
void Dialog_SetDefault (Dialog *d, int32 tag)
 
bool Dialog_SetPressed (Dialog *d, int32 tag)
 
bool Dialog_Add_Message (Dialog *d, int32 x, int32 y, const char *prompt, int32 tag)
 
bool Dialog_Add_Picture (Dialog *d, int32 x, int32 y, Buffer *myBuff, int32 tag)
 
bool Dialog_Add_Button (Dialog *d, int32 x, int32 y, const char *prompt, M4CALLBACK cb, int32 tag)
 
bool Dialog_Add_RepeatButton (Dialog *d, int32 x, int32 y, const char *prompt, M4CALLBACK cb, int32 tag)
 
bool Dialog_Add_List (Dialog *d, int32 x1, int32 y1, int32 x2, int32 y2, M4CALLBACK cb, int32 tag)
 
bool Dialog_Add_DirList (Dialog *d, int32 x1, int32 y1, int32 x2, int32 y2, M4CALLBACK cb, int32 tag, char *myDir, char *myTypes)
 
bool Dialog_Change_DirList (Dialog *d, Item *myItem, const char *myDir, const char *myTypes)
 
bool Dialog_Add_List_Item (Dialog *d, Item *myItem, const char *prompt, int32 tag, int32 listTag, int32 addMode, bool refresh)
 
bool Dialog_Delete_List_Item (Dialog *d, Item *myItem, int32 tag, ListItem *myListItem, int32 listTag)
 
bool Dialog_Change_List_Item (Dialog *d, Item *myItem, int32 tag, ListItem *myListItem, int32 listTag, char *newPrompt, int32 newListTag, int32 changeMode, bool refresh)
 
void Dialog_EmptyListBox (Dialog *d, Item *i, int32 tag)
 
char * Dialog_GetListItemPrompt (Dialog *d, Item *i, int32 tag, int32 listTag)
 
ListItemDialog_GetCurrListItem (Dialog *d, Item *i, int32 tag)
 
char * Dialog_GetCurrListItemPrompt (Dialog *d, Item *i, int32 tag)
 
bool Dialog_GetCurrListItemTag (Dialog *d, Item *i, int32 tag, int32 *listTag)
 
bool Dialog_ListItemExists (Dialog *d, Item *myItem, int32 tag, char *prompt, int32 listTag)
 
bool Dialog_ListboxSearch (Dialog *d, Item *myItem, int32 tag, int32 searchMode, char *searchStr, int32 parm1)
 
void Dialog_GetPrevListItem (Dialog *d)
 
void Dialog_GetNextListItem (Dialog *d)
 
bool Dialog_Add_TextField (Dialog *d, int32 x1, int32 y1, int32 x2, const char *defaultPrompt, M4CALLBACK cb, int32 tag, int32 fieldLength)
 
void Dialog_RegisterTextField (Dialog *d)
 
bool Dialog_Add_Key (Dialog *d, long myKey, HotkeyCB cb)
 
bool Dialog_Remove_Key (Dialog *d, long myKey)
 
ItemDialog_Get_Item (Dialog *d, int32 tag)
 
void Dialog_Change_Item_Prompt (Dialog *d, const char *newPrompt, Item *myItem, int32 tag)
 
bool Dialog_Remove_Item (Dialog *d, Item *myItem, int32 tag)
 
void Dialog_Refresh_Item (Dialog *d, Item *myItem, int32 tag)
 
void Dialog_KeyMouseCollision ()
 
void Dialog_SystemError (char *s)
 
bool sizeofGUIelement_border (int16 el_type, int32 *w, int32 *h)
 
bool sizeofGUIelement_interior (ButtonDrawRec *bdr, M4Rect *myRect)
 
bool drawGUIelement (ButtonDrawRec *bdr, M4Rect *myRect)
 
bool custom_drawGUIelement (ButtonDrawRec *bdr, M4Rect *myRect)
 
bool custom_sizeofGUIelement_border (int16 el_type, int32 *w, int32 *h)
 
bool custom_sizeofGUIelement_interior (ButtonDrawRec *bdr, M4Rect *myRect)
 
TextScrnTextScrn_Create (int32 x1, int32 y1, int32 x2, int32 y2, int32 luminance, uint32 scrnFlags, int32 textColor, int32 hiliteColor, int32 textColor_alt1=0, int32 hiliteColor_alt1=0, int32 textColor_alt2=0, int32 hiliteColor_alt2=0)
 
void vmng_TextScrn_Destroy (TextScrn *myTextScrn)
 
void TextScrn_Destroy (TextScrn *myTextScrn)
 
void TextScrn_Activate (TextScrn *myTextScrn)
 
bool TextScrn_Add_Key (TextScrn *myTextScrn, long myKey, HotkeyCB cb)
 
bool TextScrn_Add_TextItem (TextScrn *myTextScrn, int32 x, int32 y, int32 tag, int32 justification, const char *prompt, M4CALLBACK callback)
 
bool TextScrn_Add_Message (TextScrn *myTextScrn, int32 x, int32 y, int32 tag, int32 justification, const char *prompt)
 
void TextScrn_Change_TextItem (TextScrn *myTextScrn, int32 tag, char *prompt, uint8 color)
 
void TextScrn_Delete_TextItem (TextScrn *myTextScrn, int32 tag)
 
bool InitItems (void)
 
ItemItem_create (Item *parent, enum ItemType type, int32 tag, M4CALLBACK cb)
 
void Item_destroy (Item *myItem)
 
void Item_empty_list (Item *myItem)
 
ItemItemAdd (Item *itemList, int32 x, int32 y, int32 w, int32 h, const char *prompt, int32 tag, ItemType type, M4CALLBACK cb, int32 promptMax)
 
ItemItemFind (Item *itemList, int32 tag)
 
bool Item_SetViewBottom (Item *i)
 
bool ListItemExists (Item *myItem, char *prompt, int32 listTag)
 
bool ListItemAdd (Item *myItem, char *prompt, int32 listTag, int32 addMode, ListItem *changedItem)
 
bool ListItemDelete (Item *myItem, ListItem *myListItem, int32 listTag)
 
bool ListItemChange (Item *myItem, ListItem *myListItem, int32 listTag, char *newPrompt, int32 newTag, int32 changeMode)
 
void ViewCurrListItem (Item *myItem)
 
ListItemListItemFind (Item *myItem, int32 searchMode, char *searchStr, int32 parm1)
 
bool ListItemSearch (Item *myItem, int32 searchMode, char *searchStr, int32 parm1)
 
bool DoubleClickOnListBox (Item *myItem, int32 xOffset, int32 yOffset)
 
bool ClickOnListBox (Item *myItem, int32 xOffset, int32 yOffset, int32 scrollType)
 
bool ResetDefaultListBox (Item *myItem)
 
bool Item_change_prompt (Item *myItem, const char *newPrompt)
 
void Item_ClearOrigPrompt (void)
 
ItemItem_RestoreTextField (void)
 
ItemItem_CheckTextField (void)
 
void Item_SaveTextField (Item *myItem)
 
void SetTextBlockBegin (Item *myItem, int32 relXPos)
 
void SetTextBlockEnd (Item *myItem, int32 relXPos)
 
bool Item_TextEdit (Item *myItem, int32 parm1)
 
bool GetNextListItem (Item *myItem)
 
bool GetNextPageList (Item *myItem)
 
bool GetPrevListItem (Item *myItem)
 
bool GetPrevPageList (Item *myItem)
 
bool Item_show (Item *i, void *bdrDialog, Buffer *scrBuf, int32 itemType)
 
void Item_format (Item *i)
 
ItemItem_set_default (Item *itemList, Item *currDefault, int32 tag)
 
ItemItem_set_pressed (Item *itemList, Item *myItem, int32 tag)
 
ItemItem_set_unpressed (Item *itemList, Item *myItem, int32 tag)
 
ItemItem_set_cancel (Item *itemList, int32 tag)
 
ItemItem_set_next_default (Item *currDefault, Item *itemList)
 
ItemItem_set_prev_default (Item *currDefault, Item *listBottom)
 
bool gui_mouse_init ()
 
void gui_mouse_shutdown ()
 
bool mouse_set_sprite (int32 spriteNum)
 
void gui_mouse_refresh ()
 
void mouse_hide ()
 
void mouse_show ()
 
void mouse_lock_sprite (int32 mouseNum)
 
void mouse_unlock_sprite ()
 
bool gui_system_init ()
 
void gui_system_shutdown ()
 
void gui_system_event_handler ()
 
void AddSystemHotkey (int32 myKey, HotkeyCB callback)
 
void RemoveSystemHotkey (int32 myKey)
 
HotkeyCB GetSystemHotkey (int32 myKey)
 
bool vmng_init ()
 
void vmng_shutdown ()
 
ScreenContextvmng_screen_create (int32 x1, int32 y1, int32 x2, int32 y2, int32 scrnType, uint32 scrnFlags, void *scrnContent, RefreshFunc redraw, EventHandler evtHandler)
 
ScreenContextvmng_screen_find (void *scrnContent, int32 *status)
 
void vmng_screen_hide (void *scrnContent)
 
void vmng_screen_show (void *scrnContent)
 
void vmng_screen_to_back (void *scrnContent)
 
void vmng_screen_dispose (void *scrnContent)
 
void vmng_refresh_video (int32 scrnX, int32 scrnY, int32 x1, int32 y1, int32 x2, int32 y2, Buffer *srcBuffer)
 
ScreenContextExtractScreen (void *scrnContent, int32 status)
 
RectListvmng_CreateNewRect (int32 x1, int32 y1, int32 x2, int32 y2)
 
void vmng_AddRectToRectList (RectList **scrnRectList, int32 x1, int32 y1, int32 x2, int32 y2)
 
RectListvmng_DuplicateRectList (RectList *myRectList)
 
bool vmng_RectIntersectsRectList (RectList *myRectList, int32 x1, int32 y1, int32 x2, int32 y2)
 
bool vmng_RectListValid (RectList *myRectList)
 
bool vmng_ClipRectList (RectList **myRectList, int32 clipX1, int32 clipY1, int32 clipX2, int32 clipY2)
 
void vmng_DisposeRectList (RectList **rectList)
 
void vmng_RemoveRectFromRectList (RectList **scrnRectList, int32 x1, int32 y1, int32 x2, int32 y2)
 
bool GetScreenCoords (void *scrnContent, int32 *x1, int32 *y1, int32 *x2, int32 *y2)
 
bool vmng_SetScreenRefresh (void *scrnContent, RefreshFunc redraw)
 
bool AddScreenHotkey (void *scrnContent, int32 myKey, HotkeyCB callback)
 
bool RemoveScreenHotkey (void *scrnContent, int32 myKey)
 
bool MoveScreenAbs (ScreenContext *myScreen, int32 parmX, int32 parmY)
 
bool MoveScreenDelta (ScreenContext *myScreen, int32 parmX, int32 parmY)
 
bool MoveScreenDelta (int32 parmX, int32 parmY)
 
bool ResizeScreen (void *scrnContent, int32 newW, int32 newH)
 
void RestoreScreens (int32 updateX1, int32 updateY1, int32 updateX2, int32 updateY2)
 
void RestoreScreensInContext (int32 x1, int32 y1, int32 x2, int32 y2, ScreenContext *myScreen)
 
void Screen2BuffC (int8 *Buff)
 
void mem_stash_init (int16 num_types)
 
void mem_stash_shutdown ()
 
bool mem_register_stash_type (int32 *memType, int32 size, int32 numRequests, const Common::String &name)
 
void mem_free_to_stash (void *myMem, int32 memType)
 
void * mem_get_from_stash (int32 memType, const Common::String &name)
 
char * mem_strdup (const char *str)
 
Handle mem_alloc (size_t size, const char *)
 
void mem_free (Handle ptr)
 
Handle mem_realloc (Handle src, size_t new_size, const char *)
 
void HLock (Handle h)
 
void HUnLock (Handle h)
 
void HPurge (Handle h)
 
void HNoPurge (Handle h)
 
bool MakeMem (size_t FreeBlockNeeded, const char *)
 
MemHandle MakeNewHandle (size_t size, const Common::String &)
 
bool mem_ReallocateHandle (MemHandle h, size_t size, const Common::String &name)
 
MemHandle NewHandle (size_t size, const Common::String &)
 
void DisposeHandle (MemHandle handle)
 
uint32 MaxMem (Size *growBytes)
 
void PurgeMem ()
 
void CompactMem ()
 
size_t mem_avail ()
 
void adv_GetCodeMemory ()
 
void adv_GetBackgroundMemory ()
 
MemHandle rget (const Common::String &resourceName, int32 *ResourceSize)
 
void rtoss (const Common::String &resourceName)
 
void RLE8Decode (const uint8 *inBuff, uint8 *outBuff, uint32 pitch)
 
uint8 * SkipRLE_Lines (uint32 linesToSkip, uint8 *rleData)
 
size_t RLE8Decode_Size (byte *src, int pitch)
 
MouseEvent mouse_get_event ()
 
bool util_kbd_check (int32 *parm1)
 
bool digi_preload (const Common::String &name, int roomNum=-1)
 
void digi_unload (const Common::String &name)
 
int32 digi_play (const char *name, uint channel, int32 vol=255, int32 trigger=-1, int32 room_num=-1)
 
int32 digi_play_loop (const char *name, uint channel, int32 vol=255, int32 trigger=-1, int32 room_num=-1)
 
void digi_read_another_chunk ()
 
void digi_stop (int channel)
 
bool digi_play_state (int channel)
 
void digi_change_volume (int channel, int vol)
 
void digi_set_overall_volume (int vol)
 
int digi_get_overall_volume ()
 
int32 digi_ticks_to_play (const char *name, int roomNum=-1)
 
void digi_change_panning (int val1, int val2)
 
void midi_play (const char *name, int volume, int loop, int trigger, int roomNum)
 
void midi_loop ()
 
void midi_stop ()
 
void midi_set_overall_volume (int vol)
 
void midi_fade_volume (int val1, int val2)
 
void tt_read_header (SysFile *ifp, int32 *file_x, int32 *file_y, int32 *num_x_tiles, int32 *num_y_tiles, int32 *tile_x, int32 *tile_y, RGB8 *pal)
 
Buffertt_read (SysFile *ifp, int index, int32 tile_x, int32 tile_y)
 
uint32 timer_read ()
 
uint32 timer_read_dos ()
 
uint32 timer_read_600 ()
 
uint32 timer_read_60 ()
 
int32 * ws_GetDataFormats ()
 
bool ws_InitCruncher ()
 
void ws_KillCruncher ()
 
Anim8ws_AddAnim8ToCruncher (machine *m, int32 sequHash)
 
bool ws_ChangeAnim8Program (machine *m, int32 newSequHash)
 
void ws_RemoveAnim8FromCruncher (Anim8 *myAnim8)
 
bool ws_PauseAnim8 (Anim8 *myAnim8)
 
bool ws_ResumeAnim8 (Anim8 *myAnim8)
 
int32 ws_PreProcessPcode (uint32 **PC, Anim8 *myAnim8)
 
void ws_CrunchAnim8s (int16 *depth_table)
 
void ws_CrunchEOSreqs ()
 
bool ws_OnEndSeqRequest (Anim8 *myAnim8, int32 pcOffset, int32 pcCount)
 
void ws_CancelOnEndSeq (Anim8 *myAnim8)
 
bool ws_InitHAL ()
 
void ws_KillHAL ()
 
void ws_DoDisplay (Buffer *background, int16 *depth_table, Buffer *screenCodeBuff, uint8 *myPalette, uint8 *ICT, bool updateVideo)
 
void ws_hal_RefreshWoodscriptBuffer (cruncher *myCruncher, Buffer *background, int16 *depth_table, Buffer *screenCodes, uint8 *myPalette, uint8 *ICT)
 
void GetBezCoeffs (frac16 *ctrlPoints, frac16 *coeffs)
 
void GetBezPoint (frac16 *x, frac16 *y, frac16 *coeffs, frac16 tVal)
 
bool InitCCB (CCB *myCCB)
 
void HideCCB (CCB *myCCB)
 
void ShowCCB (CCB *myCCB)
 
void MoveCCB (CCB *myCCB, frac16 deltaX, frac16 deltaY)
 
void KillCCB (CCB *myCCB, bool restoreFlag)
 
void Cel_msr (Anim8 *myAnim8)
 
void ws_OverrideCrunchTime (machine *m)
 
bool CheckAddr ()
 
void ws_Error (machine *m, int32 errorType, quadchar errorCode, const char *errMsg)
 
void ws_DumpMachine (machine *m)
 
void ws_LogErrorMsg (const char *sourceFile, uint32 lineNum, const char *fmt,...)
 
bool InitWSAssets ()
 
bool ClearWSAssets (uint32 assetType, int32 minHash, int32 maxHash)
 
void ShutdownWSAssets ()
 
bool LoadWSAssets (const char *wsAssetName)
 
bool LoadWSAssets (const char *wsAssetName, RGB8 *myPalette)
 
int32 AddWSAssetCELS (const char *wsAssetName, int32 hash, RGB8 *myPalette)
 
M4spriteGetWSAssetSprite (char *spriteName, uint32 hash, uint32 index, M4sprite *mySprite, bool *streamSeries)
 
CCBGetWSAssetCEL (uint32 hash, uint32 index, CCB *myCCB)
 
int32 GetWSAssetCELCount (uint32 hash)
 
int32 GetWSAssetCELFrameRate (uint32 hash)
 
int32 GetWSAssetCELPixSpeed (uint32 hash)
 
int32 ws_get_sprite_width (uint32 hash, int32 index)
 
int32 ws_get_sprite_height (uint32 hash, int32 index)
 
MemHandle ws_GetSEQU (uint32 hash, int32 *numLocalVars, int32 *offset)
 
MemHandle ws_GetMACH (uint32 hash, int32 *numStates, int32 *stateTableOffset, int32 *machInstrOffset)
 
MemHandle ws_GetDATA (uint32 hash, uint32 index, int32 *rowOffset)
 
int32 ws_GetDATACount (uint32 hash)
 
int32 GetSSHeaderInfo (Common::SeekableReadStream *stream, uint32 **data, RGB8 *myPalette)
 
bool ws_GetSSMaxWH (MemHandle ssHandle, int32 ssOffset, int32 *maxW, int32 *maxH)
 
int32 LoadSpriteSeries (const char *assetName, MemHandle *seriesHandle, int32 *celsOffset, int32 *palOffset, RGB8 *myPalette)
 
int32 LoadSpriteSeriesDirect (const char *assetName, MemHandle *seriesHandle, int32 *celsOffset, int32 *palOffset, RGB8 *myPalette)
 
M4spriteCreateSprite (MemHandle resourceHandle, int32 handleOffset, int32 index, M4sprite *mySprite, bool *streamSeries)
 
bool ws_OpenSSstream (SysFile *streamFile, Anim8 *anim8)
 
bool ws_GetNextSSstreamCel (Anim8 *anim8)
 
void ws_CloseSSstream (CCB *myCCB)
 
bool ws_Initialize (frac16 *theGlobals)
 
void ws_Shutdown ()
 
void pauseEngines ()
 
void unpauseEngines ()
 
void addPauseTime (int32 myTime)
 
void cycleEngines (Buffer *cleanBackground, int16 *depth_table, Buffer *screenCodes, uint8 *myPalette, uint8 *ICT, bool updateVideo)
 
void ws_RefreshWoodscriptBuffer (Buffer *cleanBackground, int16 *depth_table, Buffer *screenCodes, uint8 *myPalette, uint8 *ICT)
 
void terminateMachine (machine *m)
 
void terminateMachinesByHash (uint32 machHash)
 
void terminateMachineAndNull (machine *&m)
 
bool verifyMachineExists (machine *m)
 
int32 ws_KillMachines ()
 
void ws_KillDeadMachines ()
 
void ws_StepWhile (machine *m, int32 pcOffset, int32 pcCount)
 
void IntoTheState (machine *m)
 
machineTriggerMachineByHash (int32 myHash, Anim8 *parentAnim8, int32 dataHash, int32 dataRow, MessageCB CintrMsg, bool debug, const char *machName)
 
machineTriggerMachineByHash (int32 val1, int32 val2, int32 val3, int32 val4, int32 val5, int32 val6, int32 x, int32 y, int32 scale, int32 layer, bool flag, MessageCB intrMsg, const char *machName)
 
machineTriggerMachineByHash (MessageCB intrMsg, const char *machName)
 
void sendWSMessage (uint32 msgHash, frac16 msgValue, machine *recvM, uint32 machHash, machine *sendM, int32 msgCount)
 
void sendWSMessage (int32 val1, machine *recv, int32 series1, int32 val3, int32 val4, int32 trigger, int32 series2, int32 val6, int32 val7, int32 val8)
 
bool ws_InitWSTimer (void)
 
void ws_KillTime (void)
 
void ws_MakeOnTimeReq (int32 wakeUpTime, machine *myXM, int32 pcOffset, int32 pcCount)
 
void ws_CancelOnTimeReqs (machine *m)
 
void ws_CheckTimeReqs (int32 curTime)
 

Variables

constexpr int kScaleEditor = 1
 
constexpr int NO_TRIGGER = -1
 
constexpr int TENTH_SECOND = 6
 
constexpr int MAX_TIMERS = 32
 
struct M4::conv_chunk PACKED_STRUCT
 
constexpr int GLB_SHARED_VARS = 256
 
constexpr int MIN_PAL_ENTRY = 1
 
constexpr int MAX_PAL_ENTRY = 255
 
constexpr uint32 SERIES_FORWARD = 0
 
constexpr uint32 SERIES_PINGPONG = 1
 
constexpr uint32 SERIES_BACKWARD = 2
 
constexpr uint32 SERIES_RANDOM = 4
 
constexpr uint32 SERIES_NO_TOSS = 8
 
constexpr uint32 SERIES_STICK = 16
 
constexpr uint32 SERIES_LOOP_TRIGGER = 32
 
constexpr uint32 SERIES_LOAD_PALETTE = 64
 
constexpr uint32 SERIES_HORZ_FLIP = 128
 
constexpr uint32 FORWARD = 0
 
constexpr uint32 PINGPONG = 1
 
constexpr uint32 BACKWARD = 2
 
constexpr uint32 STICK = 4
 
constexpr uint32 NO_TOSS = 8
 
constexpr int SCREEN_WIDTH = 640
 
constexpr int SCREEN_HEIGHT = 480
 
constexpr uint32 kArrowCursor = 0
 
M4Engineg_engine
 
Eventsg_events
 
Varsg_vars
 
const char * myRegLabels []
 
const char * myGlobLabels []
 
const char * tagLabels []
 

Detailed Description

I know this is confusing, but the original game had two different Globals arrays

Typedef Documentation

◆ frac16

typedef intptr M4::frac16

This needs to be intptr in ScummVM because series_stream in gr_series.cpp stores a pointer as a global. On some systems size(ptr) > sizeof(int)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Global entry constants

Function Documentation

◆ read_catalog()

bool M4::read_catalog ( )

Read in the catalog

◆ db_get_catalog()

char* M4::db_get_catalog ( )

Return the catalog data

◆ db_rmlst_get_asset_room_path()

char* M4::db_rmlst_get_asset_room_path ( const char *  s,
char *  result,
int32 *  sceneCode 
)

Given an asset name, name, return "path" from the database in result. if path starts or ends with a '\', the '\' characters at those places are deleted.

◆ player_been_init()

bool M4::player_been_init ( int16  num_scenes)

Initializes player_been information, allocates memory for a list of scenes

Takes the number of scenes to allocate space for

Returns
True if successfully allocated

◆ player_been_shutdown()

void M4::player_been_shutdown ( )

Shuts down player_been system. Deallocates some memory

◆ player_reset_been()

void M4::player_reset_been ( void  )

Resets the player_been system

◆ player_been_sync()

void M4::player_been_sync ( Common::Serializer s)

Saves/loads player_been information

◆ player_enters_scene()

bool M4::player_enters_scene ( int16  scene_num)

Called whenever player enters a scene

Parameters
scene_numTakes the scene to be entered
Returns
True if the player has been there before, or false otherwise

◆ player_forgets_scene()

void M4::player_forgets_scene ( int16  scene_num)

Called if the apps programmer wants the player to forget about being in a room

◆ player_been_here()

bool M4::player_been_here ( int16  scene_num)

Checks whether player has been in specified scene before

◆ db_def_chk_read()

int M4::db_def_chk_read ( int16  room_code,
SceneDef rdef 
)

Reads the .DEF file for the specified room into the "room" structure.

Parameters
room_coderoom number
rdefOutput def to populate
Returns
Returns 0 if successful, or -1 for error

◆ hotspot_new()

HotSpotRec* M4::hotspot_new ( int  x1,
int  y1,
int  x2,
int  y2 
)

Creates a new hot spot, doesn't add it to any list. Takes coords, sets everything else to default values.

Returns
The new hotspot

◆ hotspot_add()

HotSpotRec* M4::hotspot_add ( HotSpotRec head,
HotSpotRec h,
bool  new_head 
)

Given a list and a hotspot to insert in that list, inserts the spot ordered by size, unless new_head is true, in which case the hotspot is the head regardless of size.

Returns
The new head of the list.

◆ hotspot_delete_record()

HotSpotRec* M4::hotspot_delete_record ( HotSpotRec head,
HotSpotRec h 
)

Takes the head of a list of hot spots, and a pointer to a spot to delete.

Returns
The new head of the list.

◆ hotspot_unlink()

HotSpotRec* M4::hotspot_unlink ( HotSpotRec head,
HotSpotRec h 
)

Takes the head of a list of hot spots, and a pointer to a spot to unlink.

Returns
The new head of the list.

◆ hotspot_which()

HotSpotRec* M4::hotspot_which ( HotSpotRec head,
int  x,
int  y 
)

Given a list of spots to check, and an x,y coordinate pair,

Returns
A pointer to the hotspot we're inside, or nullptr if there's nothing.

◆ inv_init()

bool M4::inv_init ( int32  num_objects)

Init the system, preferably in game_systems_initialize

◆ inv_register_thing()

bool M4::inv_register_thing ( const Common::String itemName,
const Common::String itemVerbs,
int32  scene,
int32  cel,
int32  cursor 
)

Register things during init of the game

Parameters
itemNameName of the object as it should appear as a sentence is built
itemVerbsVerbs should have this format: verbs = "slit,peel,fricasee,examine" There can be any number of verbs in the string.
sceneThe place for the thing to appear initially (BACKPACK is one place)
celIndex into the inventory sprite series for use when displaying inventory
cursorCel index into the cursor sprite series when the player is "holding" a thing

◆ kernel_trigger_create()

int32 M4::kernel_trigger_create ( int32  trigger_num)

Create a new trigger Trigger usage: [31-28][27-16][15-0] | | | | | +— trigger_num (0 - 0xffff) | +— room_id (0 - 4096) (0 - 0xfff) +— trigger_mode (0-16)

◆ kernel_trigger_dispatchx()

bool M4::kernel_trigger_dispatchx ( int32  trigger_num)

Dispatches a trigger.

Returns
Returns true if the trigger was handled. If the trigger is for a different room that current room_id, returns false. If no trigger_mode was attached to the trigger, returns false

◆ walker_has_walk_finished()

bool M4::walker_has_walk_finished ( machine sender)

Called every time s/he hits a node

◆ set_dlg_rect()

void M4::set_dlg_rect ( )

"xxxxxxxx" means the size you have calculated a conversation box to be, x x given the sentences that are in it, and whatever border x x space you may have in it. The boxes in Figure A may be xxxxxxxx where the user wants to place them. Obviously, the user won't try to put them out in hyperspace, but may do this if he wants the box to be flush with a corner (to grow up, down, left, or right.) Figure B is the re-calculated coordinates of the boxes in order to get them onto the background. The new boxes should not be in the interface or in the letterboxed areas at the top and bottom.

   xxxxxxxxx
   x   (d) x
   x       x             Figure A                       xxxxxxxxxxxx

0,0 xxxxxxxxx x (b) x x x x x (letterbox at top) xxxxxxxxxxxx

                     (background)









                                                xxxxxxxxxxxxx
                                                x     (c)   x
                                                x           x
                                                x           x
                                                x           x
                                                x           x

xxxxxxxxxxxxxxxxxx x x x x xxxxxxxxxxxxx x x (interface) x x x x x x x x (letterbox at bottom) x x x x x (a) x 640,479 xxxxxxxxxxxxxxxxxx

                         Figure B

0,0

   xxxxxxxx                                       xxxxxxxxxxx
   x  (d) x                                       x     (b) x
   x      x                                       x         x
   xxxxxxxx                                       x         x
                                                  xxxxxxxxxxx
 xxxxxxxxxxxxxxxxxx
 x                x
 x                x
 x                x                             xxxxxxxxxxxxx
 x                x                             x     (c)   x
 x                x                             x           x
 x                x                             x           x
 x                x                             x           x
 x (a)            x                             x           x
 xxxxxxxxxxxxxxxxxx                             xxxxxxxxxxxxx











                                                             640,479

If someone says to draw conversation box (a) at the location in Figure 1, then have it automatically re-position itself into where it is in Figure 2. The extra space around the newly re-positioned box should be about 10 pixels wide and/or tall. Make the spacing visually look identical. In other words, if the height of the border is 10 pixels, the width on the side of the new conversation box may need to be 15. You may have to experiment with this. In even other words, you should correct for the aspect ration.

The same thing should work for boxes (b), (c), and (d).

◆ param_init()

void M4::param_init ( )

Initialize params handler

◆ param_shutdown()

void M4::param_shutdown ( )

Shutdown params handler

◆ parse_all_flags()

void M4::parse_all_flags ( )

Parses any flags

◆ f_info_exists()

bool M4::f_info_exists ( const Common::Path filename)

Returns true if a given file exists

◆ f_info_get_file_size()

size_t M4::f_info_get_file_size ( const Common::Path filename)

Returns the size of a given file

◆ gr_buffer_rect_copy_2()

bool M4::gr_buffer_rect_copy_2 ( const Buffer from,
Buffer to,
int32  sx,
int32  sy,
int32  dx,
int32  dy,
int32  w,
int32  h 
)

Copies a "rectangular" buffer area from "from" to "unto". Size of copied rectangle is determined by "size_x, size_y". Upper left corner in source buffer is indicated by "from_x, from_y", and "unto_x, unto_y" determines upper left corner in destination buffer (if upper left corner coordinates are the same in both buffers, buf_rect_copy() can be used instead).

Returns
Returns true if successful.

◆ gr_buffer_rect_copy()

bool M4::gr_buffer_rect_copy ( Buffer from,
Buffer to,
int32  x,
int32  y,
int32  w,
int32  h 
)

Copies a "rectangular" buffer area from "from" to "unto". Size of copied rectangle is determined by "size_x, size_y". Upper left corner in BOTH buffers is indicated by "ul_x, ul_y". (To copy using separate corner coordinates in each buffer, use buf_rect_copy_2 ().

Returns
Returns true if successful.

◆ gr_buffer_rect_fill()

int32 M4::gr_buffer_rect_fill ( Buffer target,
int32  x1,
int32  y1,
int32  w,
int32  h 
)

Fills a rectangular buffer area with the specified byte value. Upper left corner is determined by "ul_x, ul_y", and sizes are determined by "size_x, size_y."

Returns
Returns true if successful; false if buffer invalid.

◆ buffer_put_pixel()

void M4::buffer_put_pixel ( Buffer buf,
int32  x,
int32  y,
byte  c 
)

Given X, Y sets the value of the pixel at that position

◆ buffer_get_pixel()

byte M4::buffer_get_pixel ( Buffer buf,
int32  x,
int32  y 
)

Given X, Y returns value of pixel at that address on the screen

◆ buffer_draw_box()

void M4::buffer_draw_box ( Buffer buf,
int32  x1,
int32  y1,
int32  x2,
int32  y2,
byte  color 
)

Draws outside edge of retangle given home and size along both axis

◆ buffer_draw_box_xor()

void M4::buffer_draw_box_xor ( Buffer buf,
int32  x1,
int32  y1,
int32  x2,
int32  y2 
)

Draws a rectangle using xor

◆ buffer_fill()

int32 M4::buffer_fill ( Buffer target,
byte  value 
)

Fills an entire buffer with a single byte value.

Returns
Returns True if successful, FALSE if buffer invalid.

◆ gr_hline()

void M4::gr_hline ( Buffer buf,
int32  x1,
int32  x2,
int32  y 
)

Given starting and ending points on the Y axis, and the constant X value, draws a line in the set color in the specified buffer

◆ gr_vline()

void M4::gr_vline ( Buffer buf,
int32  x,
int32  y1,
int32  y2 
)

Given starting and ending points on the Y axis, and the constant X value, draws a line in the given color on the live MCGA screen.

◆ pal_cycle_active()

bool M4::pal_cycle_active ( )

Returns true if color cycling is on

◆ pal_cycle_stop()

void M4::pal_cycle_stop ( )

Stops color cycling

◆ pal_cycle_resume()

void M4::pal_cycle_resume ( )

Starts color cycling

◆ pal_fx_update()

void M4::pal_fx_update ( )

Handles fading and cycling

◆ DAC_tint_range()

void M4::DAC_tint_range ( const RGB8 tintColor,
int32  percent,
int32  firstPalEntry,
int32  lastPalEntry,
bool  transparent 
)

This is used to effect the screen colours (not the master palette) temporarily until something else updates the DAC e.g. refresh_DAC()

◆ gui_buffer_system_init()

bool M4::gui_buffer_system_init ( )

Initialize any code associated with managing buffers in the GUI

◆ gui_buffer_system_shutdown()

void M4::gui_buffer_system_shutdown ( )

Shutdown any code associated with buffers management

◆ gui_buffer_register()

bool M4::gui_buffer_register ( int32  x1,
int32  y1,
Buffer myBuf,
uint32  scrnFlags,
EventHandler  evtHandler 
)

Register a Buffer with the view manager by creating a view mananger screen

Parameters
x1Where the screen should initially be placed, coords relative to the top left hand monitor corner.
y1The screens initial "y" coord
scrnFlagsFlags defining the screens: layer, transparency, moveability, etc.
evtHandlerA pointer to the procedure to be executed when the view manager registers a keyboard or mouse event
Returns
The success of the call
Remarks
The user is responsible for keeping the Buffer *. Any changes to the contents will be made by the user.

◆ gui_buffer_set_event_handler()

bool M4::gui_buffer_set_event_handler ( void *  myBuf,
EventHandler  evtHandler 
)

Change which procedure will handle the events sent to the screen, which was created to managed the Buffer specified.

Parameters
myBufThe Buffer specified.
evtHandlerThe new procedure to handle keyboard and mouse events.

◆ gui_system_event_handler()

void M4::gui_system_event_handler ( )

Determine if an event happens, and if so, which window should process the event This is the main "engine call" of the GUI. It should be called once each time in the applications main loop. All "hot key" call backs, and evtHandlers are executed from here.

◆ AddSystemHotkey()

void M4::AddSystemHotkey ( int32  myKey,
HotkeyCB  callback 
)

Add a "hot key" to the system (as opposed to a specific window).

Parameters
myKeyThe "key" which, when pressed, will cause the callback function to be executed.
callbackThe function to be executed when "myKey" is pressed.
Remarks
If the view manager has not been initialized, or sizeof(Hotkey) memory is not available, the procedure will be aborted.

◆ RemoveSystemHotkey()

void M4::RemoveSystemHotkey ( int32  myKey)

Remove a "hot key" from the system

◆ GetSystemHotkey()

HotkeyCB M4::GetSystemHotkey ( int32  myKey)

To find the callback associated with a "hot key" in the system

◆ vmng_init()

bool M4::vmng_init ( )

To initialize the GUI view manager.

Returns
The success of the call
Remarks
Should be called once during program initialization, after dpmi_init_mem() has been called.

◆ vmng_shutdown()

void M4::vmng_shutdown ( )

Shutdown the GUI view manager, and release all resources.

Since applications can be written in which Dialogs are designed, created, and Their callback procedures are executed by the view manager, it is not always necessary for the application to retain the (Dialog*)s which it created. Therefore, Any windows which contain a (Dialog*) and still exist also destroy The Dialog for which they were created. The same goes for (TextScrn*)s.

◆ vmng_screen_create()

ScreenContext* M4::vmng_screen_create ( int32  x1,
int32  y1,
int32  x2,
int32  y2,
int32  scrnType,
uint32  scrnFlags,
void *  scrnContent,
RefreshFunc  redraw,
EventHandler  evtHandler 
)

Create a new window for the identifier given (scrnContent).

Parameters
x1Top left x
y1Top left y
x2Bottom right x
y2Bottom right y
scrnTypeOne of: SCRN_DLG (Dialog), SCRN_BUF (Buffer), SCRN_TEXT (TextScrn). to identify scrnContent type.
Seethe overview at the top of this file for an explanation of scrnFlags.
scrnContentThe identifier for the new window.
redrawThe function pointer which will be called when the view manager requests the window to redraw a portion of itself.
evtHandlerThe function pointer call when the view manager determines that an event should be processed by this window.
Remarks
If TRUE is returned, the window was successfully created, and is currently in the list of inactive windows. A call to vmng_screen_show() will activate (make visible) this window.

◆ vmng_screen_find()

ScreenContext* M4::vmng_screen_find ( void *  scrnContent,
int32 *  status 
)

Return the ScreenContext * associated with a window, and to determine whether it is active, exists but is inactive (invisible, no events are received or blocked), or is undefined (does not exist).

Parameters
scrnContentThe window identifier.
statusIf not nullptr, the status: SCRN_ACTIVE, SCRN_INACTIVE, or SCRN_UNDEFN is recoreded here.
Returns
the ScreenContext* associated with the window which was created for the structure scrnContent. returns nullptr if now window was found.

◆ vmng_screen_hide()

void M4::vmng_screen_hide ( void *  scrnContent)

Remove a window from the active list, and place it on the inactive list

Parameters
Thewindow identifier

◆ vmng_screen_show()

void M4::vmng_screen_show ( void *  scrnContent)

Place a window at the front of its layer on the active list.

Parameters
scrnContentThe window Identifier.
Remarks
If the window is currently inactive, it will be activated and placed into the list at the front of its layer (SF_BACKGRND, SF_DRIFTER, SF_FLOATER, or SF_SURFACE). If the window is already active, it will be moved to the front of its layer.

◆ vmng_screen_to_back()

void M4::vmng_screen_to_back ( void *  scrnContent)

Place a window at the back of its layer.

Parameters
scrnContentThe window Identifier.
Remarks
Essentially this procedure does the same as vmng_screen_show(), the only difference is that the window is at the back of its layer.

◆ vmng_screen_dispose()

void M4::vmng_screen_dispose ( void *  scrnContent)

Release all resources associated with the window.

Parameters
scrnContentThe window Identifier.

◆ ExtractScreen()

ScreenContext* M4::ExtractScreen ( void *  scrnContent,
int32  status 
)

Remove the window from either the active list of windows, or the inactive list, wherever it was found.

◆ GetScreenCoords()

bool M4::GetScreenCoords ( void *  scrnContent,
int32 *  x1,
int32 *  y1,
int32 *  x2,
int32 *  y2 
)

Record the (global) coordinates of the window which was created for scrnContent.

Parameters
scrnContentThe window identifier
x1Window top-left X
y1Window top-left Y
x2Window bottom-right X
y2Window bottom-right Y

◆ vmng_SetScreenRefresh()

bool M4::vmng_SetScreenRefresh ( void *  scrnContent,
RefreshFunc  redraw 
)

Change which procedure will be called when a portion of the window needs to be redrawn.

Parameters
scrnContentThe window identifier
redrawThe new refresh function pointer

◆ AddScreenHotkey()

bool M4::AddScreenHotkey ( void *  scrnContent,
int32  myKey,
HotkeyCB  callback 
)

Add a "hot key" to a window. The window identifier

Parameters
myKeyThe "key" which, when pressed, will cause the callback function to be executed.
callbackThe function to be executed when "myKey" is pressed

◆ RemoveScreenHotkey()

bool M4::RemoveScreenHotkey ( void *  scrnContent,
int32  myKey 
)

Remove a hot key

Parameters
scrnContentThe window identifier
myKeyThe "hot key" to be removed.
Returns
False if either the window or the "hot key" could not be found, TRUE if successful

◆ MoveScreenAbs()

bool M4::MoveScreenAbs ( ScreenContext myScreen,
int32  parmX,
int32  parmY 
)

Obvious shell to MoveScreen

◆ MoveScreenDelta()

bool M4::MoveScreenDelta ( ScreenContext myScreen,
int32  parmX,
int32  parmY 
)

Obvious shell to MoveScreen

◆ ResizeScreen()

bool M4::ResizeScreen ( void *  scrnContent,
int32  newW,
int32  newH 
)

Resize the windows width and/or height

Parameters
newWThe new width of the window. If <= 0, the old window width will remain
newHThe new height of the window. If <= 0, the old window height will remain.
Returns
TRUE if the window was found, FALSE otherwise

◆ RestoreScreens()

void M4::RestoreScreens ( int32  updateX1,
int32  updateY1,
int32  updateX2,
int32  updateY2 
)

Restore the monitor image by redrawing the visible portions of each window intersecting the given rectangle.

Parameters
updateX1Rectangle top-left X
updateY1Rectangle top-left Y
updateX2Rectangle bottom-right X
updateY2Rectangle bottom-right Y

◆ RestoreScreensInContext()

void M4::RestoreScreensInContext ( int32  x1,
int32  y1,
int32  x2,
int32  y2,
ScreenContext myScreen 
)

A shell to RestoreScreens

◆ Screen2BuffC()

void M4::Screen2BuffC ( int8 *  Buff)

Capture a screenshot to a bitmap.

◆ mem_stash_init()

void M4::mem_stash_init ( int16  num_types)

Initialize the memory manager.

◆ mem_stash_shutdown()

void M4::mem_stash_shutdown ( )

Purges the memory manager

◆ mem_free_to_stash()

void M4::mem_free_to_stash ( void *  myMem,
int32  memType 
)

To free a memory block whose size has been previously registered.

Parameters
myMemThe pointer to be freed

◆ mem_get_from_stash()

void* M4::mem_get_from_stash ( int32  memType,
const Common::String name 
)

Deliver a memory block whose size has been previously registered.

◆ RLE8Decode()

void M4::RLE8Decode ( const uint8 *  inBuff,
uint8 *  outBuff,
uint32  pitch 
)

Decode an 8BPP RLE encoded image

◆ SkipRLE_Lines()

uint8* M4::SkipRLE_Lines ( uint32  linesToSkip,
uint8 *  rleData 
)

Given RLE data, skips over a given number of encoded lines

◆ RLE8Decode_Size()

size_t M4::RLE8Decode_Size ( byte *  src,
int  pitch 
)

Returns the size of an RLE encoded image

Parameters
dataRLE data
pitchImage pitch
Returns
Decoded image's size in bytes

◆ tt_read_header()

void M4::tt_read_header ( SysFile ifp,
int32 *  file_x,
int32 *  file_y,
int32 *  num_x_tiles,
int32 *  num_y_tiles,
int32 *  tile_x,
int32 *  tile_y,
RGB8 pal 
)

Gets some information about a tt file

◆ tt_read()

Buffer* M4::tt_read ( SysFile ifp,
int  index,
int32  tile_x,
int32  tile_y 
)

Returns a pointer to an initialized buffer containing the image data. If an error occurs, out.x contains the error number while out.y is zero, and out.data is nullptr.

◆ ws_ChangeAnim8Program()

bool M4::ws_ChangeAnim8Program ( machine m,
int32  newSequHash 
)

This procedure assumes a machine has a slot with it's own memory

◆ ws_RemoveAnim8FromCruncher()

void M4::ws_RemoveAnim8FromCruncher ( Anim8 myAnim8)

This procedure flags the anim8 slot as empty

◆ ws_PreProcessPcode()

int32 M4::ws_PreProcessPcode ( uint32 **  PC,
Anim8 myAnim8 
)

Pre-processes a pcode instruction parameters. The instruction number is returned by this function, and the arguments are pointed to by these external globals: Frac16 *myArg1 Frac16 *myArg2 Frac16 *myArg3

◆ sendWSMessage()

void M4::sendWSMessage ( uint32  msgHash,
frac16  msgValue,
machine recvM,
uint32  machHash,
machine sendM,
int32  msgCount 
)

This proc is what allows a machine to send a message to another machine(s)