ScummVM API documentation
Drascula::DrasculaEngine Class Reference
Inheritance diagram for Drascula::DrasculaEngine:
Engine

Public Types

typedef signed char DacPalette256[256][3]
 
- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Public Member Functions

 DrasculaEngine (OSystem *syst, const DrasculaGameDescription *gameDesc)
 
bool hasFeature (EngineFeature f) const override
 
void syncSoundSettings () override
 
Common::Error loadGameState (int slot) override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
uint32 getFeatures () const
 
Common::Language getLanguage () const
 
void updateEvents ()
 
void loadArchives ()
 
void allocMemory ()
 
void freeMemory ()
 
void endChapter ()
 
void loadPic (int roomNum, byte *targetSurface, int colorCount=1)
 
void loadPic (const char *NamePcc, byte *targetSurface, int colorCount=1)
 
void setRGB (byte *pal, int plt)
 
void assignPalette (DacPalette256 pal)
 
void setDefaultPalette (DacPalette256 pal)
 
void setPalette (byte *PalBuf)
 
void copyBackground (int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest)
 
void copyBackground ()
 
void copyRect (int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest)
 
void updateScreen ()
 
void updateScreen (int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer)
 
int checkWrapX (int x)
 
int checkWrapY (int y)
 
bool loadDrasculaDat ()
 
bool runCurrentChapter ()
 
void black ()
 
void pickObject (int)
 
void walkUp ()
 
void walkDown ()
 
void moveVonBraun ()
 
void placeVonBraun (int pointX)
 
void hipo_sin_nadie (int counter)
 
void toggleDoor (int nflag, int doorNum, int action)
 
void showMap ()
 
void enterRoom (int)
 
void clearRoom ()
 
void walkToPoint (Common::Point pos)
 
void moveCursor ()
 
void checkObjects ()
 
void selectVerbFromBar ()
 
bool verify1 ()
 
bool verify2 ()
 
Common::KeyCode getScan ()
 
void addKeyToBuffer (Common::KeyState &key)
 
void flushKeyBuffer ()
 
void selectVerb (int)
 
int updateVolume (int prevVolume, int prevVolumeY)
 
void volumeControls ()
 
bool saveLoadScreen ()
 
bool scummVMSaveLoadDialog (bool isSave)
 
Common::String enterName (Common::String &selectedName)
 
void loadSaveNames ()
 
void saveGame (int slot, const Common::String &desc)
 
bool loadGame (int slot)
 
void checkForOldSaveGames ()
 
void convertSaveGame (int slot, const Common::String &desc)
 
void print_abc (const char *, int, int)
 
void delay (int ms)
 
bool confirmExit ()
 
void screenSaver ()
 
void chooseObject (int object)
 
void addObject (int)
 
int removeObject (int osj)
 
void playFLI (const char *filefli, int vel)
 
void fadeFromBlack (int fadeSpeed)
 
void fadeToBlack (int fadeSpeed)
 
signed char adjustToVGA (signed char value)
 
void color_abc (int cl)
 
bool textFitsCentered (char *text, int x)
 
void centerText (const char *, int, int)
 
void playSound (int soundNum)
 
bool animate (const char *animation, int FPS)
 
void pause (int)
 
void placeIgor ()
 
void placeDrascula ()
 
void talkInit (const char *filename)
 
bool isTalkFinished ()
 
void talk_igor (int, int)
 
void talk_drascula (int index, int talkerType=0)
 
void talk_solo (const char *, const char *)
 
void talk_bartender (int, int talkerType=0)
 
void talk_pen (const char *, const char *, int)
 
void talk_bj_bed (int)
 
void talk_htel (int)
 
void talk_bj (int)
 
void talk_trunk (int)
 
void talk (int)
 
void talk (const char *, const char *)
 
void talk_sync (const char *, const char *, const char *)
 
void talk_drunk (int)
 
void talk_pianist (int)
 
void talk_werewolf (int)
 
void talk_mus (int)
 
void talk_drascula_big (int)
 
void talk_vonBraun (int, int)
 
void talk_blind (int)
 
void talk_hacker (int)
 
void talk_generic (const char *said, const char *filename, int *faces, int faceCount, int *coords, byte *surface)
 
void hiccup (int)
 
void finishSound ()
 
void stopSound ()
 
void playMusic (int p)
 
void stopMusic ()
 
void updateMusic ()
 
int musicStatus ()
 
void updateRoom ()
 
void updateDoor (int)
 
void setPaletteBase (int darkness)
 
void updateVisible ()
 
void startWalking ()
 
void updateRefresh ()
 
void updateRefresh_pre ()
 
void moveCharacters ()
 
void showMenu ()
 
void clearMenu ()
 
void removeObject ()
 
bool exitRoom (int)
 
bool pickupObject ()
 
bool checkAction (int)
 
void setCursor (int cursor)
 
void showCursor ()
 
void hideCursor ()
 
bool isCursorVisible ()
 
bool soundIsActive ()
 
void waitFrameSSN ()
 
void mixVideo (byte *OldScreen, byte *NewScreen, uint16 oldPitch)
 
void decodeRLE (byte *BufferRLE, byte *MiVideoRLE, uint16 pitch=320)
 
void decodeOffset (byte *BufferOFF, byte *MiVideoOFF, int length)
 
int playFrameSSN (Common::SeekableReadStream *stream)
 
void showFrame (Common::SeekableReadStream *stream, bool firstFrame=false)
 
int getTime ()
 
void reduce_hare_chico (int, int, int, int, int, int, int, byte *, byte *)
 
void quadrant_1 ()
 
void quadrant_2 ()
 
void quadrant_3 ()
 
void quadrant_4 ()
 
void increaseFrameNum ()
 
int whichObject ()
 
bool checkMenuFlags ()
 
void setupRoomsTable ()
 
void freeRoomsTable ()
 
bool roomParse (int, int)
 
void cleanupString (char *string)
 
void playTalkSequence (int sequence)
 
void doTalkSequenceCommand (TalkSequenceCommand cmd)
 
void converse (int)
 
int print_abc_opc (const char *, int, int)
 
void response (int)
 
void activatePendulum ()
 
void MusicFadeout ()
 
void playFile (const char *fname)
 
void grr ()
 
void updateAnim (int y, int destX, int destY, int width, int height, int count, byte *src, int delayVal=3, bool copyRectangle=false)
 
bool room (int rN, int fl)
 
bool room_0 (int)
 
bool room_1 (int)
 
bool room_2 (int)
 
bool room_3 (int)
 
bool room_4 (int)
 
bool room_5 (int)
 
bool room_6 (int)
 
bool room_7 (int)
 
bool room_8 (int)
 
bool room_9 (int)
 
bool room_12 (int)
 
bool room_13 (int)
 
bool room_14 (int)
 
bool room_15 (int)
 
bool room_16 (int)
 
bool room_17 (int)
 
bool room_18 (int)
 
bool room_21 (int)
 
bool room_22 (int)
 
bool room_23 (int)
 
bool room_24 (int)
 
bool room_26 (int)
 
bool room_27 (int)
 
bool room_29 (int)
 
bool room_30 (int)
 
bool room_31 (int)
 
bool room_34 (int)
 
bool room_35 (int)
 
bool room_49 (int)
 
bool room_53 (int)
 
bool room_54 (int)
 
bool room_55 (int)
 
bool room_56 (int)
 
bool room_58 (int)
 
bool room_59 (int)
 
bool room_60 (int)
 
bool room_62 (int)
 
bool room_102 (int)
 
void asco ()
 
void animation_1_1 ()
 
void animation_2_1 ()
 
void animation_3_1 ()
 
void animation_4_1 ()
 
void animation_2_2 ()
 
void animation_4_2 ()
 
void animation_5_2 ()
 
void animation_6_2 ()
 
void animation_7_2 ()
 
void animation_11_2 ()
 
void animation_12_2 ()
 
void animation_13_2 ()
 
void animation_14_2 ()
 
void animation_16_2 ()
 
void animation_20_2 ()
 
void animation_23_2 ()
 
void animation_24_2 ()
 
void animation_25_2 ()
 
void animation_26_2 ()
 
void animation_27_2 ()
 
void animation_29_2 ()
 
void animation_31_2 ()
 
void animation_34_2 ()
 
void animation_35_2 ()
 
void animation_36_2 ()
 
void animation_2_3 ()
 
void animation_6_3 ()
 
void animation_castle ()
 
void animation_1_4 ()
 
void animation_5_4 ()
 
void animation_6_4 ()
 
void animation_7_4 ()
 
void animation_8_4 ()
 
void animation_1_5 ()
 
void animation_5_5 ()
 
void animation_12_5 ()
 
void animation_12_5_frankenstein ()
 
void animation_14_5 ()
 
void animation_1_6 ()
 
void animation_5_6 ()
 
void animation_6_6 ()
 
void animation_9_6 ()
 
void animation_19_6 ()
 
void update_1_pre ()
 
void update_2 ()
 
void update_3 ()
 
void update_4 ()
 
void update_6_pre ()
 
void update_9_pre ()
 
void update_14_pre ()
 
void update_13 ()
 
void update_16_pre ()
 
void update_18_pre ()
 
void update_23_pre ()
 
void update_26_pre ()
 
void update_26 ()
 
void update_35_pre ()
 
void update_58 ()
 
void update_58_pre ()
 
void update_59_pre ()
 
void update_60_pre ()
 
void update_60 ()
 
void update_62 ()
 
void update_62_pre ()
 
void update_102 ()
 
- 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 ()
 
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 Attributes

Common::RandomSource_rnd
 
const DrasculaGameDescription_gameDescription
 
Audio::SoundHandle _soundHandle
 
DacPalette256 gamePalette
 
DacPalette256 defaultPalette
 
DacPalette256 brightPalette
 
DacPalette256 darkPalette
 
byte * crosshairCursor
 
byte * mouseCursor
 
byte * bgSurface
 
byte * backSurface
 
byte * cursorSurface
 
byte * drawSurface3
 
byte * drawSurface2
 
byte * tableSurface
 
byte * extraSurface
 
byte * screenSurface
 
byte * frontSurface
 
byte cPal [768]
 
ArchiveMan _archives
 
int actorFrames [8]
 
int previousMusic
 
int roomMusic
 
int _roomNumber
 
char roomDisk [20]
 
char currentData [20]
 
int numRoomObjs
 
char menuBackground [20]
 
char objName [30][20]
 
char iconName [44][13]
 
int objectNum [40]
 
int visible [40]
 
int isDoor [40]
 
int trackObj [40]
 
Common::Point _roomObject [40]
 
int inventoryObjects [43]
 
int _doorDestRoom [40]
 
Common::Point _doorDestPoint [40]
 
int trackCharacter_alkeva [40]
 
int _roomExitId [40]
 
Common::Rect _objectRect [40]
 
int takeObject
 
int pickedObject
 
bool _subtitlesDisabled
 
bool _menuBar
 
bool _menuScreen
 
bool _hasName
 
char textName [20]
 
int curExcuseLook
 
int curExcuseAction
 
int flags [50]
 
int frame_y
 
int curX
 
int curY
 
int curDirection
 
int trackProtagonist
 
int _characterFrame
 
bool _characterMoved
 
bool _characterVisible
 
int roomX
 
int roomY
 
int checkFlags
 
int doBreak
 
int stepX
 
int stepY
 
int curHeight
 
int curWidth
 
int feetHeight
 
Common::Rect _walkRect
 
int lowerLimit
 
int upperLimit
 
int trackFinal
 
bool _walkToObject
 
int objExit
 
int _startTime
 
int hasAnswer
 
int savedTime
 
int breakOut
 
int vonBraunX
 
int trackVonBraun
 
int vonBraunHasMoved
 
float newHeight
 
float newWidth
 
int factor_red [202]
 
int color_solo
 
int blinking
 
int igorX
 
int igorY
 
int trackIgor
 
int drasculaX
 
int drasculaY
 
int trackDrascula
 
int term_int
 
int currentChapter
 
bool _loadedDifferentChapter
 
int _currentSaveSlot
 
bool _canSaveLoad
 
int _color
 
int musicStopped
 
int _mouseX
 
int _mouseY
 
int _leftMouseButton
 
int _rightMouseButton
 
bool _leftMouseButtonHeld
 
Common::KeyState _keyBuffer [16]
 
int _keyBufferHead
 
int _keyBufferTail
 
int FrameSSN
 
int globalSpeed
 
uint32 LastFrame
 
int flag_tv
 
- 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)
 

Protected Attributes

RoomHandlers * _roomHandlers
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Additional Inherited Members

- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static MetaEngineDetectiongetMetaEngineDetection ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Member Function Documentation

◆ run()

Common::Error Drascula::DrasculaEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool Drascula::DrasculaEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ syncSoundSettings()

void Drascula::DrasculaEngine::syncSoundSettings ( )
overridevirtual

Notify the engine that the sound settings in the config manager might have changed and that it should adjust any internal volume (and other) values accordingly.

The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

Note
When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.

Reimplemented from Engine.

◆ loadGameState()

Common::Error Drascula::DrasculaEngine::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.

◆ canLoadGameStateCurrently()

bool Drascula::DrasculaEngine::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.

◆ saveGameState()

Common::Error Drascula::DrasculaEngine::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.

◆ canSaveGameStateCurrently()

bool Drascula::DrasculaEngine::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.


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