diff options
Diffstat (limited to 'engines/tony/loc.h')
-rw-r--r-- | engines/tony/loc.h | 326 |
1 files changed, 163 insertions, 163 deletions
diff --git a/engines/tony/loc.h b/engines/tony/loc.h index abcdcb85a2..e465b113b2 100644 --- a/engines/tony/loc.h +++ b/engines/tony/loc.h @@ -59,7 +59,7 @@ typedef enum { */ class RMPalette { public: - byte m_data[1024]; + byte _data[1024]; public: friend RMDataStream &operator>>(RMDataStream &ds, RMPalette &pal); @@ -71,9 +71,9 @@ public: */ class RMSfx { public: - RMString m_name; - FPSFX *m_fx; - bool m_bPlayingLoop; + RMString _name; + FPSFX *_fx; + bool _bPlayingLoop; public: RMSfx(); @@ -81,12 +81,12 @@ public: friend RMDataStream &operator>>(RMDataStream &ds, RMSfx &sfx); - void Play(bool bLoop = false); - void SetVolume(int vol); - void Pause(bool bPause); - void Stop(void); + void play(bool bLoop = false); + void setVolume(int vol); + void pause(bool bPause); + void stop(void); - void ReadFromStream(RMDataStream &ds, bool bLOX = false); + void readFromStream(RMDataStream &ds, bool bLOX = false); }; @@ -108,38 +108,38 @@ public: // Class slot class RMSlot { private: - RMPoint m_pos; // Child co-ordinates + RMPoint _pos; // Child co-ordinates public: - RMSlotType m_type; - int m_data; - byte m_flag; + RMSlotType _type; + int _data; + byte _flag; public: friend RMDataStream &operator>>(RMDataStream &ds, RMSlot &slot); - RMPoint Pos() { - return m_pos; + RMPoint pos() { + return _pos; } - void ReadFromStream(RMDataStream &ds, bool bLOX = false); + void readFromStream(RMDataStream &ds, bool bLOX = false); }; public: - RMString m_name; + RMString _name; private: - int m_speed; - RMPoint m_pos; // Parent coordinates - RMPoint m_curPos; // Parent + child coordinates - int m_bLoop; - int m_nSlots; - int m_nCurSlot; - int m_nCurSprite; + int _speed; + RMPoint _pos; // Parent coordinates + RMPoint _curPos; // Parent + child coordinates + int _bLoop; + int _nSlots; + int _nCurSlot; + int _nCurSprite; - RMSlot *m_slots; + RMSlot *_slots; - uint32 m_nStartTime; + uint32 _nStartTime; public: RMPattern(); @@ -148,24 +148,24 @@ public: friend RMDataStream &operator>>(RMDataStream &ds, RMPattern &pat); // A warning that the pattern now and the current - int Init(RMSfx *sfx, bool bPlayP0 = false, byte *bFlag = NULL); + int init(RMSfx *sfx, bool bPlayP0 = false, byte *bFlag = NULL); // Update the pattern, checking to see if it's time to change slot and executing // any associated commands - int Update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx); + int update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx); // Stop a sound effect - void StopSfx(RMSfx *sfx); + void stopSfx(RMSfx *sfx); // Reads the position of the pattern - RMPoint Pos() { - return m_curPos; + RMPoint pos() { + return _curPos; } - void ReadFromStream(RMDataStream &ds, bool bLOX = false); + void readFromStream(RMDataStream &ds, bool bLOX = false); private: - void UpdateCoord(void); + void updateCoord(void); }; @@ -174,24 +174,24 @@ private: */ class RMSprite : public RMGfxTask { public: - RMString m_name; - RMRect m_rcBox; + RMString _name; + RMRect _rcBox; protected: - RMGfxSourceBuffer *m_buf; + RMGfxSourceBuffer *_buf; public: RMSprite(); virtual ~RMSprite(); - void Init(RMGfxSourceBuffer *buf); + void init(RMGfxSourceBuffer *buf); friend RMDataStream &operator>>(RMDataStream &ds, RMSprite &sprite); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); - void SetPalette(byte *lpBuf); - void GetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy); + void setPalette(byte *lpBuf); + void getSizeFromStream(RMDataStream &ds, int *dimx, int *dimy); void LOXGetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy); - void ReadFromStream(RMDataStream &ds, bool bLOX = false); + void readFromStream(RMDataStream &ds, bool bLOX = false); }; @@ -200,42 +200,42 @@ public: */ class RMItem : public RMGfxTask { public: - RMString m_name; + RMString _name; protected: - int m_z; - RMPoint m_pos; // Coordinate nonno - RMColorMode m_cm; - RMPoint m_curScroll; + int _z; + RMPoint _pos; // Coordinate nonno + RMColorMode _cm; + RMPoint _curScroll; - byte m_FX; - byte m_FXparm; + byte _FX; + byte _FXparm; - virtual int GetCurPattern() { - return m_nCurPattern; + virtual int getCurPattern() { + return _nCurPattern; } private: - int m_nCurPattern; - int m_mpalCode; - RMPoint m_hot; - RMRect m_rcBox; - int m_nSprites, m_nSfx, m_nPatterns; - byte m_bPal; - RMPalette m_pal; - - RMSprite *m_sprites; - RMSfx *m_sfx; - RMPattern *m_patterns; - - byte m_bCurFlag; - int m_nCurSprite; - bool m_bIsActive; - uint32 m_hEndPattern; - bool m_bInitCurPattern; + int _nCurPattern; + int _mpalCode; + RMPoint _hot; + RMRect _rcBox; + int _nSprites, _nSfx, _nPatterns; + byte _bPal; + RMPalette _pal; + + RMSprite *_sprites; + RMSfx *_sfx; + RMPattern *_patterns; + + byte _bCurFlag; + int _nCurSprite; + bool _bIsActive; + uint32 _hEndPattern; + bool _bInitCurPattern; public: - RMPoint CalculatePos(void); + RMPoint calculatePos(void); public: RMItem(); @@ -248,7 +248,7 @@ public: bool doFrame(RMGfxTargetBuffer *bigBuf, bool bAddToList = true); // Sets the current scrolling position - void SetScrollPosition(const RMPoint &scroll); + void setScrollPosition(const RMPoint &scroll); // Overloading of check whether to remove from active list virtual void removeThis(CORO_PARAM, bool &result); @@ -258,54 +258,54 @@ public: // Overloaded priority: it's based on Z ordering virtual int priority() { - return m_z; + return _z; } // Pattern number - int NumPattern() { - return m_nPatterns; + int numPattern() { + return _nPatterns; } // Set anew animation pattern, changing abruptly from the current - virtual void SetPattern(int nPattern, bool bPlayP0 = false); + virtual void setPattern(int nPattern, bool bPlayP0 = false); // Set a new status - void SetStatus(int nStatus); + void setStatus(int nStatus); - bool IsIn(const RMPoint &pt, int *size = NULL); - RMPoint Hotspot() { - return m_hot; + bool isIn(const RMPoint &pt, int *size = NULL); + RMPoint hotspot() { + return _hot; } - bool GetName(RMString &name); - int MpalCode() { - return m_mpalCode; + bool getName(RMString &name); + int mpalCode() { + return _mpalCode; } // Unload - void Unload(void); + void unload(void); // Wait for the end of the current pattern - void WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE); + void waitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE); // Sets a new hotspot fro the object - void ChangeHotspot(const RMPoint &pt); + void changeHotspot(const RMPoint &pt); - void SetInitCurPattern(bool status) { - m_bInitCurPattern = status; + void setInitCurPattern(bool status) { + _bInitCurPattern = status; } - void PlaySfx(int nSfx); + void playSfx(int nSfx); - void ReadFromStream(RMDataStream &ds, bool bLOX = false); + void readFromStream(RMDataStream &ds, bool bLOX = false); - void PauseSound(bool bPause); + void pauseSound(bool bPause); protected: // Create a primitive that has as it's task this item - virtual RMGfxPrimitive *NewItemPrimitive(); + virtual RMGfxPrimitive *newItemPrimitive(); // Allocate memory for the sprites - virtual RMGfxSourceBuffer *NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE); + virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE); }; @@ -330,7 +330,7 @@ public: bool bReversed; private: - void ReadFromStream(RMDataStream &ds); + void readFromStream(RMDataStream &ds); public: friend RMDataStream &operator>>(RMDataStream &ds, RMBox &box); @@ -343,47 +343,47 @@ public: RMBox *boxes; private: - void ReadFromStream(RMDataStream &ds); + void readFromStream(RMDataStream &ds); public: RMBoxLoc(); virtual ~RMBoxLoc(); friend RMDataStream &operator >>(RMDataStream &ds, RMBoxLoc &bl); - void RecalcAllAdj(void); + void recalcAllAdj(void); }; #define GAME_BOXES_SIZE 200 class RMGameBoxes { protected: - RMBoxLoc *m_allBoxes[GAME_BOXES_SIZE]; - int m_nLocBoxes; + RMBoxLoc *_allBoxes[GAME_BOXES_SIZE]; + int _nLocBoxes; public: RMGameBoxes(); ~RMGameBoxes(); - void Init(void); - void Close(void); + void init(void); + void close(void); // Get binding boxes for a given location - RMBoxLoc *GetBoxes(int nLoc); - int GetLocBoxesCount() const { return m_nLocBoxes; } + RMBoxLoc *getBoxes(int nLoc); + int getLocBoxesCount() const { return _nLocBoxes; } // Return the box which contains a given point - int WhichBox(int nLoc, const RMPoint &pt); + int whichBox(int nLoc, const RMPoint &pt); // Check whether a point is inside a given box - bool IsInBox(int nLoc, int nBox, const RMPoint &pt); + bool isInBox(int nLoc, int nBox, const RMPoint &pt); // Change the status of a box - void ChangeBoxStatus(int nLoc, int nBox, int status); + void changeBoxStatus(int nLoc, int nBox, int status); // Save state handling - int GetSaveStateSize(void); - void SaveState(byte *buf); - void LoadState(byte *buf); + int getSaveStateSize(void); + void saveState(byte *buf); + void loadState(byte *buf); }; class RMCharacter : protected RMItem { @@ -426,21 +426,21 @@ private: bool bMovingWithoutMinpath; RMGameBoxes *theBoxes; - RMPoint m_fixedScroll; + RMPoint _fixedScroll; private: - int InWhichBox(const RMPoint &pt); + int inWhichBox(const RMPoint &pt); - short FindPath(short source, short destination); - RMPoint Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint punto); - RMPoint NearestPoint(const RMPoint &punto); + short findPath(short source, short destination); + RMPoint searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint punto); + RMPoint nearestPoint(const RMPoint &punto); - void GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed = false); - short ScanLine(const RMPoint &punto); - RMPoint InvScanLine(const RMPoint &punto); - RMPoint NearestHotSpot(int sourcebox, int destbox); + void goTo(CORO_PARAM, RMPoint destcoord, bool bReversed = false); + short scanLine(const RMPoint &punto); + RMPoint invScanLine(const RMPoint &punto); + RMPoint nearestHotSpot(int sourcebox, int destbox); - void NewBoxEntered(int nBox); + void newBoxEntered(int nBox); protected: bool bMoving; @@ -452,42 +452,42 @@ public: RMCharacter(); virtual ~RMCharacter(); - void LinkToBoxes(RMGameBoxes *theBoxes); + void linkToBoxes(RMGameBoxes *theBoxes); virtual void removeThis(CORO_PARAM, bool &result); // Update the position of a character - void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc); + void doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc); // Overloaded draw virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); // TRUE if you just stopped - bool EndOfPath() { + bool endOfPath() { return bEndOfPath; } // Change the pattern of a character to STOP - virtual void Stop(CORO_PARAM); + virtual void stop(CORO_PARAM); // Check if the character is moving - bool IsMoving() { + bool isMoving() { return bMoving; } // Move the character to a certain position - void Move(CORO_PARAM, RMPoint pt, bool *result = NULL); + void move(CORO_PARAM, RMPoint pt, bool *result = NULL); // Place the character in a certain position WITHOUT moving - void SetPosition(const RMPoint &pt, int newloc = -1); + void setPosition(const RMPoint &pt, int newloc = -1); // Wait for the end of movement - void WaitForEndMovement(CORO_PARAM); + void waitForEndMovement(CORO_PARAM); - void SetFixedScroll(const RMPoint &fix) { - m_fixedScroll = fix; + void setFixedScroll(const RMPoint &fix) { + _fixedScroll = fix; } - void SetSpeed(int speed) { + void setSpeed(int speed) { curSpeed = speed; } }; @@ -495,26 +495,26 @@ public: class RMWipe : public RMGfxTask { private: - bool m_bFading; - bool m_bEndFade; - bool m_bUnregister; - uint32 m_hUnregistered; - int m_nFadeStep; - uint32 m_hEndOfFade; - bool m_bMustRegister; + bool _bFading; + bool _bEndFade; + bool _bUnregister; + uint32 _hUnregistered; + int _nFadeStep; + uint32 _hEndOfFade; + bool _bMustRegister; - RMItem m_wip0r; + RMItem _wip0r; public: RMWipe(); virtual ~RMWipe(); - void DoFrame(RMGfxTargetBuffer &bigBuf); + void doFrame(RMGfxTargetBuffer &bigBuf); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); - void InitFade(int type); - void CloseFade(void); - void WaitForFadeEnd(CORO_PARAM); + void initFade(int type); + void closeFade(void); + void waitForFadeEnd(CORO_PARAM); virtual void Unregister(void); virtual void removeThis(CORO_PARAM, bool &result); @@ -527,17 +527,17 @@ public: */ class RMLocation : public RMGfxTaskSetPrior { public: - RMString m_name; // Name + RMString _name; // Name private: - RMColorMode m_cmode; // Color mode - RMGfxSourceBuffer *m_buf; // Location picture + RMColorMode _cmode; // Color mode + RMGfxSourceBuffer *_buf; // Location picture - int m_nItems; // Number of objects - RMItem *m_items; // Objects + int _nItems; // Number of objects + RMItem *_items; // Objects - RMPoint m_curScroll; // Current scroll position - RMPoint m_fixedScroll; + RMPoint _curScroll; // Current scroll position + RMPoint _fixedScroll; public: // @@@@@@@@@@@@@@@@@@@@@@@ @@ -556,14 +556,14 @@ public: virtual ~RMLocation(); // Load variations - bool Load(const char *lpszFileName); - bool Load(Common::File &file); - bool Load(const byte *buf); - bool Load(RMDataStream &ds); - bool LoadLOX(RMDataStream &ds); + bool load(const char *lpszFileName); + bool load(Common::File &file); + bool load(const byte *buf); + bool load(RMDataStream &ds); + bool loadLOX(RMDataStream &ds); // Unload - void Unload(void); + void unload(void); // Overloaded draw virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); @@ -572,27 +572,27 @@ public: void doFrame(RMGfxTargetBuffer *bigBuf); // Return the item at a given point - RMItem *WhichItemIsIn(const RMPoint &pt); + RMItem *whichItemIsIn(const RMPoint &pt); // Return the item based on it's MPAL code - RMItem *GetItemFromCode(uint32 dwCode); + RMItem *getItemFromCode(uint32 dwCode); // Set the current scroll position - void SetScrollPosition(const RMPoint &scroll); + void setScrollPosition(const RMPoint &scroll); // Sets an additinal offset for scrolling - void SetFixedScroll(const RMPoint &scroll); + void setFixedScroll(const RMPoint &scroll); // Update the scrolling coordinates to display the specified point - void UpdateScrolling(const RMPoint &ptShowThis); + void updateScrolling(const RMPoint &ptShowThis); // Read the current scroll position - RMPoint ScrollPosition() { - return m_curScroll; + RMPoint scrollPosition() { + return _curScroll; } // Pause sound - void PauseSound(bool bPause); + void pauseSound(bool bPause); }; @@ -606,21 +606,21 @@ private: int nPeriods; private: - void ParseMessage(void); + void parseMessage(void); public: RMMessage(); RMMessage(uint32 dwId); virtual ~RMMessage(); - void Load(uint32 dwId); - bool IsValid() { + void load(uint32 dwId); + bool isValid() { return lpMessage != NULL; } - int NumPeriods() { + int numPeriods() { return nPeriods; } - char *Period(int num) { + char *period(int num) { return lpPeriods[num]; } char *operator[](int num) { |