ScummVM API documentation
NGI::NGIEngine Class Reference
Inheritance diagram for NGI::NGIEngine:
Engine

Public Member Functions

 NGIEngine (OSystem *syst, const NGIGameDescription *gameDesc)
 
void initialize ()
 
void restartGame ()
 
bool shouldQuit ()
 
void setMusicAllowed (int val)
 
uint32 getFeatures () const
 
bool isDemo ()
 
Common::Language getLanguage () const
 
const char * getGameId () const
 
int getGameGID () const
 
void updateEvents ()
 
bool loadGam (const char *fname, int scene=0)
 
void loadGameObjH ()
 
Common::String gameIdToStr (uint16 id)
 
GameVargetGameLoaderGameVar ()
 
InputControllergetGameLoaderInputController ()
 
void defHandleKeyDown (int key)
 
void stopAllSounds ()
 
void toggleMute ()
 
void playSound (int id, int flag)
 
void playTrack (GameVar *sceneVar, const char *name, bool delayed)
 
int getSceneTrack ()
 
void updateTrackDelay ()
 
void startSceneTrack ()
 
void startSoundStream1 (const Common::Path &trackName)
 
void playOggSound (const Common::Path &trackName, Audio::SoundHandle &stream)
 
void stopSoundStream2 ()
 
void stopAllSoundStreams ()
 
void stopAllSoundInstances (int id)
 
void updateSoundVolume ()
 
void setMusicVolume (int vol)
 
void deleteModalObject ()
 
void initMap ()
 
void updateMap (PreloadItem *pre)
 
void updateMapPiece (int mapId, int update)
 
void updateScreen ()
 
void freeGameLoader ()
 
void cleanup ()
 
void enableSaves ()
 
void disableSaves (ExCommand *ex)
 
bool isSaveAllowed ()
 
void initObjectStates ()
 
void setLevelStates ()
 
void setSwallowedEggsState ()
 
void loadAllScenes ()
 
void initCursors ()
 
void addCursor (CursorInfo *cursorInfo, Scene *inv, int pictureId, int hotspotX, int hotspotY, int itemPictureOffsX, int itemPictureOffsY)
 
void drawAlphaRectangle (int x1, int y1, int x2, int y2, int alpha)
 
void sceneFade (Scene *sc, bool direction)
 
void setCursor (int id)
 
void updateCursorCommon ()
 
int getObjectState (const Common::String &objname)
 
void setObjectState (const Common::String &name, int state)
 
int getObjectEnumState (const Common::String &name, const char *state)
 
void sceneAutoScrolling ()
 
bool sceneSwitcher (const EntranceInfo &entrance)
 
SceneaccessScene (int sceneId)
 
void setSceneMusicParameters (GameVar *var)
 
int convertScene (int scene)
 
int getSceneEntrance (int scene)
 
int getSceneFromTag (int tag)
 
void openMap ()
 
void openHelp ()
 
void openMainMenu ()
 
void initArcadeKeys (const char *varname)
 
void processArcade (ExCommand *ex)
 
void winArcade ()
 
void setArcadeOverlay (int picId)
 
int drawArcadeOverlay (int adjust)
 
void getAllInventory ()
 
int lift_getButtonIdP (int objid)
 
int lift_getButtonIdH (int objid)
 
int lift_getButtonIdN (int objid)
 
void lift_setButton (const char *name, int state)
 
void lift_init (Scene *sc, int qu1, int qu2)
 
void lift_setButtonStatics (Scene *sc, int buttonId)
 
void lift_exitSeq (ExCommand *ex)
 
void lift_closedoorSeq ()
 
void lift_clickButton ()
 
void lift_walkAndGo ()
 
void lift_goAnimation ()
 
void lift_animateButton (StaticANIObject *button)
 
void lift_startExitQueue ()
 
void lift_hoverButton (ExCommand *ex)
 
bool lift_checkButton (const char *varname)
 
void lift_openLift ()
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &description, bool isAutosave=false) override
 
Common::String getSaveStateName (int slot) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool hasFeature (EngineFeature f) const override
 
- 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 void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
virtual void syncSoundSettings ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
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

const NGIGameDescription_gameDescription
 
Common::RandomSource _rnd
 
Common::KeyCode _keyState
 
uint16 _buttonState
 
Graphics::Surface _backgroundSurface
 
Graphics::PixelFormat _origFormat
 
Common::ScopedPtr< GameLoader_gameLoader
 
GameProject_gameProject
 
int _gameProjectVersion
 
int _pictureScale
 
int _scrollSpeed
 
bool _updateFlag
 
bool _flgCanOpenMap
 
bool _gamePaused
 
bool _flgGameIsRunning
 
bool _inputArFlag
 
bool _recordEvents
 
bool _mainMenu_debugEnabled
 
Common::Rect _sceneRect
 
int _sceneWidth
 
int _sceneHeight
 
Scene_currentScene
 
Scene_loaderScene
 
Scene_scene2
 
Scene_scene3
 
StaticANIObject_aniMan
 
StaticANIObject_aniMan2
 
Palette _defaultPalette
 
const Palette_globalPalette
 
InputController_inputController
 
bool _inputDisabled
 
int _currentCheat
 
int _currentCheatPos
 
SoundList_currSoundList1 [11]
 
int _currSoundListCount
 
bool _soundEnabled
 
bool _flgSoundList
 
Common::Path _sceneTracks [10]
 
int _numSceneTracks
 
bool _sceneTrackHasSequence
 
int _musicMinDelay
 
int _musicMaxDelay
 
int _musicLocal
 
Common::String _trackName
 
int _trackStartDelay
 
Common::Path _sceneTracksCurrentTrack
 
bool _sceneTrackIsPlaying
 
int _sfxVolume
 
int _musicVolume
 
Common::ScopedPtr< GlobalMessageQueueList_globalMessageQueueList
 
MessageHandler_messageHandlers
 
int _msgX
 
int _msgY
 
int _msgObjectId2
 
int _msgId
 
Common::List< ExCommand * > _exCommandList
 
bool _isProcessingMessages
 
int _mouseVirtX
 
int _mouseVirtY
 
Common::Point _mouseScreenPos
 
Common::ScopedPtr< BehaviorManager_behaviorManager
 
Common::ScopedPtr< MovTable_movTable
 
Common::ScopedPtr< Floaters_floaters
 
Common::ScopedPtr< AniHandler_aniHandler
 
Common::Array< Common::Point_arcadeKeys
 
bool _gameContinue
 
bool _needRestart
 
bool _flgPlayIntro
 
int _musicAllowed
 
bool _normalSpeed
 
int32 _mapTable [200]
 
Scene_inventoryScene
 
Inventory2_inventory
 
int _currSelectedInventoryItemId
 
int32 _updateTicks
 
int32 _lastInputTicks
 
int32 _lastButtonUpTicks
 
BaseModalObject_modalObject
 
int(* _updateScreenCallback )()
 
int(* _updateCursorCallback )()
 
int _cursorId
 
int _minCursorId
 
int _maxCursorId
 
Common::Array< int > _objectIdCursors
 
GameObject_objectAtCursor
 
int _objectIdAtCursor
 
NGIArchive_currArchive
 
PictureObject_arcadeOverlay
 
PictureObject_arcadeOverlayHelper
 
int _arcadeOverlayX
 
int _arcadeOverlayY
 
int _arcadeOverlayMidX
 
int _arcadeOverlayMidY
 
StaticANIObject_lastLiftButton
 
MessageQueue_liftEnterMQ
 
MessageQueue_liftExitMQ
 
StaticANIObject_lift
 
int _liftX
 
int _liftY
 
GameVar_musicGameVar
 
Audio::SoundHandle _soundStream1
 
Audio::SoundHandle _soundStream2
 
Audio::SoundHandle _soundStream3
 
Audio::SoundHandle _soundStream4
 
bool _stream2playing
 
GameObjHMap _gameObjH
 
bool _isSaveAllowed
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static MetaEngineDetectiongetMetaEngineDetection ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Member Function Documentation

◆ run()

Common::Error NGI::NGIEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ loadGameState()

Common::Error NGI::NGIEngine::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.

◆ saveGameState()

Common::Error NGI::NGIEngine::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.

◆ getSaveStateName()

Common::String NGI::NGIEngine::getSaveStateName ( int  slot) const
overridevirtual

Generate the savegame filename.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool NGI::NGIEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool NGI::NGIEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ hasFeature()

bool NGI::NGIEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.


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