ScummVM
Pegasus::PegasusEngine Class Reference

#include <pegasus.h>

Inheritance diagram for Pegasus::PegasusEngine:
Collaboration diagram for Pegasus::PegasusEngine:

Public Member Functions

 PegasusEngine (OSystem *syst, const PegasusGameDescription *gamedesc)
 
virtual ~PegasusEngine ()
 
bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
Common::Error loadGameState (int slot)
 Load a game state. More...
 
Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
void useMenu (GameMenu *menu)
 
bool checkGameMenu ()
 
bool isDemo () const
 
bool isDVD () const
 
bool isDVDDemo () const
 
bool isOldDemo () const
 
bool isWindows () 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 ()
 
void setEnergyDeathReason (const DeathReason reason)
 
DeathReason getEnergyDeathReason ()
 
void resetEnergyDeathReason ()
 
void die (const DeathReason)
 
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::String getBriefingMovie ()
 
Common::String getEnvScanMovie ()
 
uint getNumHints ()
 
Common::String getHintMovie (uint)
 
bool canSolve ()
 
void prepareForAIHint (const Common::String &)
 
void cleanUpAfterAIHint (const Common::String &)
 
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
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 
- Public Member Functions inherited from Pegasus::InputHandler
 InputHandler (InputHandler *)
 
virtual ~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
 NotificationManager ()
 
virtual ~NotificationManager ()
 
void checkNotifications ()
 
- Public Member Functions inherited from Pegasus::NotificationReceiver
 NotificationReceiver ()
 
virtual ~NotificationReceiver ()
 

Static Public Member Functions

static Common::StringArray listSaveFiles ()
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- 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 ()
 Init the engine and start its main loop. More...
 
void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
virtual void receiveNotification (Notification *notification, const NotificationFlags flags)
 
void handleInput (const Input &input, const Hotspot *cursorSpot)
 
virtual bool isClickInput (const Input &, const Hotspot *)
 
virtual InputBits getClickFilter ()
 
void clickInHotspot (const Input &, const Hotspot *)
 
void activateHotspots (void)
 
void updateCursor (const Common::Point, const Hotspot *)
 
bool wantsCursor ()
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
- 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
 
- Protected Attributes inherited from Pegasus::InputHandler
InputHandler_nextHandler
 
bool _allowInput
 
- Protected Attributes inherited from Pegasus::NotificationManager
NotificationList _notifications
 

Private Member Functions

void runIntro ()
 
void stopIntroTimer ()
 
bool detectOpeningClosingDirectory ()
 
void giveIdleTime ()
 
void createItems ()
 
void createItem (ItemID itemID, NeighborhoodID neighborhoodID, RoomID roomID, DirectionConstant direction)
 
void destroyInventoryItem (const ItemID itemID)
 
ItemID pickItemToDestroy ()
 
bool loadFromStream (Common::SeekableReadStream *stream)
 
bool writeToStream (Common::WriteStream *stream, int saveType)
 
void loadFromContinuePoint ()
 
void writeContinueStream (Common::WriteStream *stream)
 
Common::Error showLoadDialog ()
 
Common::Error showSaveDialog ()
 
void showSaveFailedDialog (const Common::Error &status)
 
void showTempScreen (const Common::String &fileName)
 
bool playMovieScaled (Video::VideoDecoder *video, uint16 x, uint16 y)
 
void throwAwayEverything ()
 
void shellGameInput (const Input &input, const Hotspot *cursorSpot)
 
void doSubChase ()
 
uint getNeighborhoodCD (const NeighborhoodID neighborhood) const
 
void initKeymap ()
 
InputBits getInputFilter ()
 
void doGameMenuCommand (const GameMenuCommand)
 
void doInterfaceOverview ()
 
void pauseMenu (bool menuUp)
 
void doDeath ()
 
void useNeighborhood (Neighborhood *neighborhood)
 
void performJump (NeighborhoodID start)
 
void startNewGame ()
 
void startNeighborhood ()
 
void makeNeighborhood (NeighborhoodID, Neighborhood *&)
 
void switchGameMode (const GameMode, const GameMode)
 
bool canSwitchGameMode (const GameMode, const GameMode)
 
void toggleInventoryDisplay ()
 
void toggleBiochipDisplay ()
 
void raiseInventoryDrawer ()
 
void raiseBiochipDrawer ()
 
void lowerInventoryDrawer ()
 
void lowerBiochipDrawer ()
 
void raiseInventoryDrawerSync ()
 
void raiseBiochipDrawerSync ()
 
void lowerInventoryDrawerSync ()
 
void lowerBiochipDrawerSync ()
 
void showInfoScreen ()
 
void hideInfoScreen ()
 
void toggleInfo ()
 

Private Attributes

PegasusConsole_console
 
Common::String _introDirectory
 
FuseFunction_introTimer
 
Idler_idlerHead
 
ItemList _allItems
 
Inventory _items
 
Inventory _biochips
 
ItemID _currentItemID
 
ItemID _currentBiochipID
 
Common::List< TimeBase * > _timeBases
 
Common::SeekableReadStream_continuePoint
 
bool _saveAllowed
 
bool _loadAllowed
 
bool _saveRequested
 
bool _loadRequested
 
Hotspot _returnHotspot
 
HotspotList _allHotspots
 
InputHandler_savedHandler
 
Common::RandomSource_rnd
 
uint _currentCD
 
GameMenu_gameMenu
 
ScreenDimmer _screenDimmer
 
int32 _savedEnergyValue
 
DeathReason _deathReason
 
Neighborhood_neighborhood
 
uint16 _ambientLevel
 
uint16 _FXLevel
 
GameMode _gameMode
 
bool _switchModesSync
 
ItemDragger _itemDragger
 
Item_draggingItem
 
Sprite_draggingSprite
 
DragType _dragType
 
AutoDragger _autoDragger
 
Movie _bigInfoMovie
 
Movie _smallInfoMovie
 

Friends

class InputHandler
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Static Protected Attributes inherited from Pegasus::InputHandler
static InputHandler_inputHandler = 0
 
static bool _invalHotspots = false
 
static InputBits _lastFilter = kFilterNoInput
 

Detailed Description

Definition at line 71 of file pegasus.h.

Constructor & Destructor Documentation

◆ PegasusEngine()

Pegasus::PegasusEngine::PegasusEngine ( OSystem syst,
const PegasusGameDescription gamedesc 
)

Definition at line 79 of file pegasus.cpp.

◆ ~PegasusEngine()

Pegasus::PegasusEngine::~PegasusEngine ( )
virtual

Definition at line 100 of file pegasus.cpp.

Member Function Documentation

◆ activateHotspots()

void Pegasus::PegasusEngine::activateHotspots ( void  )
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 2026 of file pegasus.cpp.

◆ addIdler()

void Pegasus::PegasusEngine::addIdler ( Idler idler)

Definition at line 397 of file pegasus.cpp.

◆ addItemToBiochips()

InventoryResult Pegasus::PegasusEngine::addItemToBiochips ( BiochipItem biochip)

Definition at line 2095 of file pegasus.cpp.

◆ addItemToInventory()

InventoryResult Pegasus::PegasusEngine::addItemToInventory ( InventoryItem item)

Definition at line 1568 of file pegasus.cpp.

◆ addTimeBase()

void Pegasus::PegasusEngine::addTimeBase ( TimeBase timeBase)

Definition at line 421 of file pegasus.cpp.

◆ autoDragItemIntoInventory()

void Pegasus::PegasusEngine::autoDragItemIntoInventory ( Item ,
Sprite draggingSprite 
)

Definition at line 2196 of file pegasus.cpp.

◆ autoDragItemIntoRoom()

void Pegasus::PegasusEngine::autoDragItemIntoRoom ( Item item,
Sprite draggingSprite 
)

Definition at line 2153 of file pegasus.cpp.

◆ canLoadGameStateCurrently()

bool Pegasus::PegasusEngine::canLoadGameStateCurrently ( )
virtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 202 of file pegasus.cpp.

◆ canSaveGameStateCurrently()

bool Pegasus::PegasusEngine::canSaveGameStateCurrently ( )
virtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 206 of file pegasus.cpp.

◆ canSolve()

bool Pegasus::PegasusEngine::canSolve ( )

Definition at line 1377 of file pegasus.cpp.

◆ canSwitchGameMode()

bool Pegasus::PegasusEngine::canSwitchGameMode ( const GameMode  newMode,
const GameMode  oldMode 
)
private

Definition at line 1545 of file pegasus.cpp.

◆ checkCallBacks()

void Pegasus::PegasusEngine::checkCallBacks ( )

Definition at line 769 of file pegasus.cpp.

◆ checkFlashlight()

void Pegasus::PegasusEngine::checkFlashlight ( )

Definition at line 1399 of file pegasus.cpp.

◆ checkGameMenu()

bool Pegasus::PegasusEngine::checkGameMenu ( )

Definition at line 854 of file pegasus.cpp.

◆ cleanUpAfterAIHint()

void Pegasus::PegasusEngine::cleanUpAfterAIHint ( const Common::String movieName)

Definition at line 1389 of file pegasus.cpp.

◆ clickInHotspot()

void Pegasus::PegasusEngine::clickInHotspot ( const Input input,
const Hotspot clickedSpot 
)
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 2051 of file pegasus.cpp.

◆ countInventoryItems()

uint32 Pegasus::PegasusEngine::countInventoryItems ( )
inline

Definition at line 154 of file pegasus.h.

◆ createInterface()

void Pegasus::PegasusEngine::createInterface ( )

Definition at line 1496 of file pegasus.cpp.

◆ createItem()

void Pegasus::PegasusEngine::createItem ( ItemID  itemID,
NeighborhoodID  neighborhoodID,
RoomID  roomID,
DirectionConstant  direction 
)
private

Definition at line 264 of file pegasus.cpp.

◆ createItems()

void Pegasus::PegasusEngine::createItems ( )
private

Definition at line 243 of file pegasus.cpp.

◆ delayShell()

void Pegasus::PegasusEngine::delayShell ( TimeValue  time,
TimeScale  scale 
)

Definition at line 828 of file pegasus.cpp.

◆ destroyInventoryItem()

void Pegasus::PegasusEngine::destroyInventoryItem ( const ItemID  itemID)
private

Definition at line 2340 of file pegasus.cpp.

◆ detectOpeningClosingDirectory()

bool Pegasus::PegasusEngine::detectOpeningClosingDirectory ( )
private

Definition at line 210 of file pegasus.cpp.

◆ die()

void Pegasus::PegasusEngine::die ( const DeathReason  reason)

Definition at line 1432 of file pegasus.cpp.

◆ doDeath()

void Pegasus::PegasusEngine::doDeath ( )
private

Definition at line 1441 of file pegasus.cpp.

◆ doGameMenuCommand()

void Pegasus::PegasusEngine::doGameMenuCommand ( const GameMenuCommand  command)
private

Definition at line 868 of file pegasus.cpp.

◆ doInterfaceOverview()

void Pegasus::PegasusEngine::doInterfaceOverview ( )
private

Definition at line 1082 of file pegasus.cpp.

◆ doSubChase()

void Pegasus::PegasusEngine::doSubChase ( )
private

Definition at line 2277 of file pegasus.cpp.

◆ dragItem()

void Pegasus::PegasusEngine::dragItem ( const Input input,
Item item,
DragType  type 
)

Definition at line 1952 of file pegasus.cpp.

◆ dragTerminated()

void Pegasus::PegasusEngine::dragTerminated ( const Input )

Definition at line 1908 of file pegasus.cpp.

◆ drawScaledFrame()

void Pegasus::PegasusEngine::drawScaledFrame ( const Graphics::Surface frame,
uint16  x,
uint16  y 
)

Definition at line 2325 of file pegasus.cpp.

◆ getAllHotspots()

HotspotList& Pegasus::PegasusEngine::getAllHotspots ( )
inline

Definition at line 120 of file pegasus.h.

◆ getAllItems()

ItemList& Pegasus::PegasusEngine::getAllItems ( )
inline

Definition at line 140 of file pegasus.h.

◆ getAmbienceLevel()

uint16 Pegasus::PegasusEngine::getAmbienceLevel ( )
inline

Definition at line 136 of file pegasus.h.

◆ getBiochipsInventory()

Inventory* Pegasus::PegasusEngine::getBiochipsInventory ( )
inline

Definition at line 160 of file pegasus.h.

◆ getBriefingMovie()

Common::String Pegasus::PegasusEngine::getBriefingMovie ( )

Definition at line 1349 of file pegasus.cpp.

◆ getClickFilter()

InputBits Pegasus::PegasusEngine::getClickFilter ( )
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 2047 of file pegasus.cpp.

◆ getCurrentBiochip()

BiochipItem * Pegasus::PegasusEngine::getCurrentBiochip ( )

Definition at line 1330 of file pegasus.cpp.

◆ getCurrentInventoryItem()

InventoryItem * Pegasus::PegasusEngine::getCurrentInventoryItem ( )

Definition at line 1315 of file pegasus.cpp.

◆ getCurrentNeighborhoodID()

NeighborhoodID Pegasus::PegasusEngine::getCurrentNeighborhoodID ( ) const

Definition at line 2230 of file pegasus.cpp.

◆ getDebugger()

GUI::Debugger * Pegasus::PegasusEngine::getDebugger ( )
virtual

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 393 of file pegasus.cpp.

◆ getDraggingItem()

Item* Pegasus::PegasusEngine::getDraggingItem ( ) const
inline

Definition at line 182 of file pegasus.h.

◆ getDragType()

DragType Pegasus::PegasusEngine::getDragType ( ) const
inline

Definition at line 181 of file pegasus.h.

◆ getEnergyDeathReason()

DeathReason Pegasus::PegasusEngine::getEnergyDeathReason ( )
inline

Definition at line 128 of file pegasus.h.

◆ getEnvScanMovie()

Common::String Pegasus::PegasusEngine::getEnvScanMovie ( )

Definition at line 1356 of file pegasus.cpp.

◆ getGameMode()

GameMode Pegasus::PegasusEngine::getGameMode ( ) const
inline

Definition at line 115 of file pegasus.h.

◆ getHintMovie()

Common::String Pegasus::PegasusEngine::getHintMovie ( uint  hintNum)

Definition at line 1370 of file pegasus.cpp.

◆ getInputFilter()

InputBits Pegasus::PegasusEngine::getInputFilter ( )
privatevirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 1480 of file pegasus.cpp.

◆ getItemsInventory()

Inventory* Pegasus::PegasusEngine::getItemsInventory ( )
inline

Definition at line 150 of file pegasus.h.

◆ getNeighborhoodCD()

uint Pegasus::PegasusEngine::getNeighborhoodCD ( const NeighborhoodID  neighborhood) const
private

Definition at line 2465 of file pegasus.cpp.

◆ getNumHints()

uint Pegasus::PegasusEngine::getNumHints ( )

Definition at line 1363 of file pegasus.cpp.

◆ getRandomBit()

uint Pegasus::PegasusEngine::getRandomBit ( )

Definition at line 2249 of file pegasus.cpp.

◆ getRandomNumber()

uint Pegasus::PegasusEngine::getRandomNumber ( uint  max)

Definition at line 2253 of file pegasus.cpp.

◆ getSavedEnergyValue()

int32 Pegasus::PegasusEngine::getSavedEnergyValue ( )
inline

Definition at line 124 of file pegasus.h.

◆ getSoundFXLevel()

uint16 Pegasus::PegasusEngine::getSoundFXLevel ( )
inline

Definition at line 134 of file pegasus.h.

◆ giveIdleTime()

void Pegasus::PegasusEngine::giveIdleTime ( )
private

Definition at line 416 of file pegasus.cpp.

◆ handleInput()

void Pegasus::PegasusEngine::handleInput ( const Input input,
const Hotspot cursorSpot 
)
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 1016 of file pegasus.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 42 of file detection.cpp.

◆ hideInfoScreen()

void Pegasus::PegasusEngine::hideInfoScreen ( )
private

Definition at line 1844 of file pegasus.cpp.

◆ initKeymap()

void Pegasus::PegasusEngine::initKeymap ( )
privatevirtual

Reimplemented from Engine.

Definition at line 2489 of file pegasus.cpp.

◆ introTimerExpired()

void Pegasus::PegasusEngine::introTimerExpired ( )

Definition at line 782 of file pegasus.cpp.

◆ isClickInput()

bool Pegasus::PegasusEngine::isClickInput ( const Input input,
const Hotspot cursorSpot 
)
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 2040 of file pegasus.cpp.

◆ isDemo()

bool Pegasus::PegasusEngine::isDemo ( ) const

Definition at line 50 of file detection.cpp.

◆ isDragging()

bool Pegasus::PegasusEngine::isDragging ( ) const
inline

Definition at line 180 of file pegasus.h.

◆ isDVD()

bool Pegasus::PegasusEngine::isDVD ( ) const

Definition at line 54 of file detection.cpp.

◆ isDVDDemo()

bool Pegasus::PegasusEngine::isDVDDemo ( ) const

Definition at line 58 of file detection.cpp.

◆ isOldDemo()

bool Pegasus::PegasusEngine::isOldDemo ( ) const

Definition at line 62 of file detection.cpp.

◆ isWindows()

bool Pegasus::PegasusEngine::isWindows ( ) const

Definition at line 66 of file detection.cpp.

◆ itemInBiochips() [1/2]

bool Pegasus::PegasusEngine::itemInBiochips ( BiochipItem item)

Definition at line 1337 of file pegasus.cpp.

◆ itemInBiochips() [2/2]

bool Pegasus::PegasusEngine::itemInBiochips ( ItemID  id)

Definition at line 1341 of file pegasus.cpp.

◆ itemInInventory() [1/2]

bool Pegasus::PegasusEngine::itemInInventory ( InventoryItem item)

Definition at line 1322 of file pegasus.cpp.

◆ itemInInventory() [2/2]

bool Pegasus::PegasusEngine::itemInInventory ( ItemID  id)

Definition at line 1326 of file pegasus.cpp.

◆ itemInLocation()

bool Pegasus::PegasusEngine::itemInLocation ( const ItemID  itemID,
const NeighborhoodID  neighborhood,
const RoomID  room,
const DirectionConstant  direction 
)

Definition at line 1557 of file pegasus.cpp.

◆ jumpToNewEnvironment()

void Pegasus::PegasusEngine::jumpToNewEnvironment ( const NeighborhoodID  neighborhoodID,
const RoomID  roomID,
const DirectionConstant  direction 
)

Definition at line 1394 of file pegasus.cpp.

◆ listSaveFiles()

Common::StringArray Pegasus::PegasusEngine::listSaveFiles ( )
static

Definition at line 673 of file pegasus.cpp.

◆ loadFromContinuePoint()

void Pegasus::PegasusEngine::loadFromContinuePoint ( )
private

Definition at line 646 of file pegasus.cpp.

◆ loadFromStream()

bool Pegasus::PegasusEngine::loadFromStream ( Common::SeekableReadStream stream)
private

Definition at line 429 of file pegasus.cpp.

◆ loadGameState()

Common::Error Pegasus::PegasusEngine::loadGameState ( int  slot)
virtual

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 679 of file pegasus.cpp.

◆ loadRequested()

bool Pegasus::PegasusEngine::loadRequested ( ) const
inline

Definition at line 202 of file pegasus.h.

◆ lowerBiochipDrawer()

void Pegasus::PegasusEngine::lowerBiochipDrawer ( )
private

Definition at line 1876 of file pegasus.cpp.

◆ lowerBiochipDrawerSync()

void Pegasus::PegasusEngine::lowerBiochipDrawerSync ( )
private

Definition at line 1896 of file pegasus.cpp.

◆ lowerInventoryDrawer()

void Pegasus::PegasusEngine::lowerInventoryDrawer ( )
private

Definition at line 1871 of file pegasus.cpp.

◆ lowerInventoryDrawerSync()

void Pegasus::PegasusEngine::lowerInventoryDrawerSync ( )
private

Definition at line 1891 of file pegasus.cpp.

◆ makeContinuePoint()

void Pegasus::PegasusEngine::makeContinuePoint ( )

Definition at line 631 of file pegasus.cpp.

◆ makeNeighborhood()

void Pegasus::PegasusEngine::makeNeighborhood ( NeighborhoodID  neighborhoodID,
Neighborhood *&  neighborhood 
)
private

Definition at line 1719 of file pegasus.cpp.

◆ pauseEngineIntern()

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

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 2237 of file pegasus.cpp.

◆ pauseMenu()

void Pegasus::PegasusEngine::pauseMenu ( bool  menuUp)
private

Definition at line 2137 of file pegasus.cpp.

◆ performJump()

void Pegasus::PegasusEngine::performJump ( NeighborhoodID  start)
private

Definition at line 1604 of file pegasus.cpp.

◆ pickItemToDestroy()

ItemID Pegasus::PegasusEngine::pickItemToDestroy ( )
private

Definition at line 2391 of file pegasus.cpp.

◆ playEndMessage()

void Pegasus::PegasusEngine::playEndMessage ( )

Definition at line 2267 of file pegasus.cpp.

◆ playerAlive()

bool Pegasus::PegasusEngine::playerAlive ( )

Definition at line 1345 of file pegasus.cpp.

◆ playerHasItem()

bool Pegasus::PegasusEngine::playerHasItem ( const Item item)

Definition at line 1307 of file pegasus.cpp.

◆ playerHasItemID()

bool Pegasus::PegasusEngine::playerHasItemID ( const ItemID  itemID)

Definition at line 1311 of file pegasus.cpp.

◆ playMovieScaled()

bool Pegasus::PegasusEngine::playMovieScaled ( Video::VideoDecoder video,
uint16  x,
uint16  y 
)
private

Definition at line 1404 of file pegasus.cpp.

◆ prepareForAIHint()

void Pegasus::PegasusEngine::prepareForAIHint ( const Common::String movieName)

Definition at line 1384 of file pegasus.cpp.

◆ processShell()

void Pegasus::PegasusEngine::processShell ( )

Definition at line 1489 of file pegasus.cpp.

◆ raiseBiochipDrawer()

void Pegasus::PegasusEngine::raiseBiochipDrawer ( )
private

Definition at line 1866 of file pegasus.cpp.

◆ raiseBiochipDrawerSync()

void Pegasus::PegasusEngine::raiseBiochipDrawerSync ( )
private

Definition at line 1886 of file pegasus.cpp.

◆ raiseInventoryDrawer()

void Pegasus::PegasusEngine::raiseInventoryDrawer ( )
private

Definition at line 1861 of file pegasus.cpp.

◆ raiseInventoryDrawerSync()

void Pegasus::PegasusEngine::raiseInventoryDrawerSync ( )
private

Definition at line 1881 of file pegasus.cpp.

◆ receiveNotification()

void Pegasus::PegasusEngine::receiveNotification ( Notification notification,
const NotificationFlags  flags 
)
protectedvirtual

Reimplemented from Pegasus::NotificationReceiver.

Definition at line 719 of file pegasus.cpp.

◆ refreshDisplay()

void Pegasus::PegasusEngine::refreshDisplay ( )

Definition at line 1284 of file pegasus.cpp.

◆ removeAllItemsFromBiochips()

void Pegasus::PegasusEngine::removeAllItemsFromBiochips ( )

Definition at line 2116 of file pegasus.cpp.

◆ removeAllItemsFromInventory()

void Pegasus::PegasusEngine::removeAllItemsFromInventory ( )

Definition at line 2077 of file pegasus.cpp.

◆ removeIdler()

void Pegasus::PegasusEngine::removeIdler ( Idler idler)

Definition at line 405 of file pegasus.cpp.

◆ removeItemFromInventory()

InventoryResult Pegasus::PegasusEngine::removeItemFromInventory ( InventoryItem item)

Definition at line 2063 of file pegasus.cpp.

◆ removeTimeBase()

void Pegasus::PegasusEngine::removeTimeBase ( TimeBase timeBase)

Definition at line 425 of file pegasus.cpp.

◆ requestLoad()

void Pegasus::PegasusEngine::requestLoad ( )
inline

Definition at line 201 of file pegasus.h.

◆ requestSave()

void Pegasus::PegasusEngine::requestSave ( )
inline

Definition at line 199 of file pegasus.h.

◆ resetEnergyDeathReason()

void Pegasus::PegasusEngine::resetEnergyDeathReason ( )

Definition at line 1289 of file pegasus.cpp.

◆ resetIntroTimer()

void Pegasus::PegasusEngine::resetIntroTimer ( )

Definition at line 774 of file pegasus.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 123 of file pegasus.cpp.

◆ runIntro()

void Pegasus::PegasusEngine::runIntro ( )
private

Definition at line 305 of file pegasus.cpp.

◆ saveGameState()

Common::Error Pegasus::PegasusEngine::saveGameState ( int  slot,
const Common::String desc 
)
virtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 704 of file pegasus.cpp.

◆ saveRequested()

bool Pegasus::PegasusEngine::saveRequested ( ) const
inline

Definition at line 200 of file pegasus.h.

◆ setAmbienceLevel()

void Pegasus::PegasusEngine::setAmbienceLevel ( uint16  ambientLevel)

Definition at line 2131 of file pegasus.cpp.

◆ setEnergyDeathReason()

void Pegasus::PegasusEngine::setEnergyDeathReason ( const DeathReason  reason)
inline

Definition at line 127 of file pegasus.h.

◆ setGameMode()

void Pegasus::PegasusEngine::setGameMode ( const GameMode  newMode)

Definition at line 1503 of file pegasus.cpp.

◆ setLastEnergyValue()

void Pegasus::PegasusEngine::setLastEnergyValue ( const int32  value)
inline

Definition at line 123 of file pegasus.h.

◆ setSoundFXLevel()

void Pegasus::PegasusEngine::setSoundFXLevel ( uint16  fxLevel)

Definition at line 2123 of file pegasus.cpp.

◆ shellGameInput()

void Pegasus::PegasusEngine::shellGameInput ( const Input input,
const Hotspot cursorSpot 
)
private

Definition at line 1989 of file pegasus.cpp.

◆ showInfoScreen()

void Pegasus::PegasusEngine::showInfoScreen ( )
private

Definition at line 1805 of file pegasus.cpp.

◆ showLoadDialog()

Common::Error Pegasus::PegasusEngine::showLoadDialog ( )
private

Definition at line 354 of file pegasus.cpp.

◆ showSaveDialog()

Common::Error Pegasus::PegasusEngine::showSaveDialog ( )
private

Definition at line 373 of file pegasus.cpp.

◆ showSaveFailedDialog()

void Pegasus::PegasusEngine::showSaveFailedDialog ( const Common::Error status)
private

Definition at line 384 of file pegasus.cpp.

◆ showTempScreen()

void Pegasus::PegasusEngine::showTempScreen ( const Common::String fileName)
private

Definition at line 1251 of file pegasus.cpp.

◆ shuffleArray()

void Pegasus::PegasusEngine::shuffleArray ( int32 arr,
int32  count 
)

Definition at line 2257 of file pegasus.cpp.

◆ startNeighborhood()

void Pegasus::PegasusEngine::startNeighborhood ( )
private

Definition at line 1631 of file pegasus.cpp.

◆ startNewGame()

void Pegasus::PegasusEngine::startNewGame ( )
private

Definition at line 1644 of file pegasus.cpp.

◆ stopIntroTimer()

void Pegasus::PegasusEngine::stopIntroTimer ( )
private

Definition at line 823 of file pegasus.cpp.

◆ swapLoadAllowed()

bool Pegasus::PegasusEngine::swapLoadAllowed ( bool  allow)
inline

Definition at line 194 of file pegasus.h.

◆ swapSaveAllowed()

bool Pegasus::PegasusEngine::swapSaveAllowed ( bool  allow)
inline

Definition at line 189 of file pegasus.h.

◆ switchGameMode()

void Pegasus::PegasusEngine::switchGameMode ( const GameMode  newMode,
const GameMode  oldMode 
)
private

Definition at line 1510 of file pegasus.cpp.

◆ throwAwayEverything()

void Pegasus::PegasusEngine::throwAwayEverything ( )
private

Definition at line 1462 of file pegasus.cpp.

◆ toggleBiochipDisplay()

void Pegasus::PegasusEngine::toggleBiochipDisplay ( )
private

Definition at line 1798 of file pegasus.cpp.

◆ toggleInfo()

void Pegasus::PegasusEngine::toggleInfo ( )
private

Definition at line 1901 of file pegasus.cpp.

◆ toggleInventoryDisplay()

void Pegasus::PegasusEngine::toggleInventoryDisplay ( )
private

Definition at line 1791 of file pegasus.cpp.

◆ updateCursor()

void Pegasus::PegasusEngine::updateCursor ( const Common::Point  ,
const Hotspot cursorSpot 
)
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 1757 of file pegasus.cpp.

◆ useMenu()

void Pegasus::PegasusEngine::useMenu ( GameMenu menu)

Definition at line 842 of file pegasus.cpp.

◆ useNeighborhood()

void Pegasus::PegasusEngine::useNeighborhood ( Neighborhood neighborhood)
private

Definition at line 1590 of file pegasus.cpp.

◆ wantsCursor()

bool Pegasus::PegasusEngine::wantsCursor ( )
protectedvirtual

Reimplemented from Pegasus::InputHandler.

Definition at line 1753 of file pegasus.cpp.

◆ writeContinueStream()

void Pegasus::PegasusEngine::writeContinueStream ( Common::WriteStream stream)
private

Definition at line 658 of file pegasus.cpp.

◆ writeToStream()

bool Pegasus::PegasusEngine::writeToStream ( Common::WriteStream stream,
int  saveType 
)
private

Definition at line 562 of file pegasus.cpp.

Friends And Related Function Documentation

◆ InputHandler

friend class InputHandler
friend

Definition at line 72 of file pegasus.h.

Member Data Documentation

◆ _aiSaveStream

Common::SeekableReadStream* Pegasus::PegasusEngine::_aiSaveStream

Definition at line 172 of file pegasus.h.

◆ _allHotspots

HotspotList Pegasus::PegasusEngine::_allHotspots
private

Definition at line 265 of file pegasus.h.

◆ _allItems

ItemList Pegasus::PegasusEngine::_allItems
private

Definition at line 238 of file pegasus.h.

◆ _ambientLevel

uint16 Pegasus::PegasusEngine::_ambientLevel
private

Definition at line 301 of file pegasus.h.

◆ _autoDragger

AutoDragger Pegasus::PegasusEngine::_autoDragger
private

Definition at line 315 of file pegasus.h.

◆ _bigInfoMovie

Movie Pegasus::PegasusEngine::_bigInfoMovie
private

Definition at line 331 of file pegasus.h.

◆ _biochips

Inventory Pegasus::PegasusEngine::_biochips
private

Definition at line 242 of file pegasus.h.

◆ _console

PegasusConsole* Pegasus::PegasusEngine::_console
private

Definition at line 224 of file pegasus.h.

◆ _continuePoint

Common::SeekableReadStream* Pegasus::PegasusEngine::_continuePoint
private

Definition at line 256 of file pegasus.h.

◆ _currentBiochipID

ItemID Pegasus::PegasusEngine::_currentBiochipID
private

Definition at line 244 of file pegasus.h.

◆ _currentCD

uint Pegasus::PegasusEngine::_currentCD
private

Definition at line 274 of file pegasus.h.

◆ _currentItemID

ItemID Pegasus::PegasusEngine::_currentItemID
private

Definition at line 243 of file pegasus.h.

◆ _cursor

Cursor* Pegasus::PegasusEngine::_cursor

Definition at line 90 of file pegasus.h.

◆ _deathReason

DeathReason Pegasus::PegasusEngine::_deathReason
private

Definition at line 289 of file pegasus.h.

◆ _draggingItem

Item* Pegasus::PegasusEngine::_draggingItem
private

Definition at line 312 of file pegasus.h.

◆ _draggingSprite

Sprite* Pegasus::PegasusEngine::_draggingSprite
private

Definition at line 313 of file pegasus.h.

◆ _dragType

DragType Pegasus::PegasusEngine::_dragType
private

Definition at line 314 of file pegasus.h.

◆ _FXLevel

uint16 Pegasus::PegasusEngine::_FXLevel
private

Definition at line 302 of file pegasus.h.

◆ _gameDescription

const PegasusGameDescription* Pegasus::PegasusEngine::_gameDescription

Definition at line 79 of file pegasus.h.

◆ _gameMenu

GameMenu* Pegasus::PegasusEngine::_gameMenu
private

Definition at line 279 of file pegasus.h.

◆ _gameMode

GameMode Pegasus::PegasusEngine::_gameMode
private

Definition at line 305 of file pegasus.h.

◆ _gfx

GraphicsManager* Pegasus::PegasusEngine::_gfx

Definition at line 88 of file pegasus.h.

◆ _idlerHead

Idler* Pegasus::PegasusEngine::_idlerHead
private

Definition at line 234 of file pegasus.h.

◆ _introDirectory

Common::String Pegasus::PegasusEngine::_introDirectory
private

Definition at line 230 of file pegasus.h.

◆ _introTimer

FuseFunction* Pegasus::PegasusEngine::_introTimer
private

Definition at line 231 of file pegasus.h.

◆ _itemDragger

ItemDragger Pegasus::PegasusEngine::_itemDragger
private

Definition at line 311 of file pegasus.h.

◆ _items

Inventory Pegasus::PegasusEngine::_items
private

Definition at line 241 of file pegasus.h.

◆ _loadAllowed

bool Pegasus::PegasusEngine::_loadAllowed
private

Definition at line 257 of file pegasus.h.

◆ _loadRequested

bool Pegasus::PegasusEngine::_loadRequested
private

Definition at line 261 of file pegasus.h.

◆ _neighborhood

Neighborhood* Pegasus::PegasusEngine::_neighborhood
private

Definition at line 293 of file pegasus.h.

◆ _resFork

Common::MacResManager* Pegasus::PegasusEngine::_resFork

Definition at line 89 of file pegasus.h.

◆ _returnHotspot

Hotspot Pegasus::PegasusEngine::_returnHotspot
private

Definition at line 264 of file pegasus.h.

◆ _rnd

Common::RandomSource* Pegasus::PegasusEngine::_rnd
private

Definition at line 271 of file pegasus.h.

◆ _saveAllowed

bool Pegasus::PegasusEngine::_saveAllowed
private

Definition at line 257 of file pegasus.h.

◆ _savedEnergyValue

int32 Pegasus::PegasusEngine::_savedEnergyValue
private

Definition at line 286 of file pegasus.h.

◆ _savedHandler

InputHandler* Pegasus::PegasusEngine::_savedHandler
private

Definition at line 266 of file pegasus.h.

◆ _saveRequested

bool Pegasus::PegasusEngine::_saveRequested
private

Definition at line 261 of file pegasus.h.

◆ _screenDimmer

ScreenDimmer Pegasus::PegasusEngine::_screenDimmer
private

Definition at line 282 of file pegasus.h.

◆ _shellNotification

Notification Pegasus::PegasusEngine::_shellNotification
protected

Definition at line 209 of file pegasus.h.

◆ _smallInfoMovie

Movie Pegasus::PegasusEngine::_smallInfoMovie
private

Definition at line 331 of file pegasus.h.

◆ _switchModesSync

bool Pegasus::PegasusEngine::_switchModesSync
private

Definition at line 306 of file pegasus.h.

◆ _timeBases

Common::List<TimeBase *> Pegasus::PegasusEngine::_timeBases
private

Definition at line 249 of file pegasus.h.


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