ScummVM API documentation
Scumm::ScummEngine Class Referenceabstract

#include <scumm.h>

Inheritance diagram for Scumm::ScummEngine:
Engine Common::Serializable Scumm::ScummEngine_v5 Scumm::ScummEngine_v6 Scumm::ScummEngine_v4 Scumm::ScummEngine_v60he Scumm::ScummEngine_v3 Scumm::ScummEngine_v70he Scumm::ScummEngine_v3old Scumm::ScummEngine_v2 Scumm::ScummEngine_v0

Classes

struct  ScaleSlot
 

Public Member Functions

 ScummEngine (OSystem *syst, const DetectorResult &dr)
 
Common::Error init ()
 
Common::Error go ()
 
Common::Error run () override
 
void errorString (const char *buf_input, char *buf_output, int buf_output_size) override
 
bool hasFeature (EngineFeature f) const override
 
bool gameSupportsQuitDialogOverride () const
 
void syncSoundSettings () override
 
Common::Error loadGameState (int slot) override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
void pauseEngineIntern (bool pause) override
 
void beginTextInput ()
 
void endTextInput ()
 
void parseEvents ()
 
void pauseGame ()
 
void restart ()
 
bool isUsingOriginalGUI () const
 
bool isMessageBannerActive ()
 
char displayMessage (const char *altButton, MSVC_PRINTF const char *message,...) GCC_PRINTF(3
 
char bool displayMessageYesNo (MSVC_PRINTF const char *message,...) GCC_PRINTF(2
 
int32 & scummVar (byte var, const char *varName, const char *file, int line)
 
int32 scummVar (byte var, const char *varName, const char *file, int line) const
 
void NES_loadCostumeSet (int n)
 
virtual Common::Path generateFilename (const int room) const
 
bool getSavegameName (int slot, Common::String &desc)
 
void listSavegames (bool *marks, int num)
 
void requestSave (int slot, const Common::String &name)
 
void requestLoad (int slot)
 
Common::String getTargetName () const
 
bool canPauseSoundsDuringSave () const
 
void runScript (int script, bool freezeResistant, bool recursive, int *lvarptr, int cycle=0)
 
void stopScript (int script)
 
void nukeArrays (byte scriptSlot)
 
bool openFile (BaseScummFile &file, const Common::Path &filename, bool resourceFile=false)
 
bool isMacM68kIMuse () const
 
int getResourceSize (ResType type, ResId idx)
 
byte * getResourceAddress (ResType type, ResId idx)
 
virtual byte * getStringAddress (ResId idx)
 
byte * getStringAddressVar (int i)
 
void ensureResourceLoaded (ResType type, ResId idx)
 
const byte * findResourceData (uint32 tag, const byte *ptr)
 
const byte * findResource (uint32 tag, const byte *ptr)
 
void applyWorkaroundIfNeeded (ResType type, int idx)
 
bool verifyMI2MacBootScript ()
 
bool verifyMI2MacBootScript (byte *buf, int size)
 
bool tryPatchMI1CannibalScript (byte *buf, int size)
 
int getResourceDataSize (const byte *ptr) const
 
void dumpResource (const char *tag, int index, const byte *ptr, int length=-1)
 
int getInventorySlot ()
 
int findInventory (int owner, int index)
 
int getInventoryCount (int owner)
 
bool getClass (int obj, int cls) const
 
int getObjectOrActorWidth (int object, int &width)
 
int getObjectOrActorXY (int object, int &x, int &y)
 
int getDist (int x, int y, int x2, int y2)
 
bool isValidActor (int id) const
 
ActorderefActor (int id, const char *errmsg=0) const
 
ActorderefActorSafe (int id, const char *errmsg) const
 
virtual void actorTalk (const byte *msg)
 
void stopTalk ()
 
int getTalkingActor ()
 
void setTalkingActor (int variable)
 
bool isCostumeInUse (int i) const
 
bool isLightOn () const
 
virtual int getCurrentLights () const
 
uint8 * getHEPaletteSlot (uint16 palSlot)
 
uint16 get16BitColor (uint8 r, uint8 g, uint8 b)
 
uint32 getPaletteColorFromRGB (byte *palette, byte r, byte g, byte b)
 
uint32 getPackedRGBColorFromPalette (byte *palette, uint32 color)
 
void fetchBlackAndWhite (uint32 &black, uint32 &white, byte *palette, int paletteEntries)
 
int remapPaletteColor (int r, int g, int b, int threshold)
 
void readPCEPalette (const byte **ptr, byte **dest, int numEntries)
 
void colorPCEToRGB (uint16 color, byte *r, byte *g, byte *b)
 
void setPCETextPalette (uint8 color)
 
void markRectAsDirty (VirtScreenNumber virt, int left, int right, int top, int bottom, int dirtybit=0)
 
void markRectAsDirty (VirtScreenNumber virt, const Common::Rect &rect, int dirtybit=0)
 
VirtScreenfindVirtScreen (int y)
 
byte * getMaskBuffer (int x, int y, int z)
 
double getTimerFrequency ()
 
double getAmigaMusicTimerFrequency ()
 
byte getNumBoxes ()
 
byte * getBoxMatrixBaseAddr ()
 
byte * getBoxConnectionBase (int box)
 
int getNextBox (byte from, byte to)
 
void setBoxFlags (int box, int val)
 
void setBoxScale (int box, int b)
 
bool checkXYInBoxBounds (int box, int x, int y)
 
BoxCoords getBoxCoordinates (int boxnum)
 
byte getMaskFromBox (int box)
 
Box * getBoxBaseAddr (int box)
 
byte getBoxFlags (int box)
 
int getBoxScale (int box)
 
int getScale (int box, int x, int y)
 
int getScaleFromSlot (int slot, int x, int y)
 
virtual void translateText (const byte *text, byte *trans_buff, int transBufferSize)
 
bool reverseIfNeeded (const byte *text, byte *reverseBuf, int reverseBufSize) const
 
Common::CodePage getDialogCodePage () const
 
byte * get2byteCharPtr (int idx)
 
bool isScummvmKorTarget ()
 
bool hasLocalizer ()
 
bool towns_isRectInStringBox (int x1, int y1, int x2, int y2)
 
- Public Member Functions inherited from Engine
MetaEnginegetMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual bool canSaveAutosaveCurrently ()
 
virtual int getAutosaveSlot () const
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
bool enhancementEnabled (int32 cls)
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static Common::String makeSavegameName (const Common::String &target, int slot, bool temporary)
 
static bool querySaveMetaInfos (const char *target, int slot, int heversion, Common::String &desc, Graphics::Surface *&thumbnail, SaveStateMetaInfos *&timeInfos)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Public Attributes

IMuse_imuse = nullptr
 
IMuseDigital * _imuseDigital = nullptr
 
MusicEngine_musicEngine = nullptr
 
Player_Towns_townsPlayer = nullptr
 
Sound_sound = nullptr
 
VerbSlot_verbs = nullptr
 
ObjectData_objs = nullptr
 
GameSettings _game
 
uint8 _gameMD5 [16]
 
Common::RandomSource _rnd
 
Gdi_gdi = nullptr
 
ResourceManager_res = nullptr
 
int _insideCreateResource = 0
 
bool _useOriginalGUI = true
 
bool _enableAudioOverride = false
 
bool _enableCOMISong = false
 
bool _isAmigaPALSystem = false
 
bool _quitFromScriptCmd = false
 
bool _isHE995 = false
 
bool _enableHECompetitiveOnlineMods = false
 
Common::Keymap_insaneKeymap
 
bool _isIndy4Jap = false
 
int _numLocalScripts = 60
 
int _numImages = 0
 
int _numRooms = 0
 
int _numScripts = 0
 
int _numSounds = 0
 
int _numCostumes = 0
 
int32 _numCharsets = 0
 
BaseCostumeLoader_costumeLoader = nullptr
 
BaseCostumeRenderer_costumeRenderer = nullptr
 
int _NESCostumeSet = 0
 
byte * _NEScostdesc = nullptr
 
byte * _NEScostlens = nullptr
 
byte * _NEScostoffs = nullptr
 
byte * _NEScostdata = nullptr
 
byte _NESPatTable [2][4096]
 
byte _NESPalette [2][16]
 
byte _NESBaseTiles = 0
 
int _NESStartStrip = 0
 
byte _currentRoom = 0
 
int _roomResource = 0
 
bool _egoPositioned = false
 
FilenamePattern _filenamePattern
 
Common::Path _containerFile
 
Common::Path _macCursorFile
 
byte OF_OWNER_ROOM = 0
 
uint32 * _classData = nullptr
 
byte _actorToPrintStrFor = 0
 
byte _V1TalkingActor = 0
 
int _sentenceNum = 0
 
SentenceTab _sentence [NUM_SENTENCE]
 
StringTab _string [6]
 
byte _haveMsg = 0
 
int16 _talkDelay = 0
 
int _NES_lastTalkingActor = 0
 
int _NES_talkColor = 0
 
int _roomHeight = 0
 
int _roomWidth = 0
 
int _screenHeight = 0
 
int _screenWidth = 0
 
VirtScreen _virtscr [4]
 
CameraData camera
 
bool _cameraIsFrozen = false
 
int _screenStartStrip = 0
 
int _screenEndStrip = 0
 
int _screenTop = 0
 
bool _forceBannerVirtScreen = false
 
bool _useMacScreenCorrectHeight = true
 
int _macScreenDrawOffset = 20
 
Common::RenderMode _renderMode
 
uint8 _bytesPerPixel = 1
 
Graphics::PixelFormat _outputPixelFormat
 
byte _roomPalette [256]
 
byte * _shadowPalette = nullptr
 
bool _skipDrawObject = 0
 
int _voiceMode = 0
 
byte _HEV7ActorPalette [256]
 
uint8 * _hePalettes = nullptr
 
uint16 _hePaletteSlot = 0
 
uint16 * _16BitPalette = nullptr
 
byte * _verbPalette = nullptr
 
ScummEngine_v0_Delays _V0Delay
 
uint16 _extraBoxFlags [65]
 
CharsetRenderer_charset = nullptr
 
byte _charsetColorMap [16]
 
Graphics::Surface _textSurface
 
int _textSurfaceMultiplier = 0
 
Graphics::Surface_macScreen = nullptr
 
MacGui_macGui = nullptr
 
bool _useMacGraphicsSmoothing = true
 
byte _completeScreenBuffer [320 *200]
 
Common::Language _language
 
bool _useCJKMode = false
 
bool _useMultiFont = false
 
int _numLoadedFont = 0
 
int _2byteShadow = 0
 
bool _force2ByteCharHeight = false
 
int _2byteHeight = 0
 
int _2byteWidth = 0
 
int _krStrPost = 0
 
byte _newLineCharacter = 0
 
byte * _2byteFontPtr = nullptr
 
byte * _2byteMultiFontPtr [20]
 
int _2byteMultiHeight [20]
 
int _2byteMultiWidth [20]
 
int _2byteMultiShadow [20]
 
byte VAR_KEYPRESS = 0xFF
 
byte VAR_SYNC = 0xFF
 
byte VAR_EGO = 0xFF
 
byte VAR_CAMERA_POS_X = 0xFF
 
byte VAR_HAVE_MSG = 0xFF
 
byte VAR_ROOM = 0xFF
 
byte VAR_OVERRIDE = 0xFF
 
byte VAR_MACHINE_SPEED = 0xFF
 
byte VAR_ME = 0xFF
 
byte VAR_NUM_ACTOR = 0xFF
 
byte VAR_CURRENT_LIGHTS = 0xFF
 
byte VAR_CURRENTDRIVE = 0xFF
 
byte VAR_CURRENTDISK = 0xFF
 
byte VAR_TMR_1 = 0xFF
 
byte VAR_TMR_2 = 0xFF
 
byte VAR_TMR_3 = 0xFF
 
byte VAR_MUSIC_TIMER = 0xFF
 
byte VAR_ACTOR_RANGE_MIN = 0xFF
 
byte VAR_ACTOR_RANGE_MAX = 0xFF
 
byte VAR_CAMERA_MIN_X = 0xFF
 
byte VAR_CAMERA_MAX_X = 0xFF
 
byte VAR_TIMER_NEXT = 0xFF
 
byte VAR_VIRT_MOUSE_X = 0xFF
 
byte VAR_VIRT_MOUSE_Y = 0xFF
 
byte VAR_ROOM_RESOURCE = 0xFF
 
byte VAR_LAST_SOUND = 0xFF
 
byte VAR_CUTSCENEEXIT_KEY = 0xFF
 
byte VAR_OPTIONS_KEY = 0xFF
 
byte VAR_TALK_ACTOR = 0xFF
 
byte VAR_CAMERA_FAST_X = 0xFF
 
byte VAR_SCROLL_SCRIPT = 0xFF
 
byte VAR_ENTRY_SCRIPT = 0xFF
 
byte VAR_ENTRY_SCRIPT2 = 0xFF
 
byte VAR_EXIT_SCRIPT = 0xFF
 
byte VAR_EXIT_SCRIPT2 = 0xFF
 
byte VAR_VERB_SCRIPT = 0xFF
 
byte VAR_SENTENCE_SCRIPT = 0xFF
 
byte VAR_INVENTORY_SCRIPT = 0xFF
 
byte VAR_CUTSCENE_START_SCRIPT = 0xFF
 
byte VAR_CUTSCENE_END_SCRIPT = 0xFF
 
byte VAR_CHARINC = 0xFF
 
byte VAR_WALKTO_OBJ = 0xFF
 
byte VAR_DEBUGMODE = 0xFF
 
byte VAR_HEAPSPACE = 0xFF
 
byte VAR_RESTART_KEY = 0xFF
 
byte VAR_PAUSE_KEY = 0xFF
 
byte VAR_MOUSE_X = 0xFF
 
byte VAR_MOUSE_Y = 0xFF
 
byte VAR_TIMER = 0xFF
 
byte VAR_TIMER_TOTAL = 0xFF
 
byte VAR_SOUNDCARD = 0xFF
 
byte VAR_VIDEOMODE = 0xFF
 
byte VAR_MAINMENU_KEY = 0xFF
 
byte VAR_FIXEDDISK = 0xFF
 
byte VAR_CURSORSTATE = 0xFF
 
byte VAR_USERPUT = 0xFF
 
byte VAR_SOUNDRESULT = 0xFF
 
byte VAR_TALKSTOP_KEY = 0xFF
 
byte VAR_FADE_DELAY = 0xFF
 
byte VAR_NOSUBTITLES = 0xFF
 
byte VAR_SOUNDPARAM = 0xFF
 
byte VAR_SOUNDPARAM2 = 0xFF
 
byte VAR_SOUNDPARAM3 = 0xFF
 
byte VAR_INPUTMODE = 0xFF
 
byte VAR_MEMORY_PERFORMANCE = 0xFF
 
byte VAR_VIDEO_PERFORMANCE = 0xFF
 
byte VAR_ROOM_FLAG = 0xFF
 
byte VAR_GAME_LOADED = 0xFF
 
byte VAR_NEW_ROOM = 0xFF
 
byte VAR_V5_TALK_STRING_Y = 0xFF
 
byte VAR_ROOM_WIDTH = 0xFF
 
byte VAR_ROOM_HEIGHT = 0xFF
 
byte VAR_SUBTITLES = 0xFF
 
byte VAR_V6_EMSSPACE = 0xFF
 
byte VAR_CAMERA_POS_Y = 0xFF
 
byte VAR_CAMERA_MIN_Y = 0xFF
 
byte VAR_CAMERA_MAX_Y = 0xFF
 
byte VAR_CAMERA_THRESHOLD_X = 0xFF
 
byte VAR_CAMERA_THRESHOLD_Y = 0xFF
 
byte VAR_CAMERA_SPEED_X = 0xFF
 
byte VAR_CAMERA_SPEED_Y = 0xFF
 
byte VAR_CAMERA_ACCEL_X = 0xFF
 
byte VAR_CAMERA_ACCEL_Y = 0xFF
 
byte VAR_CAMERA_DEST_X = 0xFF
 
byte VAR_CAMERA_DEST_Y = 0xFF
 
byte VAR_CAMERA_FOLLOWED_ACTOR = 0xFF
 
byte VAR_VERSION_KEY = 0xFF
 
byte VAR_DEFAULT_TALK_DELAY = 0xFF
 
byte VAR_CUSTOMSCALETABLE = 0xFF
 
byte VAR_BLAST_ABOVE_TEXT = 0xFF
 
byte VAR_VOICE_MODE = 0xFF
 
byte VAR_MUSIC_BUNDLE_LOADED = 0xFF
 
byte VAR_VOICE_BUNDLE_LOADED = 0xFF
 
byte VAR_LEFTBTN_DOWN = 0xFF
 
byte VAR_RIGHTBTN_DOWN = 0xFF
 
byte VAR_LEFTBTN_HOLD = 0xFF
 
byte VAR_RIGHTBTN_HOLD = 0xFF
 
byte VAR_PRE_SAVELOAD_SCRIPT = 0xFF
 
byte VAR_POST_SAVELOAD_SCRIPT = 0xFF
 
byte VAR_SAVELOAD_PAGE = 0xFF
 
byte VAR_OBJECT_LABEL_FLAG = 0xFF
 
byte VAR_CHARSET_MASK = 0xFF
 
byte VAR_V6_SOUNDMODE = 0xFF
 
byte VAR_CHARCOUNT = 0xFF
 
byte VAR_VERB_ALLOWED = 0xFF
 
byte VAR_ACTIVE_VERB = 0xFF
 
byte VAR_ACTIVE_OBJECT1 = 0xFF
 
byte VAR_ACTIVE_OBJECT2 = 0xFF
 
byte VAR_ALWAYS_REDRAW_ACTORS = 0xFF
 
byte VAR_SKIP_RESET_TALK_ACTOR = 0xFF
 
byte VAR_SOUND_CHANNEL = 0xFF
 
byte VAR_TALK_CHANNEL = 0xFF
 
byte VAR_SOUND_TOKEN_OFFSET = 0xFF
 
byte VAR_START_DYN_SOUND_CHANNELS = 0xFF
 
byte VAR_SOUND_CALLBACK_SCRIPT = 0xFF
 
byte VAR_EARLY_TALKIE_CALLBACK = 0xFF
 
byte VAR_EARLY_CHAN_0_CALLBACK = 0xFF
 
byte VAR_EARLY_CHAN_1_CALLBACK = 0xFF
 
byte VAR_EARLY_CHAN_2_CALLBACK = 0xFF
 
byte VAR_EARLY_CHAN_3_CALLBACK = 0xFF
 
byte VAR_MAIN_SCRIPT = 0xFF
 
byte VAR_DEFAULT_SCRIPT_PRIORITY = 0xFF
 
byte VAR_LAST_SCRIPT_PRIORITY = 0xFF
 
byte VAR_QUIT_SCRIPT = 0xFF
 
byte VAR_ERROR_FLAG = 0xFF
 
byte VAR_OPERATION_FAILURE = 0xFF
 
byte VAR_COLOR_BLACK = 0xFF
 
byte VAR_NUM_GLOBAL_OBJS = 0xFF
 
byte _townsPaletteFlags = 0
 
byte _townsCharsetColorMap [16]
 
int hotspotX
 
int hotspotY
 
int width
 
int height
 
byte animate
 
byte animateIndex
 
int8 state
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

virtual void setupScumm (const Common::Path &macResourceFile)
 
virtual void resetScumm ()
 
virtual void setupScummVars ()
 
virtual void resetScummVars ()
 
void setVideoModeVarToCurrentConfig ()
 
void setSoundCardVarToCurrentConfig ()
 
void setupCharsetRenderer (const Common::Path &macFontFile)
 
void setupCostumeRenderer ()
 
virtual void loadLanguageBundle ()
 
void loadCJKFont ()
 
void loadKorFont ()
 
void setupMusic (int midi)
 
void setTalkSpeed (int talkspeed)
 
int getTalkSpeed ()
 
virtual void scummLoop (int delta)
 
virtual void scummLoop_updateScummVars ()
 
virtual void scummLoop_handleSaveLoad ()
 
virtual void scummLoop_handleDrawing ()
 
virtual void scummLoop_handleActors ()=0
 
virtual void scummLoop_handleEffects ()
 
virtual void scummLoop_handleSound ()
 
virtual void runBootscript ()
 
virtual void terminateSaveMenuScript ()
 
virtual void parseEvent (Common::Event event)
 
void waitForTimer (int quarterFrames, bool freezeMacGui=false)
 
void setTimerAndShakeFrequency ()
 
uint32 getIntegralTime (double fMsecs)
 
virtual void processInput ()
 
virtual void processKeyboard (Common::KeyState lastKeyHit)
 
virtual void clearClickedStatus ()
 
virtual void updateCursor ()
 
virtual void animateCursor ()
 
virtual void updatePalette ()
 
virtual void setDefaultCursor ()
 
virtual void setCursorTransparency (int a)
 
virtual void resetCursors ()
 
virtual void setCursorHotspot (int x, int y)
 
virtual void setCursorFromBuffer (const byte *ptr, int width, int height, int pitch, bool preventScale=false)
 
void confirmExitDialog ()
 
void confirmRestartDialog ()
 
void pauseDialog ()
 
void messageDialog (const Common::U32String &message)
 
void versionDialog ()
 
virtual void setSnailCursor ()
 
void initBanners ()
 
Common::KeyState showBannerAndPause (int bannerId, int32 waitTime, const char *msg,...)
 
Common::KeyState showOldStyleBannerAndPause (const char *msg, int color, int32 waitTime)
 
Common::KeyState printMessageAndPause (const char *msg, int color, int32 waitTime, bool drawOnSentenceLine)
 
void clearBanner ()
 
void setBannerColors (int bannerId, byte r, byte g, byte b)
 
virtual int getBannerColor (int bannerId)
 
void setUpInternalGUIControl (int id, int normalFillColor, int normalTextColor, int topLineColor, int bottomLineColor, int leftLineColor, int rightLineColor, int highlightedTextColor, int highlightedFillColor, int anchorPointX, int anchorPointY, int x, int y, const char *label, bool centerFlag, bool unknownFlag)
 
void drawInternalGUIControl (int id, bool highlightColor)
 
int getInternalGUIControlFromCoordinates (int x, int y)
 
virtual bool isSmushActive ()
 
virtual bool isInsaneActive ()
 
virtual void queryQuit (bool returnToLauncher)
 
virtual void queryRestart ()
 
virtual const char * getGUIString (int stringId)
 
void waitForBannerInput (int32 waitTime, Common::KeyState &ks, bool &leftBtnClicked, bool &rightBtnClicked, bool handleMouseWheel=false)
 
virtual int getGUIStringHeight (const char *str)
 
virtual int getGUIStringWidth (const char *str)
 
virtual void drawGUIText (const char *buttonString, Common::Rect *clipRect, int textXPos, int textYPos, int textColor, bool centerFlag)
 
void getSliderString (int stringId, int value, char *sliderString, int size)
 
virtual int getMusicVolume ()
 
virtual int getSpeechVolume ()
 
virtual int getSFXVolume ()
 
virtual void setMusicVolume (int volume)
 
virtual void setSpeechVolume (int volume)
 
virtual void setSFXVolume (int volume)
 
virtual void toggleVoiceMode ()
 
virtual void handleLoadDuringSmush ()
 
virtual void setSkipVideo (int value)
 
void showMainMenu ()
 
virtual void setUpMainMenuControls ()
 
void setUpMainMenuControlsSegaCD ()
 
void setUpMainMenuControlsIndy4Jap ()
 
void drawMainMenuControls ()
 
void drawMainMenuControlsSegaCD ()
 
void updateMainMenuControls ()
 
void updateMainMenuControlsSegaCD ()
 
void drawMainMenuTitle (const char *title)
 
bool executeMainMenuOperation (int op, int mouseX, int mouseY, bool &hasLoadedState)
 
bool executeMainMenuOperationSegaCD (int op, int mouseX, int mouseY, bool &hasLoadedState)
 
bool shouldHighlightLabelAndWait (int clickedControl)
 
void fillSavegameLabels ()
 
bool canWriteGame (int slotId)
 
bool userWriteLabelRoutine (Common::KeyState &ks, bool &leftMsClicked, bool &rightMsClicked)
 
void saveCursorPreMenu ()
 
void restoreCursorPostMenu ()
 
void saveSurfacesPreGUI ()
 
void restoreSurfacesPostGUI ()
 
void showDraftsInventory ()
 
void setUpDraftsInventory ()
 
void drawDraftsInventory ()
 
bool saveState (Common::WriteStream *out, bool writeHeader=true)
 
bool saveState (int slot, bool compat, Common::String &fileName)
 
bool loadState (int slot, bool compat)
 
bool loadState (int slot, bool compat, Common::String &fileName)
 
void saveLoadWithSerializer (Common::Serializer &s) override
 
void saveResource (Common::Serializer &ser, ResType type, ResId idx)
 
void loadResource (Common::Serializer &ser, ResType type, ResId idx)
 
void loadResourceOLD (Common::Serializer &ser, ResType type, ResId idx)
 
void copyHeapSaveGameToFile (int slot, const char *saveName)
 
bool changeSavegameName (int slot, char *newName)
 
virtual Common::SeekableReadStreamopenSaveFileForReading (int slot, bool compat, Common::String &fileName)
 
virtual Common::SeekableWriteStreamopenSaveFileForWriting (int slot, bool compat, Common::String &fileName)
 
Common::String makeSavegameName (int slot, bool temporary) const
 
int getKeyState (int key)
 
int getActionState (ScummAction action)
 
void saveInfos (Common::WriteStream *file)
 
virtual void setupOpcodes ()=0
 
void executeOpcode (byte i)
 
const char * getOpcodeDesc (byte i)
 
void initializeLocals (int slot, int *vars)
 
int getScriptSlot ()
 
void startScene (int room, Actor *a, int b)
 
bool startManiac ()
 
void runObjectScript (int script, int entry, bool freezeResistant, bool recursive, int *vars, int slot=-1, int cycle=0)
 
void runScriptNested (int script)
 
void executeScript ()
 
void updateScriptPtr ()
 
virtual void runInventoryScript (int i)
 
virtual void runInventoryScriptEx (int i)
 
virtual void checkAndRunSentenceScript ()
 
void runExitScript ()
 
void runEntryScript ()
 
void runQuitScript ()
 
void runAllScripts ()
 
void freezeScripts (int scr)
 
void unfreezeScripts ()
 
bool isScriptInUse (int script) const
 
bool isRoomScriptRunning (int script) const
 
bool isScriptRunning (int script) const
 
void killAllScriptsExceptCurrent ()
 
void killScriptsAndResources ()
 
void decreaseScriptDelay (int amount)
 
void stopObjectCode ()
 
void stopObjectScript (int script)
 
void getScriptBaseAddress ()
 
void resetScriptPointer ()
 
int getVerbEntrypoint (int obj, int entry)
 
void refreshScriptPointer ()
 
byte fetchScriptByte ()
 
virtual uint fetchScriptWord ()
 
virtual int fetchScriptWordSigned ()
 
uint fetchScriptDWord ()
 
int fetchScriptDWordSigned ()
 
void ignoreScriptWord ()
 
void ignoreScriptByte ()
 
void push (int a)
 
int pop ()
 
virtual int readVar (uint var)
 
virtual void writeVar (uint var, int value)
 
virtual void resetSentence ()
 
virtual void beginCutscene (int *args)
 
virtual void endCutscene ()
 
void abortCutscene ()
 
void beginOverride ()
 
void endOverride ()
 
void copyScriptString (byte *dst)
 
int resStrLen (const byte *src)
 
void doSentence (int c, int b, int a)
 
virtual void allocateArrays ()
 
void openRoom (int room)
 
void closeRoom ()
 
void deleteRoomOffsets ()
 
virtual void readRoomsOffsets ()
 
void askForDisk (const Common::Path &filename, int disknum)
 
bool openResourceFile (const Common::Path &filename, byte encByte)
 
void loadPtrToResource (ResType type, ResId idx, const byte *ptr)
 
virtual int readResTypeList (ResType type)
 
int loadResource (ResType type, ResId idx)
 
int getResourceRoomNr (ResType type, ResId idx)
 
virtual uint32 getResourceRoomOffset (ResType type, ResId idx)
 
int readSoundResource (ResId idx)
 
int readSoundResourceSmallHeader (ResId idx)
 
bool isResourceInUse (ResType type, ResId idx) const
 
virtual void setupRoomSubBlocks ()
 
virtual void resetRoomSubBlocks ()
 
virtual void clearRoomObjects ()
 
virtual void resetRoomObjects ()
 
virtual void resetRoomObject (ObjectData *od, const byte *room, const byte *searchptr=NULL)
 
virtual void readArrayFromIndexFile ()
 
virtual void readMAXS (int blockSize)=0
 
virtual void readGlobalObjects ()
 
virtual void readIndexFile ()
 
virtual void readIndexBlock (uint32 block, uint32 itemsize)
 
virtual void loadCharset (int i)
 
void nukeCharset (int i)
 
void markObjectRectAsDirty (int obj)
 
virtual void loadFlObject (uint object, uint room)
 
void nukeFlObjects (int min, int max)
 
int findFlObjectSlot ()
 
int findLocalObjectSlot ()
 
void addObjectToInventory (uint obj, uint room)
 
void updateObjectStates ()
 
void putClass (int obj, int cls, bool set)
 
int getState (int obj)
 
void putState (int obj, int state)
 
void setObjectState (int obj, int state, int x, int y)
 
int getOwner (int obj) const
 
void putOwner (int obj, int owner)
 
void setOwnerOf (int obj, int owner)
 
void clearOwnerOf (int obj)
 
int getObjectRoom (int obj) const
 
virtual bool objIsActor (int obj)
 
virtual int objToActor (int obj)
 
virtual int actorToObj (int actor)
 
int getObjX (int obj)
 
int getObjY (int obj)
 
void getObjectWidth (int object, int &width)
 
void getObjectXYPos (int object, int &x, int &y)
 
void getObjectXYPos (int object, int &x, int &y, int &dir)
 
void getObjectXYPos (int object, int &x, int &y, int &dir, int &width)
 
int getObjOldDir (int obj)
 
int getObjNewDir (int obj)
 
int getObjectIndex (int object) const
 
int getObjectImageCount (int object)
 
int whereIsObject (int object) const
 
int findObject (int x, int y)
 
void findObjectInRoom (FindObjectInRoom *fo, byte findWhat, uint object, uint room)
 
int getObjActToObjActDist (int a, int b)
 
const byte * getObjOrActorName (int obj)
 
void setObjectName (int obj)
 
void addObjectToDrawQue (int object)
 
void removeObjectFromDrawQue (int object)
 
void clearDrawObjectQueue ()
 
void processDrawQue ()
 
virtual void clearDrawQueues ()
 
uint32 getOBCDOffs (int object) const
 
byte * getOBCDFromObject (int obj, bool v0CheckInventory=true)
 
const byte * getOBIMFromObjectData (const ObjectData &od)
 
const byte * getObjectImage (const byte *ptr, int state)
 
virtual int getObjectIdFromOBIM (const byte *obim)
 
virtual void handleMouseOver (bool updateInventory)
 
virtual void redrawVerbs ()
 
virtual void checkExecVerbs ()
 
void verbMouseOver (int verb)
 
int findVerbAtPos (int x, int y) const
 
virtual void drawVerb (int verb, int mode)
 
virtual void runInputScript (int clickArea, int val, int mode)
 
void restoreVerbBG (int verb)
 
void drawVerbBitmap (int verb, int x, int y)
 
int getVerbSlot (int id, int mode) const
 
void killVerb (int slot)
 
void setVerbObject (uint room, uint object, uint verb)
 
void walkActors ()
 
void playActorSounds ()
 
void redrawAllActors ()
 
virtual void setActorRedrawFlags ()
 
void putActors ()
 
void showActors ()
 
void resetV1ActorTalkColor ()
 
virtual void resetActorBgs ()
 
virtual void processActors ()
 
void processUpperActors ()
 
virtual int getActorFromPos (int x, int y)
 
virtual void setBuiltinCursor (int index)
 
void initScreens (int b, int h)
 
void initVirtScreen (VirtScreenNumber slot, int top, int width, int height, bool twobufs, bool scrollable)
 
void initBGBuffers (int height)
 
void initCycl (const byte *ptr)
 
void decodeNESBaseTiles ()
 
void drawObject (int obj, int scrollType)
 
void drawRoomObjects (int arg)
 
void drawRoomObject (int i, int arg)
 
void drawBox (int x, int y, int x2, int y2, int color)
 
void drawLine (int x1, int y1, int x2, int y2, int color)
 
void drawPixel (VirtScreen *vs, int x, int y, int16 color, bool useBackbuffer=false)
 
void moveScreen (int dx, int dy, int height)
 
void restoreBackground (Common::Rect rect, byte backcolor=0)
 
void redrawBGStrip (int start, int num)
 
virtual void redrawBGAreas ()
 
void cameraMoved ()
 
void setCameraAtEx (int at)
 
virtual void setCameraAt (int pos_x, int pos_y)
 
virtual void setCameraFollows (Actor *a, bool setCamera=false)
 
virtual void moveCamera ()
 
virtual void panCameraTo (int x, int y)
 
void clampCameraPos (Common::Point *pt)
 
void actorFollowCamera (int act)
 
const byte * getPalettePtr (int palindex, int room)
 
void setPaletteFromTable (const byte *ptr, int numcolor, int firstIndex=0)
 
void resetPalette ()
 
void setCurrentPalette (int pal)
 
void setRoomPalette (int pal, int room)
 
void setPCEPaletteFromPtr (const byte *ptr)
 
void setAmigaPaletteFromPtr (const byte *ptr)
 
virtual void setPaletteFromPtr (const byte *ptr, int numcolor=-1)
 
void setV1ColorTable (int renderMode)
 
virtual void setPalColor (int index, int r, int g, int b)
 
void setDirtyColors (int min, int max)
 
const byte * findPalInPals (const byte *pal, int index)
 
void swapPalColors (int a, int b)
 
virtual void copyPalColor (int dst, int src)
 
void cyclePalette ()
 
void stopCycle (int i)
 
virtual void palManipulateInit (int resID, int start, int end, int time)
 
void palManipulate ()
 
uint32 findClosestPaletteColor (byte *palette, int paletteLength, byte r, byte g, byte b)
 
void applyGrayscaleToPaletteRange (int min, int max)
 
bool haveToApplyMonkey1PaletteFix ()
 
void moveMemInPalRes (int start, int end, byte direction)
 
void setShadowPalette (int slot, int redScale, int greenScale, int blueScale, int startColor, int endColor)
 
void setShadowPalette (int redScale, int greenScale, int blueScale, int startColor, int endColor, int start, int end)
 
virtual void darkenPalette (int redScale, int greenScale, int blueScale, int startColor, int endColor)
 
virtual void drawDirtyScreenParts ()
 
void updateDirtyScreen (VirtScreenNumber slot)
 
void drawStripToScreen (VirtScreen *vs, int x, int width, int top, int bottom)
 
void mac_markScreenAsDirty (int x, int y, int w, int h)
 
void mac_drawStripToScreen (VirtScreen *vs, int top, int x, int y, int width, int height)
 
void mac_drawIndy3TextBox ()
 
void mac_undrawIndy3TextBox ()
 
void mac_undrawIndy3CreditsText ()
 
void mac_drawBufferToScreen (const byte *buffer, int pitch, int x, int y, int width, int height, bool epxRectangleExpansion=true)
 
void mac_updateCompositeBuffer (const byte *buffer, int pitch, int x, int y, int width, int height)
 
void mac_blitDoubleResImage (const byte *buffer, int pitch, int x, int y, int width, int height)
 
void mac_applyDoubleResToBuffer (const byte *inputBuffer, byte *outputBuffer, int width, int height, int inputPitch, int outputPitch)
 
void mac_blitEPXImage (const byte *buffer, int pitch, int x, int y, int width, int height, bool epxRectangleExpansion=true)
 
void mac_applyEPXToBuffer (const byte *inputBuffer, byte *outputBuffer, int width, int height, int inputPitch, int outputPitch, int xOffset, int yOffset, int bufferWidth, int bufferHeight)
 
void mac_scaleCursor (byte *&outCursor, int &outHotspotX, int &outHotspotY, int &outWidth, int &outHeight)
 
void mac_toggleSmoothing ()
 
Common::KeyState mac_showOldStyleBannerAndPause (const char *msg, int32 waitTime)
 
const byte * postProcessDOSGraphics (VirtScreen *vs, int &pitch, int &x, int &y, int &width, int &height) const
 
const byte * ditherVGAtoEGA (int &pitch, int &x, int &y, int &width, int &height) const
 
void fadeIn (int effect)
 
void fadeOut (int effect)
 
void dissolveEffectSelector ()
 
void transitionEffect (int a)
 
void dissolveEffect (int width, int height)
 
void scrollEffect (int dir)
 
void updateScreenShakeEffect ()
 
void setShake (int mode)
 
void upgradeGfxUsageBits ()
 
void setGfxUsageBit (int strip, int bit)
 
void clearGfxUsageBit (int strip, int bit)
 
bool testGfxUsageBit (int strip, int bit)
 
bool testGfxAnyUsageBits (int strip)
 
bool testGfxObjectUsageBits (int strip)
 
bool testGfxOtherUsageBits (int strip, int bit)
 
void amigaPaletteFindFirstUsedColor ()
 
void mapRoomPalette (int idx)
 
int remapRoomPaletteColor (int r, int g, int b)
 
void mapVerbPalette (int idx)
 
int remapVerbPaletteColor (int r, int g, int b)
 
void setScaleSlot (int slot, int x1, int y1, int scale1, int x2, int y2, int scale2)
 
void setBoxScaleSlot (int box, int slot)
 
void convertScaleTableToScaleSlot (int slot)
 
void calcItineraryMatrix (byte *itineraryMatrix, int num)
 
void createBoxMatrix ()
 
virtual bool areBoxesNeighbors (int i, int j)
 
void restoreCharsetBg ()
 
void clearCharsetMask ()
 
void clearTextSurface ()
 
virtual void initCharset (int charset)
 
virtual void printString (int m, const byte *msg)
 
virtual bool handleNextCharsetCode (Actor *a, int *c)
 
virtual void drawSentence ()
 
virtual void displayDialog ()
 
bool newLine ()
 
void drawString (int a, const byte *msg)
 
virtual void fakeBidiString (byte *ltext, bool ignoreVerb, int ltextSize) const
 
void wrapSegaCDText ()
 
void debugMessage (const byte *msg)
 
virtual void showMessageDialog (const byte *msg)
 
virtual int convertMessageToString (const byte *msg, byte *dst, int dstSize)
 
int convertIntMessage (byte *dst, int dstSize, int var)
 
int convertVerbMessage (byte *dst, int dstSize, int var)
 
int convertNameMessage (byte *dst, int dstSize, int var)
 
int convertStringMessage (byte *dst, int dstSize, int var)
 
void towns_drawStripToScreen (VirtScreen *vs, int dstX, int dstY, int srcX, int srcY, int w, int h)
 
void towns_fillTopLayerRect (int x1, int y1, int x2, int y2, int col)
 
void towns_swapVirtScreenArea (VirtScreen *vs, int x, int y, int w, int h)
 
void towns_clearStrip (int strip)
 
void towns_setupPalCycleField (int x1, int y1, int x2, int y2)
 
void towns_processPalCycleField ()
 
void towns_resetPalCycleFields ()
 
void towns_restoreCharsetBg ()
 
void towns_scriptScrollEffect (int dir)
 
void requestScroll (int dir)
 
void scrollLeft ()
 
void scrollRight ()
 
void towns_waitForScroll (int waitForDirection, int threshold=0)
 
void towns_updateGfx ()
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 

Static Protected Member Functions

static bool loadInfos (Common::SeekableReadStream *file, SaveStateMetaInfos *stuff)
 

Protected Attributes

VirtualMachineState vm
 
bool _needsSoundUnpause = false
 
uint32 _lastWaitTime
 
double _msecFractParts = 0.0
 
byte _macGammaCorrectionLookUp [256]
 
Dialog_pauseDialog = nullptr
 
Dialog_messageDialog = nullptr
 
Dialog_versionDialog = nullptr
 
int32 _bannerColors [50]
 
byte * _bannerMem = nullptr
 
uint32 _bannerMemSize = 0
 
int _bannerSaveYStart = 0
 
bool _messageBannerActive = false
 
bool _comiQuitMenuIsOpen = false
 
bool _closeBannerAndQueryQuitFlag = false
 
byte * _textSurfBannerMem = nullptr
 
uint32 _textSurfBannerMemSize = 0
 
InternalGUIControl _internalGUIControls [30]
 
const char _emptyMsg [1] = {'\0'}
 
const char _uncheckedBox [2] = {' ', '\0'}
 
const char _checkedBox [2] = {'x', '\0'}
 
const char _arrowUp [2] = {'\x18', '\0'}
 
const char _arrowDown [2] = {'\x19', '\0'}
 
const char _arrowLeft [2] = {'\x3c', '\0'}
 
const char _arrowRight [2] = {'\x3d', '\0'}
 
Common::StringArray _savegameNames
 
int _menuPage = 0
 
int _mainMenuSavegameLabel = 1
 
int _curDisplayedSaveSlotPage = 0
 
int _firstSaveStateOfList = 0
 
bool _mainMenuIsActive = false
 
bool _quitByGUIPrompt = false
 
char _mainMenuMusicSlider [17]
 
char _mainMenuSpeechSlider [17]
 
char _mainMenuSfxSlider [17]
 
char _mainMenuTextSpeedSlider [17]
 
char _mainMenuSegaCDPasscode [5]
 
int _spooledMusicIsToBeEnabled = 1
 
int _saveScriptParam = 0
 
int _guiCursorAnimCounter = 0
 
int _v5VoiceMode = 0
 
int _internalSpeakerSoundsAreOn = 1
 
int _guiMouseFlag = 1
 
int _guiJoystickFlag = 1
 
bool _mixerMutedByGUI = false
 
Graphics::Surface _savegameThumbnail
 
byte * _tempTextSurface = nullptr
 
byte * _tempMainSurface = nullptr
 
byte * _tempVerbSurface = nullptr
 
bool _postGUICharMask = false
 
byte * _curGrabbedCursor = nullptr
 
int8 _oldCursorState = 0
 
int _curCursorState = 0
 
int _curCursorWidth = 0
 
int _curCursorHeight = 0
 
int _curCursorHotspotX = 0
 
int _curCursorHotspotY = 0
 
byte _fastMode = 0
 
byte _numActors = 0
 
Actor ** _actors = nullptr
 
Actor ** _sortedActors = nullptr
 
byte * _arraySlot = nullptr
 
uint16 * _inventory = nullptr
 
uint16 * _newNames = nullptr
 
int16 _varwatch = 0
 
int32 * _roomVars = nullptr
 
int32 * _scummVars = nullptr
 
byte * _bitVars = nullptr
 
int _numVariables = 0
 
int _numBitVariables = 0
 
int _numLocalObjects = 0
 
int _numGlobalObjects = 0
 
int _numArray = 0
 
int _numVerbs = 0
 
int _numFlObject = 0
 
int _numInventory = 0
 
int _numNewNames = 0
 
int _numGlobalScripts = 0
 
int _numRoomVariables = 0
 
int _numPalettes = 0
 
int _numSprites = 0
 
int _numTalkies = 0
 
int _numUnk = 0
 
int _HEHeapSize = 0
 
int _curPalIndex = 0
 
Common::KeyState _keyPressed
 
bool _keyDownMap [512]
 
bool _actionMap [kScummActionCount]
 
Common::Point _mouse
 
Common::Point _virtualMouse
 
uint16 _mouseAndKeyboardStat = 0
 
byte _leftBtnPressed = 0
 
byte _rightBtnPressed = 0
 
int _mouseWheelFlag = 0
 
bool _setupIsComplete = false
 
uint32 _lastInputScriptTime = 0
 
int _bootParam = 0
 
bool _dumpScripts = false
 
bool _hexdumpScripts = false
 
bool _showStack = false
 
bool _debugMode = false
 
byte _saveLoadFlag = 0
 
byte _saveLoadSlot = 0
 
uint32 _lastSaveTime = 0
 
bool _saveTemporaryState = false
 
bool _pauseSoundsDuringSave = true
 
bool _loadFromLauncher = false
 
bool _videoModeChanged = false
 
Common::String _saveLoadFileName
 
Common::String _saveLoadDescription
 
uint32 _localScriptOffsets [1024]
 
const byte * _scriptPointer = nullptr
 
const byte * _scriptOrgPointer = nullptr
 
const byte *const * _lastCodePtr = nullptr
 
byte _opcode = 0
 
bool _debug = false
 
byte _currentScript = 0xFF
 
int _scummStackPos = 0
 
int _vmStack [256]
 
char _engineVersionString [50]
 
char _dataFileVersionString [50]
 
OpcodeEntry _opcodes [256]
 
BaseScummFile_fileHandle = nullptr
 
uint32 _fileOffset = 0
 
int _resourceHeaderSize = 8
 
byte _resourceMapper [128]
 
const byte * _resourceLastSearchBuf
 
uint32 _resourceLastSearchSize
 
Common::Mutex _resourceAccessMutex
 
int _lastLoadedRoom = 0
 
byte * _objectOwnerTable = nullptr
 
byte * _objectRoomTable = nullptr
 
byte * _objectStateTable = nullptr
 
int _numObjectsInRoom = 0
 
uint16 _verbMouseOver = 0
 
int8 _userPut = 0
 
uint16 _userState = 0
 
uint16 _screenB = 0
 
uint16 _screenH = 0
 
ColorCycle _colorCycle [16]
 
uint8 _colorUsedByCycle [256]
 
Graphics::PaletteLookup _pl
 
uint32 _ENCD_offs = 0
 
uint32 _EXCD_offs = 0
 
uint32 _CLUT_offs = 0
 
uint32 _EPAL_offs = 0
 
uint32 _IM00_offs = 0
 
uint32 _PALS_offs = 0
 
bool _fullRedraw = false
 
bool _bgNeedsRedraw = false
 
bool _screenEffectFlag = false
 
bool _completeScreenRedraw = false
 
bool _disableFadeInEffect = false
 
struct {
   int   hotspotX
 
   int   hotspotY
 
   int   width
 
   int   height
 
   byte   animate
 
   byte   animateIndex
 
   int8   state
 
_cursor
 
byte _grabbedCursor [16384]
 
byte _macGrabbedCursor [16384 *4]
 
byte _currentCursor = 0
 
byte _newEffect = 0
 
byte _switchRoomEffect2 = 0
 
byte _switchRoomEffect = 0
 
bool _doEffect = false
 
bool _snapScroll = false
 
byte * _compositeBuf
 
byte * _hercCGAScaleBuf = nullptr
 
bool _enableEGADithering = false
 
bool _supportsEGADithering = false
 
bool _shakeEnabled = false
 
bool _shakeTempSavedState = false
 
uint _shakeFrame = 0
 
uint32 _shakeNextTick = 0
 
uint32 _shakeTickCounter = 0
 
double _shakeTimerRate
 
double _timerFrequency
 
int _drawObjectQueNr = 0
 
byte _drawObjectQue [200]
 
uint32 gfxUsageBits [410 *3]
 
int _shadowPaletteSize = 0
 
byte _currentPalette [3 *256]
 
byte _darkenPalette [3 *256]
 
int _paletteChangedCounter = 1
 
int _palDirtyMin = 0
 
int _palDirtyMax = 0
 
byte _palManipStart = 0
 
byte _palManipEnd = 0
 
uint16 _palManipCounter = 0
 
byte * _palManipPalette = nullptr
 
byte * _palManipIntermediatePal = nullptr
 
bool _haveActorSpeechMsg = false
 
bool _useTalkAnims = false
 
uint16 _defaultTextSpeed = 0
 
int _saveSound = 0
 
bool _native_mt32 = false
 
bool _copyProtection = false
 
bool _shadowPalRemap = false
 
uint16 _amigaFirstUsedColor = 0
 
byte _amigaPalette [3 *64]
 
byte * _egaColorMap [2]
 
ScaleSlot _scaleSlots [20]
 
byte _charsetColor = 0
 
byte _charsetData [23][16]
 
int _charsetBufPos = 0
 
byte _charsetBuffer [512]
 
bool _keepText = false
 
byte _msgCount = 0
 
int _nextLeft = 0
 
int _nextTop = 0
 
Localizer_localizer = nullptr
 
Common::Rect _cyclRects [10]
 
int _numCyclRects = 0
 
int _scrollRequest = 0
 
int _scrollDeltaAdjust = 0
 
bool _scrollNeedDeltaAdjust = 0
 
int _refreshDuration [20]
 
int _refreshArrayPos = 0
 
bool _refreshNeedCatchUp = false
 
bool _enableSmoothScrolling = false
 
bool _forceFMTownsHiResMode = false
 
uint32 _scrollTimer = 0
 
uint32 _scrollDestOffset = 0
 
uint16 _scrollFeedStrips [3]
 
Common::Rect _curStringRect
 
byte _townsOverrideShadowColor = 0
 
byte _textPalette [48]
 
byte _townsClearLayerFlag = 1
 
byte _townsActiveLayerFlags = 3
 
TownsScreen_townsScreen = nullptr
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Static Protected Attributes

static const uint8 _townsLayer2Mask []
 

Friends

void syncWithSerializer (Common::Serializer &, ScaleSlot &)
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Detailed Description

Base class for all SCUMM engines.

Member Function Documentation

◆ run()

Common::Error Scumm::ScummEngine::run ( )
inlineoverridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ errorString()

void Scumm::ScummEngine::errorString ( const char *  buf_input,
char *  buf_output,
int  buf_output_size 
)
overridevirtual

Prepare an error string that is printed by the error() function.

Reimplemented from Engine.

◆ hasFeature()

bool Scumm::ScummEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ syncSoundSettings()

void Scumm::ScummEngine::syncSoundSettings ( )
overridevirtual

Notify the engine that the sound settings in the config manager might have changed and that it should adjust any internal volume (and other) values accordingly.

The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

Note
When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.

Reimplemented from Engine.

◆ loadGameState()

Common::Error Scumm::ScummEngine::loadGameState ( int  slot)
overridevirtual

Load a game state.

Parameters
slotThe slot from which a save state should be loaded.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Scumm::ScummEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ saveGameState()

Common::Error Scumm::ScummEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
slotThe slot into which the save state should be stored.
descDescription for the save state, entered by the user.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Scumm::ScummEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ pauseEngineIntern()

void Scumm::ScummEngine::pauseEngineIntern ( bool  pause)
overridevirtual

Actual implementation of pauseEngine by subclasses.

See also
Engine::pauseEngine

Reimplemented from Engine.

◆ getIntegralTime()

uint32 Scumm::ScummEngine::getIntegralTime ( double  fMsecs)
protected

Represents fractional milliseconds by decomposing the passed value into integral and fractional parts, then incrementing the integer part as needed on subsequent function calls.

◆ isMacM68kIMuse()

bool Scumm::ScummEngine::isMacM68kIMuse ( ) const

Is this game a Mac m68k v5 game with iMuse?

Member Data Documentation

◆ _rnd

Common::RandomSource Scumm::ScummEngine::_rnd

Random number generator

◆ _gdi

Gdi* Scumm::ScummEngine::_gdi = nullptr

Graphics manager

◆ _res

ResourceManager* Scumm::ScummEngine::_res = nullptr

Central resource data.

◆ _macGammaCorrectionLookUp

byte Scumm::ScummEngine::_macGammaCorrectionLookUp[256]
protected
Initial value:
= {
0x00, 0x05, 0x09, 0x0B, 0x0E, 0x10, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1E, 0x20, 0x22, 0x24,
0x25, 0x27, 0x28, 0x2A, 0x2C, 0x2D, 0x2F, 0x30, 0x31, 0x33, 0x34, 0x36, 0x37, 0x38, 0x3A, 0x3B,
0x3C, 0x3E, 0x3F, 0x40, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4D, 0x4E, 0x4F,
0x50, 0x51, 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5E, 0x5F, 0x60, 0x61,
0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71,
0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x80, 0x81,
0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8C, 0x8D, 0x8E, 0x8F,
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9B, 0x9C, 0x9D,
0x9E, 0x9F, 0xA0, 0xA1, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB,
0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8,
0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, 0xC0, 0xC1, 0xC2, 0xC3, 0xC3, 0xC4,
0xC5, 0xC6, 0xC7, 0xC7, 0xC8, 0xC9, 0xCA, 0xCA, 0xCB, 0xCC, 0xCD, 0xCD, 0xCE, 0xCF, 0xD0, 0xD0,
0xD1, 0xD2, 0xD3, 0xD3, 0xD4, 0xD5, 0xD6, 0xD6, 0xD7, 0xD8, 0xD9, 0xD9, 0xDA, 0xDB, 0xDC, 0xDC,
0xDD, 0xDE, 0xDF, 0xDF, 0xE0, 0xE1, 0xE1, 0xE2, 0xE3, 0xE4, 0xE4, 0xE5, 0xE6, 0xE7, 0xE7, 0xE8,
0xE9, 0xE9, 0xEA, 0xEB, 0xEC, 0xEC, 0xED, 0xEE, 0xEE, 0xEF, 0xF0, 0xF1, 0xF1, 0xF2, 0xF3, 0xF3,
0xF4, 0xF5, 0xF5, 0xF6, 0xF7, 0xF8, 0xF8, 0xF9, 0xFA, 0xFA, 0xFB, 0xFC, 0xFC, 0xFD, 0xFE, 0xFF
}

◆ _lastInputScriptTime

uint32 Scumm::ScummEngine::_lastInputScriptTime = 0
protected

Last time runInputScript was run (measured in terms of OSystem::getMillis()). This is currently only used for Indy3 mac to detect "double clicks".

◆ _bootParam

int Scumm::ScummEngine::_bootParam = 0
protected

The bootparam, to be passed to the script 1, the bootscript.

◆ _containerFile

Common::Path Scumm::ScummEngine::_containerFile

The name of the (macintosh/rescumm style) container file, if any.

◆ _textSurface

Graphics::Surface Scumm::ScummEngine::_textSurface

All text is normally rendered into this overlay surface. Then later drawStripToScreen() composits it over the game graphics.


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