ScummVM
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)
 
virtual ~HopkinsEngine ()
 
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)
 
Common::String generateSaveName (int slotNumber)
 
virtual bool canLoadGameStateCurrently ()
 Returns true if it is currently okay to restore a game. More...
 
virtual bool canSaveGameStateCurrently ()
 Returns true if it is currently okay to save the game. More...
 
virtual Common::Error loadGameState (int slot)
 Load the savegame at the specified slot index. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save the game to the given slot index, and with the given name. More...
 
void playIntro ()
 Run the introduction sequence. More...
 
virtual void syncSoundSettings ()
 Synchronizes the sound settings from ScummVM into the engine. More...
 
- 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 initKeymap ()
 
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 Attributes

AnimationManager_animMan
 
ComputerManager_computer
 
DialogsManager_dialog
 
Debugger_debug
 
EventsManager_events
 
FileManager_fileIO
 
FontManager_fontMan
 
Globals_globals
 
GraphicsManager_graphicsMan
 
LinesManager_linesMan
 
MenuManager_menuMan
 
ObjectsManager_objectsMan
 
SaveLoadManager_saveLoad
 
ScriptManager_script
 
SoundManager_soundMan
 
TalkManager_talkMan
 
int _startGameSlot
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
virtual 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...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
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,
  kSupportsJoystick
}
 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 bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
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 ( )
virtual

Definition at line 62 of file hopkins.cpp.

Member Function Documentation

◆ bombExplosion()

void Hopkins::HopkinsEngine::bombExplosion ( )
private

Definition at line 1900 of file hopkins.cpp.

◆ canLoadGameStateCurrently()

bool Hopkins::HopkinsEngine::canLoadGameStateCurrently ( )
virtual

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

Reimplemented from Engine.

Definition at line 88 of file hopkins.cpp.

◆ canSaveGameStateCurrently()

bool Hopkins::HopkinsEngine::canSaveGameStateCurrently ( )
virtual

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

Reimplemented from Engine.

Definition at line 95 of file hopkins.cpp.

◆ displayAdultDisclaimer()

bool Hopkins::HopkinsEngine::displayAdultDisclaimer ( )
private

Show warning screen about the game being adults only.

Definition at line 2881 of file hopkins.cpp.

◆ displayCredits() [1/2]

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

Definition at line 2470 of file hopkins.cpp.

◆ displayCredits() [2/2]

void Hopkins::HopkinsEngine::displayCredits ( )
private

Definition at line 2500 of file hopkins.cpp.

◆ displayEndDemo()

void Hopkins::HopkinsEngine::displayEndDemo ( )
private

Definition at line 1887 of file hopkins.cpp.

◆ displayNotAvailable()

void Hopkins::HopkinsEngine::displayNotAvailable ( )
private

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

Definition at line 1861 of file hopkins.cpp.

◆ drawBaseMap()

void Hopkins::HopkinsEngine::drawBaseMap ( )
private

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 2288 of file hopkins.cpp.

◆ endLinuxDemo()

void Hopkins::HopkinsEngine::endLinuxDemo ( )
private

Definition at line 1946 of file hopkins.cpp.

◆ generateSaveName()

Common::String Hopkins::HopkinsEngine::generateSaveName ( int  slotNumber)

Definition at line 81 of file hopkins.cpp.

◆ getDebugger()

GUI::Debugger* Hopkins::HopkinsEngine::getDebugger ( )
inlineprotectedvirtual

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 134 of file hopkins.h.

◆ 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 1589 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 ( )
private

Displays the map screen in the underground base.

Definition at line 2319 of file hopkins.cpp.

◆ handleConflagration()

void Hopkins::HopkinsEngine::handleConflagration ( )
private

Definition at line 1975 of file hopkins.cpp.

◆ handleNotAvailable()

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

Definition at line 1880 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 
)
private

Definition at line 2777 of file hopkins.cpp.

◆ handleOceanMouseEvents()

void Hopkins::HopkinsEngine::handleOceanMouseEvents ( )
private

Definition at line 2563 of file hopkins.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 139 of file detection.cpp.

◆ initializeSystem()

void Hopkins::HopkinsEngine::initializeSystem ( )
private

Definition at line 1593 of file hopkins.cpp.

◆ isUnderwaterSubScene()

bool Hopkins::HopkinsEngine::isUnderwaterSubScene ( )
private

Definition at line 2929 of file hopkins.cpp.

◆ loadBaseMap()

void Hopkins::HopkinsEngine::loadBaseMap ( )
private

Loads the base map from the PBASE file.

Definition at line 2275 of file hopkins.cpp.

◆ loadCredits()

void Hopkins::HopkinsEngine::loadCredits ( )
private

Definition at line 2405 of file hopkins.cpp.

◆ loadGameState()

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

Load the savegame at the specified slot index.

Reimplemented from Engine.

Definition at line 103 of file hopkins.cpp.

◆ playEnding()

void Hopkins::HopkinsEngine::playEnding ( )
private

Definition at line 2080 of file hopkins.cpp.

◆ playIntro()

void Hopkins::HopkinsEngine::playIntro ( )

Run the introduction sequence.

Play the intro of the game.

Definition at line 1635 of file hopkins.cpp.

◆ playPlaneCutscene()

void Hopkins::HopkinsEngine::playPlaneCutscene ( )
private

Definition at line 2230 of file hopkins.cpp.

◆ playSubmarineCutscene()

void Hopkins::HopkinsEngine::playSubmarineCutscene ( )
private

Definition at line 2008 of file hopkins.cpp.

◆ playUnderwaterBaseCutscene()

void Hopkins::HopkinsEngine::playUnderwaterBaseCutscene ( )
private

Definition at line 2047 of file hopkins.cpp.

◆ restoreSystem()

void Hopkins::HopkinsEngine::restoreSystem ( )
private

Definition at line 1942 of file hopkins.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 114 of file hopkins.cpp.

◆ runFull()

bool Hopkins::HopkinsEngine::runFull ( )
private

Definition at line 773 of file hopkins.cpp.

◆ runLinuxDemo()

bool Hopkins::HopkinsEngine::runLinuxDemo ( )
private

Definition at line 450 of file hopkins.cpp.

◆ runWin95Demo()

bool Hopkins::HopkinsEngine::runWin95Demo ( )
private

Definition at line 133 of file hopkins.cpp.

◆ saveGameState()

Common::Error Hopkins::HopkinsEngine::saveGameState ( int  slot,
const Common::String desc 
)
virtual

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

Reimplemented from Engine.

Definition at line 110 of file hopkins.cpp.

◆ setSubmarineSprites()

void Hopkins::HopkinsEngine::setSubmarineSprites ( )
private

Definition at line 2758 of file hopkins.cpp.

◆ syncSoundSettings()

void Hopkins::HopkinsEngine::syncSoundSettings ( )
virtual

Synchronizes the sound settings from ScummVM into the engine.

Reimplemented from Engine.

Definition at line 2875 of file hopkins.cpp.

Member Data Documentation

◆ _animMan

AnimationManager* Hopkins::HopkinsEngine::_animMan

Definition at line 137 of file hopkins.h.

◆ _computer

ComputerManager* Hopkins::HopkinsEngine::_computer

Definition at line 138 of file hopkins.h.

◆ _debug

Debugger* Hopkins::HopkinsEngine::_debug

Definition at line 140 of file hopkins.h.

◆ _dialog

DialogsManager* Hopkins::HopkinsEngine::_dialog

Definition at line 139 of file hopkins.h.

◆ _events

EventsManager* Hopkins::HopkinsEngine::_events

Definition at line 141 of file hopkins.h.

◆ _fileIO

FileManager* Hopkins::HopkinsEngine::_fileIO

Definition at line 142 of file hopkins.h.

◆ _fontMan

FontManager* Hopkins::HopkinsEngine::_fontMan

Definition at line 143 of file hopkins.h.

◆ _gameDescription

const HopkinsGameDescription* Hopkins::HopkinsEngine::_gameDescription
private

Definition at line 80 of file hopkins.h.

◆ _globals

Globals* Hopkins::HopkinsEngine::_globals

Definition at line 144 of file hopkins.h.

◆ _graphicsMan

GraphicsManager* Hopkins::HopkinsEngine::_graphicsMan

Definition at line 145 of file hopkins.h.

◆ _linesMan

LinesManager* Hopkins::HopkinsEngine::_linesMan

Definition at line 146 of file hopkins.h.

◆ _menuMan

MenuManager* Hopkins::HopkinsEngine::_menuMan

Definition at line 147 of file hopkins.h.

◆ _objectsMan

ObjectsManager* Hopkins::HopkinsEngine::_objectsMan

Definition at line 148 of file hopkins.h.

◆ _randomSource

Common::RandomSource Hopkins::HopkinsEngine::_randomSource
private

Definition at line 81 of file hopkins.h.

◆ _saveLoad

SaveLoadManager* Hopkins::HopkinsEngine::_saveLoad

Definition at line 149 of file hopkins.h.

◆ _script

ScriptManager* Hopkins::HopkinsEngine::_script

Definition at line 150 of file hopkins.h.

◆ _soundMan

SoundManager* Hopkins::HopkinsEngine::_soundMan

Definition at line 151 of file hopkins.h.

◆ _startGameSlot

int Hopkins::HopkinsEngine::_startGameSlot

Definition at line 172 of file hopkins.h.

◆ _talkMan

TalkManager* Hopkins::HopkinsEngine::_talkMan

Definition at line 152 of file hopkins.h.


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