ScummVM API documentation
Pegasus::PegasusEngine Class Reference
Inheritance diagram for Pegasus::PegasusEngine:
Engine Pegasus::InputHandler Pegasus::NotificationManager Pegasus::NotificationReceiver

Public Member Functions

 PegasusEngine (OSystem *syst, const PegasusGameDescription *gamedesc)
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
void useMenu (GameMenu *menu)
 
bool checkGameMenu ()
 
bool isDemo () const
 
bool isDVD () const
 
bool isDVDDemo () const
 
bool isOldDemo () const
 
bool isWindows () const
 
bool isLinux () const
 
void addIdler (Idler *idler)
 
void removeIdler (Idler *idler)
 
void addTimeBase (TimeBase *timeBase)
 
void removeTimeBase (TimeBase *timeBase)
 
void delayShell (TimeValue time, TimeScale scale)
 
void resetIntroTimer ()
 
void introTimerExpired ()
 
void refreshDisplay ()
 
bool playerAlive ()
 
void processShell ()
 
void checkCallBacks ()
 
void createInterface ()
 
void setGameMode (const GameMode)
 
GameMode getGameMode () const
 
uint getRandomBit ()
 
uint getRandomNumber (uint max)
 
void shuffleArray (int32 *arr, int32 count)
 
void drawScaledFrame (const Graphics::Surface *frame, uint16 x, uint16 y)
 
HotspotListgetAllHotspots ()
 
void setLastEnergyValue (const int32 value)
 
int32 getSavedEnergyValue ()
 
SoundgetDeathSound ()
 
void setEnergyDeathReason (const DeathReason reason)
 
DeathReason getEnergyDeathReason ()
 
void resetEnergyDeathReason ()
 
void die (const DeathReason)
 
DeathReason getDeathReason ()
 
void playEndMessage ()
 
uint16 getSoundFXLevel ()
 
void setSoundFXLevel (uint16)
 
uint16 getAmbienceLevel ()
 
void setAmbienceLevel (uint16)
 
ItemListgetAllItems ()
 
bool playerHasItem (const Item *)
 
bool playerHasItemID (const ItemID)
 
void checkFlashlight ()
 
bool itemInLocation (const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant)
 
InventoryItemgetCurrentInventoryItem ()
 
bool itemInInventory (InventoryItem *)
 
bool itemInInventory (ItemID)
 
InventorygetItemsInventory ()
 
InventoryResult addItemToInventory (InventoryItem *)
 
void removeAllItemsFromInventory ()
 
InventoryResult removeItemFromInventory (InventoryItem *)
 
uint32 countInventoryItems ()
 
BiochipItemgetCurrentBiochip ()
 
bool itemInBiochips (BiochipItem *)
 
bool itemInBiochips (ItemID)
 
InventorygetBiochipsInventory ()
 
void removeAllItemsFromBiochips ()
 
InventoryResult addItemToBiochips (BiochipItem *)
 
Common::Path getBriefingMovie ()
 
Common::Path getEnvScanMovie ()
 
uint getNumHints ()
 
Common::Path getHintMovie (uint)
 
bool canSolve ()
 
void prepareForAIHint (const Common::Path &)
 
void cleanUpAfterAIHint (const Common::Path &)
 
void requestToggle (bool request=true)
 
bool toggleRequested () const
 
bool isChattyAI ()
 
void setChattyAI (bool)
 
bool isChattyArthur ()
 
void setChattyArthur (bool)
 
void jumpToNewEnvironment (const NeighborhoodID, const RoomID, const DirectionConstant)
 
NeighborhoodID getCurrentNeighborhoodID () const
 
void dragItem (const Input &, Item *, DragType)
 
bool isDragging () const
 
DragType getDragType () const
 
ItemgetDraggingItem () const
 
void dragTerminated (const Input &)
 
void autoDragItemIntoRoom (Item *, Sprite *)
 
void autoDragItemIntoInventory (Item *, Sprite *)
 
void makeContinuePoint ()
 
bool swapSaveAllowed (bool allow)
 
bool swapLoadAllowed (bool allow)
 
void requestSave ()
 
bool saveRequested () const
 
void requestLoad ()
 
bool loadRequested () const
 
- 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 ()
 
bool enhancementEnabled (int32 cls)
 
virtual void syncSoundSettings ()
 
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 Member Functions inherited from Pegasus::InputHandler
 InputHandler (InputHandler *)
 
virtual void setNextHandler (InputHandler *nextHandler)
 
virtual InputHandlergetNextHandler ()
 
virtual bool releaseInputFocus ()
 
virtual void grabInputFocus ()
 
virtual void allowInput (const bool allow)
 
- Public Member Functions inherited from Pegasus::NotificationManager
void checkNotifications ()
 

Static Public Member Functions

static Common::Array< Common::Keymap * > initKeymaps ()
 
static Common::StringArray listSaveFiles ()
 
- 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)
 
- Static Public Member Functions inherited from Pegasus::InputHandler
static InputHandlersetInputHandler (InputHandler *)
 
static InputHandlergetCurrentHandler ()
 
static void pollForInput ()
 
static void getInput (Input &, Hotspot *&)
 
static void readInputDevice (Input &)
 
static void invalHotspots ()
 
static InputBits getCurrentFilter ()
 

Public Attributes

const PegasusGameDescription_gameDescription
 
GraphicsManager_gfx
 
Common::MacResManager_resFork
 
Cursor_cursor
 
Common::SeekableReadStream_aiSaveStream
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 
void pauseEngineIntern (bool pause) override
 
void receiveNotification (Notification *notification, const NotificationFlags flags) override
 
void handleInput (const Input &input, const Hotspot *cursorSpot) override
 
bool isClickInput (const Input &, const Hotspot *) override
 
InputBits getClickFilter () override
 
void clickInHotspot (const Input &, const Hotspot *) override
 
void activateHotspots (void) override
 
void updateCursor (const Common::Point, const Hotspot *) override
 
bool wantsCursor () override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
- Protected Member Functions inherited from Pegasus::NotificationManager
void addNotification (Notification *notification)
 
void removeNotification (Notification *notification)
 
void detachNotifications ()
 
- Protected Member Functions inherited from Pegasus::NotificationReceiver
virtual void newNotification (Notification *notification)
 

Protected Attributes

Notification _shellNotification
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 
- Protected Attributes inherited from Pegasus::InputHandler
InputHandler_nextHandler
 
bool _allowInput
 
- Protected Attributes inherited from Pegasus::NotificationManager
NotificationList _notifications
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Static Protected Attributes inherited from Pegasus::InputHandler
static InputHandler_inputHandler
 
static bool _invalHotspots
 
static InputBits _lastFilter
 

Member Function Documentation

◆ hasFeature()

bool Pegasus::PegasusEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Pegasus::PegasusEngine::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.

◆ canSaveGameStateCurrently()

bool Pegasus::PegasusEngine::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.

◆ loadGameState()

Common::Error Pegasus::PegasusEngine::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 Pegasus::PegasusEngine::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.

◆ run()

Common::Error Pegasus::PegasusEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ pauseEngineIntern()

void Pegasus::PegasusEngine::pauseEngineIntern ( bool  pause)
overrideprotectedvirtual

Actual implementation of pauseEngine by subclasses.

See also
Engine::pauseEngine

Reimplemented from Engine.


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