diff --git a/src/cheat/BankRomCheat.hxx b/src/cheat/BankRomCheat.hxx index 667b75782..76863856b 100644 --- a/src/cheat/BankRomCheat.hxx +++ b/src/cheat/BankRomCheat.hxx @@ -28,9 +28,9 @@ class BankRomCheat : public Cheat BankRomCheat(OSystem& os, const string& name, const string& code); virtual ~BankRomCheat() { } - bool enable(); - bool disable(); - void evaluate(); + bool enable() override; + bool disable() override; + void evaluate() override; private: uInt8 savedRom[16]; diff --git a/src/cheat/CheatCodeDialog.hxx b/src/cheat/CheatCodeDialog.hxx index 1d475d1ba..14e5c0d93 100644 --- a/src/cheat/CheatCodeDialog.hxx +++ b/src/cheat/CheatCodeDialog.hxx @@ -41,9 +41,9 @@ class CheatCodeDialog : public Dialog virtual ~CheatCodeDialog(); protected: - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void loadConfig(); - void saveConfig(); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void loadConfig() override; + void saveConfig() override; private: void addCheat(); diff --git a/src/cheat/CheetahCheat.hxx b/src/cheat/CheetahCheat.hxx index 4a6871c18..a672b8a88 100644 --- a/src/cheat/CheetahCheat.hxx +++ b/src/cheat/CheetahCheat.hxx @@ -28,9 +28,9 @@ class CheetahCheat : public Cheat CheetahCheat(OSystem& os, const string& name, const string& code); virtual ~CheetahCheat() { } - bool enable(); - bool disable(); - void evaluate(); + bool enable() override; + bool disable() override; + void evaluate() override; private: uInt8 savedRom[16]; diff --git a/src/cheat/RamCheat.hxx b/src/cheat/RamCheat.hxx index 2473b81da..710dfb0ef 100644 --- a/src/cheat/RamCheat.hxx +++ b/src/cheat/RamCheat.hxx @@ -28,9 +28,9 @@ class RamCheat : public Cheat RamCheat(OSystem& os, const string& name, const string& code); virtual ~RamCheat() { } - bool enable(); - bool disable(); - void evaluate(); + bool enable() override; + bool disable() override; + void evaluate() override; private: uInt16 address; diff --git a/src/common/EventHandlerSDL2.hxx b/src/common/EventHandlerSDL2.hxx index c000e57ba..d645ff493 100644 --- a/src/common/EventHandlerSDL2.hxx +++ b/src/common/EventHandlerSDL2.hxx @@ -48,19 +48,19 @@ class EventHandlerSDL2 : public EventHandler /** Enable/disable text events (distinct from single-key events). */ - void enableTextEvents(bool enable); + void enableTextEvents(bool enable) override; /** Returns the human-readable name for a StellaKey. */ - const char* nameForKey(StellaKey key) const { + const char* nameForKey(StellaKey key) const override { return SDL_GetScancodeName(SDL_Scancode(key)); } /** Collects and dispatches any pending SDL2 events. */ - void pollEvent(); + void pollEvent() override; private: SDL_Event myEvent; diff --git a/src/common/FBSurfaceSDL2.hxx b/src/common/FBSurfaceSDL2.hxx index e8654fa00..ddba2df87 100644 --- a/src/common/FBSurfaceSDL2.hxx +++ b/src/common/FBSurfaceSDL2.hxx @@ -39,30 +39,30 @@ class FBSurfaceSDL2 : public FBSurface // Most of the surface drawing primitives are implemented in FBSurface; // the ones implemented here use SDL-specific code for extra performance // - void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color); + void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, uInt32 color) override; // With hardware surfaces, it's faster to just update the entire surface - void setDirty() { mySurfaceIsDirty = true; } + void setDirty() override { mySurfaceIsDirty = true; } - uInt32 width() const; - uInt32 height() const; + uInt32 width() const override; + uInt32 height() const override; - const GUI::Rect& srcRect() const; - const GUI::Rect& dstRect() const; - void setSrcPos(uInt32 x, uInt32 y); - void setSrcSize(uInt32 w, uInt32 h); - void setDstPos(uInt32 x, uInt32 y); - void setDstSize(uInt32 w, uInt32 h); - void setVisible(bool visible); + const GUI::Rect& srcRect() const override; + const GUI::Rect& dstRect() const override; + void setSrcPos(uInt32 x, uInt32 y) override; + void setSrcSize(uInt32 w, uInt32 h) override; + void setDstPos(uInt32 x, uInt32 y) override; + void setDstSize(uInt32 w, uInt32 h) override; + void setVisible(bool visible) override; - void translateCoords(Int32& x, Int32& y) const; - bool render(); - void invalidate(); - void free(); - void reload(); - void resize(uInt32 width, uInt32 height); + void translateCoords(Int32& x, Int32& y) const override; + bool render() override; + void invalidate() override; + void free() override; + void reload() override; + void resize(uInt32 width, uInt32 height) override; protected: - void applyAttributes(bool immediate); + void applyAttributes(bool immediate) override; private: void createSurface(uInt32 width, uInt32 height, const uInt32* data); diff --git a/src/common/FrameBufferSDL2.hxx b/src/common/FrameBufferSDL2.hxx index e57a27893..f7db9bab0 100644 --- a/src/common/FrameBufferSDL2.hxx +++ b/src/common/FrameBufferSDL2.hxx @@ -62,12 +62,12 @@ class FrameBufferSDL2 : public FrameBuffer /** Shows or hides the cursor based on the given boolean value. */ - void showCursor(bool show); + void showCursor(bool show) override; /** Answers if the display is currently in fullscreen mode. */ - bool fullScreen() const; + bool fullScreen() const override; /** This method is called to retrieve the R/G/B data from the given pixel. @@ -77,7 +77,7 @@ class FrameBufferSDL2 : public FrameBuffer @param g The green component of the color @param b The blue component of the color */ - inline void getRGB(Uint32 pixel, Uint8* r, Uint8* g, Uint8* b) const + inline void getRGB(Uint32 pixel, Uint8* r, Uint8* g, Uint8* b) const override { SDL_GetRGB(pixel, myPixelFormat, r, g, b); } /** @@ -87,7 +87,7 @@ class FrameBufferSDL2 : public FrameBuffer @param g The green component of the color. @param b The blue component of the color. */ - inline Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const + inline Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) const override { return SDL_MapRGB(myPixelFormat, r, g, b); } /** @@ -100,7 +100,7 @@ class FrameBufferSDL2 : public FrameBuffer @param pitch The pitch (in bytes) for the pixel data @param rect The bounding rectangle for the buffer */ - void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const; + void readPixels(uInt8* buffer, uInt32 pitch, const GUI::Rect& rect) const override; protected: ////////////////////////////////////////////////////////////////////// @@ -110,7 +110,7 @@ class FrameBufferSDL2 : public FrameBuffer This method is called to query and initialize the video hardware for desktop and fullscreen resolution information. */ - void queryHardware(vector& displays, VariantList& renderers); + void queryHardware(vector& displays, VariantList& renderers) override; /** This method is called to query the video hardware for the index @@ -119,7 +119,7 @@ class FrameBufferSDL2 : public FrameBuffer @return the current display index or a negative value if no window is displayed */ - Int32 getCurrentDisplayIndex(); + Int32 getCurrentDisplayIndex() override; /** This method is called to change to the given video mode. @@ -129,14 +129,14 @@ class FrameBufferSDL2 : public FrameBuffer @return False on any errors, else true */ - bool setVideoMode(const string& title, const VideoMode& mode); + bool setVideoMode(const string& title, const VideoMode& mode) override; /** This method is called to invalidate the contents of the entire framebuffer (ie, mark the current content as invalid, and erase it on the next drawing pass). */ - void invalidate(); + void invalidate() override; /** This method is called to create a surface with the given attributes. @@ -145,27 +145,27 @@ class FrameBufferSDL2 : public FrameBuffer @param h The requested height of the new surface. @param data If non-null, use the given data values as a static surface */ - unique_ptr createSurface(uInt32 w, uInt32 h, const uInt32* data) const; + unique_ptr createSurface(uInt32 w, uInt32 h, const uInt32* data) const override; /** Grabs or ungrabs the mouse based on the given boolean value. */ - void grabMouse(bool grab); + void grabMouse(bool grab) override; /** Set the icon for the main SDL window. */ - void setWindowIcon(); + void setWindowIcon() override; /** This method is called to provide information about the FrameBuffer. */ - string about() const; + string about() const override; /** This method is called after any drawing is done (per-frame). */ - void postFrameUpdate(); + void postFrameUpdate() override; private: // The SDL video buffer diff --git a/src/common/SoundNull.hxx b/src/common/SoundNull.hxx index b5dab0685..1128957af 100644 --- a/src/common/SoundNull.hxx +++ b/src/common/SoundNull.hxx @@ -57,7 +57,7 @@ class SoundNull : public Sound @param enable Either true or false, to enable or disable the sound system @return Whether the sound system was enabled or disabled */ - void setEnabled(bool enable) { } + void setEnabled(bool enable) override { } /** The system cycle counter is being adjusting by the specified amount. Any @@ -65,14 +65,14 @@ class SoundNull : public Sound @param amount The amount the cycle counter is being adjusted by */ - void adjustCycleCounter(Int32 amount) { } + void adjustCycleCounter(Int32 amount) override { } /** Sets the number of channels (mono or stereo sound). @param channels The number of channels */ - void setChannels(uInt32 channels) { } + void setChannels(uInt32 channels) override { } /** Sets the display framerate. Sound generation for NTSC and PAL games @@ -80,26 +80,26 @@ class SoundNull : public Sound @param framerate The base framerate depending on NTSC or PAL ROM */ - void setFrameRate(float framerate) { } + void setFrameRate(float framerate) override { } /** Initializes the sound device. This must be called before any calls are made to derived methods. */ - void open() { } + void open() override { } /** Should be called to close the sound device. Once called the sound device can be started again using the initialize method. */ - void close() { } + void close() override { } /** Set the mute state of the sound object. While muted no sound is played. @param state Mutes sound if true, unmute if false */ - void mute(bool state) { } + void mute(bool state) override { } /** Reset the sound device. @@ -113,7 +113,7 @@ class SoundNull : public Sound @param value The value to save into the register @param cycle The system cycle at which the register is being updated */ - void set(uInt16 addr, uInt8 value, Int32 cycle) { } + void set(uInt16 addr, uInt8 value, Int32 cycle) override { } /** Sets the volume of the sound device to the specified level. The @@ -122,7 +122,7 @@ class SoundNull : public Sound @param percent The new volume percentage level for the sound device */ - void setVolume(Int32 percent) { } + void setVolume(Int32 percent) override { } /** Adjusts the volume of the sound device based on the given direction. @@ -130,7 +130,7 @@ class SoundNull : public Sound @param direction Increase or decrease the current volume by a predefined amount based on the direction (1 = increase, -1 =decrease) */ - void adjustVolume(Int8 direction) { } + void adjustVolume(Int8 direction) override { } public: /** diff --git a/src/common/SoundSDL2.hxx b/src/common/SoundSDL2.hxx index 28742b9ab..7afe6f3aa 100644 --- a/src/common/SoundSDL2.hxx +++ b/src/common/SoundSDL2.hxx @@ -56,7 +56,7 @@ class SoundSDL2 : public Sound @param state True or false, to enable or disable the sound system */ - void setEnabled(bool state); + void setEnabled(bool state) override; /** The system cycle counter is being adjusting by the specified amount. Any @@ -64,7 +64,7 @@ class SoundSDL2 : public Sound @param amount The amount the cycle counter is being adjusted by */ - void adjustCycleCounter(Int32 amount); + void adjustCycleCounter(Int32 amount) override; /** Sets the number of channels (mono or stereo sound). Note that this @@ -75,7 +75,7 @@ class SoundSDL2 : public Sound @param channels The number of channels */ - void setChannels(uInt32 channels); + void setChannels(uInt32 channels) override; /** Sets the display framerate. Sound generation for NTSC and PAL games @@ -83,31 +83,31 @@ class SoundSDL2 : public Sound @param framerate The base framerate depending on NTSC or PAL ROM */ - void setFrameRate(float framerate); + void setFrameRate(float framerate) override; /** Initializes the sound device. This must be called before any calls are made to derived methods. */ - void open(); + void open() override; /** Should be called to close the sound device. Once called the sound device can be started again using the open method. */ - void close(); + void close() override; /** Set the mute state of the sound object. While muted no sound is played. @param state Mutes sound if true, unmute if false */ - void mute(bool state); + void mute(bool state) override; /** Reset the sound device. */ - void reset(); + void reset() override; /** Sets the sound register to a given value. @@ -116,7 +116,7 @@ class SoundSDL2 : public Sound @param value The value to save into the register @param cycle The system cycle at which the register is being updated */ - void set(uInt16 addr, uInt8 value, Int32 cycle); + void set(uInt16 addr, uInt8 value, Int32 cycle) override; /** Sets the volume of the sound device to the specified level. The @@ -125,7 +125,7 @@ class SoundSDL2 : public Sound @param percent The new volume percentage level for the sound device */ - void setVolume(Int32 percent); + void setVolume(Int32 percent) override; /** Adjusts the volume of the sound device based on the given direction. @@ -133,7 +133,7 @@ class SoundSDL2 : public Sound @param direction Increase or decrease the current volume by a predefined amount based on the direction (1 = increase, -1 = decrease) */ - void adjustVolume(Int8 direction); + void adjustVolume(Int8 direction) override; public: /** @@ -142,7 +142,7 @@ class SoundSDL2 : public Sound @param out The serializer device to save to. @return The result of the save. True on success, false on failure. */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Loads the current state of this device from the given Serializer. @@ -150,14 +150,14 @@ class SoundSDL2 : public Sound @param in The Serializer device to load from. @return The result of the load. True on success, false on failure. */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for this console class (used in error checking). @return The name of the object */ - string name() const { return "TIASound"; } + string name() const override { return "TIASound"; } protected: /** diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index b341e905d..3916e5efb 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -1155,7 +1155,7 @@ string CartDebug::saveRom() FilesystemNode node(path); ofstream out(node.getPath(), ios::binary); - if(out.is_open() && myConsole.cartridge().save(out)) + if(out && myConsole.cartridge().saveROM(out)) return "saved ROM as " + node.getShortPath(); else return DebuggerParser::red("failed to save ROM"); diff --git a/src/debugger/CartDebug.hxx b/src/debugger/CartDebug.hxx index 37c8ddbf0..2c983bfe9 100644 --- a/src/debugger/CartDebug.hxx +++ b/src/debugger/CartDebug.hxx @@ -91,11 +91,11 @@ class CartDebug : public DebuggerSystem CartDebug(Debugger& dbg, Console& console, const OSystem& osystem); virtual ~CartDebug(); - const DebuggerState& getState(); - const DebuggerState& getOldState() { return myOldState; } + const DebuggerState& getState() override; + const DebuggerState& getOldState() override { return myOldState; } - void saveOldState(); - string toString(); + void saveOldState() override; + string toString() override; // Used to get/set the debug widget, which contains cart-specific // functionality diff --git a/src/debugger/CpuDebug.hxx b/src/debugger/CpuDebug.hxx index 948f587b2..6babb71a0 100644 --- a/src/debugger/CpuDebug.hxx +++ b/src/debugger/CpuDebug.hxx @@ -40,11 +40,11 @@ class CpuDebug : public DebuggerSystem public: CpuDebug(Debugger& dbg, Console& console); - const DebuggerState& getState(); - const DebuggerState& getOldState() { return myOldState; } + const DebuggerState& getState() override; + const DebuggerState& getOldState() override { return myOldState; } - void saveOldState(); - string toString() { return EmptyString; } // Not needed, since CPU stuff is always visible + void saveOldState() override; + string toString() override { return EmptyString; } // Not needed, since CPU stuff is always visible // I know, we ain't supposed to do this... M6502& m6502() const { return mySystem.m6502(); } diff --git a/src/debugger/DebuggerExpressions.hxx b/src/debugger/DebuggerExpressions.hxx index 2911086d0..78299c240 100644 --- a/src/debugger/DebuggerExpressions.hxx +++ b/src/debugger/DebuggerExpressions.hxx @@ -39,7 +39,7 @@ class BinAndExpression : public Expression { public: BinAndExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() & myRHS->evaluate(); } }; @@ -48,7 +48,7 @@ class BinNotExpression : public Expression { public: BinNotExpression(Expression* left) : Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return ~(myLHS->evaluate()); } }; @@ -57,7 +57,7 @@ class BinOrExpression : public Expression { public: BinOrExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() | myRHS->evaluate(); } }; @@ -66,7 +66,7 @@ class BinXorExpression : public Expression { public: BinXorExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() ^ myRHS->evaluate(); } }; @@ -75,7 +75,7 @@ class ByteDerefExpression : public Expression { public: ByteDerefExpression(Expression* left): Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return Debugger::debugger().peek(myLHS->evaluate()); } }; @@ -84,7 +84,7 @@ class ByteDerefOffsetExpression : public Expression { public: ByteDerefOffsetExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return Debugger::debugger().peek(myLHS->evaluate() + myRHS->evaluate()); } }; @@ -93,7 +93,7 @@ class ConstExpression : public Expression { public: ConstExpression(const int value) : Expression(), myValue(value) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myValue; } private: @@ -105,7 +105,7 @@ class CpuMethodExpression : public Expression { public: CpuMethodExpression(CpuMethod method) : Expression(), myMethod(std::mem_fn(method)) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myMethod(Debugger::debugger().cpuDebug()); } private: @@ -117,7 +117,7 @@ class DivExpression : public Expression { public: DivExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { int denom = myRHS->evaluate(); return denom == 0 ? 0 : myLHS->evaluate() / denom; } }; @@ -127,7 +127,7 @@ class EqualsExpression : public Expression { public: EqualsExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() == myRHS->evaluate(); } }; @@ -136,7 +136,7 @@ class EquateExpression : public Expression { public: EquateExpression(const string& label) : Expression(), myLabel(label) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return Debugger::debugger().cartDebug().getAddress(myLabel); } private: @@ -148,7 +148,7 @@ class FunctionExpression : public Expression { public: FunctionExpression(const string& label) : Expression(), myLabel(label) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return Debugger::debugger().getFunction(myLabel).evaluate(); } private: @@ -160,7 +160,7 @@ class GreaterEqualsExpression : public Expression { public: GreaterEqualsExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() >= myRHS->evaluate(); } }; @@ -169,7 +169,7 @@ class GreaterExpression : public Expression { public: GreaterExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() > myRHS->evaluate(); } }; @@ -178,7 +178,7 @@ class HiByteExpression : public Expression { public: HiByteExpression(Expression* left) : Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return 0xff & (myLHS->evaluate() >> 8); } }; @@ -187,7 +187,7 @@ class LessEqualsExpression : public Expression { public: LessEqualsExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() <= myRHS->evaluate(); } }; @@ -196,7 +196,7 @@ class LessExpression : public Expression { public: LessExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() < myRHS->evaluate(); } }; @@ -205,7 +205,7 @@ class LoByteExpression : public Expression { public: LoByteExpression(Expression* left) : Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return 0xff & myLHS->evaluate(); } }; @@ -214,7 +214,7 @@ class LogAndExpression : public Expression { public: LogAndExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() && myRHS->evaluate(); } }; @@ -223,7 +223,7 @@ class LogNotExpression : public Expression { public: LogNotExpression(Expression* left) : Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return !(myLHS->evaluate()); } }; @@ -232,7 +232,7 @@ class LogOrExpression : public Expression { public: LogOrExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() || myRHS->evaluate(); } }; @@ -241,7 +241,7 @@ class MinusExpression : public Expression { public: MinusExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() - myRHS->evaluate(); } }; @@ -250,7 +250,7 @@ class ModExpression : public Expression { public: ModExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { int rhs = myRHS->evaluate(); return rhs == 0 ? 0 : myLHS->evaluate() % rhs; } }; @@ -260,7 +260,7 @@ class MultExpression : public Expression { public: MultExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() * myRHS->evaluate(); } }; @@ -269,7 +269,7 @@ class NotEqualsExpression : public Expression { public: NotEqualsExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() != myRHS->evaluate(); } }; @@ -278,7 +278,7 @@ class PlusExpression : public Expression { public: PlusExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() + myRHS->evaluate(); } }; @@ -287,7 +287,7 @@ class CartMethodExpression : public Expression { public: CartMethodExpression(CartMethod method) : Expression(), myMethod(std::mem_fn(method)) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myMethod(Debugger::debugger().cartDebug()); } private: @@ -299,7 +299,7 @@ class ShiftLeftExpression : public Expression { public: ShiftLeftExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() << myRHS->evaluate(); } }; @@ -308,7 +308,7 @@ class ShiftRightExpression : public Expression { public: ShiftRightExpression(Expression* left, Expression* right) : Expression(left, right) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myLHS->evaluate() >> myRHS->evaluate(); } }; @@ -317,7 +317,7 @@ class TiaMethodExpression : public Expression { public: TiaMethodExpression(TiaMethod method) : Expression(), myMethod(std::mem_fn(method)) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return myMethod(Debugger::debugger().tiaDebug()); } private: @@ -329,7 +329,7 @@ class UnaryMinusExpression : public Expression { public: UnaryMinusExpression(Expression* left) : Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return -(myLHS->evaluate()); } }; @@ -338,7 +338,7 @@ class WordDerefExpression : public Expression { public: WordDerefExpression(Expression* left) : Expression(left) { } - uInt16 evaluate() const + uInt16 evaluate() const override { return Debugger::debugger().dpeek(myLHS->evaluate()); } }; diff --git a/src/debugger/RiotDebug.hxx b/src/debugger/RiotDebug.hxx index 537f99ed1..e5287fd0a 100644 --- a/src/debugger/RiotDebug.hxx +++ b/src/debugger/RiotDebug.hxx @@ -49,11 +49,11 @@ class RiotDebug : public DebuggerSystem public: RiotDebug(Debugger& dbg, Console& console); - const DebuggerState& getState(); - const DebuggerState& getOldState() { return myOldState; } + const DebuggerState& getState() override; + const DebuggerState& getOldState() override { return myOldState; } - void saveOldState(); - string toString(); + void saveOldState() override; + string toString() override; /* Port A and B registers */ uInt8 swcha(int newVal = -1); diff --git a/src/debugger/TIADebug.hxx b/src/debugger/TIADebug.hxx index ecbc34c50..74ab5743d 100644 --- a/src/debugger/TIADebug.hxx +++ b/src/debugger/TIADebug.hxx @@ -54,11 +54,11 @@ class TIADebug : public DebuggerSystem TIADebug(Debugger& dbg, Console& console); TIA& tia() const { return myTIA; } - const DebuggerState& getState(); - const DebuggerState& getOldState() { return myOldState; } + const DebuggerState& getState() override; + const DebuggerState& getOldState() override { return myOldState; } - void saveOldState(); - string toString(); + void saveOldState() override; + string toString() override; // TIA byte (or part of a byte) registers uInt8 nusiz0(int newVal = -1); diff --git a/src/debugger/gui/AtariVoxWidget.hxx b/src/debugger/gui/AtariVoxWidget.hxx index c30c620d2..d2a87719b 100644 --- a/src/debugger/gui/AtariVoxWidget.hxx +++ b/src/debugger/gui/AtariVoxWidget.hxx @@ -32,14 +32,14 @@ class AtariVoxWidget : public ControllerWidget Controller& controller); virtual ~AtariVoxWidget() { } - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: ButtonWidget* myEEPROMErase; enum { kEEPROMErase = 'eeER' }; private: + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported AtariVoxWidget() = delete; AtariVoxWidget(const AtariVoxWidget&) = delete; diff --git a/src/debugger/gui/AudioWidget.hxx b/src/debugger/gui/AudioWidget.hxx index 4ab8fa2e5..92a62fdc5 100644 --- a/src/debugger/gui/AudioWidget.hxx +++ b/src/debugger/gui/AudioWidget.hxx @@ -43,15 +43,14 @@ class AudioWidget : public Widget, public CommandSender kAUDVID }; - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void loadConfig(); - - private: DataGridWidget* myAudF; DataGridWidget* myAudC; DataGridWidget* myAudV; private: + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void loadConfig() override; + // Following constructors and assignment operators not supported AudioWidget() = delete; AudioWidget(const AudioWidget&) = delete; diff --git a/src/debugger/gui/BoosterWidget.hxx b/src/debugger/gui/BoosterWidget.hxx index d6770515c..19ca04fef 100644 --- a/src/debugger/gui/BoosterWidget.hxx +++ b/src/debugger/gui/BoosterWidget.hxx @@ -31,9 +31,6 @@ class BoosterWidget : public ControllerWidget Controller& controller); virtual ~BoosterWidget(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: enum { kJUp = 0, kJDown, kJLeft, kJRight, kJFire, kJBooster, kJTrigger }; @@ -41,6 +38,9 @@ class BoosterWidget : public ControllerWidget static Controller::DigitalPin ourPinNo[5]; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported BoosterWidget() = delete; BoosterWidget(const BoosterWidget&) = delete; diff --git a/src/debugger/gui/Cart0840Widget.hxx b/src/debugger/gui/Cart0840Widget.hxx index a01b72aa4..efa435522 100644 --- a/src/debugger/gui/Cart0840Widget.hxx +++ b/src/debugger/gui/Cart0840Widget.hxx @@ -34,11 +34,6 @@ class Cartridge0840Widget : public CartDebugWidget Cartridge0840& cart); virtual ~Cartridge0840Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: Cartridge0840& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class Cartridge0840Widget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported Cartridge0840Widget() = delete; Cartridge0840Widget(const Cartridge0840Widget&) = delete; diff --git a/src/debugger/gui/Cart2KWidget.hxx b/src/debugger/gui/Cart2KWidget.hxx index b92277190..9bf4a3dfc 100644 --- a/src/debugger/gui/Cart2KWidget.hxx +++ b/src/debugger/gui/Cart2KWidget.hxx @@ -32,11 +32,11 @@ class Cartridge2KWidget : public CartDebugWidget Cartridge2K& cart); virtual ~Cartridge2KWidget() { } - // No implementation for non-bankswitched ROMs - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id) { } - private: + // No implementation for non-bankswitched ROMs + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override { } + // Following constructors and assignment operators not supported Cartridge2KWidget() = delete; Cartridge2KWidget(const Cartridge2KWidget&) = delete; diff --git a/src/debugger/gui/Cart3EWidget.hxx b/src/debugger/gui/Cart3EWidget.hxx index 7b7e1042d..14bbb1f34 100644 --- a/src/debugger/gui/Cart3EWidget.hxx +++ b/src/debugger/gui/Cart3EWidget.hxx @@ -34,22 +34,6 @@ class Cartridge3EWidget : public CartDebugWidget Cartridge3E& cart); virtual ~Cartridge3EWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - // end of functions for Cartridge RAM tab - private: Cartridge3E& myCart; const uInt32 myNumRomBanks; @@ -67,6 +51,22 @@ class Cartridge3EWidget : public CartDebugWidget }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported Cartridge3EWidget() = delete; Cartridge3EWidget(const Cartridge3EWidget&) = delete; diff --git a/src/debugger/gui/Cart3FWidget.hxx b/src/debugger/gui/Cart3FWidget.hxx index 5974a2a0a..f0d193607 100644 --- a/src/debugger/gui/Cart3FWidget.hxx +++ b/src/debugger/gui/Cart3FWidget.hxx @@ -34,11 +34,6 @@ class Cartridge3FWidget : public CartDebugWidget Cartridge3F& cart); virtual ~Cartridge3FWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: Cartridge3F& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class Cartridge3FWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported Cartridge3FWidget() = delete; Cartridge3FWidget(const Cartridge3FWidget&) = delete; diff --git a/src/debugger/gui/Cart4A50Widget.hxx b/src/debugger/gui/Cart4A50Widget.hxx index a1fedb397..db0c3bb4b 100644 --- a/src/debugger/gui/Cart4A50Widget.hxx +++ b/src/debugger/gui/Cart4A50Widget.hxx @@ -34,11 +34,6 @@ class Cartridge4A50Widget : public CartDebugWidget Cartridge4A50& cart); virtual ~Cartridge4A50Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: Cartridge4A50& myCart; PopUpWidget *myROMLower, *myRAMLower; @@ -55,6 +50,11 @@ class Cartridge4A50Widget : public CartDebugWidget }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported Cartridge4A50Widget() = delete; Cartridge4A50Widget(const Cartridge4A50Widget&) = delete; diff --git a/src/debugger/gui/Cart4KSCWidget.hxx b/src/debugger/gui/Cart4KSCWidget.hxx index 5479cd2ae..1eb011a87 100644 --- a/src/debugger/gui/Cart4KSCWidget.hxx +++ b/src/debugger/gui/Cart4KSCWidget.hxx @@ -32,23 +32,6 @@ class Cartridge4KSCWidget : public CartDebugWidget Cartridge4KSC& cart); virtual ~Cartridge4KSCWidget() { } - // No implementation for non-bankswitched ROMs - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id) { } - - void saveOldState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: Cartridge4KSC& myCart; struct CartState { @@ -57,6 +40,23 @@ class Cartridge4KSCWidget : public CartDebugWidget CartState myOldState; private: + // No implementation for non-bankswitched ROMs + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override { } + + void saveOldState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported Cartridge4KSCWidget() = delete; Cartridge4KSCWidget(const Cartridge4KSCWidget&) = delete; diff --git a/src/debugger/gui/Cart4KWidget.hxx b/src/debugger/gui/Cart4KWidget.hxx index 19a89a6f5..7ac4d896f 100644 --- a/src/debugger/gui/Cart4KWidget.hxx +++ b/src/debugger/gui/Cart4KWidget.hxx @@ -32,11 +32,11 @@ class Cartridge4KWidget : public CartDebugWidget Cartridge4K& cart); virtual ~Cartridge4KWidget() { } - // No implementation for non-bankswitched ROMs - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id) { } - private: + // No implementation for non-bankswitched ROMs + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override { } + // Following constructors and assignment operators not supported Cartridge4KWidget() = delete; Cartridge4KWidget(const Cartridge4KWidget&) = delete; diff --git a/src/debugger/gui/CartARWidget.hxx b/src/debugger/gui/CartARWidget.hxx index 18d53bcd7..137aca3cd 100644 --- a/src/debugger/gui/CartARWidget.hxx +++ b/src/debugger/gui/CartARWidget.hxx @@ -34,11 +34,6 @@ class CartridgeARWidget : public CartDebugWidget CartridgeAR& cart); virtual ~CartridgeARWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeAR& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeARWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeARWidget() = delete; CartridgeARWidget(const CartridgeARWidget&) = delete; diff --git a/src/debugger/gui/CartBFSCWidget.hxx b/src/debugger/gui/CartBFSCWidget.hxx index 8143d2d7d..c1570778b 100644 --- a/src/debugger/gui/CartBFSCWidget.hxx +++ b/src/debugger/gui/CartBFSCWidget.hxx @@ -34,23 +34,6 @@ class CartridgeBFSCWidget : public CartDebugWidget CartridgeBFSC& cart); virtual ~CartridgeBFSCWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeBFSC& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeBFSCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeBFSCWidget() = delete; CartridgeBFSCWidget(const CartridgeBFSCWidget&) = delete; diff --git a/src/debugger/gui/CartBFWidget.hxx b/src/debugger/gui/CartBFWidget.hxx index ed6c0cb4d..23b5b1706 100644 --- a/src/debugger/gui/CartBFWidget.hxx +++ b/src/debugger/gui/CartBFWidget.hxx @@ -34,11 +34,6 @@ class CartridgeBFWidget : public CartDebugWidget CartridgeBF& cart); virtual ~CartridgeBFWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeBF& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeBFWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeBFWidget() = delete; CartridgeBFWidget(const CartridgeBFWidget&) = delete; diff --git a/src/debugger/gui/CartCMWidget.hxx b/src/debugger/gui/CartCMWidget.hxx index efaa6877f..399bc45ba 100644 --- a/src/debugger/gui/CartCMWidget.hxx +++ b/src/debugger/gui/CartCMWidget.hxx @@ -38,24 +38,6 @@ class CartridgeCMWidget : public CartDebugWidget CartridgeCM& cart); virtual ~CartridgeCMWidget() { } - void saveOldState(); - - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: struct CartState { uInt8 swcha; @@ -63,7 +45,6 @@ class CartridgeCMWidget : public CartDebugWidget ByteArray internalram; }; - private: CartridgeCM& myCart; PopUpWidget* myBank; @@ -79,6 +60,24 @@ class CartridgeCMWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeCMWidget() = delete; CartridgeCMWidget(const CartridgeCMWidget&) = delete; diff --git a/src/debugger/gui/CartCTYWidget.hxx b/src/debugger/gui/CartCTYWidget.hxx index adc4564a5..9c6fcd617 100644 --- a/src/debugger/gui/CartCTYWidget.hxx +++ b/src/debugger/gui/CartCTYWidget.hxx @@ -34,23 +34,6 @@ class CartridgeCTYWidget : public CartDebugWidget CartridgeCTY& cart); virtual ~CartridgeCTYWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeCTY& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeCTYWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeCTYWidget() = delete; CartridgeCTYWidget(const CartridgeCTYWidget&) = delete; diff --git a/src/debugger/gui/CartCVWidget.hxx b/src/debugger/gui/CartCVWidget.hxx index 4a3482ad0..0b97e90dc 100644 --- a/src/debugger/gui/CartCVWidget.hxx +++ b/src/debugger/gui/CartCVWidget.hxx @@ -32,23 +32,6 @@ class CartridgeCVWidget : public CartDebugWidget CartridgeCV& cart); virtual ~CartridgeCVWidget() { } - // No implementation for non-bankswitched ROMs - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id) { } - - void saveOldState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeCV& myCart; struct CartState { @@ -57,6 +40,23 @@ class CartridgeCVWidget : public CartDebugWidget CartState myOldState; private: + // No implementation for non-bankswitched ROMs + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override { } + + void saveOldState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeCVWidget() = delete; CartridgeCVWidget(const CartridgeCVWidget&) = delete; diff --git a/src/debugger/gui/CartDASHWidget.hxx b/src/debugger/gui/CartDASHWidget.hxx index 9f4c1dd09..311b74bbd 100644 --- a/src/debugger/gui/CartDASHWidget.hxx +++ b/src/debugger/gui/CartDASHWidget.hxx @@ -35,22 +35,6 @@ class CartridgeDASHWidget : public CartDebugWidget CartridgeDASH& cart); virtual ~CartridgeDASHWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - // end of functions for Cartridge RAM tab - private: void updateUIState(); @@ -76,6 +60,22 @@ class CartridgeDASHWidget : public CartDebugWidget static const BankID bankEnum[4]; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeDASHWidget() = delete; CartridgeDASHWidget(const CartridgeDASHWidget&) = delete; diff --git a/src/debugger/gui/CartDFSCWidget.hxx b/src/debugger/gui/CartDFSCWidget.hxx index 2abdb6d44..9ede4efbd 100644 --- a/src/debugger/gui/CartDFSCWidget.hxx +++ b/src/debugger/gui/CartDFSCWidget.hxx @@ -34,23 +34,6 @@ class CartridgeDFSCWidget : public CartDebugWidget CartridgeDFSC& cart); virtual ~CartridgeDFSCWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeDFSC& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeDFSCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeDFSCWidget() = delete; CartridgeDFSCWidget(const CartridgeDFSCWidget&) = delete; diff --git a/src/debugger/gui/CartDFWidget.hxx b/src/debugger/gui/CartDFWidget.hxx index ebe091829..b5d487570 100644 --- a/src/debugger/gui/CartDFWidget.hxx +++ b/src/debugger/gui/CartDFWidget.hxx @@ -34,11 +34,6 @@ class CartridgeDFWidget : public CartDebugWidget CartridgeDF& cart); virtual ~CartridgeDFWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeDF& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeDFWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeDFWidget() = delete; CartridgeDFWidget(const CartridgeDFWidget&) = delete; diff --git a/src/debugger/gui/CartDPCPlusWidget.hxx b/src/debugger/gui/CartDPCPlusWidget.hxx index a039337a9..39bbb9fae 100644 --- a/src/debugger/gui/CartDPCPlusWidget.hxx +++ b/src/debugger/gui/CartDPCPlusWidget.hxx @@ -36,23 +36,6 @@ class CartridgeDPCPlusWidget : public CartDebugWidget CartridgeDPCPlus& cart); virtual ~CartridgeDPCPlusWidget() { } - void saveOldState(); - - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - // end of functions for Cartridge RAM tab - private: struct CartState { ByteArray tops; @@ -68,7 +51,6 @@ class CartridgeDPCPlusWidget : public CartDebugWidget ByteArray internalram; }; - private: CartridgeDPCPlus& myCart; PopUpWidget* myBank; @@ -90,6 +72,23 @@ class CartridgeDPCPlusWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeDPCPlusWidget() = delete; CartridgeDPCPlusWidget(const CartridgeDPCPlusWidget&) = delete; diff --git a/src/debugger/gui/CartDPCWidget.hxx b/src/debugger/gui/CartDPCWidget.hxx index 71c872d9e..069b94576 100644 --- a/src/debugger/gui/CartDPCWidget.hxx +++ b/src/debugger/gui/CartDPCWidget.hxx @@ -35,23 +35,6 @@ class CartridgeDPCWidget : public CartDebugWidget CartridgeDPC& cart); virtual ~CartridgeDPCWidget() { } - void saveOldState(); - - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - // end of functions for Cartridge RAM tab - private: struct CartState { ByteArray tops; @@ -63,7 +46,6 @@ class CartridgeDPCWidget : public CartDebugWidget ByteArray internalram; }; - private: CartridgeDPC& myCart; PopUpWidget* myBank; @@ -79,6 +61,23 @@ class CartridgeDPCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeDPCWidget() = delete; CartridgeDPCWidget(const CartridgeDPCWidget&) = delete; diff --git a/src/debugger/gui/CartDebugWidget.hxx b/src/debugger/gui/CartDebugWidget.hxx index 8186083f3..0d1e49d9e 100644 --- a/src/debugger/gui/CartDebugWidget.hxx +++ b/src/debugger/gui/CartDebugWidget.hxx @@ -108,8 +108,8 @@ class CartDebugWidget : public Widget, public CommandSender // implement change tracking; most carts probably won't do anything here virtual void saveOldState() { } - virtual void loadConfig() { myDesc->setSelected(0); } - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) { }; + virtual void loadConfig() override { myDesc->setSelected(0); } + virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override { }; // Query internal state of the cart (usually just bankswitching info) virtual string bankState() { return "0 (non-bankswitched)"; } diff --git a/src/debugger/gui/CartE0Widget.hxx b/src/debugger/gui/CartE0Widget.hxx index 74d22e3a9..a5e186983 100644 --- a/src/debugger/gui/CartE0Widget.hxx +++ b/src/debugger/gui/CartE0Widget.hxx @@ -34,11 +34,6 @@ class CartridgeE0Widget : public CartDebugWidget CartridgeE0& cart); virtual ~CartridgeE0Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeE0& myCart; PopUpWidget *mySlice0, *mySlice1, *mySlice2; @@ -50,6 +45,11 @@ class CartridgeE0Widget : public CartDebugWidget }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeE0Widget() = delete; CartridgeE0Widget(const CartridgeE0Widget&) = delete; diff --git a/src/debugger/gui/CartE7Widget.hxx b/src/debugger/gui/CartE7Widget.hxx index 728cc1175..6cb0c168f 100644 --- a/src/debugger/gui/CartE7Widget.hxx +++ b/src/debugger/gui/CartE7Widget.hxx @@ -34,22 +34,6 @@ class CartridgeE7Widget : public CartDebugWidget CartridgeE7& cart); virtual ~CartridgeE7Widget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeE7& myCart; PopUpWidget *myLower2K, *myUpper256B; @@ -65,6 +49,22 @@ class CartridgeE7Widget : public CartDebugWidget }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeE7Widget() = delete; CartridgeE7Widget(const CartridgeE7Widget&) = delete; diff --git a/src/debugger/gui/CartEFSCWidget.hxx b/src/debugger/gui/CartEFSCWidget.hxx index 3ae95a7a9..d8d44f62b 100644 --- a/src/debugger/gui/CartEFSCWidget.hxx +++ b/src/debugger/gui/CartEFSCWidget.hxx @@ -34,23 +34,6 @@ class CartridgeEFSCWidget : public CartDebugWidget CartridgeEFSC& cart); virtual ~CartridgeEFSCWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeEFSC& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeEFSCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeEFSCWidget() = delete; CartridgeEFSCWidget(const CartridgeEFSCWidget&) = delete; diff --git a/src/debugger/gui/CartEFWidget.hxx b/src/debugger/gui/CartEFWidget.hxx index 19744c94b..a5a481c0c 100644 --- a/src/debugger/gui/CartEFWidget.hxx +++ b/src/debugger/gui/CartEFWidget.hxx @@ -34,11 +34,6 @@ class CartridgeEFWidget : public CartDebugWidget CartridgeEF& cart); virtual ~CartridgeEFWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeEF& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeEFWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeEFWidget() = delete; CartridgeEFWidget(const CartridgeEFWidget&) = delete; diff --git a/src/debugger/gui/CartF0Widget.hxx b/src/debugger/gui/CartF0Widget.hxx index 521ab6db9..c53148ba8 100644 --- a/src/debugger/gui/CartF0Widget.hxx +++ b/src/debugger/gui/CartF0Widget.hxx @@ -34,11 +34,6 @@ class CartridgeF0Widget : public CartDebugWidget CartridgeF0& cart); virtual ~CartridgeF0Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeF0& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeF0Widget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeF0Widget() = delete; CartridgeF0Widget(const CartridgeF0Widget&) = delete; diff --git a/src/debugger/gui/CartF4SCWidget.hxx b/src/debugger/gui/CartF4SCWidget.hxx index c6758465a..224568577 100644 --- a/src/debugger/gui/CartF4SCWidget.hxx +++ b/src/debugger/gui/CartF4SCWidget.hxx @@ -34,23 +34,6 @@ class CartridgeF4SCWidget : public CartDebugWidget CartridgeF4SC& cart); virtual ~CartridgeF4SCWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeF4SC& myCart; PopUpWidget* myBank; @@ -64,6 +47,23 @@ class CartridgeF4SCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeF4SCWidget() = delete; CartridgeF4SCWidget(const CartridgeF4SCWidget&) = delete; diff --git a/src/debugger/gui/CartF4Widget.hxx b/src/debugger/gui/CartF4Widget.hxx index b3efb1482..3e1cd3903 100644 --- a/src/debugger/gui/CartF4Widget.hxx +++ b/src/debugger/gui/CartF4Widget.hxx @@ -34,11 +34,6 @@ class CartridgeF4Widget : public CartDebugWidget CartridgeF4& cart); virtual ~CartridgeF4Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeF4& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeF4Widget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeF4Widget() = delete; CartridgeF4Widget(const CartridgeF4Widget&) = delete; diff --git a/src/debugger/gui/CartF6SCWidget.hxx b/src/debugger/gui/CartF6SCWidget.hxx index b3c03838e..ed06ecb96 100644 --- a/src/debugger/gui/CartF6SCWidget.hxx +++ b/src/debugger/gui/CartF6SCWidget.hxx @@ -34,23 +34,6 @@ class CartridgeF6SCWidget : public CartDebugWidget CartridgeF6SC& cart); virtual ~CartridgeF6SCWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: struct CartState { ByteArray internalram; @@ -62,6 +45,23 @@ class CartridgeF6SCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeF6SCWidget() = delete; CartridgeF6SCWidget(const CartridgeF6SCWidget&) = delete; diff --git a/src/debugger/gui/CartF6Widget.hxx b/src/debugger/gui/CartF6Widget.hxx index 7b0b19fba..64b92b780 100644 --- a/src/debugger/gui/CartF6Widget.hxx +++ b/src/debugger/gui/CartF6Widget.hxx @@ -34,11 +34,6 @@ class CartridgeF6Widget : public CartDebugWidget CartridgeF6& cart); virtual ~CartridgeF6Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeF6& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeF6Widget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeF6Widget() = delete; CartridgeF6Widget(const CartridgeF6Widget&) = delete; diff --git a/src/debugger/gui/CartF8SCWidget.hxx b/src/debugger/gui/CartF8SCWidget.hxx index 33ad48f01..d6002ca6b 100644 --- a/src/debugger/gui/CartF8SCWidget.hxx +++ b/src/debugger/gui/CartF8SCWidget.hxx @@ -34,23 +34,6 @@ class CartridgeF8SCWidget : public CartDebugWidget CartridgeF8SC& cart); virtual ~CartridgeF8SCWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeF8SC& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeF8SCWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeF8SCWidget() = delete; CartridgeF8SCWidget(const CartridgeF8SCWidget&) = delete; diff --git a/src/debugger/gui/CartF8Widget.hxx b/src/debugger/gui/CartF8Widget.hxx index bc383b03e..03bb42d4f 100644 --- a/src/debugger/gui/CartF8Widget.hxx +++ b/src/debugger/gui/CartF8Widget.hxx @@ -34,11 +34,6 @@ class CartridgeF8Widget : public CartDebugWidget CartridgeF8& cart); virtual ~CartridgeF8Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeF8& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeF8Widget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeF8Widget() = delete; CartridgeF8Widget(const CartridgeF8Widget&) = delete; diff --git a/src/debugger/gui/CartFA2Widget.hxx b/src/debugger/gui/CartFA2Widget.hxx index 6acad3e4a..91179bafa 100644 --- a/src/debugger/gui/CartFA2Widget.hxx +++ b/src/debugger/gui/CartFA2Widget.hxx @@ -35,23 +35,6 @@ class CartridgeFA2Widget : public CartDebugWidget CartridgeFA2& cart); virtual ~CartridgeFA2Widget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeFA2& myCart; PopUpWidget* myBank; @@ -70,6 +53,23 @@ class CartridgeFA2Widget : public CartDebugWidget }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeFA2Widget() = delete; CartridgeFA2Widget(const CartridgeFA2Widget&) = delete; diff --git a/src/debugger/gui/CartFAWidget.hxx b/src/debugger/gui/CartFAWidget.hxx index d4c0de09b..197de69cb 100644 --- a/src/debugger/gui/CartFAWidget.hxx +++ b/src/debugger/gui/CartFAWidget.hxx @@ -34,23 +34,6 @@ class CartridgeFAWidget : public CartDebugWidget CartridgeFA& cart); virtual ~CartridgeFAWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeFA& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeFAWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeFAWidget() = delete; CartridgeFAWidget(const CartridgeFAWidget&) = delete; diff --git a/src/debugger/gui/CartFEWidget.hxx b/src/debugger/gui/CartFEWidget.hxx index 90159f6c0..789408284 100644 --- a/src/debugger/gui/CartFEWidget.hxx +++ b/src/debugger/gui/CartFEWidget.hxx @@ -32,16 +32,16 @@ class CartridgeFEWidget : public CartDebugWidget CartridgeFE& cart); virtual ~CartridgeFEWidget() { } - // No implementation for non-bankswitched ROMs - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id) { } - - string bankState(); - private: CartridgeFE& myCart; private: + // No implementation for non-bankswitched ROMs + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override { } + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeFEWidget() = delete; CartridgeFEWidget(const CartridgeFEWidget&) = delete; diff --git a/src/debugger/gui/CartMCWidget.hxx b/src/debugger/gui/CartMCWidget.hxx index b9f977c06..17cad5bff 100644 --- a/src/debugger/gui/CartMCWidget.hxx +++ b/src/debugger/gui/CartMCWidget.hxx @@ -34,11 +34,6 @@ class CartridgeMCWidget : public CartDebugWidget CartridgeMC& cart); virtual ~CartridgeMCWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeMC& myCart; PopUpWidget *mySlice0, *mySlice1, *mySlice2, *mySlice3; @@ -51,6 +46,11 @@ class CartridgeMCWidget : public CartDebugWidget }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeMCWidget() = delete; CartridgeMCWidget(const CartridgeMCWidget&) = delete; diff --git a/src/debugger/gui/CartMDMWidget.hxx b/src/debugger/gui/CartMDMWidget.hxx index 88db1144a..2e7cb381b 100644 --- a/src/debugger/gui/CartMDMWidget.hxx +++ b/src/debugger/gui/CartMDMWidget.hxx @@ -35,11 +35,6 @@ class CartridgeMDMWidget : public CartDebugWidget CartridgeMDM& cart); virtual ~CartridgeMDMWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeMDM& myCart; PopUpWidget* myBank; @@ -48,6 +43,11 @@ class CartridgeMDMWidget : public CartDebugWidget enum { kBankChanged = 'bkCH', kBankDisabled = 'bkDI' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeMDMWidget() = delete; CartridgeMDMWidget(const CartridgeMDMWidget&) = delete; diff --git a/src/debugger/gui/CartRamWidget.hxx b/src/debugger/gui/CartRamWidget.hxx index de4585324..5613dba5e 100644 --- a/src/debugger/gui/CartRamWidget.hxx +++ b/src/debugger/gui/CartRamWidget.hxx @@ -47,8 +47,8 @@ class CartRamWidget : public Widget, public CommandSender virtual ~CartRamWidget() { }; private: - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void fillGrid(bool updateOld); void showInputBox(int cmd); diff --git a/src/debugger/gui/CartSBWidget.hxx b/src/debugger/gui/CartSBWidget.hxx index 9982a9980..79c5b9e3b 100644 --- a/src/debugger/gui/CartSBWidget.hxx +++ b/src/debugger/gui/CartSBWidget.hxx @@ -34,11 +34,6 @@ class CartridgeSBWidget : public CartDebugWidget CartridgeSB& cart); virtual ~CartridgeSBWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeSB& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeSBWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeSBWidget() = delete; CartridgeSBWidget(const CartridgeSBWidget&) = delete; diff --git a/src/debugger/gui/CartUAWidget.hxx b/src/debugger/gui/CartUAWidget.hxx index 7b00d9f97..7a0390ed3 100644 --- a/src/debugger/gui/CartUAWidget.hxx +++ b/src/debugger/gui/CartUAWidget.hxx @@ -34,11 +34,6 @@ class CartridgeUAWidget : public CartDebugWidget CartridgeUA& cart); virtual ~CartridgeUAWidget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeUA& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeUAWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeUAWidget() = delete; CartridgeUAWidget(const CartridgeUAWidget&) = delete; diff --git a/src/debugger/gui/CartWDWidget.hxx b/src/debugger/gui/CartWDWidget.hxx index 8c0aeaf49..4ca2dae79 100644 --- a/src/debugger/gui/CartWDWidget.hxx +++ b/src/debugger/gui/CartWDWidget.hxx @@ -34,23 +34,6 @@ class CartridgeWDWidget : public CartDebugWidget CartridgeWD& cart); virtual ~CartridgeWDWidget() { } - void saveOldState(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - - // start of functions for Cartridge RAM tab - uInt32 internalRamSize(); - uInt32 internalRamRPort(int start); - string internalRamDescription(); - const ByteArray& internalRamOld(int start, int count); - const ByteArray& internalRamCurrent(int start, int count); - void internalRamSetValue(int addr, uInt8 value); - uInt8 internalRamGetValue(int addr); - string internalRamLabel(int addr); - // end of functions for Cartridge RAM tab - private: CartridgeWD& myCart; PopUpWidget* myBank; @@ -63,6 +46,23 @@ class CartridgeWDWidget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void saveOldState() override; + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + + // start of functions for Cartridge RAM tab + uInt32 internalRamSize() override; + uInt32 internalRamRPort(int start) override; + string internalRamDescription() override; + const ByteArray& internalRamOld(int start, int count) override; + const ByteArray& internalRamCurrent(int start, int count) override; + void internalRamSetValue(int addr, uInt8 value) override; + uInt8 internalRamGetValue(int addr) override; + string internalRamLabel(int addr) override; + // end of functions for Cartridge RAM tab + // Following constructors and assignment operators not supported CartridgeWDWidget() = delete; CartridgeWDWidget(const CartridgeWDWidget&) = delete; diff --git a/src/debugger/gui/CartX07Widget.hxx b/src/debugger/gui/CartX07Widget.hxx index 321b159ac..01da1a09b 100644 --- a/src/debugger/gui/CartX07Widget.hxx +++ b/src/debugger/gui/CartX07Widget.hxx @@ -34,11 +34,6 @@ class CartridgeX07Widget : public CartDebugWidget CartridgeX07& cart); virtual ~CartridgeX07Widget() { } - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - string bankState(); - private: CartridgeX07& myCart; PopUpWidget* myBank; @@ -46,6 +41,11 @@ class CartridgeX07Widget : public CartDebugWidget enum { kBankChanged = 'bkCH' }; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + string bankState() override; + // Following constructors and assignment operators not supported CartridgeX07Widget() = delete; CartridgeX07Widget(const CartridgeX07Widget&) = delete; diff --git a/src/debugger/gui/ColorWidget.hxx b/src/debugger/gui/ColorWidget.hxx index ac301096f..dec8d3705 100644 --- a/src/debugger/gui/ColorWidget.hxx +++ b/src/debugger/gui/ColorWidget.hxx @@ -43,10 +43,10 @@ class ColorWidget : public Widget, public CommandSender ~ColorWidget(); void setColor(int color); - int getColor() const { return _color; } + int getColor() const { return _color; } protected: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; protected: int _color; diff --git a/src/debugger/gui/ControllerWidget.hxx b/src/debugger/gui/ControllerWidget.hxx index c41ddf753..a7f07ec1b 100644 --- a/src/debugger/gui/ControllerWidget.hxx +++ b/src/debugger/gui/ControllerWidget.hxx @@ -41,13 +41,14 @@ class ControllerWidget : public Widget, public CommandSender virtual ~ControllerWidget() { }; - virtual void loadConfig() { }; - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) { }; + virtual void loadConfig() override { }; protected: Controller& myController; private: + virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override { }; + // Following constructors and assignment operators not supported ControllerWidget() = delete; ControllerWidget(const ControllerWidget&) = delete; diff --git a/src/debugger/gui/CpuWidget.hxx b/src/debugger/gui/CpuWidget.hxx index 4763d1941..0c66eb4ca 100644 --- a/src/debugger/gui/CpuWidget.hxx +++ b/src/debugger/gui/CpuWidget.hxx @@ -38,10 +38,10 @@ class CpuWidget : public Widget, public CommandSender virtual ~CpuWidget(); void setOpsWidget(DataGridOpsWidget* w); - void loadConfig(); + void loadConfig() override; private: - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: // ID's for the various widgets diff --git a/src/debugger/gui/DataGridWidget.hxx b/src/debugger/gui/DataGridWidget.hxx index 8190e9e13..e1392b5a0 100644 --- a/src/debugger/gui/DataGridWidget.hxx +++ b/src/debugger/gui/DataGridWidget.hxx @@ -71,36 +71,36 @@ class DataGridWidget : public EditableWidget void setRange(int lower, int upper); - bool wantsFocus() { return true; } + bool wantsFocus() override { return true; } // Account for the extra width of embedded scrollbar - int getWidth() const; + int getWidth() const override; int colWidth() { return _colWidth; } void setOpsWidget(DataGridOpsWidget* w) { _opsWidget = w; } protected: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; int findItem(int x, int y); - void startEditMode(); - void endEditMode(); - void abortEditMode(); + void startEditMode() override; + void endEditMode() override; + void abortEditMode() override; - GUI::Rect getEditRect() const; + GUI::Rect getEditRect() const override; - void receivedFocusWidget(); - void lostFocusWidget(); + void receivedFocusWidget() override; + void lostFocusWidget() override; - void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseUp(int x, int y, int button, int clickCount); - void handleMouseWheel(int x, int y, int direction); - bool handleText(char text); - bool handleKeyDown(StellaKey key, StellaMod mod); - bool handleKeyUp(StellaKey key, StellaMod mod); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + bool handleText(char text) override; + bool handleKeyDown(StellaKey key, StellaMod mod) override; + bool handleKeyUp(StellaKey key, StellaMod mod) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; protected: int _rows; diff --git a/src/debugger/gui/DebuggerDialog.hxx b/src/debugger/gui/DebuggerDialog.hxx index 8eb3be1c6..562a42827 100644 --- a/src/debugger/gui/DebuggerDialog.hxx +++ b/src/debugger/gui/DebuggerDialog.hxx @@ -68,9 +68,9 @@ class DebuggerDialog : public Dialog void showFatalMessage(const string& msg); private: - void loadConfig(); - void handleKeyDown(StellaKey key, StellaMod mod); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void loadConfig() override; + void handleKeyDown(StellaKey key, StellaMod mod) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void doStep(); void doTrace(); diff --git a/src/debugger/gui/DrivingWidget.hxx b/src/debugger/gui/DrivingWidget.hxx index 4b71b1aaa..8e275c19a 100644 --- a/src/debugger/gui/DrivingWidget.hxx +++ b/src/debugger/gui/DrivingWidget.hxx @@ -35,9 +35,6 @@ class DrivingWidget : public ControllerWidget Controller& controller); virtual ~DrivingWidget(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: enum { kGreyUpCmd = 'DWup', @@ -53,6 +50,9 @@ class DrivingWidget : public ControllerWidget static uInt8 ourGreyTable[4]; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported DrivingWidget() = delete; DrivingWidget(const DrivingWidget&) = delete; diff --git a/src/debugger/gui/GenesisWidget.hxx b/src/debugger/gui/GenesisWidget.hxx index 3fd04aaff..12231069d 100644 --- a/src/debugger/gui/GenesisWidget.hxx +++ b/src/debugger/gui/GenesisWidget.hxx @@ -31,9 +31,6 @@ class GenesisWidget : public ControllerWidget Controller& controller); virtual ~GenesisWidget(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: enum { kJUp = 0, kJDown, kJLeft, kJRight, kJBbtn, kJCbtn }; @@ -41,6 +38,9 @@ class GenesisWidget : public ControllerWidget static Controller::DigitalPin ourPinNo[5]; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported GenesisWidget() = delete; GenesisWidget(const GenesisWidget&) = delete; diff --git a/src/debugger/gui/JoystickWidget.hxx b/src/debugger/gui/JoystickWidget.hxx index ae6f41ba1..1f19f9acf 100644 --- a/src/debugger/gui/JoystickWidget.hxx +++ b/src/debugger/gui/JoystickWidget.hxx @@ -31,9 +31,6 @@ class JoystickWidget : public ControllerWidget Controller& controller); virtual ~JoystickWidget(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: enum { kJUp = 0, kJDown, kJLeft, kJRight, kJFire }; @@ -41,6 +38,9 @@ class JoystickWidget : public ControllerWidget static Controller::DigitalPin ourPinNo[5]; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported JoystickWidget() = delete; JoystickWidget(const JoystickWidget&) = delete; diff --git a/src/debugger/gui/KeyboardWidget.hxx b/src/debugger/gui/KeyboardWidget.hxx index 2bace4eff..a7194592e 100644 --- a/src/debugger/gui/KeyboardWidget.hxx +++ b/src/debugger/gui/KeyboardWidget.hxx @@ -31,9 +31,6 @@ class KeyboardWidget : public ControllerWidget Controller& controller); virtual ~KeyboardWidget(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: CheckboxWidget* myBox[12]; Event::Type* myEvent; @@ -41,6 +38,9 @@ class KeyboardWidget : public ControllerWidget static Event::Type ourLeftEvents[12], ourRightEvents[12]; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported KeyboardWidget() = delete; KeyboardWidget(const KeyboardWidget&) = delete; diff --git a/src/debugger/gui/PaddleWidget.hxx b/src/debugger/gui/PaddleWidget.hxx index 7ca06eb3c..740ed37ab 100644 --- a/src/debugger/gui/PaddleWidget.hxx +++ b/src/debugger/gui/PaddleWidget.hxx @@ -31,9 +31,6 @@ class PaddleWidget : public ControllerWidget Controller& controller); virtual ~PaddleWidget(); - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: enum { kP0Changed = 'P0ch', kP1Changed = 'P1ch', kP0Fire = 'P0fr', kP1Fire = 'P1fr' }; @@ -42,6 +39,9 @@ class PaddleWidget : public ControllerWidget CheckboxWidget *myP0Fire, *myP1Fire; private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported PaddleWidget() = delete; PaddleWidget(const PaddleWidget&) = delete; diff --git a/src/debugger/gui/PromptWidget.hxx b/src/debugger/gui/PromptWidget.hxx index 294946678..023bbf169 100644 --- a/src/debugger/gui/PromptWidget.hxx +++ b/src/debugger/gui/PromptWidget.hxx @@ -48,7 +48,7 @@ class PromptWidget : public Widget, public CommandSender protected: int& buffer(int idx) { return _buffer[idx % kBufferSize]; } - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; void drawCaret(); void putcharIntern(int c); // void insertIntoPrompt(const char *str); @@ -66,18 +66,18 @@ class PromptWidget : public Widget, public CommandSender void addToHistory(const char *str); void historyScroll(int direction); - void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseWheel(int x, int y, int direction); - bool handleText(char text); - bool handleKeyDown(StellaKey key, StellaMod mod); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + bool handleText(char text) override; + bool handleKeyDown(StellaKey key, StellaMod mod) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; // Account for the extra width of embedded scrollbar - virtual int getWidth() const; + virtual int getWidth() const override; virtual bool wantsFocus() { return true; } - void loadConfig(); + void loadConfig() override; private: // Get the longest prefix (initially 's') that is in every string in the list diff --git a/src/debugger/gui/RamWidget.hxx b/src/debugger/gui/RamWidget.hxx index b8d27b9ee..5d5da4641 100644 --- a/src/debugger/gui/RamWidget.hxx +++ b/src/debugger/gui/RamWidget.hxx @@ -37,9 +37,7 @@ class RamWidget : public Widget, public CommandSender int x, int y); virtual ~RamWidget(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - void loadConfig(); + void loadConfig() override; void setOpsWidget(DataGridOpsWidget* w); private: @@ -51,6 +49,8 @@ class RamWidget : public Widget, public CommandSender void doRestart(); void showSearchResults(); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + private: enum { kUndoCmd = 'RWud', diff --git a/src/debugger/gui/RiotWidget.hxx b/src/debugger/gui/RiotWidget.hxx index a16821c69..b54d02340 100644 --- a/src/debugger/gui/RiotWidget.hxx +++ b/src/debugger/gui/RiotWidget.hxx @@ -37,15 +37,15 @@ class RiotWidget : public Widget, public CommandSender int x, int y, int w, int h); virtual ~RiotWidget(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void loadConfig(); - private: ControllerWidget* addControlWidget(GuiObject* boss, const GUI::Font& font, int x, int y, Controller& controller); void handleRandomCPU(); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void loadConfig() override; + private: ToggleBitWidget* mySWCHAReadBits; ToggleBitWidget* mySWCHAWriteBits; diff --git a/src/debugger/gui/RomListSettings.hxx b/src/debugger/gui/RomListSettings.hxx index 5dc865c40..363b9fa70 100644 --- a/src/debugger/gui/RomListSettings.hxx +++ b/src/debugger/gui/RomListSettings.hxx @@ -41,12 +41,7 @@ class RomListSettings : public Dialog, public CommandSender void show(uInt32 x, uInt32 y, int data = -1); /** This dialog uses its own positioning, so we override Dialog::center() */ - void center(); - - private: - void loadConfig(); - void handleMouseDown(int x, int y, int button, int clickCount); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void center() override; private: uInt32 _xorig, _yorig; @@ -58,6 +53,10 @@ class RomListSettings : public Dialog, public CommandSender CheckboxWidget* myUseRelocation; private: + void loadConfig() override; + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported RomListSettings() = delete; RomListSettings(const RomListSettings&) = delete; diff --git a/src/debugger/gui/RomListWidget.hxx b/src/debugger/gui/RomListWidget.hxx index 4a84f0b92..4da81ba67 100644 --- a/src/debugger/gui/RomListWidget.hxx +++ b/src/debugger/gui/RomListWidget.hxx @@ -60,26 +60,26 @@ class RomListWidget : public EditableWidget void setHighlighted(int item); protected: - void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseUp(int x, int y, int button, int clickCount); - void handleMouseWheel(int x, int y, int direction); - bool handleText(char text); - bool handleKeyDown(StellaKey key, StellaMod mod); - bool handleKeyUp(StellaKey key, StellaMod mod); - bool handleEvent(Event::Type e); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + bool handleText(char text) override; + bool handleKeyDown(StellaKey key, StellaMod mod) override; + bool handleKeyUp(StellaKey key, StellaMod mod) override; + bool handleEvent(Event::Type e) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; GUI::Rect getLineRect() const; - GUI::Rect getEditRect() const; + GUI::Rect getEditRect() const override; int findItem(int x, int y) const; void recalc(); - void startEditMode(); - void endEditMode(); - void abortEditMode(); - void lostFocusWidget(); + void startEditMode() override; + void endEditMode() override; + void abortEditMode() override; + void lostFocusWidget() override; void scrollToSelected() { scrollToCurrent(_selectedItem); } void scrollToHighlighted() { scrollToCurrent(_highlightedItem); } diff --git a/src/debugger/gui/RomWidget.hxx b/src/debugger/gui/RomWidget.hxx index 3250aad7e..df23dcc8e 100644 --- a/src/debugger/gui/RomWidget.hxx +++ b/src/debugger/gui/RomWidget.hxx @@ -44,10 +44,11 @@ class RomWidget : public Widget, public CommandSender { myListIsDirty = true; if(forcereload) loadConfig(); } void scrollTo(int line) { myRomList->setSelected(line); } - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void loadConfig(); private: + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void loadConfig() override; + void setBreak(int disasm_line, bool state); void setPC(int disasm_line); void runtoPC(int disasm_line); diff --git a/src/debugger/gui/SaveKeyWidget.hxx b/src/debugger/gui/SaveKeyWidget.hxx index c09feb322..f05127148 100644 --- a/src/debugger/gui/SaveKeyWidget.hxx +++ b/src/debugger/gui/SaveKeyWidget.hxx @@ -32,14 +32,14 @@ class SaveKeyWidget : public ControllerWidget Controller& controller); virtual ~SaveKeyWidget() { } - void loadConfig() { } - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: ButtonWidget* myEEPROMErase; enum { kEEPROMErase = 'eeER' }; private: + void loadConfig() override { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported SaveKeyWidget() = delete; SaveKeyWidget(const SaveKeyWidget&) = delete; diff --git a/src/debugger/gui/TiaInfoWidget.hxx b/src/debugger/gui/TiaInfoWidget.hxx index db2cc2255..b342435c4 100644 --- a/src/debugger/gui/TiaInfoWidget.hxx +++ b/src/debugger/gui/TiaInfoWidget.hxx @@ -34,11 +34,7 @@ class TiaInfoWidget : public Widget, public CommandSender int x, int y, int max_w); virtual ~TiaInfoWidget(); - void loadConfig(); - - protected: - void handleMouseDown(int x, int y, int button, int clickCount); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void loadConfig() override; private: EditTextWidget* myFrameCount; @@ -53,6 +49,9 @@ class TiaInfoWidget : public Widget, public CommandSender CheckboxWidget* myVBlank; private: + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported TiaInfoWidget() = delete; TiaInfoWidget(const TiaInfoWidget&) = delete; diff --git a/src/debugger/gui/TiaOutputWidget.hxx b/src/debugger/gui/TiaOutputWidget.hxx index 0e23a9e86..a503c5bf5 100644 --- a/src/debugger/gui/TiaOutputWidget.hxx +++ b/src/debugger/gui/TiaOutputWidget.hxx @@ -36,7 +36,7 @@ class TiaOutputWidget : public Widget, public CommandSender int x, int y, int w, int h); virtual ~TiaOutputWidget(); - void loadConfig(); + void loadConfig() override; void setZoomWidget(TiaZoomWidget* w) { myZoom = w; } void saveSnapshot(); @@ -45,19 +45,11 @@ class TiaOutputWidget : public Widget, public CommandSender // For example, clicking an area may cause an action // (fill to this scanline, etc). /* - virtual void handleMouseUp(int x, int y, int button, int clickCount); - virtual void handleMouseWheel(int x, int y, int direction); - virtual bool handleKeyDown(StellaKey key, StellaMod mod); - virtual bool handleKeyUp(StellaKey key, StellaMod mod); + virtual void handleMouseUp(int x, int y, int button, int clickCount) override; + virtual void handleMouseWheel(int x, int y, int direction) override; + virtual bool handleKeyDown(StellaKey key, StellaMod mod) override; + virtual bool handleKeyUp(StellaKey key, StellaMod mod) override; */ - - protected: - void handleMouseDown(int x, int y, int button, int clickCount); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - void drawWidget(bool hilite); - bool wantsFocus() { return false; } - private: unique_ptr myMenu; TiaZoomWidget* myZoom; @@ -69,6 +61,12 @@ class TiaOutputWidget : public Widget, public CommandSender uInt32 myLineBuffer[320]; private: + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + void drawWidget(bool hilite) override; + bool wantsFocus() { return false; } + // Following constructors and assignment operators not supported TiaOutputWidget() = delete; TiaOutputWidget(const TiaOutputWidget&) = delete; diff --git a/src/debugger/gui/TiaWidget.hxx b/src/debugger/gui/TiaWidget.hxx index a7e0ff9f1..9e276bb9f 100644 --- a/src/debugger/gui/TiaWidget.hxx +++ b/src/debugger/gui/TiaWidget.hxx @@ -39,12 +39,6 @@ class TiaWidget : public Widget, public CommandSender int x, int y, int w, int h); virtual ~TiaWidget(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void loadConfig(); - - private: - void changeColorRegs(); - private: DataGridWidget* myColorRegs; @@ -149,6 +143,10 @@ class TiaWidget : public Widget, public CommandSender }; private: + void changeColorRegs(); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void loadConfig() override; + // Following constructors and assignment operators not supported TiaWidget() = delete; TiaWidget(const TiaWidget&) = delete; diff --git a/src/debugger/gui/TiaZoomWidget.hxx b/src/debugger/gui/TiaZoomWidget.hxx index 15f1ffa42..cad156409 100644 --- a/src/debugger/gui/TiaZoomWidget.hxx +++ b/src/debugger/gui/TiaZoomWidget.hxx @@ -34,25 +34,24 @@ class TiaZoomWidget : public Widget, public CommandSender int x, int y, int w, int h); virtual ~TiaZoomWidget(); - void loadConfig(); + void loadConfig() override; void setPos(int x, int y); - protected: - void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseUp(int x, int y, int button, int clickCount); - void handleMouseWheel(int x, int y, int direction); - void handleMouseMoved(int x, int y, int button); - void handleMouseLeft(int button); - bool handleEvent(Event::Type event); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - void drawWidget(bool hilite); - bool wantsFocus() { return true; } - private: void zoom(int level); void recalc(); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + void handleMouseMoved(int x, int y, int button) override; + void handleMouseLeft(int button) override; + bool handleEvent(Event::Type event) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + void drawWidget(bool hilite) override; + bool wantsFocus() { return true; } + private: unique_ptr myMenu; diff --git a/src/debugger/gui/ToggleBitWidget.hxx b/src/debugger/gui/ToggleBitWidget.hxx index 887da8cdb..ab5d1029a 100644 --- a/src/debugger/gui/ToggleBitWidget.hxx +++ b/src/debugger/gui/ToggleBitWidget.hxx @@ -34,7 +34,7 @@ class ToggleBitWidget : public ToggleWidget void setState(const BoolArray& state, const BoolArray& changed); protected: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; protected: StringList _offList; diff --git a/src/debugger/gui/TogglePixelWidget.hxx b/src/debugger/gui/TogglePixelWidget.hxx index 1b77d01f2..ea0241cf2 100644 --- a/src/debugger/gui/TogglePixelWidget.hxx +++ b/src/debugger/gui/TogglePixelWidget.hxx @@ -41,14 +41,13 @@ class TogglePixelWidget : public ToggleWidget void setIntState(int value, bool swap); int getIntState(); - protected: - void drawWidget(bool hilite); - private: int _pixelColor, _backgroundColor; bool _swapBits; private: + void drawWidget(bool hilite) override; + // Following constructors and assignment operators not supported TogglePixelWidget() = delete; TogglePixelWidget(const TogglePixelWidget&) = delete; diff --git a/src/debugger/gui/ToggleWidget.hxx b/src/debugger/gui/ToggleWidget.hxx index 45ae87106..04fa358e4 100644 --- a/src/debugger/gui/ToggleWidget.hxx +++ b/src/debugger/gui/ToggleWidget.hxx @@ -41,19 +41,12 @@ class ToggleWidget : public Widget, public CommandSender const BoolArray& getState() { return _stateList; } bool getSelectedState() const { return _stateList[_selectedItem]; } - virtual void handleMouseDown(int x, int y, int button, int clickCount); - virtual void handleMouseUp(int x, int y, int button, int clickCount); - virtual bool handleKeyDown(StellaKey key, StellaMod mod); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); - virtual bool wantsFocus() { return true; } int colWidth() const { return _colWidth; } void setEditable(bool editable) { _editable = editable; } protected: - void drawWidget(bool hilite) = 0; - int findItem(int x, int y); protected: int _rows; @@ -69,6 +62,14 @@ class ToggleWidget : public Widget, public CommandSender BoolArray _changedList; private: + void drawWidget(bool hilite) override = 0; + int findItem(int x, int y); + + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + bool handleKeyDown(StellaKey key, StellaMod mod) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + // Following constructors and assignment operators not supported ToggleWidget() = delete; ToggleWidget(const ToggleWidget&) = delete; diff --git a/src/emucore/AtariVox.hxx b/src/emucore/AtariVox.hxx index 99478f7a8..361e327ce 100644 --- a/src/emucore/AtariVox.hxx +++ b/src/emucore/AtariVox.hxx @@ -68,7 +68,7 @@ class AtariVox : public Controller @param pin The pin of the controller jack to read @return The state of the pin */ - bool read(DigitalPin pin); + bool read(DigitalPin pin) override; /** Write the given value to the specified digital pin for this @@ -78,22 +78,22 @@ class AtariVox : public Controller @param pin The pin of the controller jack to write to @param value The value to write to the pin */ - void write(DigitalPin pin, bool value); + void write(DigitalPin pin, bool value) override; /** Update the entire digital and analog pin state according to the events currently set. */ - void update() { } + void update() override { } /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; - string about() const; + string about() const override; private: void clockDataIn(bool value); diff --git a/src/emucore/Booster.hxx b/src/emucore/Booster.hxx index 62098bc91..6f045d8b5 100644 --- a/src/emucore/Booster.hxx +++ b/src/emucore/Booster.hxx @@ -53,7 +53,7 @@ class BoosterGrip : public Controller Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -72,7 +72,7 @@ class BoosterGrip : public Controller @return Whether the controller supports using the mouse */ bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + Controller::Type xtype, int xid, Controller::Type ytype, int yid) override; private: // Pre-compute the events we care about based on given port diff --git a/src/emucore/Cart.cxx b/src/emucore/Cart.cxx index 09c24fe0a..6a92339e6 100644 --- a/src/emucore/Cart.cxx +++ b/src/emucore/Cart.cxx @@ -316,7 +316,7 @@ Cartridge::~Cartridge() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool Cartridge::save(ofstream& out) +bool Cartridge::saveROM(ofstream& out) { int size = -1; diff --git a/src/emucore/Cart.hxx b/src/emucore/Cart.hxx index abc82c5ff..1867fc5a6 100644 --- a/src/emucore/Cart.hxx +++ b/src/emucore/Cart.hxx @@ -87,7 +87,7 @@ class Cartridge : public Device @param out The output file stream to save the image */ - bool save(ofstream& out); + bool saveROM(ofstream& out); /** Lock/unlock bankswitching capability. The debugger will lock @@ -171,29 +171,6 @@ class Cartridge : public Device */ virtual const uInt8* getImage(int& size) const = 0; - /** - Save the current state of this device to the given Serializer. - - @param out The Serializer object to use - @return False on any errors, else true - */ - virtual bool save(Serializer& out) const = 0; - - /** - Load the current state of this device from the given Serializer. - - @param in The Serializer object to use - @return False on any errors, else true - */ - virtual bool load(Serializer& in) = 0; - - /** - Get a descriptor for the device name (used in error checking). - - @return The name of the object - */ - virtual string name() const = 0; - /** Informs the cartridge about the name of the ROM file used when creating this cart. diff --git a/src/emucore/Cart0840.hxx b/src/emucore/Cart0840.hxx index 19c685d43..7a44085b8 100644 --- a/src/emucore/Cart0840.hxx +++ b/src/emucore/Cart0840.hxx @@ -56,7 +56,7 @@ class Cartridge0840 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -64,24 +64,24 @@ class Cartridge0840 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -90,7 +90,7 @@ class Cartridge0840 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -98,7 +98,7 @@ class Cartridge0840 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -106,7 +106,7 @@ class Cartridge0840 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -114,14 +114,14 @@ class Cartridge0840 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge0840"; } + string name() const override { return "Cartridge0840"; } #ifdef DEBUGGER_SUPPORT /** @@ -129,7 +129,7 @@ class Cartridge0840 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge0840Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -141,7 +141,7 @@ class Cartridge0840 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -150,7 +150,7 @@ class Cartridge0840 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // The 8K ROM image of the cartridge diff --git a/src/emucore/Cart2K.hxx b/src/emucore/Cart2K.hxx index a425cddeb..acdbeaf92 100644 --- a/src/emucore/Cart2K.hxx +++ b/src/emucore/Cart2K.hxx @@ -59,7 +59,7 @@ class Cartridge2K : public Cartridge /** Reset cartridge to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -67,7 +67,7 @@ class Cartridge2K : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -76,7 +76,7 @@ class Cartridge2K : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -84,7 +84,7 @@ class Cartridge2K : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -92,7 +92,7 @@ class Cartridge2K : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -100,14 +100,14 @@ class Cartridge2K : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge2K"; } + string name() const override { return "Cartridge2K"; } #ifdef DEBUGGER_SUPPORT /** @@ -115,7 +115,7 @@ class Cartridge2K : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge2KWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -127,7 +127,7 @@ class Cartridge2K : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -136,7 +136,7 @@ class Cartridge2K : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Pointer to a dynamically allocated ROM image of the cartridge diff --git a/src/emucore/Cart3E.hxx b/src/emucore/Cart3E.hxx index c57c01a45..4d542968b 100644 --- a/src/emucore/Cart3E.hxx +++ b/src/emucore/Cart3E.hxx @@ -87,7 +87,7 @@ class Cartridge3E : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -95,24 +95,24 @@ class Cartridge3E : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -121,7 +121,7 @@ class Cartridge3E : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -129,7 +129,7 @@ class Cartridge3E : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -137,7 +137,7 @@ class Cartridge3E : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -145,14 +145,14 @@ class Cartridge3E : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge3E"; } + string name() const override { return "Cartridge3E"; } #ifdef DEBUGGER_SUPPORT /** @@ -160,7 +160,7 @@ class Cartridge3E : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge3EWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -172,7 +172,7 @@ class Cartridge3E : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -181,7 +181,7 @@ class Cartridge3E : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active for the first segment diff --git a/src/emucore/Cart3F.hxx b/src/emucore/Cart3F.hxx index 98a7085b3..b0ca24ca3 100644 --- a/src/emucore/Cart3F.hxx +++ b/src/emucore/Cart3F.hxx @@ -64,7 +64,7 @@ class Cartridge3F : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -72,24 +72,24 @@ class Cartridge3F : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -98,7 +98,7 @@ class Cartridge3F : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -106,7 +106,7 @@ class Cartridge3F : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -114,7 +114,7 @@ class Cartridge3F : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -122,14 +122,14 @@ class Cartridge3F : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge3F"; } + string name() const override { return "Cartridge3F"; } #ifdef DEBUGGER_SUPPORT /** @@ -137,7 +137,7 @@ class Cartridge3F : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge3FWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -149,7 +149,7 @@ class Cartridge3F : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -158,7 +158,7 @@ class Cartridge3F : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active for the first segment diff --git a/src/emucore/Cart4A50.hxx b/src/emucore/Cart4A50.hxx index b3aa47eee..0b9dc8e8d 100644 --- a/src/emucore/Cart4A50.hxx +++ b/src/emucore/Cart4A50.hxx @@ -72,7 +72,7 @@ class Cartridge4A50 : public Cartridge /** Reset cartridge to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -80,7 +80,7 @@ class Cartridge4A50 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -89,7 +89,7 @@ class Cartridge4A50 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -97,7 +97,7 @@ class Cartridge4A50 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -105,7 +105,7 @@ class Cartridge4A50 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -113,14 +113,14 @@ class Cartridge4A50 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge4A50"; } + string name() const override { return "Cartridge4A50"; } #ifdef DEBUGGER_SUPPORT /** @@ -128,7 +128,7 @@ class Cartridge4A50 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge4A50Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -140,7 +140,7 @@ class Cartridge4A50 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -149,7 +149,7 @@ class Cartridge4A50 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** @@ -158,8 +158,8 @@ class Cartridge4A50 : public Cartridge @param address The address to modify @param flags A bitfield of DisasmType directives for the given address */ - uInt8 getAccessFlags(uInt16 address) const; - void setAccessFlags(uInt16 address, uInt8 flags); + uInt8 getAccessFlags(uInt16 address) const override; + void setAccessFlags(uInt16 address, uInt8 flags) override; /** Check all possible hotspots diff --git a/src/emucore/Cart4K.hxx b/src/emucore/Cart4K.hxx index 534744d96..c4831c798 100644 --- a/src/emucore/Cart4K.hxx +++ b/src/emucore/Cart4K.hxx @@ -58,7 +58,7 @@ class Cartridge4K : public Cartridge /** Reset cartridge to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,7 +66,7 @@ class Cartridge4K : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -75,7 +75,7 @@ class Cartridge4K : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -83,7 +83,7 @@ class Cartridge4K : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -91,7 +91,7 @@ class Cartridge4K : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -99,14 +99,14 @@ class Cartridge4K : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge4K"; } + string name() const override { return "Cartridge4K"; } #ifdef DEBUGGER_SUPPORT /** @@ -114,7 +114,7 @@ class Cartridge4K : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge4KWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -126,7 +126,7 @@ class Cartridge4K : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -135,7 +135,7 @@ class Cartridge4K : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // The 4K ROM image for the cartridge diff --git a/src/emucore/Cart4KSC.hxx b/src/emucore/Cart4KSC.hxx index 3ab54becc..fedb08075 100644 --- a/src/emucore/Cart4KSC.hxx +++ b/src/emucore/Cart4KSC.hxx @@ -56,7 +56,7 @@ class Cartridge4KSC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -64,7 +64,7 @@ class Cartridge4KSC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -73,7 +73,7 @@ class Cartridge4KSC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -81,7 +81,7 @@ class Cartridge4KSC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -89,7 +89,7 @@ class Cartridge4KSC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -97,14 +97,14 @@ class Cartridge4KSC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Cartridge4KSC"; } + string name() const override { return "Cartridge4KSC"; } #ifdef DEBUGGER_SUPPORT /** @@ -112,7 +112,7 @@ class Cartridge4KSC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new Cartridge4KSCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -124,7 +124,7 @@ class Cartridge4KSC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -133,7 +133,7 @@ class Cartridge4KSC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartAR.hxx b/src/emucore/CartAR.hxx index bbf6d1cb1..ac51221eb 100644 --- a/src/emucore/CartAR.hxx +++ b/src/emucore/CartAR.hxx @@ -63,14 +63,14 @@ class CartridgeAR : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; /** Install cartridge in the specified system. Invoked by the system @@ -78,24 +78,24 @@ class CartridgeAR : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -104,7 +104,7 @@ class CartridgeAR : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -112,7 +112,7 @@ class CartridgeAR : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -120,7 +120,7 @@ class CartridgeAR : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -128,14 +128,14 @@ class CartridgeAR : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeAR"; } + string name() const override { return "CartridgeAR"; } #ifdef DEBUGGER_SUPPORT /** @@ -143,7 +143,7 @@ class CartridgeAR : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeARWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -155,7 +155,7 @@ class CartridgeAR : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -164,7 +164,7 @@ class CartridgeAR : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** @@ -173,8 +173,8 @@ class CartridgeAR : public Cartridge @param address The address to modify @param flags A bitfield of DisasmType directives for the given address */ - uInt8 getAccessFlags(uInt16 address) const; - void setAccessFlags(uInt16 address, uInt8 flags); + uInt8 getAccessFlags(uInt16 address) const override; + void setAccessFlags(uInt16 address, uInt8 flags) override; // Handle a change to the bank configuration bool bankConfiguration(uInt8 configuration); diff --git a/src/emucore/CartBF.hxx b/src/emucore/CartBF.hxx index 6d3595b47..3d5235bf7 100644 --- a/src/emucore/CartBF.hxx +++ b/src/emucore/CartBF.hxx @@ -59,7 +59,7 @@ class CartridgeBF : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -67,24 +67,24 @@ class CartridgeBF : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -93,7 +93,7 @@ class CartridgeBF : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -101,7 +101,7 @@ class CartridgeBF : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -109,7 +109,7 @@ class CartridgeBF : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -117,14 +117,14 @@ class CartridgeBF : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeBF"; } + string name() const override { return "CartridgeBF"; } #ifdef DEBUGGER_SUPPORT /** @@ -132,7 +132,7 @@ class CartridgeBF : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeBFWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -144,7 +144,7 @@ class CartridgeBF : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -153,7 +153,7 @@ class CartridgeBF : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartBFSC.hxx b/src/emucore/CartBFSC.hxx index cdb2c6ac3..567ae7a5b 100644 --- a/src/emucore/CartBFSC.hxx +++ b/src/emucore/CartBFSC.hxx @@ -58,7 +58,7 @@ class CartridgeBFSC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeBFSC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeBFSC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeBFSC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeBFSC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeBFSC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeBFSC"; } + string name() const override { return "CartridgeBFSC"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeBFSC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeBFSCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeBFSC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeBFSC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartCM.hxx b/src/emucore/CartCM.hxx index a9c93781a..5a65b38b2 100644 --- a/src/emucore/CartCM.hxx +++ b/src/emucore/CartCM.hxx @@ -130,7 +130,7 @@ class CartridgeCM : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -138,24 +138,24 @@ class CartridgeCM : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -164,7 +164,7 @@ class CartridgeCM : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -172,7 +172,7 @@ class CartridgeCM : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -180,7 +180,7 @@ class CartridgeCM : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -188,14 +188,14 @@ class CartridgeCM : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeCM"; } + string name() const override { return "CartridgeCM"; } #ifdef DEBUGGER_SUPPORT /** @@ -203,7 +203,7 @@ class CartridgeCM : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeCMWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -215,7 +215,7 @@ class CartridgeCM : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -224,7 +224,7 @@ class CartridgeCM : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; /** Inform the cartridge about the parent CompuMate controller diff --git a/src/emucore/CartCTY.hxx b/src/emucore/CartCTY.hxx index 07145e153..2c1f143a7 100644 --- a/src/emucore/CartCTY.hxx +++ b/src/emucore/CartCTY.hxx @@ -133,14 +133,14 @@ class CartridgeCTY : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; /** Install cartridge in the specified system. Invoked by the system @@ -148,24 +148,24 @@ class CartridgeCTY : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -174,7 +174,7 @@ class CartridgeCTY : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -182,7 +182,7 @@ class CartridgeCTY : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -190,7 +190,7 @@ class CartridgeCTY : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -198,14 +198,14 @@ class CartridgeCTY : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeCTY"; } + string name() const override { return "CartridgeCTY"; } /** Informs the cartridge about the name of the ROM file used when @@ -213,7 +213,7 @@ class CartridgeCTY : public Cartridge @param name The properties file name of the ROM */ - void setRomName(const string& name); + void setRomName(const string& name) override; #ifdef DEBUGGER_SUPPORT /** @@ -221,7 +221,7 @@ class CartridgeCTY : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeCTYWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -233,7 +233,7 @@ class CartridgeCTY : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -242,7 +242,7 @@ class CartridgeCTY : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartCV.hxx b/src/emucore/CartCV.hxx index 12a24e505..543ae1e5d 100644 --- a/src/emucore/CartCV.hxx +++ b/src/emucore/CartCV.hxx @@ -61,7 +61,7 @@ class CartridgeCV : public Cartridge /** Reset cartridge to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -69,7 +69,7 @@ class CartridgeCV : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -78,7 +78,7 @@ class CartridgeCV : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -86,7 +86,7 @@ class CartridgeCV : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -94,7 +94,7 @@ class CartridgeCV : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -102,14 +102,14 @@ class CartridgeCV : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeCV"; } + string name() const override { return "CartridgeCV"; } #ifdef DEBUGGER_SUPPORT /** @@ -117,7 +117,7 @@ class CartridgeCV : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeCVWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -129,7 +129,7 @@ class CartridgeCV : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -138,7 +138,7 @@ class CartridgeCV : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Pointer to the initial RAM data from the cart diff --git a/src/emucore/CartDASH.hxx b/src/emucore/CartDASH.hxx index 86655c48e..f51614d18 100644 --- a/src/emucore/CartDASH.hxx +++ b/src/emucore/CartDASH.hxx @@ -147,7 +147,7 @@ public: /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -155,7 +155,7 @@ public: @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -164,7 +164,7 @@ public: @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -172,7 +172,7 @@ public: @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -180,7 +180,7 @@ public: @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -188,16 +188,14 @@ public: @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { - return "CartridgeDASH"; - } + string name() const override { return "CartridgeDASH"; } #ifdef DEBUGGER_SUPPORT /** @@ -205,7 +203,7 @@ public: of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeDASHWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -217,7 +215,7 @@ public: @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -226,7 +224,7 @@ public: @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: diff --git a/src/emucore/CartDF.hxx b/src/emucore/CartDF.hxx index bcf236dd0..fba60b105 100644 --- a/src/emucore/CartDF.hxx +++ b/src/emucore/CartDF.hxx @@ -59,7 +59,7 @@ class CartridgeDF : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -67,24 +67,24 @@ class CartridgeDF : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -93,7 +93,7 @@ class CartridgeDF : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -101,7 +101,7 @@ class CartridgeDF : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -109,7 +109,7 @@ class CartridgeDF : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -117,14 +117,14 @@ class CartridgeDF : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeDF"; } + string name() const override { return "CartridgeDF"; } #ifdef DEBUGGER_SUPPORT /** @@ -132,7 +132,7 @@ class CartridgeDF : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeDFWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -144,7 +144,7 @@ class CartridgeDF : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -153,7 +153,7 @@ class CartridgeDF : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartDFSC.hxx b/src/emucore/CartDFSC.hxx index ebe272239..e2a0e2a77 100644 --- a/src/emucore/CartDFSC.hxx +++ b/src/emucore/CartDFSC.hxx @@ -58,7 +58,7 @@ class CartridgeDFSC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeDFSC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeDFSC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeDFSC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeDFSC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeDFSC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeDFSC"; } + string name() const override { return "CartridgeDFSC"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeDFSC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeDFSCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeDFSC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeDFSC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartDPC.hxx b/src/emucore/CartDPC.hxx index 2ee3fc186..40971e19f 100644 --- a/src/emucore/CartDPC.hxx +++ b/src/emucore/CartDPC.hxx @@ -63,14 +63,14 @@ class CartridgeDPC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; /** Install cartridge in the specified system. Invoked by the system @@ -78,24 +78,24 @@ class CartridgeDPC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -104,7 +104,7 @@ class CartridgeDPC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -112,7 +112,7 @@ class CartridgeDPC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -120,7 +120,7 @@ class CartridgeDPC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -128,14 +128,14 @@ class CartridgeDPC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeDPC"; } + string name() const override { return "CartridgeDPC"; } #ifdef DEBUGGER_SUPPORT /** @@ -143,7 +143,7 @@ class CartridgeDPC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeDPCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -155,7 +155,7 @@ class CartridgeDPC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -164,7 +164,7 @@ class CartridgeDPC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartDPCPlus.hxx b/src/emucore/CartDPCPlus.hxx index 9801dff4c..d90066896 100644 --- a/src/emucore/CartDPCPlus.hxx +++ b/src/emucore/CartDPCPlus.hxx @@ -67,14 +67,14 @@ class CartridgeDPCPlus : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; /** Install cartridge in the specified system. Invoked by the system @@ -82,24 +82,24 @@ class CartridgeDPCPlus : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -108,7 +108,7 @@ class CartridgeDPCPlus : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -116,7 +116,7 @@ class CartridgeDPCPlus : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -124,7 +124,7 @@ class CartridgeDPCPlus : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -132,14 +132,14 @@ class CartridgeDPCPlus : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeDPC+"; } + string name() const override { return "CartridgeDPC+"; } #ifdef DEBUGGER_SUPPORT /** @@ -147,7 +147,7 @@ class CartridgeDPCPlus : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeDPCPlusWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -159,7 +159,7 @@ class CartridgeDPCPlus : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -168,7 +168,7 @@ class CartridgeDPCPlus : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartE0.hxx b/src/emucore/CartE0.hxx index 692055e1a..a9d414f56 100644 --- a/src/emucore/CartE0.hxx +++ b/src/emucore/CartE0.hxx @@ -67,7 +67,7 @@ class CartridgeE0 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -75,7 +75,7 @@ class CartridgeE0 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Patch the cartridge ROM. @@ -84,7 +84,7 @@ class CartridgeE0 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -92,7 +92,7 @@ class CartridgeE0 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -100,7 +100,7 @@ class CartridgeE0 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -108,14 +108,14 @@ class CartridgeE0 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeE0"; } + string name() const override { return "CartridgeE0"; } #ifdef DEBUGGER_SUPPORT /** @@ -123,7 +123,7 @@ class CartridgeE0 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeE0Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -135,7 +135,7 @@ class CartridgeE0 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -144,7 +144,7 @@ class CartridgeE0 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartE7.hxx b/src/emucore/CartE7.hxx index 81c9dc7c0..608b7c66b 100644 --- a/src/emucore/CartE7.hxx +++ b/src/emucore/CartE7.hxx @@ -84,7 +84,7 @@ class CartridgeE7 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -92,24 +92,24 @@ class CartridgeE7 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -118,7 +118,7 @@ class CartridgeE7 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -126,7 +126,7 @@ class CartridgeE7 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -134,7 +134,7 @@ class CartridgeE7 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -142,14 +142,14 @@ class CartridgeE7 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeE7"; } + string name() const override { return "CartridgeE7"; } #ifdef DEBUGGER_SUPPORT /** @@ -157,7 +157,7 @@ class CartridgeE7 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeE7Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -169,7 +169,7 @@ class CartridgeE7 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -178,7 +178,7 @@ class CartridgeE7 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartEF.hxx b/src/emucore/CartEF.hxx index 180ffe3a6..dcca3c72e 100644 --- a/src/emucore/CartEF.hxx +++ b/src/emucore/CartEF.hxx @@ -62,7 +62,7 @@ class CartridgeEF : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -70,24 +70,24 @@ class CartridgeEF : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -96,7 +96,7 @@ class CartridgeEF : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -104,7 +104,7 @@ class CartridgeEF : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -112,7 +112,7 @@ class CartridgeEF : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -120,14 +120,14 @@ class CartridgeEF : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeEF"; } + string name() const override { return "CartridgeEF"; } #ifdef DEBUGGER_SUPPORT /** @@ -135,7 +135,7 @@ class CartridgeEF : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeEFWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -147,7 +147,7 @@ class CartridgeEF : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -156,7 +156,7 @@ class CartridgeEF : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartEFSC.hxx b/src/emucore/CartEFSC.hxx index 5eaa044da..8f1ae63c1 100644 --- a/src/emucore/CartEFSC.hxx +++ b/src/emucore/CartEFSC.hxx @@ -62,7 +62,7 @@ class CartridgeEFSC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -70,24 +70,24 @@ class CartridgeEFSC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -96,7 +96,7 @@ class CartridgeEFSC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -104,7 +104,7 @@ class CartridgeEFSC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -112,7 +112,7 @@ class CartridgeEFSC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -120,14 +120,14 @@ class CartridgeEFSC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeEFSC"; } + string name() const override { return "CartridgeEFSC"; } #ifdef DEBUGGER_SUPPORT /** @@ -135,7 +135,7 @@ class CartridgeEFSC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeEFSCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -147,7 +147,7 @@ class CartridgeEFSC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -156,7 +156,7 @@ class CartridgeEFSC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartF0.hxx b/src/emucore/CartF0.hxx index 8ab6bebc6..c99c44ff8 100644 --- a/src/emucore/CartF0.hxx +++ b/src/emucore/CartF0.hxx @@ -59,7 +59,7 @@ class CartridgeF0 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -67,24 +67,24 @@ class CartridgeF0 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -93,7 +93,7 @@ class CartridgeF0 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -101,7 +101,7 @@ class CartridgeF0 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -109,7 +109,7 @@ class CartridgeF0 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -117,14 +117,14 @@ class CartridgeF0 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF0"; } + string name() const override { return "CartridgeF0"; } #ifdef DEBUGGER_SUPPORT /** @@ -132,7 +132,7 @@ class CartridgeF0 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF0Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -144,7 +144,7 @@ class CartridgeF0 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -153,7 +153,7 @@ class CartridgeF0 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartF4.hxx b/src/emucore/CartF4.hxx index e3e5fcced..99bccf26c 100644 --- a/src/emucore/CartF4.hxx +++ b/src/emucore/CartF4.hxx @@ -58,7 +58,7 @@ class CartridgeF4 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeF4 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeF4 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeF4 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeF4 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeF4 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF4"; } + string name() const override { return "CartridgeF4"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeF4 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF4Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeF4 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeF4 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartF4SC.hxx b/src/emucore/CartF4SC.hxx index 64cf34587..4a3432695 100644 --- a/src/emucore/CartF4SC.hxx +++ b/src/emucore/CartF4SC.hxx @@ -58,7 +58,7 @@ class CartridgeF4SC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeF4SC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeF4SC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeF4SC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeF4SC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeF4SC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF4SC"; } + string name() const override { return "CartridgeF4SC"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeF4SC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF4SCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeF4SC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeF4SC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartF6.hxx b/src/emucore/CartF6.hxx index 478429e7f..49944fbd9 100644 --- a/src/emucore/CartF6.hxx +++ b/src/emucore/CartF6.hxx @@ -58,7 +58,7 @@ class CartridgeF6 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeF6 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeF6 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeF6 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeF6 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeF6 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF6"; } + string name() const override { return "CartridgeF6"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeF6 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF6Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeF6 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeF6 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartF6SC.hxx b/src/emucore/CartF6SC.hxx index 6abbb59bf..a630ab0b7 100644 --- a/src/emucore/CartF6SC.hxx +++ b/src/emucore/CartF6SC.hxx @@ -58,7 +58,7 @@ class CartridgeF6SC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeF6SC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeF6SC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeF6SC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeF6SC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeF6SC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF6SC"; } + string name() const override { return "CartridgeF6SC"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeF6SC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF6SCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeF6SC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeF6SC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartF8.hxx b/src/emucore/CartF8.hxx index 0a83eaf2d..befe02f34 100644 --- a/src/emucore/CartF8.hxx +++ b/src/emucore/CartF8.hxx @@ -60,7 +60,7 @@ class CartridgeF8 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -68,24 +68,24 @@ class CartridgeF8 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -94,7 +94,7 @@ class CartridgeF8 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -102,7 +102,7 @@ class CartridgeF8 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -110,7 +110,7 @@ class CartridgeF8 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -118,14 +118,14 @@ class CartridgeF8 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF8"; } + string name() const override { return "CartridgeF8"; } #ifdef DEBUGGER_SUPPORT /** @@ -133,7 +133,7 @@ class CartridgeF8 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF8Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -145,7 +145,7 @@ class CartridgeF8 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -154,7 +154,7 @@ class CartridgeF8 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartF8SC.hxx b/src/emucore/CartF8SC.hxx index 11258555b..c1f230ab4 100644 --- a/src/emucore/CartF8SC.hxx +++ b/src/emucore/CartF8SC.hxx @@ -58,7 +58,7 @@ class CartridgeF8SC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeF8SC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeF8SC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeF8SC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeF8SC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeF8SC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeF8SC"; } + string name() const override { return "CartridgeF8SC"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeF8SC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeF8SCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeF8SC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeF8SC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartFA.hxx b/src/emucore/CartFA.hxx index 4623b3205..251c1e6c5 100644 --- a/src/emucore/CartFA.hxx +++ b/src/emucore/CartFA.hxx @@ -58,7 +58,7 @@ class CartridgeFA : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeFA : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeFA : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeFA : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeFA : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeFA : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeFA"; } + string name() const override { return "CartridgeFA"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeFA : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeFAWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeFA : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeFA : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartFA2.hxx b/src/emucore/CartFA2.hxx index 5a17a6e75..c3183b73f 100644 --- a/src/emucore/CartFA2.hxx +++ b/src/emucore/CartFA2.hxx @@ -66,7 +66,7 @@ class CartridgeFA2 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -74,24 +74,24 @@ class CartridgeFA2 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -100,7 +100,7 @@ class CartridgeFA2 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -108,7 +108,7 @@ class CartridgeFA2 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -116,7 +116,7 @@ class CartridgeFA2 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -124,14 +124,14 @@ class CartridgeFA2 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeFA2"; } + string name() const override { return "CartridgeFA2"; } /** Informs the cartridge about the name of the ROM file used when @@ -139,7 +139,7 @@ class CartridgeFA2 : public Cartridge @param name The properties file name of the ROM */ - void setRomName(const string& name); + void setRomName(const string& name) override; #ifdef DEBUGGER_SUPPORT /** @@ -147,7 +147,7 @@ class CartridgeFA2 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeFA2Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -159,7 +159,7 @@ class CartridgeFA2 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -168,7 +168,7 @@ class CartridgeFA2 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartFE.hxx b/src/emucore/CartFE.hxx index d136a2e79..ef906eab3 100644 --- a/src/emucore/CartFE.hxx +++ b/src/emucore/CartFE.hxx @@ -73,7 +73,7 @@ class CartridgeFE : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -81,17 +81,17 @@ class CartridgeFE : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Answer whether the bank has changed since the last time this @@ -99,7 +99,7 @@ class CartridgeFE : public Cartridge @return Whether the bank was changed */ - bool bankChanged(); + bool bankChanged() override; /** Patch the cartridge ROM. @@ -108,7 +108,7 @@ class CartridgeFE : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -116,7 +116,7 @@ class CartridgeFE : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -124,7 +124,7 @@ class CartridgeFE : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -132,14 +132,14 @@ class CartridgeFE : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeFE"; } + string name() const override { return "CartridgeFE"; } #ifdef DEBUGGER_SUPPORT /** @@ -147,7 +147,7 @@ class CartridgeFE : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeFEWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -159,7 +159,7 @@ class CartridgeFE : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -168,7 +168,7 @@ class CartridgeFE : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** @@ -177,8 +177,8 @@ class CartridgeFE : public Cartridge @param address The address to modify @param flags A bitfield of DisasmType directives for the given address */ - uInt8 getAccessFlags(uInt16 address) const; - void setAccessFlags(uInt16 address, uInt8 flags); + uInt8 getAccessFlags(uInt16 address) const override; + void setAccessFlags(uInt16 address, uInt8 flags) override; private: // The 8K ROM image of the cartridge diff --git a/src/emucore/CartMC.hxx b/src/emucore/CartMC.hxx index 10e670b8e..3b3dc0603 100644 --- a/src/emucore/CartMC.hxx +++ b/src/emucore/CartMC.hxx @@ -164,7 +164,7 @@ class CartridgeMC : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -172,17 +172,17 @@ class CartridgeMC : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -191,7 +191,7 @@ class CartridgeMC : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -199,7 +199,7 @@ class CartridgeMC : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -207,7 +207,7 @@ class CartridgeMC : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -215,14 +215,14 @@ class CartridgeMC : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeMC"; } + string name() const override { return "CartridgeMC"; } #ifdef DEBUGGER_SUPPORT /** @@ -230,7 +230,7 @@ class CartridgeMC : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeMCWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -242,7 +242,7 @@ class CartridgeMC : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -251,7 +251,7 @@ class CartridgeMC : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // The 128K ROM image for the cartridge diff --git a/src/emucore/CartMDM.hxx b/src/emucore/CartMDM.hxx index 4daa7382a..89ad843e0 100644 --- a/src/emucore/CartMDM.hxx +++ b/src/emucore/CartMDM.hxx @@ -69,7 +69,7 @@ class CartridgeMDM : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -77,24 +77,24 @@ class CartridgeMDM : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -103,7 +103,7 @@ class CartridgeMDM : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -111,7 +111,7 @@ class CartridgeMDM : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -119,7 +119,7 @@ class CartridgeMDM : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -127,14 +127,14 @@ class CartridgeMDM : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeMDM"; } + string name() const override { return "CartridgeMDM"; } #ifdef DEBUGGER_SUPPORT /** @@ -142,7 +142,7 @@ class CartridgeMDM : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeMDMWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -154,7 +154,7 @@ class CartridgeMDM : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -163,7 +163,7 @@ class CartridgeMDM : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Pointer to a dynamically allocated ROM image of the cartridge diff --git a/src/emucore/CartSB.hxx b/src/emucore/CartSB.hxx index ab38ff513..20938fd15 100644 --- a/src/emucore/CartSB.hxx +++ b/src/emucore/CartSB.hxx @@ -58,7 +58,7 @@ class CartridgeSB : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeSB : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeSB : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeSB : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeSB : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeSB : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeSB"; } + string name() const override { return "CartridgeSB"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeSB : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeSBWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeSB : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeSB : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // The 128-256K ROM image and size of the cartridge diff --git a/src/emucore/CartUA.hxx b/src/emucore/CartUA.hxx index fb17ad07c..6f2f08561 100644 --- a/src/emucore/CartUA.hxx +++ b/src/emucore/CartUA.hxx @@ -58,7 +58,7 @@ class CartridgeUA : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -66,24 +66,24 @@ class CartridgeUA : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -92,7 +92,7 @@ class CartridgeUA : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -100,7 +100,7 @@ class CartridgeUA : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -108,7 +108,7 @@ class CartridgeUA : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -116,14 +116,14 @@ class CartridgeUA : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeUA"; } + string name() const override { return "CartridgeUA"; } #ifdef DEBUGGER_SUPPORT /** @@ -131,7 +131,7 @@ class CartridgeUA : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeUAWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -143,7 +143,7 @@ class CartridgeUA : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -152,7 +152,7 @@ class CartridgeUA : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CartWD.hxx b/src/emucore/CartWD.hxx index 5b1cd53f0..7f6106271 100644 --- a/src/emucore/CartWD.hxx +++ b/src/emucore/CartWD.hxx @@ -86,7 +86,7 @@ class CartridgeWD : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -94,24 +94,24 @@ class CartridgeWD : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -120,7 +120,7 @@ class CartridgeWD : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -128,7 +128,7 @@ class CartridgeWD : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -136,7 +136,7 @@ class CartridgeWD : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -144,14 +144,14 @@ class CartridgeWD : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeWD"; } + string name() const override { return "CartridgeWD"; } #ifdef DEBUGGER_SUPPORT /** @@ -159,7 +159,7 @@ class CartridgeWD : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeWDWidget(boss, lfont, nfont, x, y, w, h, *this); } @@ -171,7 +171,7 @@ class CartridgeWD : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value. @@ -180,7 +180,7 @@ class CartridgeWD : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: /** diff --git a/src/emucore/CartX07.hxx b/src/emucore/CartX07.hxx index 40b587497..e3cacda29 100644 --- a/src/emucore/CartX07.hxx +++ b/src/emucore/CartX07.hxx @@ -68,7 +68,7 @@ class CartridgeX07 : public Cartridge /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Install cartridge in the specified system. Invoked by the system @@ -76,24 +76,24 @@ class CartridgeX07 : public Cartridge @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install pages for the specified bank in the system. @param bank The bank that should be installed in the system */ - bool bank(uInt16 bank); + bool bank(uInt16 bank) override; /** Get the current bank. */ - uInt16 getBank() const; + uInt16 getBank() const override; /** Query the number of banks supported by the cartridge. */ - uInt16 bankCount() const; + uInt16 bankCount() const override; /** Patch the cartridge ROM. @@ -102,7 +102,7 @@ class CartridgeX07 : public Cartridge @param value The value to place into the address @return Success or failure of the patch operation */ - bool patch(uInt16 address, uInt8 value); + bool patch(uInt16 address, uInt8 value) override; /** Access the internal ROM image for this cartridge. @@ -110,7 +110,7 @@ class CartridgeX07 : public Cartridge @param size Set to the size of the internal ROM image data @return A pointer to the internal ROM image data */ - const uInt8* getImage(int& size) const; + const uInt8* getImage(int& size) const override; /** Save the current state of this cart to the given Serializer. @@ -118,7 +118,7 @@ class CartridgeX07 : public Cartridge @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this cart from the given Serializer. @@ -126,14 +126,14 @@ class CartridgeX07 : public Cartridge @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "CartridgeX07"; } + string name() const override { return "CartridgeX07"; } #ifdef DEBUGGER_SUPPORT /** @@ -141,7 +141,7 @@ class CartridgeX07 : public Cartridge of the cart. */ CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, - const GUI::Font& nfont, int x, int y, int w, int h) + const GUI::Font& nfont, int x, int y, int w, int h) override { return new CartridgeX07Widget(boss, lfont, nfont, x, y, w, h, *this); } @@ -153,7 +153,7 @@ class CartridgeX07 : public Cartridge @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -162,7 +162,7 @@ class CartridgeX07 : public Cartridge @param value The value to be stored at the address @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: // Indicates which bank is currently active diff --git a/src/emucore/CompuMate.hxx b/src/emucore/CompuMate.hxx index 7424e1875..373ec4fa0 100644 --- a/src/emucore/CompuMate.hxx +++ b/src/emucore/CompuMate.hxx @@ -122,13 +122,13 @@ class CompuMate @param value The entire contents of the SWCHA register */ - void controlWrite(uInt8) { if(myJack == Controller::Left) myHandler.update(); } + void controlWrite(uInt8) override { if(myJack == Controller::Left) myHandler.update(); } /** Update the entire digital and analog pin state according to the events currently set. */ - void update() { } + void update() override { } private: class CompuMate& myHandler; diff --git a/src/emucore/Console.hxx b/src/emucore/Console.hxx index 9d198d300..d70fc8e38 100644 --- a/src/emucore/Console.hxx +++ b/src/emucore/Console.hxx @@ -134,7 +134,7 @@ class Console : public Serializable @param out The serializer device to save to. @return The result of the save. True on success, false on failure. */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Loads the current state of this console class from the given Serializer. @@ -142,14 +142,14 @@ class Console : public Serializable @param in The Serializer device to load from. @return The result of the load. True on success, false on failure. */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for this console class (used in error checking). @return The name of the object */ - string name() const { return "Console"; } + string name() const override { return "Console"; } /** Set the properties to those given diff --git a/src/emucore/Control.hxx b/src/emucore/Control.hxx index 02b8a8fac..c43411f4d 100644 --- a/src/emucore/Control.hxx +++ b/src/emucore/Control.hxx @@ -201,7 +201,7 @@ class Controller : public Serializable /** Returns the name of this controller. */ - virtual string name() const { return myName; } + virtual string name() const override { return myName; } /** Returns more detailed information about this controller. @@ -227,7 +227,7 @@ class Controller : public Serializable @param out The serializer device to save to. @return The result of the save. True on success, false on failure. */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Loads the current state of this controller from the given Serializer. @@ -235,7 +235,7 @@ class Controller : public Serializable @param in The serializer device to load from. @return The result of the load. True on success, false on failure. */ - bool load(Serializer& in); + bool load(Serializer& in) override; public: /// Constant which represents maximum resistance for analog pins diff --git a/src/emucore/Device.hxx b/src/emucore/Device.hxx index 44798fe57..a14caec5f 100644 --- a/src/emucore/Device.hxx +++ b/src/emucore/Device.hxx @@ -76,7 +76,7 @@ class Device : public Serializable @param out The Serializer object to use @return False on any errors, else true */ - virtual bool save(Serializer& out) const = 0; + virtual bool save(Serializer& out) const override = 0; /** Load the current state of this device from the given Serializer. @@ -84,14 +84,14 @@ class Device : public Serializable @param in The Serializer object to use @return False on any errors, else true */ - virtual bool load(Serializer& in) = 0; + virtual bool load(Serializer& in) override = 0; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - virtual string name() const = 0; + virtual string name() const override = 0; public: /** diff --git a/src/emucore/Driving.hxx b/src/emucore/Driving.hxx index 6f7d26c5e..336ac1286 100644 --- a/src/emucore/Driving.hxx +++ b/src/emucore/Driving.hxx @@ -53,7 +53,7 @@ class Driving : public Controller Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -72,7 +72,7 @@ class Driving : public Controller @return Whether the controller supports using the mouse */ bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + Controller::Type xtype, int xid, Controller::Type ytype, int yid) override; private: // Counter to iterate through the gray codes diff --git a/src/emucore/Genesis.hxx b/src/emucore/Genesis.hxx index 62a96d2db..a8ea5ae79 100644 --- a/src/emucore/Genesis.hxx +++ b/src/emucore/Genesis.hxx @@ -54,7 +54,7 @@ class Genesis : public Controller Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -73,7 +73,7 @@ class Genesis : public Controller @return Whether the controller supports using the mouse */ bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + Controller::Type xtype, int xid, Controller::Type ytype, int yid) override; private: // Pre-compute the events we care about based on given port diff --git a/src/emucore/Joystick.hxx b/src/emucore/Joystick.hxx index f2f7f3f0e..e3d7bcf9c 100644 --- a/src/emucore/Joystick.hxx +++ b/src/emucore/Joystick.hxx @@ -52,7 +52,7 @@ class Joystick : public Controller Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -71,7 +71,7 @@ class Joystick : public Controller @return Whether the controller supports using the mouse */ bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + Controller::Type xtype, int xid, Controller::Type ytype, int yid) override; /** Sets the deadzone amount for real analog joysticks. diff --git a/src/emucore/Keyboard.hxx b/src/emucore/Keyboard.hxx index 8c43591e0..c6877cc19 100644 --- a/src/emucore/Keyboard.hxx +++ b/src/emucore/Keyboard.hxx @@ -56,13 +56,13 @@ class Keyboard : public Controller @param pin The pin of the controller jack to write to @param value The value to write to the pin */ - void write(DigitalPin pin, bool value); + void write(DigitalPin pin, bool value) override; /** Update the entire digital and analog pin state according to the events currently set. */ - void update() { } + void update() override { } private: // Pre-compute the events we care about based on given port diff --git a/src/emucore/KidVid.hxx b/src/emucore/KidVid.hxx index ce5e6f261..7884ba663 100644 --- a/src/emucore/KidVid.hxx +++ b/src/emucore/KidVid.hxx @@ -62,7 +62,7 @@ class KidVid : public Controller Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; private: // Open/close a WAV sample file diff --git a/src/emucore/M6502.hxx b/src/emucore/M6502.hxx index 4aa899d13..596650358 100644 --- a/src/emucore/M6502.hxx +++ b/src/emucore/M6502.hxx @@ -177,7 +177,7 @@ class M6502 : public Serializable @param out The serializer device to save to. @return The result of the save. True on success, false on failure. */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Loads the current state of this device from the given Serializer. @@ -185,14 +185,14 @@ class M6502 : public Serializable @param in The Serializer device to load from. @return The result of the load. True on success, false on failure. */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a null terminated string which is the processor's name (i.e. "M6532") @return The name of the device */ - string name() const { return "M6502"; } + string name() const override { return "M6502"; } #ifdef DEBUGGER_SUPPORT public: diff --git a/src/emucore/M6532.hxx b/src/emucore/M6532.hxx index 76efaa7f2..4dbcf7412 100644 --- a/src/emucore/M6532.hxx +++ b/src/emucore/M6532.hxx @@ -65,14 +65,14 @@ class M6532 : public Device /** Reset cartridge to its power-on state */ - void reset(); + void reset() override; /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; /** Update the entire digital and analog pin state of ports A and B. @@ -85,7 +85,7 @@ class M6532 : public Device @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install 6532 in the specified system and device. Invoked by @@ -104,7 +104,7 @@ class M6532 : public Device @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this device from the given Serializer. @@ -112,14 +112,14 @@ class M6532 : public Device @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "M6532"; } + string name() const override { return "M6532"; } public: /** @@ -127,7 +127,7 @@ class M6532 : public Device @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -137,7 +137,7 @@ class M6532 : public Device @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; private: Int32 timerClocks() const diff --git a/src/emucore/MindLink.hxx b/src/emucore/MindLink.hxx index e43d4a1ab..e57ad8db4 100644 --- a/src/emucore/MindLink.hxx +++ b/src/emucore/MindLink.hxx @@ -66,20 +66,20 @@ class MindLink : public Controller @param pin The pin of the controller jack to write to @param value The value to write to the pin */ - void write(DigitalPin pin, bool value) { myDigitalPinState[pin] = value; } + void write(DigitalPin pin, bool value) override { myDigitalPinState[pin] = value; } /** Called after *all* digital pins have been written on Port A. @param value The entire contents of the SWCHA register */ - void controlWrite(uInt8) { nextMindlinkBit(); } + void controlWrite(uInt8) override { nextMindlinkBit(); } /** Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -98,7 +98,7 @@ class MindLink : public Controller @return Whether the controller supports using the mouse */ bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + Controller::Type xtype, int xid, Controller::Type ytype, int yid) override; private: void nextMindlinkBit(); diff --git a/src/emucore/NullDev.hxx b/src/emucore/NullDev.hxx index 565c85b60..4c764884d 100644 --- a/src/emucore/NullDev.hxx +++ b/src/emucore/NullDev.hxx @@ -53,12 +53,12 @@ class NullDevice : public Device @param system The system the device should install itself in */ - void install(System& system) { mySystem = &system; } + void install(System& system) override { mySystem = &system; } /** Reset device to its power-on state */ - void reset() { } + void reset() override { } /** Save the current state of this device to the given Serializer. @@ -66,7 +66,7 @@ class NullDevice : public Device @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const { return true; } + bool save(Serializer& out) const override { return true; } /** Load the current state of this device from the given Serializer. @@ -74,14 +74,14 @@ class NullDevice : public Device @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in) { return true; } + bool load(Serializer& in) override { return true; } /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "NullDevice"; } + string name() const override { return "NullDevice"; } public: /** @@ -89,7 +89,7 @@ class NullDevice : public Device @return The byte at the specified address */ - uInt8 peek(uInt16 address) { + uInt8 peek(uInt16 address) override { cerr << hex << "NullDevice: peek(" << address << ")\n"; return 0; } @@ -102,7 +102,7 @@ class NullDevice : public Device @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value) { + bool poke(uInt16 address, uInt8 value) override { cerr << hex << "NullDevice: poke(" << address << "," << value << ")\n"; return false; } diff --git a/src/emucore/Paddles.hxx b/src/emucore/Paddles.hxx index 594ef9092..e02e985a9 100644 --- a/src/emucore/Paddles.hxx +++ b/src/emucore/Paddles.hxx @@ -59,7 +59,7 @@ class Paddles : public Controller Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -78,7 +78,7 @@ class Paddles : public Controller @return Whether the controller supports using the mouse */ bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + Controller::Type xtype, int xid, Controller::Type ytype, int yid) override; /** Sets the sensitivity for digital emulation of paddle movement. diff --git a/src/emucore/SaveKey.hxx b/src/emucore/SaveKey.hxx index 545b49b9f..336dbd41d 100644 --- a/src/emucore/SaveKey.hxx +++ b/src/emucore/SaveKey.hxx @@ -64,7 +64,7 @@ class SaveKey : public Controller @param pin The pin of the controller jack to read @return The state of the pin */ - bool read(DigitalPin pin); + bool read(DigitalPin pin) override; /** Write the given value to the specified digital pin for this @@ -74,20 +74,20 @@ class SaveKey : public Controller @param pin The pin of the controller jack to write to @param value The value to write to the pin */ - void write(DigitalPin pin, bool value); + void write(DigitalPin pin, bool value) override; /** Update the entire digital and analog pin state according to the events currently set. */ - void update() { } + void update() override { } /** Notification method invoked by the system right before the system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; private: // The EEPROM used in the SaveKey diff --git a/src/emucore/Switches.hxx b/src/emucore/Switches.hxx index 8c8b14df7..e35b776c7 100644 --- a/src/emucore/Switches.hxx +++ b/src/emucore/Switches.hxx @@ -72,7 +72,7 @@ class Switches : public Serializable @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of the switches from the given Serializer. @@ -80,14 +80,14 @@ class Switches : public Serializable @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "Switches"; } + string name() const override { return "Switches"; } /** Query the 'Console_TelevisionType' switches bit. diff --git a/src/emucore/System.hxx b/src/emucore/System.hxx index 0249e7c09..c953f69b5 100644 --- a/src/emucore/System.hxx +++ b/src/emucore/System.hxx @@ -358,7 +358,7 @@ class System : public Serializable @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this system from the given Serializer. @@ -366,14 +366,14 @@ class System : public Serializable @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const { return "System"; } + string name() const override { return "System"; } private: const OSystem& myOSystem; diff --git a/src/emucore/TIA.hxx b/src/emucore/TIA.hxx index b99dede8a..832d67947 100644 --- a/src/emucore/TIA.hxx +++ b/src/emucore/TIA.hxx @@ -67,7 +67,7 @@ class TIA : public Device /** Reset device to its power-on state */ - void reset(); + void reset() override; /** Reset frame to current YStart/Height properties @@ -79,7 +79,7 @@ class TIA : public Device system resets its cycle counter to zero. It may be necessary to override this method for devices that remember cycle counts. */ - void systemCyclesReset(); + void systemCyclesReset() override; /** Install TIA in the specified system. Invoked by the system @@ -87,7 +87,7 @@ class TIA : public Device @param system The system the device should install itself in */ - void install(System& system); + void install(System& system) override; /** Install TIA in the specified system and device. Invoked by @@ -106,7 +106,7 @@ class TIA : public Device @param out The Serializer object to use @return False on any errors, else true */ - bool save(Serializer& out) const; + bool save(Serializer& out) const override; /** Load the current state of this device from the given Serializer. @@ -114,7 +114,7 @@ class TIA : public Device @param in The Serializer object to use @return False on any errors, else true */ - bool load(Serializer& in); + bool load(Serializer& in) override; /** The following are very similar to save() and load(), except they @@ -143,14 +143,14 @@ class TIA : public Device @return The name of the object */ - string name() const { return "TIA"; } + string name() const override { return "TIA"; } /** Get the byte at the specified address @return The byte at the specified address */ - uInt8 peek(uInt16 address); + uInt8 peek(uInt16 address) override; /** Change the byte at the specified address to the given value @@ -160,7 +160,7 @@ class TIA : public Device @return True if the poke changed the device address space, else false */ - bool poke(uInt16 address, uInt8 value); + bool poke(uInt16 address, uInt8 value) override; /** This method should be called at an interval corresponding to the diff --git a/src/emucore/TrackBall.hxx b/src/emucore/TrackBall.hxx index 9ab1d348e..f5edd141d 100644 --- a/src/emucore/TrackBall.hxx +++ b/src/emucore/TrackBall.hxx @@ -65,13 +65,13 @@ class TrackBall : public Controller @return The state of all digital pins */ - uInt8 read(); + uInt8 read() override; /** Update the entire digital and analog pin state according to the events currently set. */ - void update(); + void update() override; /** Determines how this controller will treat values received from the @@ -89,8 +89,8 @@ class TrackBall : public Controller @return Whether the controller supports using the mouse */ - bool setMouseControl( - Controller::Type xtype, int xid, Controller::Type ytype, int yid); + bool setMouseControl(Controller::Type xtype, int xid, + Controller::Type ytype, int yid) override; private: // Counter to iterate through the gray codes diff --git a/src/gui/AboutDialog.hxx b/src/gui/AboutDialog.hxx index 5ce568d8d..c45aba311 100644 --- a/src/gui/AboutDialog.hxx +++ b/src/gui/AboutDialog.hxx @@ -34,7 +34,14 @@ class AboutDialog : public Dialog const GUI::Font& font); virtual ~AboutDialog(); - protected: + private: + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void updateStrings(int page, int lines, string& title); + void displayInfo(); + + void loadConfig() override { displayInfo(); } + + private: ButtonWidget* myNextButton; ButtonWidget* myPrevButton; @@ -46,13 +53,6 @@ class AboutDialog : public Dialog int myNumPages; int myLinesPerPage; - private: - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void updateStrings(int page, int lines, string& title); - void displayInfo(); - - void loadConfig() { displayInfo(); } - private: // Following constructors and assignment operators not supported AboutDialog() = delete; diff --git a/src/gui/AudioDialog.hxx b/src/gui/AudioDialog.hxx index 2c8584d98..c92cb6c45 100644 --- a/src/gui/AudioDialog.hxx +++ b/src/gui/AudioDialog.hxx @@ -37,26 +37,26 @@ class AudioDialog : public Dialog AudioDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); virtual ~AudioDialog(); - protected: + private: + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; + + void handleSoundEnableChange(bool active); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + private: + enum { + kVolumeChanged = 'ADvc', + kSoundEnableChanged = 'ADse' + }; + SliderWidget* myVolumeSlider; StaticTextWidget* myVolumeLabel; PopUpWidget* myFragsizePopup; PopUpWidget* myFreqPopup; CheckboxWidget* mySoundEnableCheckbox; - private: - void loadConfig(); - void saveConfig(); - void setDefaults(); - - void handleSoundEnableChange(bool active); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - enum { - kVolumeChanged = 'ADvc', - kSoundEnableChanged = 'ADse' - }; - private: // Following constructors and assignment operators not supported AudioDialog() = delete; diff --git a/src/gui/BrowserDialog.hxx b/src/gui/BrowserDialog.hxx index 4d6f8e850..3678d920e 100644 --- a/src/gui/BrowserDialog.hxx +++ b/src/gui/BrowserDialog.hxx @@ -51,8 +51,8 @@ class BrowserDialog : public Dialog, public CommandSender /** Get resulting file node (called after receiving kChooseCmd) */ const FilesystemNode& getResult() const; - protected: - void handleCommand(CommandSender* sender, int cmd, int data, int id); + private: + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void updateUI(); private: diff --git a/src/gui/CheckListWidget.hxx b/src/gui/CheckListWidget.hxx index ebc0ac014..16e1f90a1 100644 --- a/src/gui/CheckListWidget.hxx +++ b/src/gui/CheckListWidget.hxx @@ -31,14 +31,8 @@ using CheckboxArray = vector; class CheckListWidget : public ListWidget { public: - enum { - kListItemChecked = 'LIct' // checkbox toggled on current line - }; - - enum CheckStyle { - XFill, - SolidFill - }; + enum { kListItemChecked = 'LIct' /* checkbox toggled on current line*/ }; + enum CheckStyle { XFill, SolidFill }; public: CheckListWidget(GuiObject* boss, const GUI::Font& font, @@ -52,12 +46,12 @@ class CheckListWidget : public ListWidget bool getState(int line); bool getSelectedState() { return getState(_selectedItem); } - bool handleEvent(Event::Type e); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + private: + bool handleEvent(Event::Type e) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; - protected: - void drawWidget(bool hilite); - GUI::Rect getEditRect() const; + void drawWidget(bool hilite) override; + GUI::Rect getEditRect() const override; protected: BoolArray _stateList; diff --git a/src/gui/ComboDialog.hxx b/src/gui/ComboDialog.hxx index b68b2176e..423d9a863 100644 --- a/src/gui/ComboDialog.hxx +++ b/src/gui/ComboDialog.hxx @@ -38,11 +38,11 @@ class ComboDialog : public Dialog void show(Event::Type event, const string& name); private: - void loadConfig(); - void saveConfig(); - void setDefaults(); + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: Event::Type myComboEvent; diff --git a/src/gui/CommandDialog.hxx b/src/gui/CommandDialog.hxx index 76fba227f..aea771b9d 100644 --- a/src/gui/CommandDialog.hxx +++ b/src/gui/CommandDialog.hxx @@ -34,7 +34,7 @@ class CommandDialog : public Dialog virtual ~CommandDialog(); protected: - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; enum { kSelectCmd = 'Csel', diff --git a/src/gui/ConfigPathDialog.hxx b/src/gui/ConfigPathDialog.hxx index 34e840c1e..c907ef09b 100644 --- a/src/gui/ConfigPathDialog.hxx +++ b/src/gui/ConfigPathDialog.hxx @@ -41,12 +41,12 @@ class ConfigPathDialog : public Dialog, public CommandSender int max_w, int max_h); virtual ~ConfigPathDialog(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: - void loadConfig(); - void saveConfig(); - void setDefaults(); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; private: enum { diff --git a/src/gui/ContextMenu.hxx b/src/gui/ContextMenu.hxx index b58b78ab0..bd3a6aa21 100644 --- a/src/gui/ContextMenu.hxx +++ b/src/gui/ContextMenu.hxx @@ -71,7 +71,7 @@ class ContextMenu : public Dialog, public CommandSender const Variant& getSelectedTag() const; /** This dialog uses its own positioning, so we override Dialog::center() */ - void center(); + void center() override; /** The following methods are used when we want to select *and* send a command for the new selection. They are only to be used @@ -83,20 +83,19 @@ class ContextMenu : public Dialog, public CommandSender bool sendSelectionFirst(); bool sendSelectionLast(); - protected: - void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseMoved(int x, int y, int button); - bool handleMouseClicks(int x, int y, int button); - void handleMouseWheel(int x, int y, int direction); - void handleKeyDown(StellaKey key, StellaMod mod); - void handleJoyDown(int stick, int button); - void handleJoyAxis(int stick, int axis, int value); - bool handleJoyHat(int stick, int hat, int value); + private: + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseMoved(int x, int y, int button) override; + bool handleMouseClicks(int x, int y, int button) override; + void handleMouseWheel(int x, int y, int direction) override; + void handleKeyDown(StellaKey key, StellaMod mod) override; + void handleJoyDown(int stick, int button) override; + void handleJoyAxis(int stick, int axis, int value) override; + bool handleJoyHat(int stick, int hat, int value) override; void handleEvent(Event::Type e); - void drawDialog(); + void drawDialog() override; - private: void recalc(const GUI::Rect& image); int findItem(int x, int y) const; diff --git a/src/gui/Dialog.hxx b/src/gui/Dialog.hxx index 4d64bccf9..932daa7ac 100644 --- a/src/gui/Dialog.hxx +++ b/src/gui/Dialog.hxx @@ -55,7 +55,7 @@ class Dialog : public GuiObject void open(bool refresh = true); void close(bool refresh = true); - bool isVisible() const { return _visible; } + bool isVisible() const override { return _visible; } virtual void center(); virtual void drawDialog(); @@ -63,7 +63,7 @@ class Dialog : public GuiObject virtual void saveConfig() { } virtual void setDefaults() { } - void addFocusWidget(Widget* w); + void addFocusWidget(Widget* w) override; void addToFocusList(WidgetArray& list); void addToFocusList(WidgetArray& list, TabWidget* w, int tabId); void addBGroupToFocusList(WidgetArray& list) { _buttonGroup = list; } @@ -83,8 +83,8 @@ class Dialog : public GuiObject void addSurface(shared_ptr surface); protected: - virtual void draw() { }; - void releaseFocus(); + virtual void draw() override { }; + void releaseFocus() override; virtual void handleText(char text); virtual void handleKeyDown(StellaKey key, StellaMod modifiers); @@ -98,7 +98,7 @@ class Dialog : public GuiObject virtual void handleJoyUp(int stick, int button); virtual void handleJoyAxis(int stick, int axis, int value); virtual bool handleJoyHat(int stick, int hat, int value); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override; Widget* findWidget(int x, int y) const; // Find the widget at pos x,y if any diff --git a/src/gui/EditTextWidget.hxx b/src/gui/EditTextWidget.hxx index e4aef5773..3f4004fa6 100644 --- a/src/gui/EditTextWidget.hxx +++ b/src/gui/EditTextWidget.hxx @@ -31,19 +31,19 @@ class EditTextWidget : public EditableWidget EditTextWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h, const string& text = ""); - void setText(const string& str, bool changed = false); - - void handleMouseDown(int x, int y, int button, int clickCount); + void setText(const string& str, bool changed = false) override; protected: - void drawWidget(bool hilite); - void lostFocusWidget(); + void drawWidget(bool hilite) override; + void lostFocusWidget() override; - void startEditMode(); - void endEditMode(); - void abortEditMode(); + void startEditMode() override; + void endEditMode() override; + void abortEditMode() override; - GUI::Rect getEditRect() const; + GUI::Rect getEditRect() const override; + + void handleMouseDown(int x, int y, int button, int clickCount) override; protected: string _backupString; diff --git a/src/gui/EditableWidget.hxx b/src/gui/EditableWidget.hxx index 344e2c7b3..9c8487843 100644 --- a/src/gui/EditableWidget.hxx +++ b/src/gui/EditableWidget.hxx @@ -56,8 +56,8 @@ class EditableWidget : public Widget, public CommandSender bool isEditable() const { return _editable; } void setEditable(bool editable); - virtual bool handleText(char text); - virtual bool handleKeyDown(StellaKey key, StellaMod mod); + bool handleText(char text) override; + bool handleKeyDown(StellaKey key, StellaMod mod) override; // We only want to focus this widget when we can edit its contents virtual bool wantsFocus() { return _editable; } diff --git a/src/gui/EventMappingWidget.hxx b/src/gui/EventMappingWidget.hxx index 4d9b71ec2..e42127ad1 100644 --- a/src/gui/EventMappingWidget.hxx +++ b/src/gui/EventMappingWidget.hxx @@ -46,10 +46,6 @@ class EventMappingWidget : public Widget, public CommandSender const StringList& actions, EventMode mode); ~EventMappingWidget(); - bool handleKeyDown(StellaKey key, StellaMod mod); - void handleJoyDown(int stick, int button); - void handleJoyAxis(int stick, int axis, int value); - bool handleJoyHat(int stick, int hat, int value); bool remapMode() { return myRemapStatus; } @@ -64,14 +60,20 @@ class EventMappingWidget : public Widget, public CommandSender kComboCmd = 'cmbo' }; - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); + bool handleKeyDown(StellaKey key, StellaMod mod) override; + void handleJoyDown(int stick, int button) override; + void handleJoyAxis(int stick, int axis, int value) override; + bool handleJoyHat(int stick, int hat, int value) override; + + void loadConfig() override; + void saveConfig(); + + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void startRemapping(); void eraseRemapping(); void resetRemapping(); void stopRemapping(); - void loadConfig(); - void saveConfig(); void drawKeyMapping(); void enableButtons(bool state); diff --git a/src/gui/FileListWidget.hxx b/src/gui/FileListWidget.hxx index 8bda7d3ea..58a74f455 100644 --- a/src/gui/FileListWidget.hxx +++ b/src/gui/FileListWidget.hxx @@ -66,7 +66,7 @@ class FileListWidget : public StringListWidget const FilesystemNode& currentDir() const { return _node; } protected: - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: FilesystemNode::ListMode _fsmode; diff --git a/src/gui/GameInfoDialog.hxx b/src/gui/GameInfoDialog.hxx index b0e66afdc..81bc60167 100644 --- a/src/gui/GameInfoDialog.hxx +++ b/src/gui/GameInfoDialog.hxx @@ -39,13 +39,12 @@ class GameInfoDialog : public Dialog, public CommandSender const GUI::Font& font, GuiObject* boss); virtual ~GameInfoDialog(); - protected: - void loadConfig(); - void saveConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: - void setDefaults(); + void loadConfig() override; + void saveConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + void setDefaults() override; void loadView(); private: diff --git a/src/gui/GlobalPropsDialog.hxx b/src/gui/GlobalPropsDialog.hxx index 0822593ea..a45cd2007 100644 --- a/src/gui/GlobalPropsDialog.hxx +++ b/src/gui/GlobalPropsDialog.hxx @@ -38,11 +38,11 @@ class GlobalPropsDialog : public Dialog, public CommandSender private: int addHoldWidgets(const GUI::Font& font, int x, int y, WidgetArray& wid); - void loadConfig(); - void saveConfig(); - void setDefaults(); + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: enum { diff --git a/src/gui/HelpDialog.hxx b/src/gui/HelpDialog.hxx index 95fc9c95f..c96f53cc0 100644 --- a/src/gui/HelpDialog.hxx +++ b/src/gui/HelpDialog.hxx @@ -35,7 +35,13 @@ class HelpDialog : public Dialog HelpDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); virtual ~HelpDialog(); - protected: + private: + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void updateStrings(uInt8 page, uInt8 lines, string& title); + void displayInfo(); + void loadConfig() override { displayInfo(); } + + private: enum { kLINES_PER_PAGE = 10 }; ButtonWidget* myNextButton; ButtonWidget* myPrevButton; @@ -49,12 +55,6 @@ class HelpDialog : public Dialog uInt8 myPage; uInt8 myNumPages; - private: - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void updateStrings(uInt8 page, uInt8 lines, string& title); - void displayInfo(); - void loadConfig() { displayInfo(); } - private: // Following constructors and assignment operators not supported HelpDialog() = delete; diff --git a/src/gui/InputDialog.hxx b/src/gui/InputDialog.hxx index 47f6bb536..5909e0867 100644 --- a/src/gui/InputDialog.hxx +++ b/src/gui/InputDialog.hxx @@ -41,18 +41,17 @@ class InputDialog : public Dialog const GUI::Font& font, int max_w, int max_h); virtual ~InputDialog(); - protected: - void handleKeyDown(StellaKey key, StellaMod mod); - void handleJoyDown(int stick, int button); - void handleJoyAxis(int stick, int axis, int value); - bool handleJoyHat(int stick, int hat, int value); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - - void loadConfig(); - void saveConfig(); - void setDefaults(); - private: + void handleKeyDown(StellaKey key, StellaMod mod) override; + void handleJoyDown(int stick, int button) override; + void handleJoyAxis(int stick, int axis, int value) override; + bool handleJoyHat(int stick, int hat, int value) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; + void addDevicePortTab(const GUI::Font& font); private: diff --git a/src/gui/InputTextDialog.hxx b/src/gui/InputTextDialog.hxx index ac05263dc..1343ef40b 100644 --- a/src/gui/InputTextDialog.hxx +++ b/src/gui/InputTextDialog.hxx @@ -53,13 +53,13 @@ class InputTextDialog : public Dialog, public CommandSender void setFocus(int idx = 0); - /** This dialog uses its own positioning, so we override Dialog::center() */ - void center(); - protected: void initialize(const GUI::Font& lfont, const GUI::Font& nfont, const StringList& labels); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + /** This dialog uses its own positioning, so we override Dialog::center() */ + void center() override; private: vector myInput; diff --git a/src/gui/JoystickDialog.hxx b/src/gui/JoystickDialog.hxx index 143ca3cec..94659661d 100644 --- a/src/gui/JoystickDialog.hxx +++ b/src/gui/JoystickDialog.hxx @@ -44,8 +44,8 @@ class JoystickDialog : public Dialog void show() { open(); } private: - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: StringListWidget* myJoyList; diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index 0ac74dfc4..2814b4ef5 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -78,15 +78,14 @@ class LauncherDialog : public Dialog */ void reload() { updateListing(); } - protected: - void handleKeyDown(StellaKey key, StellaMod mod); - void handleMouseDown(int x, int y, int button, int clickCount); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + private: + void handleKeyDown(StellaKey key, StellaMod mod) override; + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; - void loadConfig(); + void loadConfig() override; void updateListing(const string& nameToSelect = ""); - private: void loadDirListing(); void loadRomInfo(); void handleContextMenu(); diff --git a/src/gui/LauncherFilterDialog.hxx b/src/gui/LauncherFilterDialog.hxx index 001636b22..dc02d8895 100644 --- a/src/gui/LauncherFilterDialog.hxx +++ b/src/gui/LauncherFilterDialog.hxx @@ -58,12 +58,12 @@ class LauncherFilterDialog : public Dialog, public CommandSender static bool isValidRomName(const FilesystemNode& name, string& ext); private: - void loadConfig(); - void saveConfig(); - void setDefaults(); + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; void handleFileTypeChange(const string& type); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: PopUpWidget* myFileType; diff --git a/src/gui/ListWidget.hxx b/src/gui/ListWidget.hxx index ff98aed62..0f787d752 100644 --- a/src/gui/ListWidget.hxx +++ b/src/gui/ListWidget.hxx @@ -62,34 +62,33 @@ class ListWidget : public EditableWidget void scrollTo(int item); - virtual void handleMouseDown(int x, int y, int button, int clickCount); - virtual void handleMouseUp(int x, int y, int button, int clickCount); - virtual void handleMouseWheel(int x, int y, int direction); - virtual bool handleText(char text); - virtual bool handleKeyDown(StellaKey key, StellaMod mod); - virtual bool handleKeyUp(StellaKey key, StellaMod mod); - virtual bool handleEvent(Event::Type e); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); - // Account for the extra width of embedded scrollbar - virtual int getWidth() const { return _w + kScrollBarWidth; } - - void startEditMode(); - void endEditMode(); + int getWidth() const override { return _w + kScrollBarWidth; } static void setQuickSelectDelay(uInt64 time) { _QUICK_SELECT_DELAY = time; } protected: - virtual void drawWidget(bool hilite) = 0; - virtual GUI::Rect getEditRect() const = 0; + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + bool handleText(char text) override; + bool handleKeyDown(StellaKey key, StellaMod mod) override; + bool handleKeyUp(StellaKey key, StellaMod mod) override; + bool handleEvent(Event::Type e) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + virtual void drawWidget(bool hilite) override = 0; + virtual GUI::Rect getEditRect() const override = 0; int findItem(int x, int y) const; void recalc(); void scrollBarRecalc(); - void abortEditMode(); + void startEditMode() override; + void endEditMode() override; + void abortEditMode() override; - void lostFocusWidget(); + void lostFocusWidget() override; void scrollToSelected() { scrollToCurrent(_selectedItem); } void scrollToHighlighted() { scrollToCurrent(_highlightedItem); } diff --git a/src/gui/LoggerDialog.hxx b/src/gui/LoggerDialog.hxx index c278ba7ed..29e315126 100644 --- a/src/gui/LoggerDialog.hxx +++ b/src/gui/LoggerDialog.hxx @@ -36,12 +36,12 @@ class LoggerDialog : public Dialog const GUI::Font& font, int max_w, int max_h); virtual ~LoggerDialog(); - protected: - void loadConfig(); - void saveConfig(); + private: + void loadConfig() override; + void saveConfig() override; void saveLogFile(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: StringListWidget* myLogInfo; diff --git a/src/gui/MessageBox.hxx b/src/gui/MessageBox.hxx index f2570a26a..861e00138 100644 --- a/src/gui/MessageBox.hxx +++ b/src/gui/MessageBox.hxx @@ -50,7 +50,7 @@ class MessageBox : public Dialog, public CommandSender private: void addText(const GUI::Font& font, const StringList& text); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: int myCmd; diff --git a/src/gui/OptionsDialog.hxx b/src/gui/OptionsDialog.hxx index b1e9acdb2..6ccb24db8 100644 --- a/src/gui/OptionsDialog.hxx +++ b/src/gui/OptionsDialog.hxx @@ -48,8 +48,8 @@ class OptionsDialog : public Dialog virtual ~OptionsDialog(); private: - void loadConfig(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: unique_ptr myVideoDialog; diff --git a/src/gui/PopUpWidget.hxx b/src/gui/PopUpWidget.hxx index 52620d917..96bf14b8e 100644 --- a/src/gui/PopUpWidget.hxx +++ b/src/gui/PopUpWidget.hxx @@ -63,11 +63,11 @@ class PopUpWidget : public Widget, public CommandSender bool wantsFocus() { return true; } protected: - void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseWheel(int x, int y, int direction); - bool handleEvent(Event::Type e); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - void drawWidget(bool hilite); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + bool handleEvent(Event::Type e) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + void drawWidget(bool hilite) override; private: unique_ptr myMenu; diff --git a/src/gui/ProgressDialog.cxx b/src/gui/ProgressDialog.cxx index 57c49dbd5..a95d811ee 100644 --- a/src/gui/ProgressDialog.cxx +++ b/src/gui/ProgressDialog.cxx @@ -33,8 +33,7 @@ ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font, mySlider(nullptr), myStart(0), myFinish(0), - myStep(0), - myCurrentStep(0) + myStep(0) { const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), diff --git a/src/gui/ProgressDialog.hxx b/src/gui/ProgressDialog.hxx index 37851502c..f23f06b78 100644 --- a/src/gui/ProgressDialog.hxx +++ b/src/gui/ProgressDialog.hxx @@ -37,11 +37,11 @@ class ProgressDialog : public Dialog void setRange(int begin, int end, int step); void setProgress(int progress); - protected: + private: StaticTextWidget* myMessage; SliderWidget* mySlider; - int myStart, myFinish, myStep, myCurrentStep; + int myStart, myFinish, myStep; private: // Following constructors and assignment operators not supported diff --git a/src/gui/RomAuditDialog.hxx b/src/gui/RomAuditDialog.hxx index 7dd06b23b..9ca1eeaff 100644 --- a/src/gui/RomAuditDialog.hxx +++ b/src/gui/RomAuditDialog.hxx @@ -40,11 +40,11 @@ class RomAuditDialog : public Dialog virtual ~RomAuditDialog(); private: - void loadConfig(); + void loadConfig() override; void auditRoms(); void openBrowser(const string& title, const string& startpath, FilesystemNode::ListMode mode, int cmd); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: enum { diff --git a/src/gui/RomInfoWidget.hxx b/src/gui/RomInfoWidget.hxx index b7c458146..7206f0576 100644 --- a/src/gui/RomInfoWidget.hxx +++ b/src/gui/RomInfoWidget.hxx @@ -38,10 +38,10 @@ class RomInfoWidget : public Widget void setProperties(const Properties& props); void clearProperties(); - void loadConfig(); + void loadConfig() override; protected: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; private: void parseProperties(); diff --git a/src/gui/ScrollBarWidget.hxx b/src/gui/ScrollBarWidget.hxx index 7f26e35c3..2e0206107 100644 --- a/src/gui/ScrollBarWidget.hxx +++ b/src/gui/ScrollBarWidget.hxx @@ -36,23 +36,23 @@ class ScrollBarWidget : public Widget, public CommandSender ScrollBarWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h); - virtual void handleMouseDown(int x, int y, int button, int clickCount); - virtual void handleMouseUp(int x, int y, int button, int clickCount); - virtual void handleMouseWheel(int x, int y, int direction); - virtual void handleMouseMoved(int x, int y, int button); - virtual bool handleMouseClicks(int x, int y, int button); - virtual void handleMouseEntered(int button); - virtual void handleMouseLeft(int button); - void recalc(); + void handleMouseWheel(int x, int y, int direction) override; static void setWheelLines(int lines) { _WHEEL_LINES = lines; } static int getWheelLines() { return _WHEEL_LINES; } private: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; void checkBounds(int old_pos); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseMoved(int x, int y, int button) override; + bool handleMouseClicks(int x, int y, int button) override; + void handleMouseEntered(int button) override; + void handleMouseLeft(int button) override; + public: int _numEntries; int _entriesPerPage; diff --git a/src/gui/SnapshotDialog.hxx b/src/gui/SnapshotDialog.hxx index 7d2a30329..e053eaf76 100644 --- a/src/gui/SnapshotDialog.hxx +++ b/src/gui/SnapshotDialog.hxx @@ -41,12 +41,12 @@ class SnapshotDialog : public Dialog int max_w, int max_h); virtual ~SnapshotDialog(); - void handleCommand(CommandSender* sender, int cmd, int data, int id); - private: - void loadConfig(); - void saveConfig(); - void setDefaults(); + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; + + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: enum { diff --git a/src/gui/StringListWidget.hxx b/src/gui/StringListWidget.hxx index be6b5142d..a4a0ee098 100644 --- a/src/gui/StringListWidget.hxx +++ b/src/gui/StringListWidget.hxx @@ -33,8 +33,8 @@ class StringListWidget : public ListWidget void setList(const StringList& list); protected: - void drawWidget(bool hilite); - GUI::Rect getEditRect() const; + void drawWidget(bool hilite) override; + GUI::Rect getEditRect() const override; protected: bool _hilite; diff --git a/src/gui/TabWidget.hxx b/src/gui/TabWidget.hxx index 55ff62957..c8d0a2e36 100644 --- a/src/gui/TabWidget.hxx +++ b/src/gui/TabWidget.hxx @@ -31,8 +31,6 @@ class TabWidget : public Widget, public CommandSender TabWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h); virtual ~TabWidget(); - virtual int getChildY() const; - // use Dialog::releaseFocus() when changing to another tab // Problem: how to add items to a tab? @@ -55,15 +53,16 @@ class TabWidget : public Widget, public CommandSender int getTabHeight() { return _tabHeight; } int getActiveTab() { return _activeTab; } - virtual void handleMouseDown(int x, int y, int button, int clickCount); - virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); - virtual bool handleEvent(Event::Type event); - - virtual void loadConfig(); + void loadConfig() override; protected: - virtual void drawWidget(bool hilite); - virtual Widget* findWidget(int x, int y); + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + bool handleEvent(Event::Type event) override; + + void drawWidget(bool hilite) override; + Widget* findWidget(int x, int y) override; + int getChildY() const override; private: struct Tab { diff --git a/src/gui/UIDialog.hxx b/src/gui/UIDialog.hxx index 0944cb2df..e82bc918e 100644 --- a/src/gui/UIDialog.hxx +++ b/src/gui/UIDialog.hxx @@ -38,7 +38,14 @@ class UIDialog : public Dialog UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); virtual ~UIDialog(); - protected: + private: + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; + + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + private: TabWidget* myTab; // Launcher options @@ -62,13 +69,6 @@ class UIDialog : public Dialog PopUpWidget* myListDelayPopup; PopUpWidget* myWheelLinesPopup; - private: - void loadConfig(); - void saveConfig(); - void setDefaults(); - - void handleCommand(CommandSender* sender, int cmd, int data, int id); - enum { kLWidthChanged = 'UIlw', kLHeightChanged = 'UIlh', diff --git a/src/gui/VideoDialog.hxx b/src/gui/VideoDialog.hxx index 185bdabd1..9766eb003 100644 --- a/src/gui/VideoDialog.hxx +++ b/src/gui/VideoDialog.hxx @@ -40,14 +40,14 @@ class VideoDialog : public Dialog virtual ~VideoDialog(); private: - void loadConfig(); - void saveConfig(); - void setDefaults(); + void loadConfig() override; + void saveConfig() override; + void setDefaults() override; void handleFullscreenChange(bool enable); void handleTVModeChange(NTSCFilter::Preset); void loadTVAdjustables(NTSCFilter::Preset preset); - void handleCommand(CommandSender* sender, int cmd, int data, int id); + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; private: TabWidget* myTab; diff --git a/src/gui/Widget.hxx b/src/gui/Widget.hxx index c82bce6d6..c7b443292 100644 --- a/src/gui/Widget.hxx +++ b/src/gui/Widget.hxx @@ -63,29 +63,29 @@ class Widget : public GuiObject Widget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h); virtual ~Widget(); - virtual int getAbsX() const { return _x + _boss->getChildX(); } - virtual int getAbsY() const { return _y + _boss->getChildY(); } + virtual int getAbsX() const override { return _x + _boss->getChildX(); } + virtual int getAbsY() const override { return _y + _boss->getChildY(); } - virtual bool handleText(char text) { return false; } - virtual bool handleKeyDown(StellaKey key, StellaMod mod) { return false; } - virtual bool handleKeyUp(StellaKey key, StellaMod mod) { return false; } - virtual void handleMouseDown(int x, int y, int button, int clickCount) {} - virtual void handleMouseUp(int x, int y, int button, int clickCount) {} - virtual void handleMouseEntered(int button) {} - virtual void handleMouseLeft(int button) {} - virtual void handleMouseMoved(int x, int y, int button) {} - virtual void handleMouseWheel(int x, int y, int direction) {} + virtual bool handleText(char text) { return false; } + virtual bool handleKeyDown(StellaKey key, StellaMod mod) { return false; } + virtual bool handleKeyUp(StellaKey key, StellaMod mod) { return false; } + virtual void handleMouseDown(int x, int y, int button, int clickCount) { } + virtual void handleMouseUp(int x, int y, int button, int clickCount) { } + virtual void handleMouseEntered(int button) { } + virtual void handleMouseLeft(int button) { } + virtual void handleMouseMoved(int x, int y, int button) { } + virtual void handleMouseWheel(int x, int y, int direction) { } virtual bool handleMouseClicks(int x, int y, int button) { return false; } - virtual void handleJoyDown(int stick, int button) {} - virtual void handleJoyUp(int stick, int button) {} - virtual void handleJoyAxis(int stick, int axis, int value) {} + virtual void handleJoyDown(int stick, int button) { } + virtual void handleJoyUp(int stick, int button) { } + virtual void handleJoyAxis(int stick, int axis, int value) { } virtual bool handleJoyHat(int stick, int hat, int value) { return false; } virtual bool handleEvent(Event::Type event) { return false; } - void draw(); + void draw() override; void receivedFocus(); void lostFocus(); - void addFocusWidget(Widget* w) { _focusList.push_back(w); } + void addFocusWidget(Widget* w) override { _focusList.push_back(w); } /** Set/clear WIDGET_ENABLED flag */ void setEnabled(bool e); @@ -94,11 +94,11 @@ class Widget : public GuiObject void clearFlags(int flags) { _flags &= ~flags; setDirty(); } int getFlags() const { return _flags; } - bool isEnabled() const { return _flags & WIDGET_ENABLED; } - bool isVisible() const { return !(_flags & WIDGET_INVISIBLE); } - bool wantsFocus() const { return _flags & WIDGET_RETAIN_FOCUS; } - bool wantsTab() const { return _flags & WIDGET_WANTS_TAB; } - bool wantsRaw() const { return _flags & WIDGET_WANTS_RAWDATA; } + bool isEnabled() const { return _flags & WIDGET_ENABLED; } + bool isVisible() const override { return !(_flags & WIDGET_INVISIBLE); } + bool wantsFocus() const { return _flags & WIDGET_RETAIN_FOCUS; } + bool wantsTab() const { return _flags & WIDGET_WANTS_TAB; } + bool wantsRaw() const { return _flags & WIDGET_WANTS_RAWDATA; } void setID(int id) { _id = id; } int getID() const { return _id; } @@ -110,20 +110,20 @@ class Widget : public GuiObject void setBGColor(uInt32 color) { _bgcolor = color; } void setBGColorHi(uInt32 color) { _bgcolorhi = color; } - virtual void loadConfig() {} + virtual void loadConfig() { } protected: - virtual void drawWidget(bool hilite) {} + virtual void drawWidget(bool hilite) { } - virtual void receivedFocusWidget() {} - virtual void lostFocusWidget() {} + virtual void receivedFocusWidget() { } + virtual void lostFocusWidget() { } virtual Widget* findWidget(int x, int y) { return this; } - void releaseFocus() { assert(_boss); _boss->releaseFocus(); } + void releaseFocus() override { assert(_boss); _boss->releaseFocus(); } // By default, delegate unhandled commands to the boss - void handleCommand(CommandSender* sender, int cmd, int data, int id) + void handleCommand(CommandSender* sender, int cmd, int data, int id) override { assert(_boss); _boss->handleCommand(sender, cmd, data, id); } protected: @@ -181,7 +181,7 @@ class StaticTextWidget : public Widget const string& getLabel() const { return _label; } protected: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; protected: string _label; @@ -209,13 +209,13 @@ class ButtonWidget : public StaticTextWidget, public CommandSender void setCmd(int cmd) { _cmd = cmd; } int getCmd() const { return _cmd; } - virtual void handleMouseUp(int x, int y, int button, int clickCount); - virtual void handleMouseEntered(int button); - virtual void handleMouseLeft(int button); - virtual bool handleEvent(Event::Type event); - protected: - void drawWidget(bool hilite); + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseEntered(int button) override; + void handleMouseLeft(int button) override; + bool handleEvent(Event::Type event) override; + + void drawWidget(bool hilite) override; protected: int _cmd; @@ -234,18 +234,12 @@ class ButtonWidget : public StaticTextWidget, public CommandSender class CheckboxWidget : public ButtonWidget { public: - enum FillType { - Normal, Inactive, Circle - }; + enum FillType { Normal, Inactive, Circle }; public: CheckboxWidget(GuiObject* boss, const GUI::Font& font, int x, int y, const string& label, int cmd = 0); - void handleMouseUp(int x, int y, int button, int clickCount); - virtual void handleMouseEntered(int button) {} - virtual void handleMouseLeft(int button) {} - void setEditable(bool editable); void setFill(FillType type); @@ -253,10 +247,14 @@ class CheckboxWidget : public ButtonWidget void toggleState() { setState(!_state); } bool getState() const { return _state; } + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseEntered(int button) override { } + void handleMouseLeft(int button) override { } + static int boxSize() { return 14; } // box is square protected: - void drawWidget(bool hilite); + void drawWidget(bool hilite) override; protected: bool _state; @@ -298,14 +296,14 @@ class SliderWidget : public ButtonWidget void setStepValue(int value); int getStepValue() const { return _stepValue; } - virtual void handleMouseMoved(int x, int y, int button); - virtual void handleMouseDown(int x, int y, int button, int clickCount); - virtual void handleMouseUp(int x, int y, int button, int clickCount); - virtual void handleMouseWheel(int x, int y, int direction); - virtual bool handleEvent(Event::Type event); - protected: - void drawWidget(bool hilite); + void handleMouseMoved(int x, int y, int button) override; + void handleMouseDown(int x, int y, int button, int clickCount) override; + void handleMouseUp(int x, int y, int button, int clickCount) override; + void handleMouseWheel(int x, int y, int direction) override; + bool handleEvent(Event::Type event) override; + + void drawWidget(bool hilite) override; int valueToPos(int value); int posToValue(int pos); diff --git a/src/unix/FSNodePOSIX.hxx b/src/unix/FSNodePOSIX.hxx index 5e202e5ab..9a6834e12 100644 --- a/src/unix/FSNodePOSIX.hxx +++ b/src/unix/FSNodePOSIX.hxx @@ -64,19 +64,19 @@ class FilesystemNodePOSIX : public AbstractFSNode */ FilesystemNodePOSIX(const string& path, bool verify = true); - bool exists() const { return access(_path.c_str(), F_OK) == 0; } - const string& getName() const { return _displayName; } - const string& getPath() const { return _path; } - string getShortPath() const; - bool isDirectory() const { return _isDirectory; } - bool isFile() const { return _isFile; } - bool isReadable() const { return access(_path.c_str(), R_OK) == 0; } - bool isWritable() const { return access(_path.c_str(), W_OK) == 0; } - bool makeDir(); - bool rename(const string& newfile); + bool exists() const override { return access(_path.c_str(), F_OK) == 0; } + const string& getName() const override { return _displayName; } + const string& getPath() const override { return _path; } + string getShortPath() const override; + bool isDirectory() const override { return _isDirectory; } + bool isFile() const override { return _isFile; } + bool isReadable() const override { return access(_path.c_str(), R_OK) == 0; } + bool isWritable() const override { return access(_path.c_str(), W_OK) == 0; } + bool makeDir() override; + bool rename(const string& newfile) override; - bool getChildren(AbstractFSList& list, ListMode mode, bool hidden) const; - AbstractFSNode* getParent() const; + bool getChildren(AbstractFSList& list, ListMode mode, bool hidden) const override; + AbstractFSNode* getParent() const override; protected: string _displayName; diff --git a/src/unix/SerialPortUNIX.hxx b/src/unix/SerialPortUNIX.hxx index 77b158e98..012c3612c 100644 --- a/src/unix/SerialPortUNIX.hxx +++ b/src/unix/SerialPortUNIX.hxx @@ -41,12 +41,12 @@ class SerialPortUNIX : public SerialPort @param device The name of the port @return False on any errors, else true */ - bool openPort(const string& device); + bool openPort(const string& device) override; /** Close a previously opened serial port. */ - void closePort(); + void closePort() override; /** Write a byte to the serial port. @@ -54,7 +54,7 @@ class SerialPortUNIX : public SerialPort @param data The byte to write to the port @return True if a byte was written, else false */ - bool writeByte(const uInt8* data); + bool writeByte(const uInt8* data) override; private: // File descriptor for serial connection