Classes | |
struct | Event |
struct | SaveHeader |
Public Types | |
enum | kVolumeEntry { kVolumeMusic = 0, kVolumeSfx = 1, kVolumeSpeech = 2 } |
Public Types inherited from Engine | |
enum | EngineFeature { kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime, kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride } |
Public Member Functions | |
KyraEngine_v1 (OSystem *system, const GameFlags &flags) | |
uint8 | game () const |
const GameFlags & | gameFlags () const |
Resource * | resource () |
virtual Screen * | screen ()=0 |
virtual TextDisplayer * | text () |
virtual GUI * | gui () const |
Sound * | sound () |
StaticResource * | staticres () |
TimerManager * | timer () |
uint32 | tickLength () const |
void | setMousePos (int x, int y) |
Common::Point | getMousePos () |
bool | speechEnabled () |
bool | textEnabled () |
void | setVolume (kVolumeEntry vol, uint8 value) |
uint8 | getVolume (kVolumeEntry vol) |
void | syncSoundSettings () override |
int | setGameFlag (int flag) |
int | queryGameFlag (int flag) const |
int | resetGameFlag (int flag) |
virtual void | snd_playTheme (int file, int track) |
virtual void | snd_playSoundEffect (int id, int volume=0xFF) |
virtual void | snd_playWanderScoreViaMap (int command, int restart) |
virtual void | snd_playVoiceFile (int id)=0 |
virtual bool | snd_voiceIsPlaying () |
virtual void | snd_stopVoice () |
virtual void | delayUntil (uint32 timestamp, bool updateGameTimers=false, bool update=false, bool isMainLoop=false) |
virtual void | delay (uint32 millis, bool update=false, bool isMainLoop=false) |
virtual void | delayWithTicks (int ticks) |
Public Member Functions inherited from Engine | |
MetaEngine * | getMetaEngine () const |
void | setMetaEngine (MetaEngine *metaEngine) |
PauseToken | pauseEngine () |
bool | isPaused () const |
void | openMainMenuDialog () |
uint32 | getTotalPlayTime () const |
void | setTotalPlayTime (uint32 time=0) |
Common::TimerManager * | getTimerManager () |
Common::EventManager * | getEventManager () |
Common::SaveFileManager * | getSaveFileManager () |
bool | existExtractedCDAudioFiles (uint track=1) |
bool | isDataAndCDAudioReadFromSameCD () |
void | warnMissingExtractedCDAudio () |
void | handleAutoSave () |
void | saveAutosaveIfEnabled () |
virtual bool | canSaveAutosaveCurrently () |
Engine (OSystem *syst) | |
virtual | ~Engine () |
virtual void | initializePath (const Common::FSNode &gamePath) |
virtual void | errorString (const char *buf_input, char *buf_output, int buf_output_size) |
virtual GUI::Debugger * | getDebugger () final |
void | setDebugger (GUI::Debugger *debugger) |
GUI::Debugger * | getOrCreateDebugger () |
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 () |
Public Attributes | |
Common::RandomSource | _rnd |
Public Attributes inherited from Engine | |
OSystem * | _system |
Audio::Mixer * | _mixer |
Protected Types | |
enum | ReadSaveHeaderError { kRSHENoError = 0, kRSHEInvalidType = 1, kRSHEInvalidVersion = 2, kRSHEIoError = 3 } |
typedef Common::HashMap< Common::KeyCode, int16, KeyCodeHash > | KeyMap |
Protected Member Functions | |
virtual Common::Error | init () |
virtual Common::Error | go ()=0 |
Common::Error | run () override |
bool | hasFeature (EngineFeature f) const override |
void | pauseEngineIntern (bool pause) override |
void | setupKeyMap () |
void | updateInput () |
int | checkInput (Button *buttonList, bool mainLoop=false, int eventFlag=0x8000) |
void | removeInputTop () |
void | transposeScreenOutputY (int yAdd) |
virtual void | registerDefaultSettings () |
virtual void | readSettings () |
virtual void | writeSettings () |
virtual bool | skipFlag () const |
virtual void | resetSkipFlag (bool removeEvent=true) |
virtual void | setupTimers ()=0 |
virtual void | setWalkspeed (uint8 speed)=0 |
virtual void | setupOpcodeTable ()=0 |
int | o1_queryGameFlag (EMCState *script) |
int | o1_setGameFlag (EMCState *script) |
int | o1_resetGameFlag (EMCState *script) |
int | o1_getRand (EMCState *script) |
int | o1_hideMouse (EMCState *script) |
int | o1_showMouse (EMCState *script) |
int | o1_setMousePos (EMCState *script) |
int | o1_setHandItem (EMCState *script) |
int | o1_removeHandItem (EMCState *script) |
int | o1_getMouseState (EMCState *script) |
int | o1_setDeathHandler (EMCState *script) |
int | o1_playWanderScoreViaMap (EMCState *script) |
int | o1_fillRect (EMCState *script) |
int | o1_blockInWalkableRegion (EMCState *script) |
int | o1_blockOutWalkableRegion (EMCState *script) |
int | o1_playSoundEffect (EMCState *script) |
int16 | emcSafeReadStack (EMCState *s, int x, int line, const char *file) |
virtual void | setHandItem (Item item)=0 |
virtual void | removeHandItem ()=0 |
virtual int | convertVolumeToMixer (int value) |
virtual int | convertVolumeFromMixer (int value) |
virtual int | findWay (int x, int y, int toX, int toY, int *moveTable, int moveTableSize) |
int | findSubPath (int x, int y, int toX, int toY, int *moveTable, int start, int end) |
int | getFacingFromPointToPoint (int x, int y, int toX, int toY) |
int | getOppositeFacingDirection (int dir) |
void | changePosTowardsFacing (int &x, int &y, int facing) |
int | getMoveTableSize (int *moveTable) |
virtual bool | lineIsPassable (int x, int y)=0 |
bool | canLoadGameStateCurrently (Common::U32String *msg=nullptr) override |
bool | canSaveGameStateCurrently (Common::U32String *msg=nullptr) override |
int | getAutosaveSlot () const override |
const char * | getSavegameFilename (int num) |
bool | saveFileLoadable (int slot) |
void | loadGameStateCheck (int slot) |
Common::Error | loadGameState (int slot) override=0 |
Common::Error | saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override |
virtual Common::Error | saveGameStateIntern (int slot, const char *saveName, const Graphics::Surface *thumbnail)=0 |
Common::SeekableReadStream * | openSaveForReading (const char *filename, SaveHeader &header, bool checkID=true) |
Common::OutSaveFile * | openSaveForWriting (const char *filename, const char *saveName, const Graphics::Surface *thumbnail) const |
virtual Graphics::Surface * | generateSaveThumbnail () const |
void | updatePlayTimer () |
void | restartPlayTimerAt (uint32 totalPlaySecs) |
void | pausePlayTimer (bool pause) |
Protected Member Functions inherited from Engine | |
virtual int | runDialog (GUI::Dialog &dialog) |
void | defaultSyncSoundSettings () |
Static Protected Member Functions | |
static Common::String | getSavegameFilename (const Common::String &target, int num) |
static WARN_UNUSED_RESULT ReadSaveHeaderError | readSaveHeader (Common::SeekableReadStream *file, SaveHeader &header, bool skipThumbnail=true) |
Protected Attributes | |
Resource * | _res |
Sound * | _sound |
TextDisplayer * | _text |
StaticResource * | _staticres |
TimerManager * | _timer |
EMCInterpreter * | _emc |
int | _mouseX |
int | _mouseY |
int | _transOffsY |
Common::List< Event > | _eventList |
KeyMap | _keyMap |
bool | _asciiCodeEvents |
bool | _kbEventSkip |
uint8 | _configWalkspeed |
int | _configMusic |
bool | _configSounds |
uint8 | _configVoice |
bool | _configNullSound |
Common::RenderMode | _configRenderMode |
uint16 | _tickLength |
uint16 | _gameSpeed |
int8 | _deathHandler |
GameFlags | _flags |
Common::Array< const Opcode * > | _opcodes |
int | _mouseState |
uint8 | _flagsTable [100] |
Audio::SoundHandle | _speechHandle |
int | _curMusicTheme |
int | _curSfxFile |
int16 | _lastMusicCommand |
const int8 * | _trackMap |
int | _trackMapSize |
bool | _preventScriptSfx |
int | _gameToLoad |
bool | _isSaveAllowed |
Common::String | _savegameFilename |
uint32 | _lastSecTick |
uint32 | _lastSecTickAtPauseStart |
uint32 | _totalPlaySecs |
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 int8 | _addXPosTable [] |
static const int8 | _addYPosTable [] |
static const int8 | _charAddXPosTable [] |
static const int8 | _charAddYPosTable [] |
Additional Inherited Members | |
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) |
|
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).
Reimplemented from Engine.
|
inlineoverrideprotectedvirtual |
Initialize the engine and start its main loop.
Implements Engine.
|
overrideprotectedvirtual |
Determine whether the engine supports the specified feature.
Reimplemented from Engine.
|
overrideprotectedvirtual |
Actual implementation of pauseEngine by subclasses.
Reimplemented from Engine.
|
inlineoverrideprotectedvirtual |
Indicate whether a game state can be loaded.
msg | Optional pointer to message explaining why it is disabled |
Reimplemented from Engine.
|
inlineoverrideprotectedvirtual |
Indicate whether a game state can be saved.
msg | Optional pointer to message explaining why it is disabled |
Reimplemented from Engine.
|
inlineoverrideprotectedvirtual |
Return the slot that should be used for autosaves, or -1 for engines that don't support autosave.
Reimplemented from Engine.
|
overrideprotectedpure virtual |
Load a game state.
slot | The slot from which a save state should be loaded. |
Reimplemented from Engine.
Implemented in Kyra::KyraEngine_HoF, and Kyra::KyraEngine_LoK.
|
inlineoverrideprotectedvirtual |
Save a game state.
slot | The slot into which the save state should be stored. |
desc | Description for the save state, entered by the user. |
isAutosave | Expected to be true if an autosave is being created. |
Reimplemented from Engine.