TONY: Move functions comment to doxygen format
This commit is contained in:
parent
31c0210f22
commit
a46b06a587
15 changed files with 249 additions and 121 deletions
|
@ -2380,7 +2380,7 @@ void RMDialogChoice::setNumChoices(int num) {
|
|||
_drawedStrings = new RMText[num];
|
||||
_ptDrawStrings = new RMPoint[num];
|
||||
|
||||
// Initialisation
|
||||
// Initialization
|
||||
for (i = 0; i < _numChoices; i++) {
|
||||
_drawedStrings[i].setColor(0, 255, 0);
|
||||
_drawedStrings[i].setAlignType(RMText::HLEFTPAR, RMText::VTOP);
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
RMFont();
|
||||
virtual ~RMFont();
|
||||
|
||||
// Initialisation and closing
|
||||
// Initialization and closing
|
||||
virtual void init(void) = 0;
|
||||
virtual void close(void);
|
||||
|
||||
|
@ -366,11 +366,11 @@ public:
|
|||
void Unregister(void);
|
||||
|
||||
public:
|
||||
// Initialisation
|
||||
// Initialization
|
||||
RMDialogChoice();
|
||||
virtual ~RMDialogChoice();
|
||||
|
||||
// Initialisation and closure
|
||||
// Initialization and closure
|
||||
void init(void);
|
||||
void close(void);
|
||||
|
||||
|
|
|
@ -316,8 +316,6 @@ void RMOptionSlide::addToList(RMGfxTargetBuffer &bigBuf) {
|
|||
bigBuf.addPrim(new RMGfxPrimitive(this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************\
|
||||
* RMOptionScreen Methods
|
||||
\****************************************************************************/
|
||||
|
@ -379,7 +377,6 @@ RMOptionScreen::RMOptionScreen(void) {
|
|||
_nLastState = MENUGAME;
|
||||
}
|
||||
|
||||
|
||||
RMOptionScreen::~RMOptionScreen(void) {
|
||||
closeState();
|
||||
}
|
||||
|
@ -567,7 +564,6 @@ void RMOptionScreen::refreshThumbnails(void) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void RMOptionScreen::initState(CORO_PARAM) {
|
||||
CORO_BEGIN_CONTEXT;
|
||||
RMResRaw *raw;
|
||||
|
@ -1097,7 +1093,6 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
|
|||
_ctx->bRefresh |= _buttonSave_ArrowLeft->doFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
|
||||
if (_statePos < 90)
|
||||
_ctx->bRefresh |= _buttonSave_ArrowRight->doFrame(_ctx->mousePos, _ctx->bLeftClick, _ctx->bRightClick);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1195,7 +1190,7 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
|
|||
if (_buttonSave_States[_ctx->i]->isActive()) {
|
||||
// There by saving or loading!!!
|
||||
if (_nState == MENULOAD && _curThumb[_ctx->i] != NULL) {
|
||||
// Caricamento
|
||||
// Loading
|
||||
CORO_INVOKE_1(_vm->loadState, _statePos + _ctx->i);
|
||||
close();
|
||||
} else if (_nState == MENUSAVE && (_statePos != 0 || _ctx->i != 0)) {
|
||||
|
@ -1468,7 +1463,6 @@ bool RMOptionScreen::loadThumbnailFromSaveState(int nState, byte *lpDestBuf, RMS
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************\
|
||||
* RMPointer Methods
|
||||
\****************************************************************************/
|
||||
|
|
|
@ -81,32 +81,48 @@ public:
|
|||
};
|
||||
|
||||
public:
|
||||
// Constructor & destructor
|
||||
/**
|
||||
* Constructor & destructor
|
||||
*/
|
||||
RMPointer();
|
||||
virtual ~RMPointer();
|
||||
|
||||
// Initialisation
|
||||
/**
|
||||
* Initialization
|
||||
*/
|
||||
void init(void);
|
||||
|
||||
// Deinitialisation
|
||||
/**
|
||||
* Deinitialization
|
||||
*/
|
||||
void close(void);
|
||||
|
||||
// Process a frame
|
||||
/**
|
||||
* Process a frame
|
||||
*/
|
||||
void doFrame(RMGfxTargetBuffer *bigBuf);
|
||||
|
||||
// Overloading of priorities
|
||||
/**
|
||||
* Overloading of priorities
|
||||
*/
|
||||
int priority();
|
||||
|
||||
// draw method
|
||||
/**
|
||||
* draw method
|
||||
*/
|
||||
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
||||
// Sets a new action as current
|
||||
/**
|
||||
* Sets a new action as current
|
||||
*/
|
||||
void setAction(RMTonyAction action) {
|
||||
_nCurPointer = action;
|
||||
updateCursor();
|
||||
}
|
||||
|
||||
// Sets a new pointer
|
||||
/**
|
||||
* Sets a new pointer
|
||||
*/
|
||||
void setSpecialPointer(PointerType ptr) {
|
||||
_nCurSpecialPointer = ptr;
|
||||
if (_nCurSpecialPointer && _nCurSpecialPointer != PTR_CUSTOM)
|
||||
|
@ -118,19 +134,27 @@ public:
|
|||
return (PointerType)_nCurSpecialPointer;
|
||||
}
|
||||
|
||||
// Set the new custom pointer
|
||||
/**
|
||||
* Set the new custom pointer
|
||||
*/
|
||||
void setCustomPointer(RMGfxSourceBuffer8 *ptr) {
|
||||
_nCurCustomPointer = ptr;
|
||||
updateCursor();
|
||||
}
|
||||
|
||||
// Return the current action to be applied according to the pointer
|
||||
/**
|
||||
* Return the current action to be applied according to the pointer
|
||||
*/
|
||||
int curAction(void);
|
||||
|
||||
/** Show the cursor */
|
||||
/**
|
||||
* Show the cursor
|
||||
*/
|
||||
void showCursor();
|
||||
|
||||
/** Hide the cursor */
|
||||
/**
|
||||
* Hide the cursor
|
||||
*/
|
||||
void hideCursor();
|
||||
};
|
||||
|
||||
|
@ -280,15 +304,19 @@ public:
|
|||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
virtual void removeThis(CORO_PARAM, bool &result);
|
||||
|
||||
// Polling for the option screen
|
||||
/**
|
||||
* Polling for the option screen
|
||||
*/
|
||||
void doFrame(CORO_PARAM, RMInput *m_input);
|
||||
|
||||
// Retrieves a savegame's thumbnail, description, and difficulty level
|
||||
/**
|
||||
* Retrieves a savegame's thumbnail, description, and difficulty level
|
||||
*/
|
||||
static bool loadThumbnailFromSaveState(int numState, byte *lpDestBuf, RMString &name, byte &diff);
|
||||
|
||||
protected:
|
||||
|
||||
// Initialisation and state change
|
||||
// Initialization and state change
|
||||
void initState(CORO_PARAM);
|
||||
void closeState(void);
|
||||
void changeState(CORO_PARAM, OptionScreenState newState);
|
||||
|
|
|
@ -324,7 +324,7 @@ public:
|
|||
RMGfxSourceBuffer16(int dimx, int dimy, bool bUseDDraw = false);
|
||||
virtual ~RMGfxSourceBuffer16();
|
||||
|
||||
// Initialisation
|
||||
// Initialization
|
||||
void create(int dimx, int dimy, bool bUseDDraw = false);
|
||||
|
||||
int getBpp();
|
||||
|
@ -369,7 +369,7 @@ public:
|
|||
RMGfxSourceBuffer8(int dimx, int dimy, bool bUseDDraw = false);
|
||||
virtual ~RMGfxSourceBuffer8();
|
||||
|
||||
// Initialisation
|
||||
// Initialization
|
||||
void create(int dimx, int dimy, bool bUseDDraw = false);
|
||||
|
||||
int getBpp();
|
||||
|
@ -414,7 +414,7 @@ protected:
|
|||
void compressRLE(void);
|
||||
|
||||
protected:
|
||||
// Overriding initialisation methods
|
||||
// Overriding initialization methods
|
||||
virtual void prepareImage(void);
|
||||
virtual void preparePalette(void);
|
||||
|
||||
|
@ -422,7 +422,7 @@ public:
|
|||
RMGfxSourceBuffer8RLE();
|
||||
virtual ~RMGfxSourceBuffer8RLE();
|
||||
|
||||
// Overload of the initialisation method
|
||||
// Overload of the initialization method
|
||||
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
|
||||
virtual int init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
|
||||
|
||||
|
@ -505,7 +505,7 @@ protected:
|
|||
public:
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
||||
// Overloaded initialisation methods
|
||||
// Overloaded initialization methods
|
||||
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
|
||||
virtual int init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
|
||||
|
||||
|
@ -519,7 +519,7 @@ protected:
|
|||
public:
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
||||
// Overloaded initialisation methods
|
||||
// Overloaded initialization methods
|
||||
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
|
||||
virtual int init(byte *buf, int dimx, int dimy, bool bLoadPalette = false);
|
||||
|
||||
|
@ -535,7 +535,7 @@ public:
|
|||
RMGfxSourceBuffer4();
|
||||
RMGfxSourceBuffer4(int dimx, int dimy, bool bUseDDraw = false);
|
||||
|
||||
// Initialisation
|
||||
// Initialization
|
||||
void create(int dimx, int dimy, bool bUseDDraw = false);
|
||||
|
||||
int getBpp();
|
||||
|
|
|
@ -353,7 +353,6 @@ SKIPCLICKSINISTRO:
|
|||
CORO_END_CODE;
|
||||
}
|
||||
|
||||
|
||||
void RMGfxEngine::initCustomDll(void) {
|
||||
setupGlobalVars(&_tony, &_point, &_vm->_theBoxes, &_loc, &_inv, &_input);
|
||||
}
|
||||
|
@ -378,7 +377,6 @@ void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void RMGfxEngine::initForNewLocation(int nLoc, RMPoint ptTonyStart, RMPoint start) {
|
||||
if (start._x == -1 || start._y == -1) {
|
||||
start._x = ptTonyStart._x - RM_SX / 2;
|
||||
|
|
|
@ -43,10 +43,8 @@ namespace Tony {
|
|||
#define TAPPETI_MARE 6
|
||||
#define TAPPETI_MAREMETA 7
|
||||
|
||||
|
||||
#define MAX_PATH 255
|
||||
|
||||
|
||||
struct CharacterStruct {
|
||||
uint32 _code;
|
||||
RMItem *_item;
|
||||
|
@ -254,7 +252,6 @@ public:
|
|||
/**
|
||||
* @defgroup MPAL variables
|
||||
*/
|
||||
//@{
|
||||
uint32 _mpalError;
|
||||
LPITEMIRQFUNCTION _lpiifCustom;
|
||||
LPLPCUSTOMFUNCTION _lplpFunctions;
|
||||
|
@ -292,8 +289,6 @@ public:
|
|||
uint32 _nExecutingDialog;
|
||||
uint32 _nExecutingChoice;
|
||||
uint32 _nSelectedChoice;
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
} // End of namespace Tony
|
||||
|
|
|
@ -47,32 +47,46 @@ private:
|
|||
// Keyboard related fields
|
||||
bool _keyDown[350];
|
||||
private:
|
||||
// Deinitialize DirectInput
|
||||
/**
|
||||
* Deinitialize DirectInput
|
||||
*/
|
||||
void DIClose(void);
|
||||
|
||||
public:
|
||||
RMInput();
|
||||
~RMInput();
|
||||
|
||||
// Class initialisation
|
||||
/**
|
||||
* Class initialization
|
||||
*/
|
||||
void init(/*uint32 hInst*/);
|
||||
|
||||
// Closes the class
|
||||
/**
|
||||
* Closes the class
|
||||
*/
|
||||
void close(void);
|
||||
|
||||
// Polling (must be performed once per frame)
|
||||
/**
|
||||
* Polling (must be performed once per frame)
|
||||
*/
|
||||
void poll(void);
|
||||
|
||||
// Reading of the mouse
|
||||
/**
|
||||
* Reading of the mouse
|
||||
*/
|
||||
RMPoint mousePos() {
|
||||
return _mousePos;
|
||||
}
|
||||
|
||||
// Current status of the mouse buttons
|
||||
/**
|
||||
* Current status of the mouse buttons
|
||||
*/
|
||||
bool mouseLeft();
|
||||
bool mouseRight();
|
||||
|
||||
// Events of mouse clicks
|
||||
/**
|
||||
* Events of mouse clicks
|
||||
*/
|
||||
bool mouseLeftClicked() {
|
||||
return _leftClickMouse;
|
||||
}
|
||||
|
@ -92,7 +106,9 @@ public:
|
|||
return _leftReleaseMouse && _rightReleaseMouse;
|
||||
}
|
||||
|
||||
// Returns true if the given key is pressed
|
||||
/**
|
||||
* Returns true if the given key is pressed
|
||||
*/
|
||||
bool getAsyncKeyState(Common::KeyCode kc);
|
||||
};
|
||||
|
||||
|
|
|
@ -79,48 +79,72 @@ protected:
|
|||
OSystem::MutexRef _csModifyInterface;
|
||||
|
||||
protected:
|
||||
// Prepare the image inventory. It should be recalled whenever the inventory changes
|
||||
/**
|
||||
* Prepare the image inventory. It should be recalled whenever the inventory changes
|
||||
*/
|
||||
void prepare(void);
|
||||
|
||||
// Check if the mouse Y position is conrrect, even under the inventory portion of the screen
|
||||
/**
|
||||
* Check if the mouse Y position is conrrect, even under the inventory portion of the screen
|
||||
*/
|
||||
bool checkPointInside(const RMPoint &pt);
|
||||
|
||||
public:
|
||||
RMInventory();
|
||||
virtual ~RMInventory();
|
||||
|
||||
// Prepare a frame
|
||||
/**
|
||||
* Prepare a frame
|
||||
*/
|
||||
void doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen);
|
||||
|
||||
// Initialisation and closing
|
||||
/**
|
||||
* Initialization and closing
|
||||
*/
|
||||
void init(void);
|
||||
void close(void);
|
||||
void reset(void);
|
||||
|
||||
// Overload test for removal from OT list
|
||||
/**
|
||||
* Overload test for removal from OT list
|
||||
*/
|
||||
virtual void removeThis(CORO_PARAM, bool &result);
|
||||
|
||||
// Overload the drawing of the inventory
|
||||
/**
|
||||
* Overload the drawing of the inventory
|
||||
*/
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
||||
// Method for determining whether the inventory currently has the focus
|
||||
/**
|
||||
* Method for determining whether the inventory currently has the focus
|
||||
*/
|
||||
bool haveFocus(const RMPoint &mpos);
|
||||
|
||||
// Method for determining if the mini interface is active
|
||||
/**
|
||||
* Method for determining if the mini interface is active
|
||||
*/
|
||||
bool miniActive(void);
|
||||
|
||||
// Handle the left mouse click (only when the inventory has the focus)
|
||||
/**
|
||||
* Handle the left mouse click (only when the inventory has the focus)
|
||||
*/
|
||||
bool leftClick(const RMPoint &mpos, int &nCombineObj);
|
||||
|
||||
// Handle the right mouse button (only when the inventory has the focus)
|
||||
/**
|
||||
* Handle the right mouse button (only when the inventory has the focus)
|
||||
*/
|
||||
void rightClick(const RMPoint &mpos);
|
||||
bool rightRelease(const RMPoint &mpos, RMTonyAction &curAction);
|
||||
|
||||
// Warn that an item combine is over
|
||||
/**
|
||||
* Warn that an item combine is over
|
||||
*/
|
||||
void endCombine(void);
|
||||
|
||||
public:
|
||||
// Add an item to the inventory
|
||||
/**
|
||||
* Add an item to the inventory
|
||||
*/
|
||||
void addItem(int code);
|
||||
RMInventory &operator+=(RMItem *item) {
|
||||
addItem(item->mpalCode());
|
||||
|
@ -135,17 +159,25 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
// Removes an item
|
||||
/**
|
||||
* Removes an item
|
||||
*/
|
||||
void removeItem(int code);
|
||||
|
||||
// We are on an object?
|
||||
/**
|
||||
* We are on an object?
|
||||
*/
|
||||
RMItem *whichItemIsIn(const RMPoint &mpt);
|
||||
bool itemInFocus(const RMPoint &mpt);
|
||||
|
||||
// Change the icon of an item
|
||||
/**
|
||||
* Change the icon of an item
|
||||
*/
|
||||
void changeItemStatus(uint32 dwCode, uint32 dwStatus);
|
||||
|
||||
// Save methods
|
||||
/**
|
||||
* Save methods
|
||||
*/
|
||||
int getSaveStateSize(void);
|
||||
void saveState(byte *state);
|
||||
int loadState(byte *state);
|
||||
|
@ -165,35 +197,51 @@ private:
|
|||
int _lastHotZone;
|
||||
|
||||
protected:
|
||||
// Return which box a given point is in
|
||||
/**
|
||||
* Return which box a given point is in
|
||||
*/
|
||||
int onWhichBox(RMPoint pt);
|
||||
|
||||
public:
|
||||
RMInterface();
|
||||
virtual ~RMInterface();
|
||||
|
||||
// The usual DoFrame (poll the graphics engine)
|
||||
/**
|
||||
* The usual DoFrame (poll the graphics engine)
|
||||
*/
|
||||
void doFrame(RMGfxTargetBuffer &bigBuf, RMPoint mousepos);
|
||||
|
||||
// TRUE if it is active (you can select items)
|
||||
/**
|
||||
* TRUE if it is active (you can select items)
|
||||
*/
|
||||
bool active();
|
||||
|
||||
// Initialisation
|
||||
/**
|
||||
* Initialization
|
||||
*/
|
||||
void init(void);
|
||||
void close(void);
|
||||
|
||||
// Reset the interface
|
||||
/**
|
||||
* Reset the interface
|
||||
*/
|
||||
void reset(void);
|
||||
|
||||
// Warns of mouse clicks and releases
|
||||
/**
|
||||
* Warns of mouse clicks and releases
|
||||
*/
|
||||
void clicked(const RMPoint &mousepos);
|
||||
bool released(const RMPoint &mousepos, RMTonyAction &action);
|
||||
|
||||
// Enalbes or disables the fifth verb
|
||||
/**
|
||||
* Enables or disables the fifth verb
|
||||
*/
|
||||
void setPerorate(bool bOn);
|
||||
bool getPerorate(void);
|
||||
|
||||
// Overloaded Draw
|
||||
/**
|
||||
* Overloaded Draw
|
||||
*/
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
};
|
||||
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
* Copyright (c) 1997-2003 Nayma Software
|
||||
*/
|
||||
|
||||
/*
|
||||
Da 10500 in poi ci sono gli .OGG per l'inventario e i ritagli
|
||||
*/
|
||||
// From 10500 onwards there are .OGG for inventory and scrap
|
||||
#ifndef TONY_RESID_H
|
||||
#define TONY_RESID_H
|
||||
|
||||
|
|
|
@ -422,13 +422,11 @@ void TonyEngine::autoSave(CORO_PARAM) {
|
|||
CORO_END_CODE;
|
||||
}
|
||||
|
||||
|
||||
void TonyEngine::saveState(int n, const char *name) {
|
||||
Common::String buf = getSaveStateFileName(n);
|
||||
_theEngine.saveState(buf.c_str(), (byte *)_curThumbnail, name);
|
||||
}
|
||||
|
||||
|
||||
void TonyEngine::loadState(CORO_PARAM, int n) {
|
||||
CORO_BEGIN_CONTEXT;
|
||||
Common::String buf;
|
||||
|
@ -600,7 +598,6 @@ void TonyEngine::unfreezeTime(void) {
|
|||
_bTimeFreezed = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the millisecond timer
|
||||
*/
|
||||
|
|
|
@ -118,7 +118,6 @@ public:
|
|||
FPStream *_stream[6];
|
||||
FPSfx *_sfx[MAX_SFX_CHANNELS];
|
||||
FPSfx *_utilSfx[MAX_SFX_CHANNELS];
|
||||
// RMFont *_fonts[2];
|
||||
bool _bPaused;
|
||||
bool _bDrawLocation;
|
||||
int _startTime;
|
||||
|
@ -154,7 +153,9 @@ public:
|
|||
Common::Error loadGameState(int slot);
|
||||
Common::Error saveGameState(int slot, const Common::String &desc);
|
||||
|
||||
// Warn when are being controlled by the GDI
|
||||
/**
|
||||
* Warn when are being controlled by the GDI
|
||||
*/
|
||||
void GDIControl(bool bCon);
|
||||
|
||||
void play();
|
||||
|
@ -173,7 +174,9 @@ public:
|
|||
_bDrawLocation = false;
|
||||
}
|
||||
|
||||
// Reads the time
|
||||
/**
|
||||
* Reads the time
|
||||
*/
|
||||
uint32 getTime(void);
|
||||
void freezeTime(void);
|
||||
void unfreezeTime(void);
|
||||
|
@ -197,19 +200,25 @@ public:
|
|||
void preloadUtilSFX(int nSfx, const char *fn);
|
||||
void unloadAllUtilSFX(void);
|
||||
|
||||
// Stop all the audio
|
||||
/**
|
||||
* Stop all the audio
|
||||
*/
|
||||
void pauseSound(bool bPause);
|
||||
|
||||
void setMusicVolume(int nChannel, int volume);
|
||||
int getMusicVolume(int nChannel);
|
||||
|
||||
// Handle saving
|
||||
/**
|
||||
* Handle saving
|
||||
*/
|
||||
void autoSave(CORO_PARAM);
|
||||
void saveState(int n, const char *name);
|
||||
void loadState(CORO_PARAM, int n);
|
||||
static Common::String getSaveStateFileName(int n);
|
||||
|
||||
// Get a thumbnail
|
||||
/**
|
||||
* Get a thumbnail
|
||||
*/
|
||||
void grabThumbnail(void);
|
||||
uint16 *getThumbnail(void) {
|
||||
return _curThumbnail;
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
|
||||
namespace Tony {
|
||||
|
||||
/****************************************************************************\
|
||||
* Metodi di RMTony
|
||||
\****************************************************************************/
|
||||
|
||||
bool RMTony::_bAction = false;
|
||||
|
||||
void RMTony::initStatics() {
|
||||
|
@ -124,7 +120,7 @@ void RMTony::init(void) {
|
|||
|
||||
|
||||
void RMTony::close(void) {
|
||||
// Disalloca @@@ Deallocation of missing item
|
||||
// Deallocation of missing item
|
||||
// _shadow.destroy();
|
||||
}
|
||||
|
||||
|
@ -479,7 +475,6 @@ void RMTony::put(int nWhere, int nPart) {
|
|||
if (nPart == 0) {
|
||||
switch (getCurPattern()) {
|
||||
case PAT_STANDDOWN:
|
||||
//assert(0);
|
||||
break;
|
||||
|
||||
case PAT_STANDUP:
|
||||
|
@ -690,7 +685,6 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
|
|||
}
|
||||
break;
|
||||
|
||||
|
||||
case TALK_SING:
|
||||
_nBodyOffset.set(-10, 25);
|
||||
headStartPat = PAT_HEAD_LEFT;
|
||||
|
@ -744,7 +738,6 @@ bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat,
|
|||
}
|
||||
break;
|
||||
|
||||
|
||||
case TALK_INDICATE:
|
||||
switch (_talkDirection) {
|
||||
case UP:
|
||||
|
@ -1181,7 +1174,6 @@ bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
bStatic = false;
|
||||
switch (_nTalkType) {
|
||||
case TALK_NORMAL:
|
||||
|
@ -1759,7 +1751,6 @@ void RMTony::startStatic(CORO_PARAM, CharacterTalkType nTalk) {
|
|||
CORO_END_CODE;
|
||||
}
|
||||
|
||||
|
||||
void RMTony::endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &finalPat, int &headEndPat) {
|
||||
switch (_talkDirection) {
|
||||
case UP:
|
||||
|
|
|
@ -107,10 +107,14 @@ private:
|
|||
uint32 _hActionThread;
|
||||
|
||||
protected:
|
||||
// Overload of the allocation allocation of sprites
|
||||
/**
|
||||
* Overload of the allocation allocation of sprites
|
||||
*/
|
||||
virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
|
||||
|
||||
// Watch thread which waits for the end of an action
|
||||
/**
|
||||
* Watch thread which waits for the end of an action
|
||||
*/
|
||||
static void waitEndOfAction(CORO_PARAM, const void *param);
|
||||
|
||||
public:
|
||||
|
@ -362,79 +366,115 @@ public:
|
|||
static void initStatics();
|
||||
RMTony();
|
||||
|
||||
// Initialize Tony
|
||||
/**
|
||||
* Initialize Tony
|
||||
*/
|
||||
void init(void);
|
||||
|
||||
// Free all memory
|
||||
/**
|
||||
* Free all memory
|
||||
*/
|
||||
void close(void);
|
||||
|
||||
// Tony makes a frame, updating the movement, etc.
|
||||
/**
|
||||
* Tony makes a frame, updating the movement, etc.
|
||||
*/
|
||||
void doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc);
|
||||
|
||||
// Draw method, which controls chararacter display
|
||||
/**
|
||||
* Draw method, which controls chararacter display
|
||||
*/
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
||||
// Show or hide
|
||||
/**
|
||||
* Show or hide
|
||||
*/
|
||||
void show(void);
|
||||
void hide(bool bShowShadow = false);
|
||||
|
||||
// Move and make an action, if necessary
|
||||
/**
|
||||
* Move and make an action, if necessary
|
||||
*/
|
||||
void moveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm = 0);
|
||||
|
||||
// Tony stops (on the right side with respect to any subject)
|
||||
/**
|
||||
* Tony stops (on the right side with respect to any subject)
|
||||
*/
|
||||
virtual void stop(CORO_PARAM);
|
||||
void stopNoAction(CORO_PARAM);
|
||||
|
||||
// Set a pattern
|
||||
/**
|
||||
* Set a pattern
|
||||
*/
|
||||
void setPattern(int npatt, bool bPlayP0 = false);
|
||||
|
||||
// Reads the current pattern
|
||||
/**
|
||||
* Reads the current pattern
|
||||
*/
|
||||
int getCurPattern();
|
||||
|
||||
// Waits until the end of a pattern
|
||||
/**
|
||||
* Waits until the end of a pattern
|
||||
*/
|
||||
void waitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE) {
|
||||
RMCharacter::waitForEndPattern(coroParam, hCustomSkip);
|
||||
}
|
||||
|
||||
// Check if currently in an action
|
||||
/**
|
||||
* Check if currently in an action
|
||||
*/
|
||||
bool inAction() {
|
||||
return (_bActionPending && _action != 0) | _bAction;
|
||||
}
|
||||
|
||||
// Check if there needs to be an update for scrolling movement
|
||||
/**
|
||||
* Check if there needs to be an update for scrolling movement
|
||||
*/
|
||||
bool mustUpdateScrolling() {
|
||||
return ((!inAction()) || (isMoving()));
|
||||
}
|
||||
|
||||
// Returns Tony's position
|
||||
/**
|
||||
* Returns Tony's position
|
||||
*/
|
||||
RMPoint position() {
|
||||
return _pos;
|
||||
}
|
||||
|
||||
// Set the scrolling position
|
||||
/**
|
||||
* Set the scrolling position
|
||||
*/
|
||||
void setScrollPosition(const RMPoint &pt) {
|
||||
RMCharacter::setScrollPosition(pt);
|
||||
}
|
||||
|
||||
// Set the take animation
|
||||
/**
|
||||
* Set the take animation
|
||||
*/
|
||||
void take(int nWhere, int nPart);
|
||||
void put(int nWhere, int nPart);
|
||||
|
||||
// Start or End Talk
|
||||
/**
|
||||
* Start or End Talk
|
||||
*/
|
||||
bool startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat, int &bodyStartPat,
|
||||
int &headLoopPat, int &bodyLoopPat);
|
||||
void startTalk(CORO_PARAM, CharacterTalkType nTalkType);
|
||||
bool endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic);
|
||||
void endTalk(CORO_PARAM);
|
||||
|
||||
// Start or End Static
|
||||
/**
|
||||
* Start or End Static
|
||||
*/
|
||||
void startStaticCalculate(CharacterTalkType nTalk, int &headPat, int &headLoopPat,
|
||||
int &bodyStartPat, int &bodyLoopPat);
|
||||
void startStatic(CORO_PARAM, CharacterTalkType nTalkType);
|
||||
void endStaticCalculate(CharacterTalkType nTalk, int &bodyEndPat, int &finalPat, int &headEndPat);
|
||||
void endStatic(CORO_PARAM, CharacterTalkType nTalkType);
|
||||
|
||||
// Tony disguises himself!
|
||||
/**
|
||||
* Tony disguises himself!
|
||||
*/
|
||||
void setShepherdess(bool bIsPast) {
|
||||
_bShepherdess = bIsPast;
|
||||
}
|
||||
|
@ -442,7 +482,9 @@ public:
|
|||
return _bShepherdess;
|
||||
}
|
||||
|
||||
// Perform an action
|
||||
/**
|
||||
* Perform an action
|
||||
*/
|
||||
void executeAction(int nAction, int nActionItem, int nParm);
|
||||
|
||||
void playSfx(int nSfx) {
|
||||
|
|
|
@ -44,7 +44,9 @@ private:
|
|||
// Buffer used to convert to RGB
|
||||
static byte rgb[RM_SX *RM_SY * 3];
|
||||
public:
|
||||
// Take a screenshot
|
||||
/**
|
||||
* Take a screenshot
|
||||
*/
|
||||
void grabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL);
|
||||
};
|
||||
|
||||
|
@ -78,21 +80,31 @@ public:
|
|||
RMWindow();
|
||||
~RMWindow();
|
||||
|
||||
// Initialisation
|
||||
/**
|
||||
* Initialization
|
||||
*/
|
||||
void init(/*HINSTANCE hInst*/);
|
||||
void initDirectDraw(void);
|
||||
void close(void);
|
||||
|
||||
// Drawing
|
||||
/**
|
||||
* Drawing
|
||||
*/
|
||||
void repaint(void);
|
||||
|
||||
// Switch between windowed and fullscreen
|
||||
/**
|
||||
* Switch between windowed and fullscreen
|
||||
*/
|
||||
void switchFullscreen(bool bFull) {}
|
||||
|
||||
// Reads the next frame
|
||||
/**
|
||||
* Reads the next frame
|
||||
*/
|
||||
void getNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse);
|
||||
|
||||
// Request a thumbnail be grabbed during the next frame
|
||||
/**
|
||||
* Request a thumbnail be grabbed during the next frame
|
||||
*/
|
||||
void grabThumbnail(uint16 *buf);
|
||||
|
||||
int getFps() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue