diff options
author | Bastien Bouclet | 2018-03-31 12:52:08 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-03-31 13:36:09 +0200 |
commit | 84b2dc5cc85721570aa7aafdd9e3e96f0f04a025 (patch) | |
tree | 0326a67ec3cfda91f2419353fdd30b069d9e65c3 /engines/mohawk/myst_areas.h | |
parent | 494fd3bb52e054969eb94ed72dc2d12a6e412fd1 (diff) | |
download | scummvm-rg350-84b2dc5cc85721570aa7aafdd9e3e96f0f04a025.tar.gz scummvm-rg350-84b2dc5cc85721570aa7aafdd9e3e96f0f04a025.tar.bz2 scummvm-rg350-84b2dc5cc85721570aa7aafdd9e3e96f0f04a025.zip |
MOHAWK: Fix some clang-tidy warnings
Diffstat (limited to 'engines/mohawk/myst_areas.h')
-rw-r--r-- | engines/mohawk/myst_areas.h | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/engines/mohawk/myst_areas.h b/engines/mohawk/myst_areas.h index 32b6ca4f2f..bfd370d504 100644 --- a/engines/mohawk/myst_areas.h +++ b/engines/mohawk/myst_areas.h @@ -58,12 +58,13 @@ enum { class MystArea { public: - MystArea(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); + MystArea(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); virtual ~MystArea(); virtual const Common::String describe(); void drawBoundingRect(); + bool hasType(ResourceType type) const { return _type == type; } bool contains(Common::Point point) { return _rect.contains(point); } virtual void drawDataToScreen() {} virtual void handleCardChange() {} @@ -83,10 +84,10 @@ public: virtual void handleMouseDrag() {} MystArea *_parent; - ResourceType type; protected: MohawkEngine_Myst *_vm; + ResourceType _type; uint16 _flags; Common::Rect _rect; uint16 _dest; @@ -94,7 +95,7 @@ protected: class MystAreaAction : public MystArea { public: - MystAreaAction(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); + MystAreaAction(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); void handleMouseUp() override; const Common::String describe() override; @@ -105,7 +106,7 @@ protected: class MystAreaVideo : public MystAreaAction { public: - MystAreaVideo(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); + MystAreaVideo(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); VideoEntryPtr playMovie(); VideoEntryPtr getVideo(); @@ -131,14 +132,14 @@ protected: class MystAreaActionSwitch : public MystArea { public: - MystAreaActionSwitch(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); - virtual ~MystAreaActionSwitch(); + MystAreaActionSwitch(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); + ~MystAreaActionSwitch() override; - virtual void drawDataToScreen() override; - virtual void handleCardChange() override; + void drawDataToScreen() override; + void handleCardChange() override; - virtual void handleMouseUp() override; - virtual void handleMouseDown() override; + void handleMouseUp() override; + void handleMouseDown() override; MystArea *getSubResource(uint16 index) { return _subResources[index]; } protected: @@ -152,16 +153,16 @@ protected: class MystAreaImageSwitch : public MystAreaActionSwitch { public: - MystAreaImageSwitch(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); - virtual ~MystAreaImageSwitch(); + MystAreaImageSwitch(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); + ~MystAreaImageSwitch() override; struct SubImage { uint16 wdib; Common::Rect rect; }; - virtual const Common::String describe() override; - virtual void drawDataToScreen() override; + const Common::String describe() override; + void drawDataToScreen() override; void drawConditionalDataToScreen(uint16 state, bool update = true); uint16 getImageSwitchVar() override; @@ -175,14 +176,14 @@ protected: class MystAreaDrag : public MystAreaImageSwitch { public: - MystAreaDrag(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); - virtual ~MystAreaDrag(); + MystAreaDrag(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); + ~MystAreaDrag() override; const Common::String describe() override; - virtual void handleMouseDown() override; - virtual void handleMouseUp() override; - virtual void handleMouseDrag() override; + void handleMouseDown() override; + void handleMouseUp() override; + void handleMouseDrag() override; uint16 getList1(uint16 index); uint16 getList2(uint16 index); @@ -214,8 +215,8 @@ protected: class MystAreaSlider : public MystAreaDrag { public: - MystAreaSlider(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); - virtual ~MystAreaSlider(); + MystAreaSlider(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); + ~MystAreaSlider() override; void handleMouseDown() override; void handleMouseUp() override; @@ -235,8 +236,8 @@ protected: class MystVideoInfo : public MystAreaDrag { public: - MystVideoInfo(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); - virtual ~MystVideoInfo(); + MystVideoInfo(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); + ~MystVideoInfo() override; void drawFrame(uint16 frame); bool pullLeverV(); @@ -247,14 +248,11 @@ protected: uint16 _numFrames; uint16 _firstFrame; Common::Rect _frameRect; - -private: - uint16 _currentFrame; }; class MystAreaHover : public MystArea { public: - MystAreaHover(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystArea *parent); + MystAreaHover(MohawkEngine_Myst *vm, ResourceType type, Common::SeekableReadStream *rlstStream, MystArea *parent); const Common::String describe() override; |