ZVISION: Add override keywords

This commit is contained in:
Bastien Bouclet 2020-02-09 12:05:34 +01:00
parent 1bcdcabb29
commit e3abab45ab
30 changed files with 173 additions and 173 deletions

View File

@ -32,7 +32,7 @@ class ZVision;
class Console : public GUI::Debugger {
public:
Console(ZVision *engine);
virtual ~Console() {}
~Console() override {}
private:
ZVision *_engine;

View File

@ -67,18 +67,18 @@ public:
return "zvision";
}
virtual const char *getName() const override {
const char *getName() const override {
return "Z-Vision";
}
virtual const char *getOriginalCopyright() const override {
const char *getOriginalCopyright() const override {
return "Z-Vision (C) 1996 Activision";
}
virtual bool hasFeature(MetaEngineFeature f) const override;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
SaveStateList listSaves(const char *target) const override;
virtual int getMaximumSaveSlot() const override;
int getMaximumSaveSlot() const override;
void removeSaveState(const char *target, int slot) const override;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
};

View File

@ -54,8 +54,8 @@ private:
bool _eosFlag;
public:
bool eos() const;
uint32 read(void *dataPtr, uint32 dataSize);
bool eos() const override;
uint32 read(void *dataPtr, uint32 dataSize) override;
private:
/**

View File

@ -58,14 +58,14 @@ class ZfsArchive : public Common::Archive {
public:
ZfsArchive(const Common::String &fileName);
ZfsArchive(const Common::String &fileName, Common::SeekableReadStream *stream);
~ZfsArchive();
~ZfsArchive() override;
/**
* Check if a member with the given name is present in the Archive.
* Patterns are not allowed, as this is meant to be a quick File::exists()
* replacement.
*/
bool hasFile(const Common::String &fileName) const;
bool hasFile(const Common::String &fileName) const override;
/**
* Add all members of the Archive to list.
@ -73,12 +73,12 @@ public:
*
* @return The number of names added to list
*/
int listMembers(Common::ArchiveMemberList &list) const;
int listMembers(Common::ArchiveMemberList &list) const override;
/**
* Returns a ArchiveMember representation of the given file.
*/
const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
const Common::ArchiveMemberPtr getMember(const Common::String &name) const override;
/**
* Create a stream bound to a member with the specified name in the
@ -86,7 +86,7 @@ public:
*
* @return The newly created input stream
*/
Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const override;
private:
const Common::String _fileName;

View File

@ -34,11 +34,11 @@ class FogFx : public GraphicsEffect {
public:
FogFx(ZVision *engine, uint32 key, Common::Rect region, bool ported, EffectMap *Map, const Common::String &clouds);
~FogFx();
~FogFx() override;
const Graphics::Surface *draw(const Graphics::Surface &srcSubRect);
const Graphics::Surface *draw(const Graphics::Surface &srcSubRect) override;
void update();
void update() override;
private:
EffectMap *_map;

View File

@ -33,11 +33,11 @@ class LightFx : public GraphicsEffect {
public:
LightFx(ZVision *engine, uint32 key, Common::Rect region, bool ported, EffectMap *Map, int8 delta, int8 minD = -127, int8 maxD = 127);
~LightFx();
~LightFx() override;
const Graphics::Surface *draw(const Graphics::Surface &srcSubRect);
const Graphics::Surface *draw(const Graphics::Surface &srcSubRect) override;
void update();
void update() override;
private:
EffectMap *_map;

View File

@ -34,11 +34,11 @@ class WaveFx : public GraphicsEffect {
public:
WaveFx(ZVision *engine, uint32 key, Common::Rect region, bool ported, int16 frames, int16 centerX, int16 centerY, float ampl, float waveln, float spd);
~WaveFx();
~WaveFx() override;
const Graphics::Surface *draw(const Graphics::Surface &srcSubRect);
const Graphics::Surface *draw(const Graphics::Surface &srcSubRect) override;
void update();
void update() override;
private:
int16 _frame;

View File

@ -59,7 +59,7 @@ protected:
class ActionAdd : public ResultAction {
public:
ActionAdd(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
@ -69,8 +69,8 @@ private:
class ActionAssign : public ResultAction {
public:
ActionAssign(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionAssign();
bool execute();
~ActionAssign() override;
bool execute() override;
private:
uint32 _key;
@ -80,7 +80,7 @@ private:
class ActionAttenuate : public ResultAction {
public:
ActionAttenuate(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
@ -90,7 +90,7 @@ private:
class ActionChangeLocation : public ResultAction {
public:
ActionChangeLocation(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
char _world;
@ -103,7 +103,7 @@ private:
class ActionCrossfade : public ResultAction {
public:
ActionCrossfade(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _keyOne;
@ -118,7 +118,7 @@ private:
class ActionCursor : public ResultAction {
public:
ActionCursor(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint8 _action;
@ -127,7 +127,7 @@ private:
class ActionDelayRender : public ResultAction {
public:
ActionDelayRender(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _framesToDelay;
@ -136,7 +136,7 @@ private:
class ActionDisableControl : public ResultAction {
public:
ActionDisableControl(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
@ -145,7 +145,7 @@ private:
class ActionDisplayMessage : public ResultAction {
public:
ActionDisplayMessage(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
int16 _control;
@ -155,14 +155,14 @@ private:
class ActionDissolve : public ResultAction {
public:
ActionDissolve(ZVision *engine);
bool execute();
bool execute() override;
};
class ActionDistort : public ResultAction {
public:
ActionDistort(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionDistort();
bool execute();
~ActionDistort() override;
bool execute() override;
private:
int16 _distSlot;
@ -176,7 +176,7 @@ private:
class ActionEnableControl : public ResultAction {
public:
ActionEnableControl(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
@ -185,13 +185,13 @@ private:
class ActionFlushMouseEvents : public ResultAction {
public:
ActionFlushMouseEvents(ZVision *engine, int32 slotkey);
bool execute();
bool execute() override;
};
class ActionInventory : public ResultAction {
public:
ActionInventory(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
int8 _type;
int32 _key;
@ -200,7 +200,7 @@ private:
class ActionKill : public ResultAction {
public:
ActionKill(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
@ -210,7 +210,7 @@ private:
class ActionMenuBarEnable : public ResultAction {
public:
ActionMenuBarEnable(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint16 _menus;
};
@ -218,8 +218,8 @@ private:
class ActionMusic : public ResultAction {
public:
ActionMusic(ZVision *engine, int32 slotkey, const Common::String &line, bool global);
~ActionMusic();
bool execute();
~ActionMusic() override;
bool execute() override;
private:
Common::String _fileName;
@ -234,8 +234,8 @@ private:
class ActionPanTrack : public ResultAction {
public:
ActionPanTrack(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionPanTrack();
bool execute();
~ActionPanTrack() override;
bool execute() override;
private:
int32 _pos;
@ -245,8 +245,8 @@ private:
class ActionPlayAnimation : public ResultAction {
public:
ActionPlayAnimation(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionPlayAnimation();
bool execute();
~ActionPlayAnimation() override;
bool execute() override;
private:
Common::String _fileName;
@ -264,7 +264,7 @@ private:
class ActionPlayPreloadAnimation : public ResultAction {
public:
ActionPlayPreloadAnimation(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _controlKey;
@ -280,8 +280,8 @@ private:
class ActionPreloadAnimation : public ResultAction {
public:
ActionPreloadAnimation(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionPreloadAnimation();
bool execute();
~ActionPreloadAnimation() override;
bool execute() override;
private:
Common::String _fileName;
@ -292,7 +292,7 @@ private:
class ActionPreferences : public ResultAction {
public:
ActionPreferences(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
bool _save;
@ -301,14 +301,14 @@ private:
class ActionQuit : public ResultAction {
public:
ActionQuit(ZVision *engine, int32 slotkey) : ResultAction(engine, slotkey) {}
bool execute();
bool execute() override;
};
class ActionRegion : public ResultAction {
public:
ActionRegion(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionRegion();
bool execute();
~ActionRegion() override;
bool execute() override;
private:
Common::String _art;
@ -324,7 +324,7 @@ private:
class ActionUnloadAnimation : public ResultAction {
public:
ActionUnloadAnimation(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
};
@ -332,8 +332,8 @@ private:
class ActionRandom : public ResultAction {
public:
ActionRandom(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionRandom();
bool execute();
~ActionRandom() override;
bool execute() override;
private:
ValueSlot *_max;
@ -342,7 +342,7 @@ private:
class ActionRestoreGame : public ResultAction {
public:
ActionRestoreGame(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
Common::String _fileName;
@ -351,7 +351,7 @@ private:
class ActionRotateTo : public ResultAction {
public:
ActionRotateTo(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
int32 _toPos;
@ -361,7 +361,7 @@ private:
class ActionSetPartialScreen : public ResultAction {
public:
ActionSetPartialScreen(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint _x;
@ -373,7 +373,7 @@ private:
class ActionSetScreen : public ResultAction {
public:
ActionSetScreen(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
Common::String _fileName;
@ -382,7 +382,7 @@ private:
class ActionStop : public ResultAction {
public:
ActionStop(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
uint32 _key;
@ -391,7 +391,7 @@ private:
class ActionStreamVideo : public ResultAction {
public:
ActionStreamVideo(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
enum {
@ -410,7 +410,7 @@ private:
class ActionSyncSound : public ResultAction {
public:
ActionSyncSound(ZVision *engine, int32 slotkey, const Common::String &line);
bool execute();
bool execute() override;
private:
int _syncto;
@ -420,8 +420,8 @@ private:
class ActionTimer : public ResultAction {
public:
ActionTimer(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionTimer();
bool execute();
~ActionTimer() override;
bool execute() override;
private:
ValueSlot *_time;
};
@ -429,8 +429,8 @@ private:
class ActionTtyText : public ResultAction {
public:
ActionTtyText(ZVision *engine, int32 slotkey, const Common::String &line);
~ActionTtyText();
bool execute();
~ActionTtyText() override;
bool execute() override;
private:
Common::String _filename;

View File

@ -38,7 +38,7 @@ namespace ZVision {
class FistControl : public Control {
public:
FistControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~FistControl();
~FistControl() override;
private:
uint32 _fiststatus;
@ -67,9 +67,9 @@ private:
int32 _animationId;
public:
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool process(uint32 deltaTimeInMillis);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool process(uint32 deltaTimeInMillis) override;
private:
void readDescFile(const Common::String &fileName);

View File

@ -38,7 +38,7 @@ namespace ZVision {
class HotMovControl : public Control {
public:
HotMovControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~HotMovControl();
~HotMovControl() override;
private:
int32 _framesCount;
@ -48,9 +48,9 @@ private:
Common::Rect _rectangle;
Common::Array<Common::Rect> _frames;
public:
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool process(uint32 deltaTimeInMillis);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool process(uint32 deltaTimeInMillis) override;
private:
void readHsFile(const Common::String &fileName);

View File

@ -38,7 +38,7 @@ namespace ZVision {
class InputControl : public Control {
public:
InputControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~InputControl();
~InputControl() override;
private:
Graphics::Surface *_background;
@ -59,18 +59,18 @@ private:
Video::VideoDecoder *_animation;
public:
void focus() {
void focus() override {
_focused = true;
_textChanged = true;
}
void unfocus() {
void unfocus() override {
_focused = false;
_textChanged = true;
}
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onKeyDown(Common::KeyState keyState);
bool process(uint32 deltaTimeInMillis);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onKeyDown(Common::KeyState keyState) override;
bool process(uint32 deltaTimeInMillis) override;
void setText(const Common::String &_str);
const Common::String getText();
bool enterPress();

View File

@ -38,7 +38,7 @@ namespace ZVision {
class LeverControl : public Control {
public:
LeverControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~LeverControl();
~LeverControl() override;
private:
@ -81,10 +81,10 @@ private:
uint32 _accumulatedTime;
public:
bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool process(uint32 deltaTimeInMillis);
bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool process(uint32 deltaTimeInMillis) override;
private:
void parseLevFile(const Common::String &fileName);

View File

@ -36,19 +36,19 @@ namespace ZVision {
class PaintControl : public Control {
public:
PaintControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~PaintControl();
~PaintControl() override;
/**
* @param screenSpacePos The position of the mouse in screen space
* @param backgroundImageSpacePos The position of the mouse in background image space
*/
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
/**
* @param screenSpacePos The position of the mouse in screen space
* @param backgroundImageSpacePos The position of the mouse in background image space
*/
bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
/**
* Called on every MouseMove. Tests if the mouse is inside _hotspot, and if so, sets the cursor.
*
@ -57,9 +57,9 @@ public:
* @param backgroundImageSpacePos The position of the mouse in background image space
* @return Was the cursor changed?
*/
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool process(uint32 deltaTimeInMillis) {
bool process(uint32 deltaTimeInMillis) override {
return false;
};

View File

@ -34,7 +34,7 @@ namespace ZVision {
class PushToggleControl : public Control {
public:
PushToggleControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~PushToggleControl();
~PushToggleControl() override;
/**
* Called when LeftMouse is pushed. Default is NOP.
@ -42,14 +42,14 @@ public:
* @param screenSpacePos The position of the mouse in screen space
* @param backgroundImageSpacePos The position of the mouse in background image space
*/
bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseDown(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
/**
* Called when LeftMouse is lifted. Calls ScriptManager::setStateValue(_key, 1);
*
* @param screenSpacePos The position of the mouse in screen space
* @param backgroundImageSpacePos The position of the mouse in background image space
*/
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
/**
* Called on every MouseMove. Tests if the mouse is inside _hotspot, and if so, sets the cursor.
*
@ -58,7 +58,7 @@ public:
* @param backgroundImageSpacePos The position of the mouse in background image space
* @return Was the cursor changed?
*/
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
private:
/**

View File

@ -38,7 +38,7 @@ namespace ZVision {
class SafeControl : public Control {
public:
SafeControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~SafeControl();
~SafeControl() override;
private:
int16 _statesCount;
@ -55,9 +55,9 @@ private:
int16 _targetFrame;
public:
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool process(uint32 deltaTimeInMillis);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool process(uint32 deltaTimeInMillis) override;
};
} // End of namespace ZVision

View File

@ -46,7 +46,7 @@ private:
public:
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
};

View File

@ -35,7 +35,7 @@ namespace ZVision {
class SlotControl : public Control {
public:
SlotControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~SlotControl();
~SlotControl() override;
/**
* Called when LeftMouse is lifted. Calls ScriptManager::setStateValue(_key, 1);
@ -43,7 +43,7 @@ public:
* @param screenSpacePos The position of the mouse in screen space
* @param backgroundImageSpacePos The position of the mouse in background image space
*/
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
/**
* Called on every MouseMove. Tests if the mouse is inside _hotspot, and if so, sets the cursor.
*
@ -52,9 +52,9 @@ public:
* @param backgroundImageSpacePos The position of the mouse in background image space
* @return Was the cursor changed?
*/
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos);
bool onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) override;
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
private:
/**

View File

@ -36,7 +36,7 @@ namespace ZVision {
class TitlerControl : public Control {
public:
TitlerControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream);
~TitlerControl();
~TitlerControl() override;
void setString(int strLine);

View File

@ -42,7 +42,7 @@ class ZVision;
class AnimationEffect : public ScriptingEffect {
public:
AnimationEffect(ZVision *engine, uint32 controlKey, const Common::String &fileName, int32 mask, int32 frate, bool disposeAfterUse = true);
~AnimationEffect();
~AnimationEffect() override;
struct playnode {
Common::Rect pos;
@ -67,11 +67,11 @@ private:
int32 _frmDelayOverride;
public:
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
void addPlayNode(int32 slot, int x, int y, int x2, int y2, int startFrame, int endFrame, int loops = 1);
bool stop();
bool stop() override;
};
} // End of namespace ZVision

View File

@ -32,9 +32,9 @@ class ZVision;
class DistortNode : public ScriptingEffect {
public:
DistortNode(ZVision *engine, uint32 key, int16 speed, float startAngle, float endAngle, float startLineScale, float endLineScale);
~DistortNode();
~DistortNode() override;
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
private:
int16 _speed;

View File

@ -36,7 +36,7 @@ namespace ZVision {
class MusicNodeBASE : public ScriptingEffect {
public:
MusicNodeBASE(ZVision *engine, uint32 key, ScriptingEffectType type) : ScriptingEffect(engine, key, type) {}
~MusicNodeBASE() {}
~MusicNodeBASE() override {}
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -45,7 +45,7 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
virtual bool process(uint32 deltaTimeInMillis) = 0;
bool process(uint32 deltaTimeInMillis) override = 0;
virtual void setVolume(uint8 volume) = 0;
virtual uint8 getVolume() = 0;
@ -58,7 +58,7 @@ public:
class MusicNode : public MusicNodeBASE {
public:
MusicNode(ZVision *engine, uint32 key, Common::String &file, bool loop, uint8 volume);
~MusicNode();
~MusicNode() override;
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -67,14 +67,14 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
void setVolume(uint8 volume);
uint8 getVolume();
void setDeltaVolume(uint8 volume);
void setBalance(int8 balance);
void setVolume(uint8 volume) override;
uint8 getVolume() override;
void setDeltaVolume(uint8 volume) override;
void setBalance(int8 balance) override;
void setFade(int32 time, uint8 target);
void setFade(int32 time, uint8 target) override;
private:
uint8 _volume;
@ -94,7 +94,7 @@ private:
class MusicMidiNode : public MusicNodeBASE {
public:
MusicMidiNode(ZVision *engine, uint32 key, int8 program, int8 note, int8 volume);
~MusicMidiNode();
~MusicMidiNode() override;
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -103,14 +103,14 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
void setVolume(uint8 volume);
uint8 getVolume();
void setDeltaVolume(uint8 volume);
void setBalance(int8 balance);
void setVolume(uint8 volume) override;
uint8 getVolume() override;
void setDeltaVolume(uint8 volume) override;
void setBalance(int8 balance) override;
void setFade(int32 time, uint8 target);
void setFade(int32 time, uint8 target) override;
private:
int8 _chan;
@ -123,9 +123,9 @@ private:
class PanTrackNode : public ScriptingEffect {
public:
PanTrackNode(ZVision *engine, uint32 key, uint32 slot, int16 pos);
~PanTrackNode();
~PanTrackNode() override;
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
private:
uint32 _slot;

View File

@ -35,7 +35,7 @@ class ZVision;
class RegionNode : public ScriptingEffect {
public:
RegionNode(ZVision *engine, uint32 key, GraphicsEffect *effect, uint32 delay);
~RegionNode();
~RegionNode() override;
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -44,7 +44,7 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
private:
int32 _timeLeft;

View File

@ -35,7 +35,7 @@ namespace ZVision {
class SyncSoundNode : public ScriptingEffect {
public:
SyncSoundNode(ZVision *engine, uint32 key, Common::String &file, int32 syncto);
~SyncSoundNode();
~SyncSoundNode() override;
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -44,7 +44,7 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
private:
int32 _syncto;
Audio::SoundHandle _handle;

View File

@ -32,7 +32,7 @@ class ZVision;
class TimerNode : public ScriptingEffect {
public:
TimerNode(ZVision *engine, uint32 key, uint timeInSeconds);
~TimerNode();
~TimerNode() override;
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -41,14 +41,14 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
bool process(uint32 deltaTimeInMillis);
void serialize(Common::WriteStream *stream);
void deserialize(Common::SeekableReadStream *stream);
inline bool needsSerialization() {
bool process(uint32 deltaTimeInMillis) override;
void serialize(Common::WriteStream *stream) override;
void deserialize(Common::SeekableReadStream *stream) override;
inline bool needsSerialization() override {
return true;
}
bool stop();
bool stop() override;
private:
int32 _timeLeft;

View File

@ -38,7 +38,7 @@ namespace ZVision {
class ttyTextNode : public ScriptingEffect {
public:
ttyTextNode(ZVision *engine, uint32 key, const Common::String &file, const Common::Rect &r, int32 delay);
~ttyTextNode();
~ttyTextNode() override;
/**
* Decrement the timer by the delta time. If the timer is finished, set the status
@ -47,7 +47,7 @@ public:
* @param deltaTimeInMillis The number of milliseconds that have passed since last frame
* @return If true, the node can be deleted after process() finishes
*/
bool process(uint32 deltaTimeInMillis);
bool process(uint32 deltaTimeInMillis) override;
private:
Common::Rect _r;

View File

@ -63,10 +63,10 @@ protected:
class MenuZGI: public MenuHandler {
public:
MenuZGI(ZVision *engine);
~MenuZGI();
void onMouseMove(const Common::Point &Pos);
void onMouseUp(const Common::Point &Pos);
void process(uint32 deltaTimeInMillis);
~MenuZGI() override;
void onMouseMove(const Common::Point &Pos) override;
void onMouseUp(const Common::Point &Pos) override;
void process(uint32 deltaTimeInMillis) override;
private:
Graphics::Surface menuBack[3][2];
Graphics::Surface menuBar[4][2];
@ -92,10 +92,10 @@ private:
class MenuNemesis: public MenuHandler {
public:
MenuNemesis(ZVision *engine);
~MenuNemesis();
void onMouseMove(const Common::Point &Pos);
void onMouseUp(const Common::Point &Pos);
void process(uint32 deltaTimeInMillis);
~MenuNemesis() override;
void onMouseMove(const Common::Point &Pos) override;
void onMouseUp(const Common::Point &Pos) override;
void process(uint32 deltaTimeInMillis) override;
private:
Graphics::Surface but[4][6];
Graphics::Surface menuBar;

View File

@ -86,7 +86,7 @@ class RawZorkStream : public Audio::RewindableAudioStream {
public:
RawZorkStream(uint32 rate, bool stereo, DisposeAfterUse::Flag disposeStream, Common::SeekableReadStream *stream);
~RawZorkStream() {
~RawZorkStream() override {
}
public:
@ -103,23 +103,23 @@ private:
RawChunkStream _streamReader;
public:
int readBuffer(int16 *buffer, const int numSamples);
int readBuffer(int16 *buffer, const int numSamples) override;
bool isStereo() const {
bool isStereo() const override {
return _stereo;
}
bool endOfData() const {
bool endOfData() const override {
return _endOfData;
}
int getRate() const {
int getRate() const override {
return _rate;
}
Audio::Timestamp getLength() const {
return _playtime;
}
bool rewind();
bool rewind() override;
};
/**

View File

@ -33,27 +33,27 @@ namespace ZVision {
class RLFDecoder : public Video::VideoDecoder {
public:
RLFDecoder() {}
~RLFDecoder();
~RLFDecoder() override;
bool loadStream(Common::SeekableReadStream *stream);
bool loadStream(Common::SeekableReadStream *stream) override;
private:
class RLFVideoTrack : public FixedRateVideoTrack {
public:
RLFVideoTrack(Common::SeekableReadStream *stream);
~RLFVideoTrack();
~RLFVideoTrack() override;
uint16 getWidth() const { return _width; }
uint16 getHeight() const { return _height; }
Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); /* RGB 555 */ }
int getCurFrame() const { return _displayedFrame; }
int getFrameCount() const { return _frameCount; }
const Graphics::Surface *decodeNextFrame();
bool isSeekable() const { return true; }
bool seek(const Audio::Timestamp &time);
uint16 getWidth() const override { return _width; }
uint16 getHeight() const override { return _height; }
Graphics::PixelFormat getPixelFormat() const override { return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); /* RGB 555 */ }
int getCurFrame() const override { return _displayedFrame; }
int getFrameCount() const override { return _frameCount; }
const Graphics::Surface *decodeNextFrame() override;
bool isSeekable() const override { return true; }
bool seek(const Audio::Timestamp &time) override;
protected:
Common::Rational getFrameRate() const { return Common::Rational(1000, _frameTime); }
Common::Rational getFrameRate() const override { return Common::Rational(1000, _frameTime); }
private:
enum EncodingType {

View File

@ -33,23 +33,23 @@ class ZorkAVIDecoder : public Video::AVIDecoder {
public:
ZorkAVIDecoder() {}
virtual ~ZorkAVIDecoder() {}
~ZorkAVIDecoder() override {}
private:
class ZorkAVIAudioTrack : public Video::AVIDecoder::AVIAudioTrack {
public:
ZorkAVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType);
void createAudioStream();
void queueSound(Common::SeekableReadStream *stream);
void resetStream();
void createAudioStream() override;
void queueSound(Common::SeekableReadStream *stream) override;
void resetStream() override;
private:
Audio::QueuingAudioStream *_queueStream;
RawChunkStream _decoder;
};
Video::AVIDecoder::AVIAudioTrack *createAudioTrack(Video::AVIDecoder::AVIStreamHeader sHeader, Video::AVIDecoder::PCMWaveFormat wvInfo);
Video::AVIDecoder::AVIAudioTrack *createAudioTrack(Video::AVIDecoder::AVIStreamHeader sHeader, Video::AVIDecoder::PCMWaveFormat wvInfo) override;
private:
// Audio Codecs

View File

@ -99,7 +99,7 @@ enum ZVisionFeatures {
class ZVision : public Engine {
public:
ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc);
~ZVision();
~ZVision() override;
public:
/**