ScummVM
Agi::MickeyEngine Class Reference

#include <preagi_mickey.h>

+ Inheritance diagram for Agi::MickeyEngine:
+ Collaboration diagram for Agi::MickeyEngine:

Public Member Functions

 MickeyEngine (OSystem *syst, const AGIGameDescription *gameDesc)
 
 ~MickeyEngine () override
 
void init ()
 
Common::Error go () override
 
void debugCurRoom ()
 
void debugGotoRoom (int)
 
void drawPic (int)
 
void drawObj (ENUM_MSA_OBJECT, int, int)
 
- Public Member Functions inherited from Agi::AgiBase
virtual bool promptIsEnabled ()
 
 AgiBase (OSystem *syst, const AGIGameDescription *gameDesc)
 
 ~AgiBase () override
 
bool getFlag (int16 flagNr)
 
void setFlag (int16 flagNr, bool newState)
 
void flipFlag (int16 flagNr)
 
uint32 getGameID () const
 
uint32 getFeatures () const
 
uint16 getVersion () const
 
uint16 getGameType () const
 
Common::Language getLanguage () const
 
Common::Platform getPlatform () const
 
const char * getGameMD5 () const
 
void initFeatures ()
 
void setFeature (uint32 feature)
 
void initVersion ()
 
void setVersion (uint16 version)
 
const char * getDiskName (uint16 id)
 
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
 
const bytegetFontData ()
 
void cycleInnerLoopActive (int16 loopType)
 
void cycleInnerLoopInactive ()
 
bool cycleInnerLoopIsActive ()
 
- 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 syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. 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 loadGameState (int slot)
 Load a game state. 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 saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. 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)
 

Protected Member Functions

int getDat (int)
 
void readExe (int, uint8 *, long)
 
void getDatFileName (int, char *)
 
void readDatHdr (char *, MSA_DAT_HEADER *)
 
void readOfsData (int, int, uint8 *, long)
 
bool chooseY_N (int, bool)
 
int choose1to9 (int)
 
void printStr (char *)
 
void printLine (const char *)
 
void printExeStr (int)
 
void printExeMsg (int)
 
void printDesc (int)
 
bool checkMenu ()
 
void drawMenu (MSA_MENU &, int, int)
 
void getMouseMenuSelRow (MSA_MENU &, int *, int *, int, int, int)
 
bool getMenuSelRow (MSA_MENU &, int *, int *, int)
 
void getMenuSel (char *, int *, int *)
 
void centerMenu (MSA_MENU *)
 
void patchMenu (MSA_MENU *)
 
void printDatString (int)
 
void printDatMessage (int)
 
void playNote (MSA_SND_NOTE)
 
void playSound (ENUM_MSA_SOUND)
 
void drawRoomAnimation ()
 
void drawRoom ()
 
void drawLogo ()
 
void animate ()
 
void printRoomDesc ()
 
bool loadGame ()
 
void saveGame ()
 
void showPlanetInfo ()
 
void printStory ()
 
int getPlanet ()
 
void pressOB (int)
 
void insertDisk (int)
 
void gameOver ()
 
void inventory ()
 
void intro ()
 
void getItem (ENUM_MSA_ITEM)
 
void getXtal (int)
 
bool parse (int, int)
 
void flipSwitch ()
 
void waitAnyKey (bool anim=false)
 
bool planetIsAlreadyAssigned (int planet)
 
bool mickeyHasItem (int item)
 
- Protected Member Functions inherited from Agi::PreAgiEngine
void initialize () override
 
void pollTimer ()
 
int getKeypress () override
 
bool isKeypress () override
 
void clearKeyQueue () override
 
 PreAgiEngine (OSystem *syst, const AGIGameDescription *gameDesc)
 
 ~PreAgiEngine () override
 
int getGameId ()
 
void clearImageStack () override
 
void recordImageStackCall (uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7) override
 
void replayImageStackCall (uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7) override
 
void releaseImageStack () override
 
int saveGame (const Common::String &fileName, const Common::String &saveName)
 
int loadGame (const Common::String &fileName, bool checkId=true)
 
Common::String getTargetName ()
 
void clearScreen (int attr, bool overrideDefault=true)
 
void clearGfxScreen (int attr)
 
void setDefaultTextColor (int attr)
 
int getSelection (SelectionTypes type)
 
int rnd (int hi)
 
void drawStr (int row, int col, int attr, const char *buffer)
 
void drawStrMiddle (int row, int attr, const char *buffer)
 
void clearTextArea ()
 
void clearRow (int row)
 
void XOR80 (char *buffer)
 
void printStr (const char *szMsg)
 
void printStrXOR (char *szMsg)
 
Common::SaveFileManagergetSaveFileMan ()
 
void playNote (int16 frequency, int32 length)
 
void waitForTimer (int msec_delay)
 
- Protected Member Functions inherited from Agi::AgiBase
Common::Error init ()
 
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...
 
void initRenderMode ()
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

Protected Attributes

MSA_GAME _gameStateMickey
 
bool _clickToMove
 
- Protected Attributes inherited from Agi::PreAgiEngine
PictureMgr_picture
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

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...
 
- Public Attributes inherited from Agi::AgiBase
Words_words
 
GfxFont_font
 
GfxMgr_gfx
 
Common::RenderMode _renderMode
 
AgiDebug _debug
 
AgiGame _game
 
Common::RandomSource_rnd
 
SoundMgr_sound
 
Mouse _mouse
 
bool _noSaveLoadAllowed
 
int _soundemu
 
const AGIGameDescription_gameDescription
 
uint32 _gameFeatures
 
uint16 _gameVersion
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Detailed Description

Definition at line 679 of file preagi_mickey.h.

Constructor & Destructor Documentation

◆ MickeyEngine()

Agi::MickeyEngine::MickeyEngine ( OSystem syst,
const AGIGameDescription gameDesc 
)

Definition at line 2246 of file preagi_mickey.cpp.

◆ ~MickeyEngine()

Agi::MickeyEngine::~MickeyEngine ( )
override

Definition at line 2250 of file preagi_mickey.cpp.

Member Function Documentation

◆ animate()

void Agi::MickeyEngine::animate ( )
protected

Definition at line 962 of file preagi_mickey.cpp.

◆ centerMenu()

void Agi::MickeyEngine::centerMenu ( MSA_MENU menu)
protected

Definition at line 590 of file preagi_mickey.cpp.

◆ checkMenu()

bool Agi::MickeyEngine::checkMenu ( )
protected

Definition at line 231 of file preagi_mickey.cpp.

◆ choose1to9()

int Agi::MickeyEngine::choose1to9 ( int  ofsPrompt)
protected

Definition at line 122 of file preagi_mickey.cpp.

◆ chooseY_N()

bool Agi::MickeyEngine::chooseY_N ( int  ofsPrompt,
bool  fErrorMsg 
)
protected

Definition at line 100 of file preagi_mickey.cpp.

◆ debugCurRoom()

void Agi::MickeyEngine::debugCurRoom ( )

Definition at line 2233 of file preagi_mickey.cpp.

◆ debugGotoRoom()

void Agi::MickeyEngine::debugGotoRoom ( int  room)

Definition at line 2241 of file preagi_mickey.cpp.

◆ drawLogo()

void Agi::MickeyEngine::drawLogo ( )
protected

Definition at line 911 of file preagi_mickey.cpp.

◆ drawMenu()

void Agi::MickeyEngine::drawMenu ( MSA_MENU menu,
int  sel0,
int  sel1 
)
protected

Definition at line 258 of file preagi_mickey.cpp.

◆ drawObj()

void Agi::MickeyEngine::drawObj ( ENUM_MSA_OBJECT  iObj,
int  x0,
int  y0 
)

Definition at line 726 of file preagi_mickey.cpp.

◆ drawPic()

void Agi::MickeyEngine::drawPic ( int  iPic)

Definition at line 748 of file preagi_mickey.cpp.

◆ drawRoom()

void Agi::MickeyEngine::drawRoom ( )
protected

Definition at line 858 of file preagi_mickey.cpp.

◆ drawRoomAnimation()

void Agi::MickeyEngine::drawRoomAnimation ( )
protected

Definition at line 768 of file preagi_mickey.cpp.

◆ flipSwitch()

void Agi::MickeyEngine::flipSwitch ( )
protected

Definition at line 1295 of file preagi_mickey.cpp.

◆ gameOver()

void Agi::MickeyEngine::gameOver ( )
protected

Definition at line 1274 of file preagi_mickey.cpp.

◆ getDat()

int Agi::MickeyEngine::getDat ( int  iRoom)
protected

Definition at line 35 of file preagi_mickey.cpp.

◆ getDatFileName()

void Agi::MickeyEngine::getDatFileName ( int  iRoom,
char *  szFile 
)
protected

Definition at line 57 of file preagi_mickey.cpp.

◆ getItem()

void Agi::MickeyEngine::getItem ( ENUM_MSA_ITEM  iItem)
protected

Definition at line 1463 of file preagi_mickey.cpp.

◆ getMenuSel()

void Agi::MickeyEngine::getMenuSel ( char *  buffer,
int *  sel0,
int *  sel1 
)
protected

Definition at line 556 of file preagi_mickey.cpp.

◆ getMenuSelRow()

bool Agi::MickeyEngine::getMenuSelRow ( MSA_MENU menu,
int *  sel0,
int *  sel1,
int  iRow 
)
protected

Definition at line 316 of file preagi_mickey.cpp.

◆ getMouseMenuSelRow()

void Agi::MickeyEngine::getMouseMenuSelRow ( MSA_MENU menu,
int *  sel0,
int *  sel1,
int  iRow,
int  x,
int  y 
)
protected

Definition at line 289 of file preagi_mickey.cpp.

◆ getPlanet()

int Agi::MickeyEngine::getPlanet ( )
protected

Definition at line 1228 of file preagi_mickey.cpp.

◆ getXtal()

void Agi::MickeyEngine::getXtal ( int  iStr)
protected

Definition at line 1471 of file preagi_mickey.cpp.

◆ go()

Common::Error Agi::MickeyEngine::go ( )
overridevirtual

Implements Agi::AgiBase.

Definition at line 2307 of file preagi_mickey.cpp.

◆ init()

void Agi::MickeyEngine::init ( void  )

Definition at line 2254 of file preagi_mickey.cpp.

◆ insertDisk()

void Agi::MickeyEngine::insertDisk ( int  iDisk)
protected

Definition at line 1268 of file preagi_mickey.cpp.

◆ intro()

void Agi::MickeyEngine::intro ( )
protected

Definition at line 1396 of file preagi_mickey.cpp.

◆ inventory()

void Agi::MickeyEngine::inventory ( )
protected

Definition at line 1371 of file preagi_mickey.cpp.

◆ loadGame()

bool Agi::MickeyEngine::loadGame ( )
protected

Definition at line 978 of file preagi_mickey.cpp.

◆ mickeyHasItem()

bool Agi::MickeyEngine::mickeyHasItem ( int  item)
inlineprotected

Definition at line 748 of file preagi_mickey.h.

◆ parse()

bool Agi::MickeyEngine::parse ( int  cmd,
int  arg 
)
protected

Definition at line 1480 of file preagi_mickey.cpp.

◆ patchMenu()

void Agi::MickeyEngine::patchMenu ( MSA_MENU menu)
protected

Definition at line 610 of file preagi_mickey.cpp.

◆ planetIsAlreadyAssigned()

bool Agi::MickeyEngine::planetIsAlreadyAssigned ( int  planet)
inlineprotected

Definition at line 740 of file preagi_mickey.h.

◆ playNote()

void Agi::MickeyEngine::playNote ( MSA_SND_NOTE  note)
protected

Definition at line 663 of file preagi_mickey.cpp.

◆ playSound()

void Agi::MickeyEngine::playSound ( ENUM_MSA_SOUND  iSound)
protected

Definition at line 672 of file preagi_mickey.cpp.

◆ pressOB()

void Agi::MickeyEngine::pressOB ( int  iButton)
protected

Definition at line 1241 of file preagi_mickey.cpp.

◆ printDatMessage()

void Agi::MickeyEngine::printDatMessage ( int  iStr)
protected

Definition at line 656 of file preagi_mickey.cpp.

◆ printDatString()

void Agi::MickeyEngine::printDatString ( int  iStr)
protected

Definition at line 186 of file preagi_mickey.cpp.

◆ printDesc()

void Agi::MickeyEngine::printDesc ( int  iRoom)
protected

Definition at line 208 of file preagi_mickey.cpp.

◆ printExeMsg()

void Agi::MickeyEngine::printExeMsg ( int  ofs)
protected

Definition at line 178 of file preagi_mickey.cpp.

◆ printExeStr()

void Agi::MickeyEngine::printExeStr ( int  ofs)
protected

Definition at line 168 of file preagi_mickey.cpp.

◆ printLine()

void Agi::MickeyEngine::printLine ( const char *  buffer)
protected

Definition at line 157 of file preagi_mickey.cpp.

◆ printRoomDesc()

void Agi::MickeyEngine::printRoomDesc ( )
protected

Definition at line 967 of file preagi_mickey.cpp.

◆ printStory()

void Agi::MickeyEngine::printStory ( )
protected

Definition at line 1195 of file preagi_mickey.cpp.

◆ printStr()

void Agi::MickeyEngine::printStr ( char *  buffer)
protected

Definition at line 139 of file preagi_mickey.cpp.

◆ readDatHdr()

void Agi::MickeyEngine::readDatHdr ( char *  szFile,
MSA_DAT_HEADER hdr 
)
protected

Definition at line 61 of file preagi_mickey.cpp.

◆ readExe()

void Agi::MickeyEngine::readExe ( int  ofs,
uint8 buffer,
long  buflen 
)
protected

Definition at line 48 of file preagi_mickey.cpp.

◆ readOfsData()

void Agi::MickeyEngine::readOfsData ( int  offset,
int  iItem,
uint8 buffer,
long  buflen 
)
protected

Definition at line 86 of file preagi_mickey.cpp.

◆ saveGame()

void Agi::MickeyEngine::saveGame ( )
protected

Definition at line 1078 of file preagi_mickey.cpp.

◆ showPlanetInfo()

void Agi::MickeyEngine::showPlanetInfo ( )
protected

Definition at line 1188 of file preagi_mickey.cpp.

◆ waitAnyKey()

void Agi::MickeyEngine::waitAnyKey ( bool  anim = false)
protected

Definition at line 2202 of file preagi_mickey.cpp.

Member Data Documentation

◆ _clickToMove

bool Agi::MickeyEngine::_clickToMove
protected

Definition at line 694 of file preagi_mickey.h.

◆ _gameStateMickey

MSA_GAME Agi::MickeyEngine::_gameStateMickey
protected

Definition at line 693 of file preagi_mickey.h.


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