ScummVM API documentation
EEM::EEMEngine Class Reference
Inheritance diagram for EEM::EEMEngine:
Engine

Public Member Functions

 EEMEngine (OSystem *syst, const ADGameDescription *gameDesc)
 
Common::Error run () override
 
const char * getGameId () const
 
Common::Platform getPlatform () const
 
Variant getVariant () const
 
bool isFloppy () const
 
bool isLondon () const
 
bool isMacintosh () const
 
bool isDemo () const
 
int screenWidth () const
 
int screenHeight () const
 
int scaleX (int x) const
 
int scaleY (int y) const
 
int unscaleX (int x) const
 
int unscaleY (int y) const
 
Common::Point scalePoint (int x, int y) const
 
Common::Rect scaleRect (const Common::Rect &r) const
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
int getAutosaveSlot () const override
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Error saveProfile (const Common::String &name)
 
bool loadProfile (const Common::String &name)
 
SaveStateList listProfiles () const
 
bool isSpanish () const
 Spanish floppy release.
 
DBDArchivegetPics ()
 
DBDArchivegetAni ()
 
DBDArchivegetSites ()
 
DBDArchivegetBalloons ()
 
DBDArchivegetButtons ()
 
MysterygetMystery ()
 
const EEMFontgetFont () const
 
uint8 getPartnerIndex () const
 
void setInteractiveMouseCursor (bool active)
 
void setHotspotMouseCursor (bool active)
 Interactive cursor over searchable hotspots.
 
void setSiteHotspotCursorId (int cursorId)
 
void displayClue (const byte *clueBlock)
 _DisplayClue @ 2404:05e6.
 
bool doPuzzle (uint puzzleId)
 
void displayFloppyHotspotDialog (uint siteNum, uint hotIdx)
 
bool floppyHotspotSearched (uint siteNum, uint hotspotIdx) const
 
const Common::StringplayerName () const
 Active player name (= profile-save description).
 
void applyClueSideEffects (const byte *entry)
 Apply a ClueEntry's side effects (notebook, gallery, site flags).
 
void doNotebook ()
 
void doGallery ()
 
bool moreInfo (const byte *gd, uint suspectIdx, const Picture &galBg, bool haveBg)
 
void doBigMap ()
 
void doAccuse ()
 Accuse flow. _DoAccuseGallery @ 1df2:0a31 + _DisplayEnding @ 1df2:0548.
 
void doAccuseFloppy ()
 
bool doAccuseNotes ()
 
void drawKDBalloonOverCurrentScreen (Common::String text)
 
void doHelp ()
 _KDHelp @ 1560:010a + _DisplayHint @ 1560:0009.
 
void doInterfaceHelp (uint num=0)
 _InterfaceHelp @ 1560:0205. Walks HelpData @ 29be:00c8.
 
uint16 getKDTextBalloon (byte firstChar) const
 _GetKDTextBalloon @ 1df2:0105.
 
uint16 fitBalloonToText (uint16 bubNum, const Common::String &text)
 Pick a shorter balloon sibling when wrapped text leaves empty lines.
 
uint getBalloonLineCapacity (uint16 balloonId, int lineH) const
 
Common::String parseString (const Common::String &raw, const Common::String &playerName, uint partner) const
 _ParseString @ 1b66:07c3.
 
bool loadKdAnim (uint16 num, Animation &anim, int &px, int &py, uint16 &animId)
 
void setPartnerEraseBg (const Graphics::ManagedSurface *bg)
 
void setPartnerIdleAnim (bool has, uint16 animId, int x, int y)
 
bool getBalloonInsets (uint16 bubNum, uint16 &xInset, uint16 &yInset, uint16 &textW) const
 
bool getBalloonIndicatorPos (uint16 bubNum, uint16 &dx, uint16 &dy) const
 
void drawFloppyBubbleIndicator (Graphics::ManagedSurface &dst, uint16 bubNum, int ballX, int ballY, bool endIndicator)
 
bool areYouSure ()
 
void setSitePaletteForSite (uint siteNum)
 Public so SiteScreen can switch palettes per site.
 
void waitForInput (uint32 maxMs)
 
void playAnm (const Common::Path &path, uint frameDelayMs=120, bool holdLastFrame=false, bool fadeIn=false, bool setSkipIntroOnEsc=true)
 
void playFlc (const Common::Path &path, bool fadeIn=false, bool holdLastFrame=false)
 
void startTravelMusic ()
 
void waitForMusicDone (uint32 maxMs=60000)
 _IsMIDIPlaying spin + _StopMIDI cleanup in _DoSiteLoop.
 
void stopMusic ()
 _StopMIDI @ 20a2:0512.
 
bool doLondonApproach (uint16 approachId)
 
void syncSoundSettings () override
 
void startLondonTravelMusic (uint8 travelKind)
 
void setNextScreen (ScreenId s)
 _NextScreen @ 2d5d:3f26 writer for site loop / inline screens.
 
bool shouldPlaySiteArrival (uint siteNum) const
 
void markSiteArrivalPlayed (uint siteNum)
 
void resetSiteArrivalState ()
 
void setSiteArrivalState (uint siteNum)
 
- 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 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 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

const ADGameDescription_gameDescription
 
Variant _variant = kVariantCD
 
Common::Language _language = Common::EN_ANY
 
AudioPlayer_audio = nullptr
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

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 Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 
- 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 EEM::EEMEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool EEM::EEMEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool EEM::EEMEngine::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.

◆ canSaveGameStateCurrently()

bool EEM::EEMEngine::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.

◆ getAutosaveSlot()

int EEM::EEMEngine::getAutosaveSlot ( ) const
inlineoverridevirtual

Return the slot that should be used for autosaves, or -1 for engines that don't support autosave.

Note
This should match the meta engine getAutosaveSlot() method.

Reimplemented from Engine.

◆ saveGameStream()

Common::Error EEM::EEMEngine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
overridevirtual

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 EEM::EEMEngine::loadGameStream ( Common::SeekableReadStream stream)
overridevirtual

Load a game state.

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

Reimplemented from Engine.

◆ setInteractiveMouseCursor()

void EEM::EEMEngine::setInteractiveMouseCursor ( bool  active)

Interactive-region cursor. DOS/EEM1 uses a red-outline pointer; Mac London uses the original Color QuickDraw arrow.

◆ setSiteHotspotCursorId()

void EEM::EEMEngine::setSiteHotspotCursorId ( int  cursorId)

EEM2 _SwitchMouse: swap the cursor shape by ID. DOS uses the seven PIC-backed cursor slots; Mac London maps the same IDs through the original crsr resources loaded by the application.

◆ doPuzzle()

bool EEM::EEMEngine::doPuzzle ( uint  puzzleId)

EEM2/London _DoPuzzle @ 2542:1482. A clue entry can gate the rest of itself behind a "check the manual / a real map" puzzle

◆ doAccuseNotes()

bool EEM::EEMEngine::doAccuseNotes ( )

Accuse-notes screen (PIC 0x1A7). Outer loop of _DoAccuse @ 1df2:0bdd. Returns true if the player committed (SOLVE clicked), false on ESC.

◆ getBalloonLineCapacity()

uint EEM::EEMEngine::getBalloonLineCapacity ( uint16  balloonId,
int  lineH 
) const

How many lineH-tall text lines fit in balloon balloonId (the balloon height is scaled to native coordinates on Mac).

◆ loadKdAnim()

bool EEM::EEMEngine::loadKdAnim ( uint16  num,
Animation anim,
int &  px,
int &  py,
uint16 &  animId 
)

Load the partner gesture (animId + anchor) for concurrent playback with the clue balloon/voice. false if out of range.

◆ setPartnerIdleAnim()

void EEM::EEMEngine::setPartnerIdleAnim ( bool  has,
uint16  animId,
int  x,
int  y 
)
inline

Partner idle wait-anim that displayClue loops once a clue gesture's one-shot ends. Set around displayClue by the site loop.

◆ getBalloonInsets()

bool EEM::EEMEngine::getBalloonInsets ( uint16  bubNum,
uint16 &  xInset,
uint16 &  yInset,
uint16 &  textW 
) const

Balloon-text-inset metadata. 52-entry table @ 29be:0875 (CD) / 2608:05f9 (floppy), indexed by (bubNum & 0x7F). 10 bytes per entry: the first 3 fields (x inset, y inset, text width) are used for text wrap; the last 2 (indicator dX/dY) by drawFloppyBubbleIndicator. Returns false if bubNum is outside the table.

◆ playAnm()

void EEM::EEMEngine::playAnm ( const Common::Path path,
uint  frameDelayMs = 120,
bool  holdLastFrame = false,
bool  fadeIn = false,
bool  setSkipIntroOnEsc = true 
)

Play a difference-encoded animation file (.ANM / .A) on the full 320x200 screen. If holdLastFrame is true the call blocks on the final frame until the user clicks or hits a key — used for the title screen. If fadeIn is true the first decoded frame is copied while the palette is black, then ramped in like _OpenFadeIn.

◆ playFlc()

void EEM::EEMEngine::playFlc ( const Common::Path path,
bool  fadeIn = false,
bool  holdLastFrame = false 
)

Play a Flic (.FLC) movie, centred on the screen with a black letterbox. The Mac CD ships its intro as a Flic (KDCDINTR.FLC) where the DOS release uses .ANM movies. A click/key/Esc ends it (Esc also sets _skipIntro).

◆ startTravelMusic()

void EEM::EEMEngine::startTravelMusic ( )

_StartTravelMusic @ 20a2:0595. Picks MUS%05d.XMI from _mystery._siteNumber % 5, one-shot.

◆ doLondonApproach()

bool EEM::EEMEngine::doLondonApproach ( uint16  approachId)

EEM2 _DoApproach @ 1717:009b: London-only place information screen with a short VIDEOnn.A clip and text pages from Ann.BIN.

◆ syncSoundSettings()

void EEM::EEMEngine::syncSoundSettings ( )
overridevirtual

Engine::syncSoundSettings override. Re-pulls music_volume into the MIDI player's _masterVolume.

Reimplemented from Engine.

◆ startLondonTravelMusic()

void EEM::EEMEngine::startLondonTravelMusic ( uint8  travelKind)

EEM2 _DoTravel @ 1717:0622 transition music. The matrix entry (1..3) chooses one of three short one-shot MUS tracks at random.


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