MOHAWK: Add override keywords

This commit is contained in:
Bastien Bouclet 2020-02-09 12:05:30 +01:00
parent 5aef420e17
commit cccd6428c0
12 changed files with 116 additions and 116 deletions

View File

@ -116,7 +116,7 @@ class MohawkEngine_CSTime;
class CSTimeConsole : public GUI::Debugger {
public:
CSTimeConsole(MohawkEngine_CSTime *vm);
virtual ~CSTimeConsole(void);
~CSTimeConsole(void) override;
private:
MohawkEngine_CSTime *_vm;

View File

@ -133,7 +133,7 @@ protected:
public:
MohawkEngine_CSTime(OSystem *syst, const MohawkGameDescription *gamedesc);
virtual ~MohawkEngine_CSTime();
~MohawkEngine_CSTime() override;
Common::RandomSource *_rnd;

View File

@ -30,13 +30,13 @@ namespace Mohawk {
class CSTimeCase1 : public CSTimeCase {
public:
CSTimeCase1(MohawkEngine_CSTime *vm);
~CSTimeCase1();
~CSTimeCase1() override;
bool checkConvCondition(uint16 conditionId);
bool checkAmbientCondition(uint16 charId, uint16 ambientId);
bool checkObjectCondition(uint16 objectId);
void selectHelpStrings();
void handleConditionalEvent(const CSTimeEvent &event);
bool checkConvCondition(uint16 conditionId) override;
bool checkAmbientCondition(uint16 charId, uint16 ambientId) override;
bool checkObjectCondition(uint16 objectId) override;
void selectHelpStrings() override;
void handleConditionalEvent(const CSTimeEvent &event) override;
protected:
void incorrectBodySequence(uint16 stage, uint16 speech, uint16 feature);

View File

@ -32,14 +32,14 @@ class MohawkEngine_CSTime;
class CSTimeGraphics : public GraphicsManager {
public:
CSTimeGraphics(MohawkEngine_CSTime *vm);
~CSTimeGraphics();
~CSTimeGraphics() override;
void drawRect(Common::Rect rect, byte color);
protected:
MohawkSurface *decodeImage(uint16 id);
Common::Array<MohawkSurface *> decodeImages(uint16 id);
MohawkEngine *getVM() { return (MohawkEngine *)_vm; }
MohawkSurface *decodeImage(uint16 id) override;
Common::Array<MohawkSurface *> decodeImages(uint16 id) override;
MohawkEngine *getVM() override { return (MohawkEngine *)_vm; }
private:
MohawkBitmap *_bmpDecoder;

View File

@ -33,9 +33,9 @@ public:
CSTimeModule(MohawkEngine_CSTime *vm);
// TODO: these don't really belong here
void init() { }
void shutdown() { }
void update() { }
void init() override { }
void shutdown() override { }
void update() override { }
void defaultMoveProc(Feature *feature);
void defaultDrawProc(Feature *feature);
@ -63,7 +63,7 @@ class CSTimeView : public View {
public:
CSTimeView(MohawkEngine_CSTime *vm);
uint32 getTime();
uint32 getTime() override;
void setupView();
Feature *installViewFeature(uint16 scrbId, uint32 flags, Common::Point *pos);
@ -88,7 +88,7 @@ protected:
void groupFreeScript(uint index);
void groupAdjustView(uint index, uint count);
void finishDraw();
void finishDraw() override;
};
} // End of namespace Mohawk

View File

@ -470,14 +470,14 @@ protected:
class LBSoundItem : public LBItem {
public:
LBSoundItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBSoundItem();
~LBSoundItem() override;
void update();
bool togglePlaying(bool playing, bool restart);
void stop();
void update() override;
bool togglePlaying(bool playing, bool restart) override;
void stop() override;
protected:
LBItem *createClone();
LBItem *createClone() override;
bool _running;
};
@ -491,26 +491,26 @@ class LBGroupItem : public LBItem {
public:
LBGroupItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) override;
void destroySelf();
void setEnabled(bool enabled);
void setGlobalEnabled(bool enabled);
bool contains(Common::Point point);
bool togglePlaying(bool playing, bool restart);
void destroySelf() override;
void setEnabled(bool enabled) override;
void setGlobalEnabled(bool enabled) override;
bool contains(Common::Point point) override;
bool togglePlaying(bool playing, bool restart) override;
// 0x12
void seek(uint16 pos);
void setVisible(bool visible);
void setGlobalVisible(bool visible);
void startPhase(uint phase);
void stop();
void load();
void unload();
void moveBy(const Common::Point &pos);
void moveTo(const Common::Point &pos);
void seek(uint16 pos) override;
void setVisible(bool visible) override;
void setGlobalVisible(bool visible) override;
void startPhase(uint phase) override;
void stop() override;
void load() override;
void unload() override;
void moveBy(const Common::Point &pos) override;
void moveTo(const Common::Point &pos) override;
protected:
LBItem *createClone();
LBItem *createClone() override;
bool _starting;
@ -520,15 +520,15 @@ protected:
class LBPaletteItem : public LBItem {
public:
LBPaletteItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBPaletteItem();
~LBPaletteItem() override;
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) override;
bool togglePlaying(bool playing, bool restart);
void update();
bool togglePlaying(bool playing, bool restart) override;
void update() override;
protected:
LBItem *createClone();
LBItem *createClone() override;
uint16 _fadeInPeriod, _fadeInStep, _drawStart, _drawCount;
uint32 _fadeInStart, _fadeInCurrent;
@ -553,18 +553,18 @@ class LBLiveTextItem : public LBItem {
public:
LBLiveTextItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) override;
bool contains(Common::Point point);
void update();
void draw();
void handleMouseDown(Common::Point pos);
bool togglePlaying(bool playing, bool restart);
void stop();
void notify(uint16 data, uint16 from);
bool contains(Common::Point point) override;
void update() override;
void draw() override;
void handleMouseDown(Common::Point pos) override;
bool togglePlaying(bool playing, bool restart) override;
void stop() override;
void notify(uint16 data, uint16 from) override;
protected:
LBItem *createClone();
LBItem *createClone() override;
void paletteUpdate(uint16 word, bool on);
void drawWord(uint word, uint yPos);
@ -584,35 +584,35 @@ class LBPictureItem : public LBItem {
public:
LBPictureItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) override;
bool contains(Common::Point point);
void draw();
void init();
bool contains(Common::Point point) override;
void draw() override;
void init() override;
protected:
LBItem *createClone();
LBItem *createClone() override;
};
class LBAnimationItem : public LBItem {
public:
LBAnimationItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBAnimationItem();
~LBAnimationItem() override;
void setEnabled(bool enabled);
bool contains(Common::Point point);
void update();
void draw();
bool togglePlaying(bool playing, bool restart);
void done(bool onlyNotify);
void init();
void seek(uint16 pos);
void seekToTime(uint32 time);
void startPhase(uint phase);
void stop();
void setEnabled(bool enabled) override;
bool contains(Common::Point point) override;
void update() override;
void draw() override;
bool togglePlaying(bool playing, bool restart) override;
void done(bool onlyNotify) override;
void init() override;
void seek(uint16 pos) override;
void seekToTime(uint32 time) override;
void startPhase(uint phase) override;
void stop() override;
protected:
LBItem *createClone();
LBItem *createClone() override;
LBAnimation *_anim;
bool _running;
@ -621,36 +621,36 @@ protected:
class LBMovieItem : public LBItem {
public:
LBMovieItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBMovieItem();
~LBMovieItem() override;
void update();
bool togglePlaying(bool playing, bool restart);
void update() override;
bool togglePlaying(bool playing, bool restart) override;
protected:
LBItem *createClone();
LBItem *createClone() override;
};
class LBMiniGameItem : public LBItem {
public:
LBMiniGameItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBMiniGameItem();
~LBMiniGameItem() override;
bool togglePlaying(bool playing, bool restart);
bool togglePlaying(bool playing, bool restart) override;
protected:
LBItem *createClone();
LBItem *createClone() override;
};
class LBProxyItem : public LBItem {
public:
LBProxyItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBProxyItem();
~LBProxyItem() override;
void load();
void unload();
void load() override;
void unload() override;
protected:
LBItem *createClone();
LBItem *createClone() override;
class LBPage *_page;
};
@ -711,7 +711,7 @@ protected:
public:
MohawkEngine_LivingBooks(OSystem *syst, const MohawkGameDescription *gamedesc);
virtual ~MohawkEngine_LivingBooks();
~MohawkEngine_LivingBooks() override;
Common::RandomSource *_rnd;

View File

@ -32,15 +32,15 @@ class MohawkEngine_LivingBooks;
class LBGraphics : public GraphicsManager {
public:
LBGraphics(MohawkEngine_LivingBooks *vm, uint16 width, uint16 height);
~LBGraphics();
~LBGraphics() override;
void setPalette(uint16 id);
void setPalette(uint16 id) override;
void copyOffsetAnimImageToScreen(uint16 image, int left = 0, int top = 0);
bool imageIsTransparentAt(uint16 image, bool useOffsets, int x, int y);
protected:
MohawkSurface *decodeImage(uint16 id);
MohawkEngine *getVM() { return (MohawkEngine *)_vm; }
MohawkSurface *decodeImage(uint16 id) override;
MohawkEngine *getVM() override { return (MohawkEngine *)_vm; }
private:
MohawkBitmap *_bmpDecoder;

View File

@ -28,9 +28,9 @@ namespace Mohawk {
class LBXDataFile : public LBXObject {
public:
LBXDataFile(MohawkEngine_LivingBooks *vm);
~LBXDataFile();
~LBXDataFile() override;
bool call(uint callId, const Common::Array<LBValue> &params, LBValue &result);
bool call(uint callId, const Common::Array<LBValue> &params, LBValue &result) override;
protected:
Common::INIFile _dataFile;

View File

@ -285,12 +285,12 @@ public:
typedef Common::Array<uint16> ArgumentArray;
RivenSimpleCommand(MohawkEngine_Riven *vm, RivenCommandType type, const ArgumentArray &arguments);
virtual ~RivenSimpleCommand();
~RivenSimpleCommand() override;
// RivenCommand API
virtual void dump(byte tabs) override;
virtual void execute() override;
virtual RivenCommandType getType() const override;
void dump(byte tabs) override;
void execute() override;
RivenCommandType getType() const override;
private:
typedef void (RivenSimpleCommand::*OpcodeProcRiven)(uint16 op, const ArgumentArray &args);
@ -358,13 +358,13 @@ private:
class RivenSwitchCommand : public RivenCommand {
public:
static RivenSwitchCommand *createFromStream(MohawkEngine_Riven *vm, Common::ReadStream *stream);
virtual ~RivenSwitchCommand();
~RivenSwitchCommand() override;
// RivenCommand API
virtual void dump(byte tabs) override;
virtual void execute() override;
virtual RivenCommandType getType() const override;
virtual void applyCardPatches(uint32 globalId, int scriptType, uint16 hotspotId) override;
void dump(byte tabs) override;
void execute() override;
RivenCommandType getType() const override;
void applyCardPatches(uint32 globalId, int scriptType, uint16 hotspotId) override;
private:
RivenSwitchCommand(MohawkEngine_Riven *vm);
@ -391,12 +391,12 @@ public:
bool byStackId, bool byStackCardId);
static RivenStackChangeCommand *createFromStream(MohawkEngine_Riven *vm, Common::ReadStream *stream);
virtual ~RivenStackChangeCommand();
~RivenStackChangeCommand() override;
// RivenCommand API
virtual void dump(byte tabs) override;
virtual void execute() override;
virtual RivenCommandType getType() const override;
void dump(byte tabs) override;
void execute() override;
RivenCommandType getType() const override;
private:
uint16 _stackId;
@ -416,9 +416,9 @@ public:
RivenTimerCommand(MohawkEngine_Riven *vm, const Common::SharedPtr<RivenStack::TimerProc> &timerProc);
// RivenCommand API
virtual void dump(byte tabs) override;
virtual void execute() override;
virtual RivenCommandType getType() const override;
void dump(byte tabs) override;
void execute() override;
RivenCommandType getType() const override;
private:
Common::SharedPtr<RivenStack::TimerProc> _timerProc;

View File

@ -37,7 +37,7 @@ public:
JSpit(MohawkEngine_Riven *vm);
// RivenStack API
virtual void installCardTimer() override;
void installCardTimer() override;
// External commands - Rebel Tunnel Puzzle
void xreseticons(const ArgumentArray &args);

View File

@ -36,7 +36,7 @@ public:
PSpit(MohawkEngine_Riven *vm);
// RivenStack API
virtual void installCardTimer() override;
void installCardTimer() override;
// External commands - Prison Elevator
void xpisland990_elevcombo(const ArgumentArray &args); // Param1: button

View File

@ -155,23 +155,23 @@ protected:
class OldFeature : public Feature {
public:
OldFeature(View *view);
~OldFeature();
~OldFeature() override;
void resetFrame();
void resetFeatureScript(uint16 enabled, uint16 scrbId);
void resetFrame() override;
void resetFeatureScript(uint16 enabled, uint16 scrbId) override;
protected:
void resetScript();
void finishResetFeatureScript();
void resetScript() override;
void finishResetFeatureScript() override;
};
class NewFeature : public Feature {
public:
NewFeature(View *view);
~NewFeature();
~NewFeature() override;
void resetFrame();
void resetFeatureScript(uint16 enabled, uint16 scrbId);
void resetFrame() override;
void resetFeatureScript(uint16 enabled, uint16 scrbId) override;
uint32 _unknown168;
@ -187,8 +187,8 @@ public:
Common::Point _currDragPos;
protected:
void resetScript();
void finishResetFeatureScript();
void resetScript() override;
void finishResetFeatureScript() override;
};
class View {