ScummVM
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 ()
 
void init ()
 
Common::Error go ()
 
void debugCurRoom ()
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
- Public Member Functions inherited from Agi::AgiBase
virtual bool promptIsEnabled ()
 
 AgiBase (OSystem *syst, const AGIGameDescription *gameDesc)
 
 ~AgiBase ()
 
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 ()
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently ()
 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
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 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 initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::Error loadGameState (int slot)
 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)
 Save a game state. More...
 

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

WinnieConsole_console
 
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,
  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...
 
- 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
 
- Protected Member Functions inherited from Agi::PreAgiEngine
void initialize ()
 
void pollTimer ()
 
int getKeypress ()
 
bool isKeypress ()
 
void clearKeyQueue ()
 
 PreAgiEngine (OSystem *syst, const AGIGameDescription *gameDesc)
 
virtual ~PreAgiEngine ()
 
int getGameId ()
 
void clearImageStack ()
 
void recordImageStackCall (uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7)
 
void replayImageStackCall (uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7)
 
void releaseImageStack ()
 
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 ()
 
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...
 
void initRenderMode ()
 
- 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...
 
- 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
 

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 1328 of file preagi_winnie.cpp.

◆ ~WinnieEngine()

Agi::WinnieEngine::~WinnieEngine ( )

Definition at line 1332 of file preagi_winnie.cpp.

Member Function Documentation

◆ clearWinnieFlag()

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

Definition at line 233 of file preagi_winnie.cpp.

◆ clrMenuSel()

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

Definition at line 1186 of file preagi_winnie.cpp.

◆ debugCurRoom()

void Agi::WinnieEngine::debugCurRoom ( )

Definition at line 1324 of file preagi_winnie.cpp.

◆ decMenuSel()

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

Definition at line 773 of file preagi_winnie.cpp.

◆ drawMenu()

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

Definition at line 715 of file preagi_winnie.cpp.

◆ drawObjPic()

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

Definition at line 1095 of file preagi_winnie.cpp.

◆ drawPic()

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

Definition at line 1071 of file preagi_winnie.cpp.

◆ drawRoomPic()

void Agi::WinnieEngine::drawRoomPic ( )
private

Definition at line 1112 of file preagi_winnie.cpp.

◆ dropObj()

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

Definition at line 549 of file preagi_winnie.cpp.

◆ dropObjRnd()

void Agi::WinnieEngine::dropObjRnd ( )
private

Definition at line 619 of file preagi_winnie.cpp.

◆ gameLoop()

void Agi::WinnieEngine::gameLoop ( )
private

Definition at line 1019 of file preagi_winnie.cpp.

◆ gameOver()

void Agi::WinnieEngine::gameOver ( )
private

Definition at line 1205 of file preagi_winnie.cpp.

◆ getDebugger()

GUI::Debugger* Agi::WinnieEngine::getDebugger ( )
inlinevirtual

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 294 of file preagi_winnie.h.

◆ getMenuMouseSel()

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

Definition at line 780 of file preagi_winnie.cpp.

◆ getMenuSel()

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

Definition at line 808 of file preagi_winnie.cpp.

◆ getObjInRoom()

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

Definition at line 217 of file preagi_winnie.cpp.

◆ getSelOkBack()

bool Agi::WinnieEngine::getSelOkBack ( )
private

◆ go()

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

Implements Agi::AgiBase.

Definition at line 1385 of file preagi_winnie.cpp.

◆ incMenuSel()

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

Definition at line 766 of file preagi_winnie.cpp.

◆ init()

void Agi::WinnieEngine::init ( void  )

Definition at line 1336 of file preagi_winnie.cpp.

◆ intro()

void Agi::WinnieEngine::intro ( )
private

Definition at line 192 of file preagi_winnie.cpp.

◆ inventory()

void Agi::WinnieEngine::inventory ( )
private

Definition at line 472 of file preagi_winnie.cpp.

◆ isRightObj()

bool Agi::WinnieEngine::isRightObj ( int  iRoom,
int  iObj,
int iCode 
)
private

Definition at line 498 of file preagi_winnie.cpp.

◆ keyHelp()

void Agi::WinnieEngine::keyHelp ( )
private

Definition at line 464 of file preagi_winnie.cpp.

◆ loadGame()

void Agi::WinnieEngine::loadGame ( )
private

Definition at line 1252 of file preagi_winnie.cpp.

◆ makeSel()

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

Definition at line 800 of file preagi_winnie.cpp.

◆ mist()

void Agi::WinnieEngine::mist ( )
private

Definition at line 680 of file preagi_winnie.cpp.

◆ parseObjHeader()

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

Definition at line 73 of file preagi_winnie.cpp.

◆ parser()

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

Definition at line 237 of file preagi_winnie.cpp.

◆ parseRoomHeader()

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

Definition at line 38 of file preagi_winnie.cpp.

◆ playSound()

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

Definition at line 1133 of file preagi_winnie.cpp.

◆ printObjStr()

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

Definition at line 487 of file preagi_winnie.cpp.

◆ printRoomStr()

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

Definition at line 1195 of file preagi_winnie.cpp.

◆ printStrWinnie()

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

Definition at line 1315 of file preagi_winnie.cpp.

◆ randomize()

void Agi::WinnieEngine::randomize ( )
private

Definition at line 153 of file preagi_winnie.cpp.

◆ readObj()

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

Definition at line 123 of file preagi_winnie.cpp.

◆ readRoom()

uint32 Agi::WinnieEngine::readRoom ( int  iRoom,
uint8 buffer,
WTP_ROOM_HDR roomHdr 
)
private

Definition at line 90 of file preagi_winnie.cpp.

◆ saveGame()

void Agi::WinnieEngine::saveGame ( )
private

Definition at line 1218 of file preagi_winnie.cpp.

◆ setTakeDrop()

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

Definition at line 224 of file preagi_winnie.cpp.

◆ setWinnieFlag()

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

Definition at line 229 of file preagi_winnie.cpp.

◆ showOwlHelp()

void Agi::WinnieEngine::showOwlHelp ( )
private

Definition at line 699 of file preagi_winnie.cpp.

◆ takeObj()

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

Definition at line 521 of file preagi_winnie.cpp.

◆ tigger()

void Agi::WinnieEngine::tigger ( )
private

Definition at line 690 of file preagi_winnie.cpp.

◆ wind()

void Agi::WinnieEngine::wind ( )
private

Definition at line 642 of file preagi_winnie.cpp.

Member Data Documentation

◆ _console

WinnieConsole* Agi::WinnieEngine::_console
private

Definition at line 297 of file preagi_winnie.h.

◆ _doWind

bool Agi::WinnieEngine::_doWind
private

Definition at line 302 of file preagi_winnie.h.

◆ _gameStateWinnie

WTP_SAVE_GAME Agi::WinnieEngine::_gameStateWinnie
private

Definition at line 299 of file preagi_winnie.h.

◆ _isBigEndian

bool Agi::WinnieEngine::_isBigEndian
private

Definition at line 308 of file preagi_winnie.h.

◆ _mist

int Agi::WinnieEngine::_mist
private

Definition at line 301 of file preagi_winnie.h.

◆ _objOffset

int Agi::WinnieEngine::_objOffset
private

Definition at line 307 of file preagi_winnie.h.

◆ _room

int Agi::WinnieEngine::_room
private

Definition at line 300 of file preagi_winnie.h.

◆ _roomOffset

int Agi::WinnieEngine::_roomOffset
private

Definition at line 306 of file preagi_winnie.h.

◆ _tiggerMist

int Agi::WinnieEngine::_tiggerMist
private

Definition at line 304 of file preagi_winnie.h.

◆ _winnieEvent

bool Agi::WinnieEngine::_winnieEvent
private

Definition at line 303 of file preagi_winnie.h.

◆ hotspotEast

Common::Rect Agi::WinnieEngine::hotspotEast
private

Definition at line 309 of file preagi_winnie.h.

◆ hotspotNorth

Common::Rect Agi::WinnieEngine::hotspotNorth
private

Definition at line 309 of file preagi_winnie.h.

◆ hotspotSouth

Common::Rect Agi::WinnieEngine::hotspotSouth
private

Definition at line 309 of file preagi_winnie.h.

◆ hotspotWest

Common::Rect Agi::WinnieEngine::hotspotWest
private

Definition at line 309 of file preagi_winnie.h.


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