ScummVM API documentation
Pelrock::PelrockEngine Class Reference
Inheritance diagram for Pelrock::PelrockEngine:
Engine

Public Member Functions

 PelrockEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
uint32 getFeatures () const
 
Common::String getGameId () const
 
uint32 getRandomNumber (uint maxNum)
 
bool isAlternateTiming () const
 
bool isScreenSaverDisabled () const
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveAutosaveCurrently () override
 
Common::Error syncGame (Common::Serializer &s)
 
void loadGame (SaveGameData &saveGame)
 
SaveGameDatacreateSaveGameData () const
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
void setScreen (int s)
 
void setScreenAndPrepare (int s, AlfredDirection dir)
 
void loadExtraScreenAndPresent (int screenIndex)
 
void waitForSpecialAnimation ()
 
bool renderScene (int overlayMode=OVERLAY_NONE)
 
void mouseHoverForMap ()
 
void frameTriggers ()
 
void maybeHaveDogPee ()
 
void maybePlayPostIntro ()
 
void maybeShakeEffect ()
 
void resetPasserByAnim (int startX, int startY, Sprite *sprite)
 
void handleFightRoomFrame ()
 
void paintDebugLayer ()
 
void maybeUpdatePasserByAnim (uint32 frameCount)
 
void changeCursor (Cursor cursor)
 
void travelToEgypt ()
 
bool shouldSkipFrame ()
 
void doExtraActions (int roomNumber)
 
void pyramidCollapse ()
 
void endingScene ()
 
void credits ()
 
void initGodsSequences (int roomNumber)
 
void addInventoryItem (int item)
 
void buyFromStore (HotSpot *hotspot, int stickerId)
 
void performActionTrigger (uint16 actionTrigger)
 
void dialogActionTrigger (uint16 actionTrigger, byte room, byte rootIndex)
 
void turnLightsOff ()
 
void givenItems ()
 
void advanceQuotesConversation (byte rootIndex, byte room)
 
void toJail ()
 
void executeAction (VerbIcon action, HotSpot *hotspot)
 
void openRoomDrawer (HotSpot *hotspot)
 
void closeRoomDrawer (HotSpot *hotspot)
 
void openClosedDrawer (HotSpot *hotspot)
 
void openRoomDoor (HotSpot *hotspot)
 
void closeRoomDoor (HotSpot *hotspot)
 
void pickUpAndDisable (HotSpot *hotspot)
 
void grabKetchup (HotSpot *hotspot)
 
void grabMustard (HotSpot *hotspot)
 
void grabSpicey (HotSpot *hotspot)
 
void openKitchenDoor (HotSpot *hotspot)
 
void closeKitchenDoor (HotSpot *HotSpot)
 
void openKitchenDrawer (HotSpot *hotspot)
 
void openKitchenDoorFromInside (HotSpot *hotspot)
 
void useSpicySauceWithBurger (int inventoryObject, HotSpot *hotspot)
 
void openShopDoor (HotSpot *hotspot)
 
void closeShopDoor (HotSpot *hotspot)
 
void openLamppost (HotSpot *hotspot)
 
void openDoor (HotSpot *hotspot, int doorIndex, int sticker, bool masculine, bool stayClosed)
 
void closeDoor (HotSpot *hotspot, int doorIndex, int sticker, bool masculine, bool stayOpen)
 
void pickUpPhoto (HotSpot *hotspot)
 
void pickYellowBook (HotSpot *hotspot)
 
void pickUpBrick (HotSpot *hotspot)
 
void openIceCreamShopDoor (HotSpot *hotspot)
 
void pickupGarbageCan (HotSpot *hotspot)
 
void noOpAction (HotSpot *hotspot)
 
void noOpItem (int item, HotSpot *hotspot)
 
void useOnAlfred (int inventoryObject)
 
void sayRandomIncorrectResponse ()
 
void chooseCorrectDoor ()
 
void useCardWithATM (int inventoryObject, HotSpot *hotspot)
 
void useBrickWithWindow (int inventoryObject, HotSpot *hotspot)
 
void moveCable (HotSpot *hotspot)
 
void useBrickWithShopWindow (int inventoryObject, HotSpot *hotspot)
 
void pickGuitar (HotSpot *hotspot)
 
void pickFish (HotSpot *hotspot)
 
void pickTeddyBear (HotSpot *hotspot)
 
void pickDiscs (HotSpot *hotspot)
 
void pickMonkeyBrain (HotSpot *hotspot)
 
void pickBooks (HotSpot *hotspot)
 
void pickPalette (HotSpot *hotspot)
 
void pickCandy (HotSpot *hotspot)
 
void pickConch (HotSpot *hotspot)
 
void pickHat (HotSpot *hotspot)
 
void pickCord (HotSpot *hotspot)
 
void pickAmulet (HotSpot *hotspot)
 
void openPlug (HotSpot *hotspot)
 
void useCordWithPlug (int inventoryObject, HotSpot *hotspot)
 
void pickCables (HotSpot *hotspot)
 
void showIdToGuard (int inventoryObject, HotSpot *hotspot)
 
void unlockMuseum ()
 
void giveMoneyToGuard (int inventoryObject, HotSpot *hotspot)
 
void openMuseumDoor (HotSpot *hotspot)
 
void closeMuseumDoor (HotSpot *hotspot)
 
void pickupFruit (HotSpot *hotspot)
 
void useAmuletWithStatue (int inventoryObject, HotSpot *hotspot)
 
void useSecretCodeWithStatue (int inventoryObject, HotSpot *hotspot)
 
void pickUpLetter (HotSpot *hotspot)
 
void openLibraryOutdoorsDoor (HotSpot *hotspot)
 
void closeLibraryOutdoorsDoor (HotSpot *hotspot)
 
void openLibraryIndoorsDoor (HotSpot *hotspot)
 
void closeLibraryIndoorsDoor (HotSpot *hotspot)
 
void pickBooksFromShelf1 (HotSpot *hotspot)
 
void pickBooksFromShelf2 (HotSpot *hotspot)
 
void pickBooksFromShelf3 (HotSpot *hotspot)
 
void giveSecretCodeToLibrarian (int inventoryObject, HotSpot *hotspot)
 
void useBrickWithLibrarian (int inventoryObject, HotSpot *hotspot)
 
void openNewspaperDoor (HotSpot *hotspot)
 
void closeNewspaperDoor (HotSpot *hotspot)
 
void openNewspaperBossDor (HotSpot *hotspot)
 
void closeNewspaperBossDoor (HotSpot *hotspot)
 
void openTravelAgencyDoor (HotSpot *hotspot)
 
void closeTravelAgencyDoor (HotSpot *hotspot)
 
void usePumpkinWithRiver (int inventoryObject, HotSpot *hotspot)
 
void playAlfredSpecialAnim (int anim, bool reverse=false)
 
void waitForSoundEnd (int channel=0)
 
void pickupSunflower (HotSpot *hotspot)
 
void checkIngredients ()
 
void pickUpBook (int i)
 
void pickUpChainsaw (HotSpot *hotspot)
 
void pickUpSpellbook (HotSpot *hotspot)
 
void pickUpBoot (HotSpot *hotspot)
 
void pickupCondoms (HotSpot *hotspot)
 
void openEgyptMuseumDoor (HotSpot *hotspot)
 
void closeEgyptMuseumDoor (HotSpot *hotspot)
 
void pushSymbol1 (HotSpot *hotspot)
 
void pushSymbol2 (HotSpot *hotspot)
 
void pushSymbol3 (HotSpot *hotspot)
 
void pushSymbol4 (HotSpot *hotspot)
 
void pickUpHairStrand (HotSpot *hotspot)
 
void openJailFloorTile (HotSpot *hotspot)
 
void openTunnelDrawer (HotSpot *hotspot)
 
void useKeyWithPortrait (int inventoryObject, HotSpot *hotspot)
 
void openSafe (HotSpot *hotspot)
 
void openTunnelDoor (HotSpot *hotspot)
 
void closeTunnelDoor (HotSpot *hotspot)
 
void useDollWithBed (int inventoryObject, HotSpot *hotspot)
 
void giveMagazineToGuard (int inventoryObject, HotSpot *hotspot)
 
void giveWaterToGuard (int inventoryObject, HotSpot *hotspot)
 
void guardMovement ()
 
void pickUpStone (HotSpot *hotspot)
 
void playSpecialAnim (uint32 offset, bool compressed, int x, int y, int width, int height, int numFrames)
 
void giveStoneToSlaves (int inventoryObject, HotSpot *hotspot)
 
void swimmingPoolCutscene (HotSpot *hotspot)
 
void pickUpStones (HotSpot *hotspot)
 
void pickUpMud (HotSpot *hotspot)
 
void openPyramidDoor (HotSpot *hotspot)
 
void usePumpkinWithPond (int inventoryObject, HotSpot *hotspot)
 
void useWaterOnFakeStone (int inventoryObject, HotSpot *hotspot)
 
void useWigWithPot (int inventoryObject, HotSpot *hotspot)
 
void magicFormula (int inventoryObject, HotSpot *hotspot)
 
void smokeAnimation (int spriteIndex, bool hide=true)
 
void openArchitectDoor (HotSpot *hotspot)
 
void closeArchitectDoor (HotSpot *hotspot)
 
void pickupPyramidMap (HotSpot *hotspot)
 
void openArchitectDoorFromInside (HotSpot *hotspot)
 
void closeArchitectDoorFromInside (HotSpot *hotspot)
 
void checkAllSymbols ()
 
void openMcDoor (HotSpot *hotspot)
 
void closeMcDoor (HotSpot *hotspot)
 
void pickupBush (HotSpot *hotspot)
 
void teleportToPrincess ()
 
void animateStatuePaletteFade (bool reverse=false)
 
void pickUpMatches (HotSpot *hotspot)
 
void antiPiracyEffect ()
 
void checkObjectsForPart2 ()
 
void waitForActionEnd ()
 
- 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 int getAutosaveSlot () const
 
virtual bool gameTypeHasAddOns () const
 
virtual bool dirCanBeGameAddOn (const Common::FSDirectory &dir) const
 
virtual bool dirMustBeGameAddOn (const Common::FSDirectory &dir) const
 
Common::ErrorCode updateAddOns (const MetaEngine *metaEngine) 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 loadGameState (int slot)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Public Attributes

GraphicsManager_graphics = nullptr
 
Graphics::Screen_screen = nullptr
 
ResourceManager_res = nullptr
 
RoomManager_room = nullptr
 
ChronoManager_chrono = nullptr
 
PelrockEventManager_events = nullptr
 
DialogManager_dialog = nullptr
 
AlfredState _alfredState
 
ShakeEffectState _shakeEffectState
 
byte _npcTalkSpeedByte = 0
 
Graphics::ManagedSurface _compositeBuffer
 
Graphics::ManagedSurface _currentBackground
 
Graphics::ManagedSurface _bgScreen
 
Graphics::Surface _saveThumbnail
 
GameStateData_state = new GameStateData()
 
bool _autoSaveAllowed = true
 
SmallFont_smallFont = nullptr
 
LargeFont_largeFont = nullptr
 
DoubleSmallFont_doubleSmallFont = nullptr
 
- 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 bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static bool warnUserAboutUnsupportedAddOn (Common::String addOnName)
 
static void warnUserAboutTestingMode ()
 
static void errorAddingAddOnWithoutBaseGame (Common::String addOnName, Common::String gameId)
 
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
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Member Function Documentation

◆ run()

Common::Error Pelrock::PelrockEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ getGameId()

Common::String Pelrock::PelrockEngine::getGameId ( ) const

Returns the game Id

◆ getRandomNumber()

uint32 Pelrock::PelrockEngine::getRandomNumber ( uint  maxNum)
inline

Gets a random number

◆ isAlternateTiming()

bool Pelrock::PelrockEngine::isAlternateTiming ( ) const

Returns true if "Alternate timing" option is enabled. When false, the engine uses the original game's half-speed walking/talking timing.

◆ hasFeature()

bool Pelrock::PelrockEngine::hasFeature ( EngineFeature  f) const
inlineoverridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Pelrock::PelrockEngine::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 Pelrock::PelrockEngine::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.

◆ canSaveAutosaveCurrently()

bool Pelrock::PelrockEngine::canSaveAutosaveCurrently ( )
inlineoverridevirtual

Indicate whether an autosave can currently be done.

Reimplemented from Engine.

◆ syncGame()

Common::Error Pelrock::PelrockEngine::syncGame ( Common::Serializer s)

Uses a serializer to allow implementing savegame loading and saving using a single method

◆ saveGameStream()

Common::Error Pelrock::PelrockEngine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
inlineoverridevirtual

Save a game state.

Parameters
streamThe write stream to save the savegame data to.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ loadGameStream()

Common::Error Pelrock::PelrockEngine::loadGameStream ( Common::SeekableReadStream stream)
inlineoverridevirtual

Load a game state.

Parameters
streamThe stream to load the save state from.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.


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