Agi::WinnieEngine Class Reference

#include <preagi_winnie.h>

+ Inheritance diagram for Agi::WinnieEngine:
+ Collaboration diagram for Agi::WinnieEngine:

Public Member Functions

 WinnieEngine (OSystem *syst, const AGIGameDescription *gameDesc)
 ~WinnieEngine () override
void init ()
Common::Error go () override
void debugCurRoom ()
- 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)

Private Member Functions

void randomize ()
void intro ()
void drawPic (const char *)
void gameLoop ()
void parseRoomHeader (WTP_ROOM_HDR *roomHdr, byte *buffer, int len)
void parseObjHeader (WTP_OBJ_HDR *objHdr, byte *buffer, int len)
uint32 readRoom (int, uint8 *, WTP_ROOM_HDR &)
void drawRoomPic ()
int parser (int, int, uint8 *)
int getObjInRoom (int)
bool getSelOkBack ()
void getMenuSel (char *, int *, int[])
void keyHelp ()
void clrMenuSel (int *, int[])
void incMenuSel (int *, int[])
void decMenuSel (int *, int[])
void drawMenu (char *, int, int[])
void printRoomStr (int, int)
void inventory ()
void printObjStr (int, int)
uint32 readObj (int, uint8 *)
void takeObj (int)
void dropObj (int)
bool isRightObj (int, int, int *)
void drawObjPic (int, int, int)
void getMenuMouseSel (int *, int[], int, int)
void setWinnieFlag (int)
void clearWinnieFlag (int)
void gameOver ()
void saveGame ()
void loadGame ()
void dropObjRnd ()
void setTakeDrop (int[])
void makeSel (int *, int[])
void wind ()
void mist ()
void tigger ()
void showOwlHelp ()
bool playSound (ENUM_WTP_SOUND)
void printStrWinnie (char *szMsg)

Private Attributes

WTP_SAVE_GAME _gameStateWinnie
int _room
int _mist
bool _doWind
bool _winnieEvent
int _tiggerMist
int _roomOffset
int _objOffset
bool _isBigEndian
Common::Rect hotspotNorth
Common::Rect hotspotSouth
Common::Rect hotspotEast
Common::Rect hotspotWest

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
Common::RenderMode _renderMode
AgiDebug _debug
AgiGame _game
Mouse _mouse
bool _noSaveLoadAllowed
int _soundemu
const AGIGameDescription_gameDescription
uint32 _gameFeatures
uint16 _gameVersion
- Public Attributes inherited from Engine
- 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 inherited from Agi::PreAgiEngine
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 284 of file preagi_winnie.h.

Constructor & Destructor Documentation

◆ WinnieEngine()

Agi::WinnieEngine::WinnieEngine ( OSystem syst,
const AGIGameDescription gameDesc 

Definition at line 1322 of file preagi_winnie.cpp.

◆ ~WinnieEngine()

Agi::WinnieEngine::~WinnieEngine ( )

Definition at line 1326 of file preagi_winnie.cpp.

Member Function Documentation

◆ clearWinnieFlag()

void Agi::WinnieEngine::clearWinnieFlag ( int  iFlag)

Definition at line 233 of file preagi_winnie.cpp.

◆ clrMenuSel()

void Agi::WinnieEngine::clrMenuSel ( int *  iSel,
int  fCanSel[] 

Definition at line 1180 of file preagi_winnie.cpp.

◆ debugCurRoom()

void Agi::WinnieEngine::debugCurRoom ( )

Definition at line 1318 of file preagi_winnie.cpp.

◆ decMenuSel()

void Agi::WinnieEngine::decMenuSel ( int *  iSel,
int  fCanSel[] 

Definition at line 773 of file preagi_winnie.cpp.

◆ drawMenu()

void Agi::WinnieEngine::drawMenu ( char *  szMenu,
int  iSel,
int  fCanSel[] 

Definition at line 715 of file preagi_winnie.cpp.

◆ drawObjPic()

void Agi::WinnieEngine::drawObjPic ( int  iObj,
int  x0,
int  y0 

Definition at line 1089 of file preagi_winnie.cpp.

◆ drawPic()

void Agi::WinnieEngine::drawPic ( const char *  szName)

Definition at line 1065 of file preagi_winnie.cpp.

◆ drawRoomPic()

void Agi::WinnieEngine::drawRoomPic ( )

Definition at line 1106 of file preagi_winnie.cpp.

◆ dropObj()

void Agi::WinnieEngine::dropObj ( int  iRoom)

Definition at line 549 of file preagi_winnie.cpp.

◆ dropObjRnd()

void Agi::WinnieEngine::dropObjRnd ( )

Definition at line 619 of file preagi_winnie.cpp.

◆ gameLoop()

void Agi::WinnieEngine::gameLoop ( )

Definition at line 1013 of file preagi_winnie.cpp.

◆ gameOver()

void Agi::WinnieEngine::gameOver ( )

Definition at line 1199 of file preagi_winnie.cpp.

◆ getMenuMouseSel()

void Agi::WinnieEngine::getMenuMouseSel ( int *  iSel,
int  fCanSel[],
int  x,
int  y 

Definition at line 780 of file preagi_winnie.cpp.

◆ getMenuSel()

void Agi::WinnieEngine::getMenuSel ( char *  szMenu,
int *  iSel,
int  fCanSel[] 

Definition at line 808 of file preagi_winnie.cpp.

◆ getObjInRoom()

int Agi::WinnieEngine::getObjInRoom ( int  iRoom)

Definition at line 217 of file preagi_winnie.cpp.

◆ getSelOkBack()

bool Agi::WinnieEngine::getSelOkBack ( )

◆ go()

Common::Error Agi::WinnieEngine::go ( )

Implements Agi::AgiBase.

Definition at line 1378 of file preagi_winnie.cpp.

◆ incMenuSel()

void Agi::WinnieEngine::incMenuSel ( int *  iSel,
int  fCanSel[] 

Definition at line 766 of file preagi_winnie.cpp.

◆ init()

void Agi::WinnieEngine::init ( void  )

Definition at line 1329 of file preagi_winnie.cpp.

◆ intro()

void Agi::WinnieEngine::intro ( )

Definition at line 192 of file preagi_winnie.cpp.

◆ inventory()

void Agi::WinnieEngine::inventory ( )

Definition at line 472 of file preagi_winnie.cpp.

◆ isRightObj()

bool Agi::WinnieEngine::isRightObj ( int  iRoom,
int  iObj,
int *  iCode 

Definition at line 498 of file preagi_winnie.cpp.

◆ keyHelp()

void Agi::WinnieEngine::keyHelp ( )

Definition at line 464 of file preagi_winnie.cpp.

◆ loadGame()

void Agi::WinnieEngine::loadGame ( )

Definition at line 1246 of file preagi_winnie.cpp.

◆ makeSel()

void Agi::WinnieEngine::makeSel ( int *  iSel,
int  fCanSel[] 

Definition at line 800 of file preagi_winnie.cpp.

◆ mist()

void Agi::WinnieEngine::mist ( )

Definition at line 680 of file preagi_winnie.cpp.

◆ parseObjHeader()

void Agi::WinnieEngine::parseObjHeader ( WTP_OBJ_HDR objHdr,
byte buffer,
int  len 

Definition at line 73 of file preagi_winnie.cpp.

◆ parser()

int Agi::WinnieEngine::parser ( int  pc,
int  index,
uint8 buffer 

Definition at line 237 of file preagi_winnie.cpp.

◆ parseRoomHeader()

void Agi::WinnieEngine::parseRoomHeader ( WTP_ROOM_HDR roomHdr,
byte buffer,
int  len 

Definition at line 38 of file preagi_winnie.cpp.

◆ playSound()

bool Agi::WinnieEngine::playSound ( ENUM_WTP_SOUND  iSound)

Definition at line 1127 of file preagi_winnie.cpp.

◆ printObjStr()

void Agi::WinnieEngine::printObjStr ( int  iObj,
int  iStr 

Definition at line 487 of file preagi_winnie.cpp.

◆ printRoomStr()

void Agi::WinnieEngine::printRoomStr ( int  iRoom,
int  iStr 

Definition at line 1189 of file preagi_winnie.cpp.

◆ printStrWinnie()

void Agi::WinnieEngine::printStrWinnie ( char *  szMsg)

Definition at line 1309 of file preagi_winnie.cpp.

◆ randomize()

void Agi::WinnieEngine::randomize ( )

Definition at line 153 of file preagi_winnie.cpp.

◆ readObj()

uint32 Agi::WinnieEngine::readObj ( int  iObj,
uint8 buffer 

Definition at line 123 of file preagi_winnie.cpp.

◆ readRoom()

uint32 Agi::WinnieEngine::readRoom ( int  iRoom,
uint8 buffer,

Definition at line 90 of file preagi_winnie.cpp.

◆ saveGame()

void Agi::WinnieEngine::saveGame ( )

Definition at line 1212 of file preagi_winnie.cpp.

◆ setTakeDrop()

void Agi::WinnieEngine::setTakeDrop ( int  fCanSel[])

Definition at line 224 of file preagi_winnie.cpp.

◆ setWinnieFlag()

void Agi::WinnieEngine::setWinnieFlag ( int  iFlag)

Definition at line 229 of file preagi_winnie.cpp.

◆ showOwlHelp()

void Agi::WinnieEngine::showOwlHelp ( )

Definition at line 699 of file preagi_winnie.cpp.

◆ takeObj()

void Agi::WinnieEngine::takeObj ( int  iRoom)

Definition at line 521 of file preagi_winnie.cpp.

◆ tigger()

void Agi::WinnieEngine::tigger ( )

Definition at line 690 of file preagi_winnie.cpp.

◆ wind()

void Agi::WinnieEngine::wind ( )

Definition at line 642 of file preagi_winnie.cpp.

Member Data Documentation

◆ _doWind

bool Agi::WinnieEngine::_doWind

Definition at line 298 of file preagi_winnie.h.

◆ _gameStateWinnie

WTP_SAVE_GAME Agi::WinnieEngine::_gameStateWinnie

Definition at line 295 of file preagi_winnie.h.

◆ _isBigEndian

bool Agi::WinnieEngine::_isBigEndian

Definition at line 304 of file preagi_winnie.h.

◆ _mist

int Agi::WinnieEngine::_mist

Definition at line 297 of file preagi_winnie.h.

◆ _objOffset

int Agi::WinnieEngine::_objOffset

Definition at line 303 of file preagi_winnie.h.

◆ _room

int Agi::WinnieEngine::_room

Definition at line 296 of file preagi_winnie.h.

◆ _roomOffset

int Agi::WinnieEngine::_roomOffset

Definition at line 302 of file preagi_winnie.h.

◆ _tiggerMist

int Agi::WinnieEngine::_tiggerMist

Definition at line 300 of file preagi_winnie.h.

◆ _winnieEvent

bool Agi::WinnieEngine::_winnieEvent

Definition at line 299 of file preagi_winnie.h.

◆ hotspotEast

Common::Rect Agi::WinnieEngine::hotspotEast

Definition at line 305 of file preagi_winnie.h.

◆ hotspotNorth

Common::Rect Agi::WinnieEngine::hotspotNorth

Definition at line 305 of file preagi_winnie.h.

◆ hotspotSouth

Common::Rect Agi::WinnieEngine::hotspotSouth

Definition at line 305 of file preagi_winnie.h.

◆ hotspotWest

Common::Rect Agi::WinnieEngine::hotspotWest

Definition at line 305 of file preagi_winnie.h.

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