Hopkins::HopkinsEngine Class Reference

#include <hopkins.h>

+ Inheritance diagram for Hopkins::HopkinsEngine:
+ Collaboration diagram for Hopkins::HopkinsEngine:

Public Member Functions

 HopkinsEngine (OSystem *syst, const HopkinsGameDescription *gameDesc)
 ~HopkinsEngine () override
void GUIError (const Common::String &msg)
uint32 getFeatures () const
Common::Language getLanguage () const
Common::Platform getPlatform () const
uint16 getVersion () const
bool getIsDemo () const
const Common::StringgetTargetName () const
int getRandomNumber (int maxNumber)
bool canLoadGameStateCurrently () override
 Returns true if it is currently okay to restore a game. More...
bool canSaveGameStateCurrently () override
 Returns true if it is currently okay to save the game. More...
Common::Error loadGameState (int slot) override
 Load the savegame at the specified slot index. More...
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save the game to the given slot index, and with the given name. More...
void playIntro ()
 Run the introduction sequence. More...
void syncSoundSettings () override
 Synchronizes the sound settings from ScummVM into the engine. More...
- Public Member Functions inherited from Engine
 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 GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
virtual void flipMute ()
 Flip mute all sound option. More...
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
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...
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
bool shouldPerformAutoSave (int lastSaveTime)

Public Attributes

int _startGameSlot
- Public Attributes inherited from Engine

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Private Member Functions

void initializeSystem ()
void displayNotAvailable ()
 If in demo, displays a 'not available' screen and returns to the city map. More...
void restoreSystem ()
void endLinuxDemo ()
void displayEndDemo ()
void bombExplosion ()
void handleConflagration ()
void playSubmarineCutscene ()
void playUnderwaterBaseCutscene ()
void playPlaneCutscene ()
void playEnding ()
bool isUnderwaterSubScene ()
int handleBaseMap ()
 Displays the map screen in the underground base. More...
void loadBaseMap ()
 Loads the base map from the PBASE file. More...
void drawBaseMap ()
 Draws a simple base map for the Windows version, which implemented a 'Wolfenstein 3D' style shooter for the base, rather than having a map. More...
void handleOceanMouseEvents ()
void setSubmarineSprites ()
void handleOceanMaze (int16 curExitId, Common::String backgroundFilename, Directions defaultDirection, int16 exit1, int16 exit2, int16 exit3, int16 exit4, int16 soundId)
void loadCredits ()
void displayCredits (int startPosY, byte *buffer, char color)
void displayCredits ()
void handleNotAvailable (int nextScreen)
bool runWin95Demo ()
bool runLinuxDemo ()
bool runFull ()
bool displayAdultDisclaimer ()
 Show warning screen about the game being adults only. More...

Private Attributes

const HopkinsGameDescription_gameDescription
Common::RandomSource _randomSource

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 A feature in this context means an ability of the engine which can be either available or not. More...
- 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 MetaEnginegetMetaEngine ()
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 78 of file hopkins.h.

Constructor & Destructor Documentation

◆ HopkinsEngine()

Hopkins::HopkinsEngine::HopkinsEngine ( OSystem syst,
const HopkinsGameDescription gameDesc 

Definition at line 38 of file hopkins.cpp.

◆ ~HopkinsEngine()

Hopkins::HopkinsEngine::~HopkinsEngine ( )

Definition at line 62 of file hopkins.cpp.

Member Function Documentation

◆ bombExplosion()

void Hopkins::HopkinsEngine::bombExplosion ( )

Definition at line 1895 of file hopkins.cpp.

◆ canLoadGameStateCurrently()

bool Hopkins::HopkinsEngine::canLoadGameStateCurrently ( )

Returns true if it is currently okay to restore a game.

Reimplemented from Engine.

Definition at line 83 of file hopkins.cpp.

◆ canSaveGameStateCurrently()

bool Hopkins::HopkinsEngine::canSaveGameStateCurrently ( )

Returns true if it is currently okay to save the game.

Reimplemented from Engine.

Definition at line 90 of file hopkins.cpp.

◆ displayAdultDisclaimer()

bool Hopkins::HopkinsEngine::displayAdultDisclaimer ( )

Show warning screen about the game being adults only.

Definition at line 2876 of file hopkins.cpp.

◆ displayCredits() [1/2]

void Hopkins::HopkinsEngine::displayCredits ( )

Definition at line 2495 of file hopkins.cpp.

◆ displayCredits() [2/2]

void Hopkins::HopkinsEngine::displayCredits ( int  startPosY,
byte buffer,
char  color 

Definition at line 2465 of file hopkins.cpp.

◆ displayEndDemo()

void Hopkins::HopkinsEngine::displayEndDemo ( )

Definition at line 1882 of file hopkins.cpp.

◆ displayNotAvailable()

void Hopkins::HopkinsEngine::displayNotAvailable ( )

If in demo, displays a 'not available' screen and returns to the city map.

Definition at line 1856 of file hopkins.cpp.

◆ drawBaseMap()

void Hopkins::HopkinsEngine::drawBaseMap ( )

Draws a simple base map for the Windows version, which implemented a 'Wolfenstein 3D' style shooter for the base, rather than having a map.

Definition at line 2283 of file hopkins.cpp.

◆ endLinuxDemo()

void Hopkins::HopkinsEngine::endLinuxDemo ( )

Definition at line 1941 of file hopkins.cpp.

◆ getFeatures()

uint32 Hopkins::HopkinsEngine::getFeatures ( ) const

Definition at line 43 of file detection.cpp.

◆ getIsDemo()

bool Hopkins::HopkinsEngine::getIsDemo ( ) const

Definition at line 55 of file detection.cpp.

◆ getLanguage()

Common::Language Hopkins::HopkinsEngine::getLanguage ( ) const

Definition at line 47 of file detection.cpp.

◆ getPlatform()

Common::Platform Hopkins::HopkinsEngine::getPlatform ( ) const

Definition at line 51 of file detection.cpp.

◆ getRandomNumber()

int Hopkins::HopkinsEngine::getRandomNumber ( int  maxNumber)

Definition at line 1584 of file hopkins.cpp.

◆ getTargetName()

const Common::String & Hopkins::HopkinsEngine::getTargetName ( ) const

Definition at line 59 of file detection.cpp.

◆ getVersion()

uint16 Hopkins::HopkinsEngine::getVersion ( ) const

◆ GUIError()

void Hopkins::HopkinsEngine::GUIError ( const Common::String msg)

◆ handleBaseMap()

int Hopkins::HopkinsEngine::handleBaseMap ( )

Displays the map screen in the underground base.

Definition at line 2314 of file hopkins.cpp.

◆ handleConflagration()

void Hopkins::HopkinsEngine::handleConflagration ( )

Definition at line 1970 of file hopkins.cpp.

◆ handleNotAvailable()

void Hopkins::HopkinsEngine::handleNotAvailable ( int  nextScreen)

Definition at line 1875 of file hopkins.cpp.

◆ handleOceanMaze()

void Hopkins::HopkinsEngine::handleOceanMaze ( int16  curExitId,
Common::String  backgroundFilename,
Directions  defaultDirection,
int16  exit1,
int16  exit2,
int16  exit3,
int16  exit4,
int16  soundId 

Definition at line 2772 of file hopkins.cpp.

◆ handleOceanMouseEvents()

void Hopkins::HopkinsEngine::handleOceanMouseEvents ( )

Definition at line 2558 of file hopkins.cpp.

◆ hasFeature()

bool Hopkins::HopkinsEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 139 of file detection.cpp.

◆ initializeSystem()

void Hopkins::HopkinsEngine::initializeSystem ( )

Definition at line 1588 of file hopkins.cpp.

◆ isUnderwaterSubScene()

bool Hopkins::HopkinsEngine::isUnderwaterSubScene ( )

Definition at line 2924 of file hopkins.cpp.

◆ loadBaseMap()

void Hopkins::HopkinsEngine::loadBaseMap ( )

Loads the base map from the PBASE file.

Definition at line 2270 of file hopkins.cpp.

◆ loadCredits()

void Hopkins::HopkinsEngine::loadCredits ( )

Definition at line 2400 of file hopkins.cpp.

◆ loadGameState()

Common::Error Hopkins::HopkinsEngine::loadGameState ( int  slot)

Load the savegame at the specified slot index.

Reimplemented from Engine.

Definition at line 98 of file hopkins.cpp.

◆ playEnding()

void Hopkins::HopkinsEngine::playEnding ( )

Definition at line 2075 of file hopkins.cpp.

◆ playIntro()

void Hopkins::HopkinsEngine::playIntro ( )

Run the introduction sequence.

Play the intro of the game.

Definition at line 1630 of file hopkins.cpp.

◆ playPlaneCutscene()

void Hopkins::HopkinsEngine::playPlaneCutscene ( )

Definition at line 2225 of file hopkins.cpp.

◆ playSubmarineCutscene()

void Hopkins::HopkinsEngine::playSubmarineCutscene ( )

Definition at line 2003 of file hopkins.cpp.

◆ playUnderwaterBaseCutscene()

void Hopkins::HopkinsEngine::playUnderwaterBaseCutscene ( )

Definition at line 2042 of file hopkins.cpp.

◆ restoreSystem()

void Hopkins::HopkinsEngine::restoreSystem ( )

Definition at line 1937 of file hopkins.cpp.

◆ run()

Common::Error Hopkins::HopkinsEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 109 of file hopkins.cpp.

◆ runFull()

bool Hopkins::HopkinsEngine::runFull ( )

Definition at line 768 of file hopkins.cpp.

◆ runLinuxDemo()

bool Hopkins::HopkinsEngine::runLinuxDemo ( )

Definition at line 445 of file hopkins.cpp.

◆ runWin95Demo()

bool Hopkins::HopkinsEngine::runWin95Demo ( )

Definition at line 128 of file hopkins.cpp.

◆ saveGameState()

Common::Error Hopkins::HopkinsEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 

Save the game to the given slot index, and with the given name.

Reimplemented from Engine.

Definition at line 105 of file hopkins.cpp.

◆ setSubmarineSprites()

void Hopkins::HopkinsEngine::setSubmarineSprites ( )

Definition at line 2753 of file hopkins.cpp.

◆ syncSoundSettings()

void Hopkins::HopkinsEngine::syncSoundSettings ( )

Synchronizes the sound settings from ScummVM into the engine.

Reimplemented from Engine.

Definition at line 2870 of file hopkins.cpp.

Member Data Documentation

◆ _animMan

AnimationManager* Hopkins::HopkinsEngine::_animMan

Definition at line 135 of file hopkins.h.

◆ _computer

ComputerManager* Hopkins::HopkinsEngine::_computer

Definition at line 136 of file hopkins.h.

◆ _dialog

DialogsManager* Hopkins::HopkinsEngine::_dialog

Definition at line 137 of file hopkins.h.

◆ _events

EventsManager* Hopkins::HopkinsEngine::_events

Definition at line 138 of file hopkins.h.

◆ _fileIO

FileManager* Hopkins::HopkinsEngine::_fileIO

Definition at line 139 of file hopkins.h.

◆ _fontMan

FontManager* Hopkins::HopkinsEngine::_fontMan

Definition at line 140 of file hopkins.h.

◆ _gameDescription

const HopkinsGameDescription* Hopkins::HopkinsEngine::_gameDescription

Definition at line 80 of file hopkins.h.

◆ _globals

Globals* Hopkins::HopkinsEngine::_globals

Definition at line 141 of file hopkins.h.

◆ _graphicsMan

GraphicsManager* Hopkins::HopkinsEngine::_graphicsMan

Definition at line 142 of file hopkins.h.

◆ _linesMan

LinesManager* Hopkins::HopkinsEngine::_linesMan

Definition at line 143 of file hopkins.h.

◆ _menuMan

MenuManager* Hopkins::HopkinsEngine::_menuMan

Definition at line 144 of file hopkins.h.

◆ _objectsMan

ObjectsManager* Hopkins::HopkinsEngine::_objectsMan

Definition at line 145 of file hopkins.h.

◆ _randomSource

Common::RandomSource Hopkins::HopkinsEngine::_randomSource

Definition at line 81 of file hopkins.h.

◆ _saveLoad

SaveLoadManager* Hopkins::HopkinsEngine::_saveLoad

Definition at line 146 of file hopkins.h.

◆ _script

ScriptManager* Hopkins::HopkinsEngine::_script

Definition at line 147 of file hopkins.h.

◆ _soundMan

SoundManager* Hopkins::HopkinsEngine::_soundMan

Definition at line 148 of file hopkins.h.

◆ _startGameSlot

int Hopkins::HopkinsEngine::_startGameSlot

Definition at line 169 of file hopkins.h.

◆ _talkMan

TalkManager* Hopkins::HopkinsEngine::_talkMan

Definition at line 149 of file hopkins.h.

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