From b5235f2c7dd6d737914022f71e6a53ca286339d3 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Wed, 31 May 2017 15:28:23 -0700 Subject: [PATCH 1/2] fix compiler warnings (when I include ale headers) about 1. unused parameters 2. type qualifiers ignored --- src/ale_interface.cpp | 6 +++--- src/ale_interface.hpp | 2 +- src/common/SoundNull.hxx | 18 +++++++++--------- src/common/display_screen.h | 2 +- src/emucore/Control.cxx | 4 ++-- src/emucore/Control.hxx | 4 ++-- src/emucore/OSystem.hxx | 18 +++++++++--------- src/environment/ale_state.hpp | 10 +++++----- src/games/RomSettings.hpp | 2 +- src/games/supported/Alien.hpp | 2 +- src/games/supported/Amidar.hpp | 2 +- src/games/supported/Assault.hpp | 2 +- src/games/supported/Asterix.hpp | 4 ++-- src/games/supported/Asteroids.hpp | 2 +- src/games/supported/Atlantis.hpp | 2 +- src/games/supported/BankHeist.hpp | 2 +- src/games/supported/BattleZone.hpp | 2 +- src/games/supported/BeamRider.hpp | 2 +- src/games/supported/Berzerk.hpp | 2 +- src/games/supported/Bowling.hpp | 2 +- src/games/supported/Boxing.hpp | 2 +- src/games/supported/Breakout.hpp | 2 +- src/games/supported/Carnival.hpp | 2 +- src/games/supported/Centipede.hpp | 2 +- src/games/supported/ChopperCommand.hpp | 2 +- src/games/supported/CrazyClimber.hpp | 2 +- src/games/supported/Defender.hpp | 2 +- src/games/supported/DemonAttack.hpp | 2 +- src/games/supported/DonkeyKong.hpp | 2 +- src/games/supported/DoubleDunk.hpp | 2 +- src/games/supported/ElevatorAction.hpp | 2 +- src/games/supported/Enduro.hpp | 2 +- src/games/supported/FishingDerby.hpp | 2 +- src/games/supported/Freeway.hpp | 2 +- src/games/supported/Frogger.hpp | 2 +- src/games/supported/Frostbite.hpp | 2 +- src/games/supported/Galaxian.hpp | 2 +- src/games/supported/Gopher.hpp | 2 +- src/games/supported/Gravitar.hpp | 2 +- src/games/supported/Hero.hpp | 2 +- src/games/supported/IceHockey.hpp | 2 +- src/games/supported/JamesBond.hpp | 2 +- src/games/supported/JourneyEscape.hpp | 2 +- src/games/supported/Kangaroo.hpp | 2 +- src/games/supported/KeystoneKapers.hpp | 2 +- src/games/supported/Kingkong.hpp | 2 +- src/games/supported/Koolaid.hpp | 2 +- src/games/supported/Krull.hpp | 2 +- src/games/supported/KungFuMaster.hpp | 2 +- src/games/supported/LaserGates.hpp | 2 +- src/games/supported/LostLuggage.hpp | 2 +- src/games/supported/MontezumaRevenge.hpp | 2 +- src/games/supported/MrDo.hpp | 2 +- src/games/supported/MsPacman.hpp | 2 +- src/games/supported/NameThisGame.hpp | 2 +- src/games/supported/Phoenix.hpp | 2 +- src/games/supported/Pitfall.hpp | 2 +- src/games/supported/Pong.hpp | 2 +- src/games/supported/Pooyan.hpp | 2 +- src/games/supported/PrivateEye.hpp | 2 +- src/games/supported/QBert.hpp | 2 +- src/games/supported/RiverRaid.hpp | 2 +- src/games/supported/RoadRunner.hpp | 2 +- src/games/supported/RoboTank.hpp | 2 +- src/games/supported/Seaquest.hpp | 2 +- src/games/supported/SirLancelot.hpp | 2 +- src/games/supported/Skiing.hpp | 2 +- src/games/supported/Solaris.hpp | 2 +- src/games/supported/SpaceInvaders.hpp | 2 +- src/games/supported/StarGunner.hpp | 2 +- src/games/supported/Tennis.hpp | 2 +- src/games/supported/Tetris.hpp | 2 +- src/games/supported/TimePilot.hpp | 2 +- src/games/supported/Trondead.hpp | 2 +- src/games/supported/Turmoil.hpp | 2 +- src/games/supported/Tutankham.hpp | 2 +- src/games/supported/UpNDown.hpp | 2 +- src/games/supported/Venture.hpp | 2 +- src/games/supported/VideoPinball.hpp | 2 +- src/games/supported/WizardOfWor.hpp | 2 +- src/games/supported/YarsRevenge.hpp | 2 +- src/games/supported/Zaxxon.hpp | 2 +- 82 files changed, 107 insertions(+), 107 deletions(-) diff --git a/src/ale_interface.cpp b/src/ale_interface.cpp index 621831653..18eda3660 100644 --- a/src/ale_interface.cpp +++ b/src/ale_interface.cpp @@ -193,7 +193,7 @@ bool ALEInterface::game_over() const { } // The remaining number of lives. -const int ALEInterface::lives() { +int ALEInterface::lives() { if (!romSettings.get()){ throw std::runtime_error("ROM not set"); } @@ -256,7 +256,7 @@ void ALEInterface::getScreenGrayscale(std::vector& grayscale_outp size_t w = environment->getScreen().width(); size_t h = environment->getScreen().height(); size_t screen_size = w*h; - + pixel_t *ale_screen_data = environment->getScreen().getArray(); theOSystem->colourPalette().applyPaletteGrayscale(grayscale_output_buffer, ale_screen_data, screen_size); } @@ -306,7 +306,7 @@ void ALEInterface::restoreSystemState(const ALEState& state) { } void ALEInterface::saveScreenPNG(const string& filename) { - + ScreenExporter exporter(theOSystem->colourPalette()); exporter.save(environment->getScreen(), filename); } diff --git a/src/ale_interface.hpp b/src/ale_interface.hpp index 997a3e454..f90c79bef 100644 --- a/src/ale_interface.hpp +++ b/src/ale_interface.hpp @@ -99,7 +99,7 @@ class ALEInterface { int getFrameNumber(); // The remaining number of lives. - const int lives(); + int lives(); // Returns the frame number since the start of the current episode int getEpisodeFrameNumber() const; diff --git a/src/common/SoundNull.hxx b/src/common/SoundNull.hxx index ecb6d88bc..adc964b9c 100644 --- a/src/common/SoundNull.hxx +++ b/src/common/SoundNull.hxx @@ -41,7 +41,7 @@ class SoundNull : public Sound using the object. */ SoundNull(OSystem* osystem); - + /** Destructor */ @@ -54,7 +54,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) { } /** The system cycle counter is being adjusting by the specified amount. Any @@ -62,14 +62,14 @@ class SoundNull : public Sound @param amount The amount the cycle counter is being adjusted by */ - void adjustCycleCounter(Int32 amount) { } + void adjustCycleCounter(Int32) { } /** Sets the number of channels (mono or stereo sound). @param channels The number of channels */ - void setChannels(uInt32 channels) { } + void setChannels(uInt32) { } /** Sets the display framerate. Sound generation for NTSC and PAL games @@ -77,7 +77,7 @@ class SoundNull : public Sound @param framerate The base framerate depending on NTSC or PAL ROM */ - void setFrameRate(uInt32 framerate) { } + void setFrameRate(uInt32) { } /** Initializes the sound device. This must be called before any @@ -103,7 +103,7 @@ class SoundNull : public Sound @param state Mutes sound if true, unmute if false */ - void mute(bool state) { } + void mute(bool) { } /** Reset the sound device. @@ -117,7 +117,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, uInt8, Int32) { } /** Sets the volume of the sound device to the specified level. The @@ -126,7 +126,7 @@ class SoundNull : public Sound @param percent The new volume percentage level for the sound device */ - void setVolume(Int32 percent) { } + void setVolume(Int32) { } /** Adjusts the volume of the sound device based on the given direction. @@ -134,7 +134,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) { } /** * Tells the sound engine to record one frame's worth of sound. diff --git a/src/common/display_screen.h b/src/common/display_screen.h index ffe4abd19..60910de52 100644 --- a/src/common/display_screen.h +++ b/src/common/display_screen.h @@ -68,7 +68,7 @@ class DisplayScreen { /** A dummy class that simply ignores display events. */ class DisplayScreen { public: - DisplayScreen(MediaSource* mediaSource, Sound* sound, ColourPalette &palette) {} + DisplayScreen(MediaSource*, Sound*, ColourPalette &) {} void display_screen() {} bool manual_control_engaged() { return false; } Action getUserAction() { return UNDEFINED; } diff --git a/src/emucore/Control.cxx b/src/emucore/Control.cxx index 61984adb4..314f743c9 100644 --- a/src/emucore/Control.cxx +++ b/src/emucore/Control.cxx @@ -26,14 +26,14 @@ Controller::Controller(Jack jack, const Event& event, Type type) myType(type) { } - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Controller::~Controller() { } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const Controller::Type Controller::type() +Controller::Type Controller::type() { return myType; } diff --git a/src/emucore/Control.hxx b/src/emucore/Control.hxx index 1b3a54249..07a0bb250 100644 --- a/src/emucore/Control.hxx +++ b/src/emucore/Control.hxx @@ -87,7 +87,7 @@ class Controller @param type The type for this controller */ Controller(Jack jack, const Event& event, Type type); - + /** Destructor */ @@ -96,7 +96,7 @@ class Controller /** Returns the type of this controller. */ - const Type type(); + Type type(); /** Inform this controller about the current System. diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 4eca7d653..231562740 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -223,8 +223,8 @@ class OSystem /** Get the maximum dimensions of a window for the video hardware. */ - const uInt32 desktopWidth() const { return myDesktopWidth; } - const uInt32 desktopHeight() const { return myDesktopHeight; } + uInt32 desktopWidth() const { return myDesktopWidth; } + uInt32 desktopHeight() const { return myDesktopHeight; } /** Get the supported fullscreen resolutions for the video hardware. @@ -410,7 +410,7 @@ class OSystem */ //ALE virtual void stateChanged(EventHandler::State state); - + protected: /** Query the OSystem video hardware for resolution information. @@ -434,7 +434,7 @@ class OSystem void setConfigFile(const std::string& file) { myConfigFile = file; } - + protected: // Pointer to the EventHandler object //ALE EventHandler* myEventHandler; @@ -455,10 +455,10 @@ class OSystem // Pointer to the (currently defined) Console object Console* myConsole; - + // Random number generator shared across the emulator's components Random myRandGen; - + // Pointer to the Menu object //ALE Menu* myMenu; @@ -476,7 +476,7 @@ class OSystem // Pointer to the AI object //ALE AIBase *aiBase; - + // Maximum dimensions of the desktop area uInt32 myDesktopWidth, myDesktopHeight; @@ -515,7 +515,7 @@ class OSystem // The font object to use for the console/debugger //ALE GUI::Font* myConsoleFont; - + public: //ALE // Time per frame for a video update, based on the current framerate uInt32 myTimePerFrame; @@ -536,7 +536,7 @@ class OSystem //ALE static uInt32 ourGUIColors[kNumUIPalettes][kNumColors-256]; public: DisplayScreen* p_display_screen; //MHAUSKN - + private: ColourPalette m_colour_palette; diff --git a/src/environment/ale_state.hpp b/src/environment/ale_state.hpp index 9dee5bc66..5f05f5780 100644 --- a/src/environment/ale_state.hpp +++ b/src/environment/ale_state.hpp @@ -57,14 +57,14 @@ class ALEState { void setActionJoysticks(Event* event_obj, int player_a_action, int player_b_action); void incrementFrame(int steps = 1); - + void resetEpisodeFrameNumber(); - + //Get the frames executed so far - const int getFrameNumber() const { return m_frame_number; } + int getFrameNumber() const { return m_frame_number; } //Get the number of frames executed this episode. - const int getEpisodeFrameNumber() const { return m_episode_frame_number; } + int getEpisodeFrameNumber() const { return m_episode_frame_number; } std::string serialize(); @@ -94,7 +94,7 @@ class ALEState { /** Calculates the Paddle resistance, based on the given x val */ int calcPaddleResistance(int x_val); - + private: int m_left_paddle; // Current value for the left-paddle int m_right_paddle; // Current value for the right-paddle diff --git a/src/games/RomSettings.hpp b/src/games/RomSettings.hpp index c7fc4c493..181b97b1d 100644 --- a/src/games/RomSettings.hpp +++ b/src/games/RomSettings.hpp @@ -75,7 +75,7 @@ struct RomSettings { virtual bool isLegal(const Action &a) const; // Remaining lives. - virtual const int lives() { return isTerminal() ? 0 : 1; } + virtual int lives() { return isTerminal() ? 0 : 1; } // Returns a restricted (minimal) set of actions. If not overriden, this is all actions. virtual ActionVect getMinimalActionSet(); diff --git a/src/games/supported/Alien.hpp b/src/games/supported/Alien.hpp index 5075fe037..433904c8f 100644 --- a/src/games/supported/Alien.hpp +++ b/src/games/supported/Alien.hpp @@ -64,7 +64,7 @@ class AlienSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return m_lives; } + virtual int lives() { return m_lives; } private: diff --git a/src/games/supported/Amidar.hpp b/src/games/supported/Amidar.hpp index 7c3fa7a0e..9408c8bae 100644 --- a/src/games/supported/Amidar.hpp +++ b/src/games/supported/Amidar.hpp @@ -64,7 +64,7 @@ class AmidarSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Assault.hpp b/src/games/supported/Assault.hpp index 7c8bc9fcb..31033a60e 100644 --- a/src/games/supported/Assault.hpp +++ b/src/games/supported/Assault.hpp @@ -64,7 +64,7 @@ class AssaultSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Asterix.hpp b/src/games/supported/Asterix.hpp index 7756d035c..10d1f0e22 100644 --- a/src/games/supported/Asterix.hpp +++ b/src/games/supported/Asterix.hpp @@ -60,14 +60,14 @@ class AsterixSettings : public RomSettings { // saves the state of the rom settings void saveState(Serializer & ser); - + // loads the state of the rom settings void loadState(Deserializer & ser); // Asterix requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Asteroids.hpp b/src/games/supported/Asteroids.hpp index 5834e246a..31f5f8a46 100644 --- a/src/games/supported/Asteroids.hpp +++ b/src/games/supported/Asteroids.hpp @@ -64,7 +64,7 @@ class AsteroidsSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Atlantis.hpp b/src/games/supported/Atlantis.hpp index 74ea60feb..e23ff1fa5 100644 --- a/src/games/supported/Atlantis.hpp +++ b/src/games/supported/Atlantis.hpp @@ -64,7 +64,7 @@ class AtlantisSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/BankHeist.hpp b/src/games/supported/BankHeist.hpp index a9a6732e4..0ace733e1 100644 --- a/src/games/supported/BankHeist.hpp +++ b/src/games/supported/BankHeist.hpp @@ -64,7 +64,7 @@ class BankHeistSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/BattleZone.hpp b/src/games/supported/BattleZone.hpp index ce6943195..d717fcdcc 100644 --- a/src/games/supported/BattleZone.hpp +++ b/src/games/supported/BattleZone.hpp @@ -64,7 +64,7 @@ class BattleZoneSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/BeamRider.hpp b/src/games/supported/BeamRider.hpp index 99fa61cef..7667ea157 100644 --- a/src/games/supported/BeamRider.hpp +++ b/src/games/supported/BeamRider.hpp @@ -66,7 +66,7 @@ class BeamRiderSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Berzerk.hpp b/src/games/supported/Berzerk.hpp index f0ff79302..88c2bf690 100644 --- a/src/games/supported/Berzerk.hpp +++ b/src/games/supported/Berzerk.hpp @@ -64,7 +64,7 @@ class BerzerkSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Bowling.hpp b/src/games/supported/Bowling.hpp index 721f0eddc..c9a0338f7 100644 --- a/src/games/supported/Bowling.hpp +++ b/src/games/supported/Bowling.hpp @@ -65,7 +65,7 @@ class BowlingSettings : public RomSettings { void loadState(Deserializer & ser); // No lives in bowling! - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Boxing.hpp b/src/games/supported/Boxing.hpp index c0add3971..5768b930d 100644 --- a/src/games/supported/Boxing.hpp +++ b/src/games/supported/Boxing.hpp @@ -64,7 +64,7 @@ class BoxingSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Breakout.hpp b/src/games/supported/Breakout.hpp index c229298ef..33bbfb8f8 100644 --- a/src/games/supported/Breakout.hpp +++ b/src/games/supported/Breakout.hpp @@ -65,7 +65,7 @@ class BreakoutSettings : public RomSettings { void loadState(Deserializer & ser); // remaining lives - const int lives() { return isTerminal() ? 0 : m_lives; } + int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Carnival.hpp b/src/games/supported/Carnival.hpp index 6ee6fc230..b9662de2f 100644 --- a/src/games/supported/Carnival.hpp +++ b/src/games/supported/Carnival.hpp @@ -64,7 +64,7 @@ class CarnivalSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Centipede.hpp b/src/games/supported/Centipede.hpp index e8ed11e56..5c3de49ac 100644 --- a/src/games/supported/Centipede.hpp +++ b/src/games/supported/Centipede.hpp @@ -64,7 +64,7 @@ class CentipedeSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/ChopperCommand.hpp b/src/games/supported/ChopperCommand.hpp index b055aba5c..c1b5b104a 100644 --- a/src/games/supported/ChopperCommand.hpp +++ b/src/games/supported/ChopperCommand.hpp @@ -64,7 +64,7 @@ class ChopperCommandSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return m_lives; } + virtual int lives() { return m_lives; } private: diff --git a/src/games/supported/CrazyClimber.hpp b/src/games/supported/CrazyClimber.hpp index 4f6aa2674..d46cd7552 100644 --- a/src/games/supported/CrazyClimber.hpp +++ b/src/games/supported/CrazyClimber.hpp @@ -64,7 +64,7 @@ class CrazyClimberSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Defender.hpp b/src/games/supported/Defender.hpp index 35b20ffc1..39c83b6b2 100644 --- a/src/games/supported/Defender.hpp +++ b/src/games/supported/Defender.hpp @@ -64,7 +64,7 @@ class DefenderSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/DemonAttack.hpp b/src/games/supported/DemonAttack.hpp index 444e4a268..b3b27f267 100644 --- a/src/games/supported/DemonAttack.hpp +++ b/src/games/supported/DemonAttack.hpp @@ -64,7 +64,7 @@ class DemonAttackSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/DonkeyKong.hpp b/src/games/supported/DonkeyKong.hpp index 2404c622a..e485f413d 100644 --- a/src/games/supported/DonkeyKong.hpp +++ b/src/games/supported/DonkeyKong.hpp @@ -50,7 +50,7 @@ class DonkeyKongSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: bool m_terminal; diff --git a/src/games/supported/DoubleDunk.hpp b/src/games/supported/DoubleDunk.hpp index c568c1b5e..e7c6a88a6 100644 --- a/src/games/supported/DoubleDunk.hpp +++ b/src/games/supported/DoubleDunk.hpp @@ -66,7 +66,7 @@ class DoubleDunkSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/ElevatorAction.hpp b/src/games/supported/ElevatorAction.hpp index 05c2a618d..c9528ca56 100644 --- a/src/games/supported/ElevatorAction.hpp +++ b/src/games/supported/ElevatorAction.hpp @@ -66,7 +66,7 @@ class ElevatorActionSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Enduro.hpp b/src/games/supported/Enduro.hpp index 02420cfaa..dc1386e1b 100644 --- a/src/games/supported/Enduro.hpp +++ b/src/games/supported/Enduro.hpp @@ -66,7 +66,7 @@ class EnduroSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/FishingDerby.hpp b/src/games/supported/FishingDerby.hpp index 1bcb439ac..faf378cba 100644 --- a/src/games/supported/FishingDerby.hpp +++ b/src/games/supported/FishingDerby.hpp @@ -64,7 +64,7 @@ class FishingDerbySettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Freeway.hpp b/src/games/supported/Freeway.hpp index 6cf5bb0ff..42f836835 100644 --- a/src/games/supported/Freeway.hpp +++ b/src/games/supported/Freeway.hpp @@ -64,7 +64,7 @@ class FreewaySettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Frogger.hpp b/src/games/supported/Frogger.hpp index 7c3eabc1a..725bc36c5 100644 --- a/src/games/supported/Frogger.hpp +++ b/src/games/supported/Frogger.hpp @@ -51,7 +51,7 @@ class FroggerSettings : public RomSettings { // Frogger requires the RESET action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: bool m_terminal; diff --git a/src/games/supported/Frostbite.hpp b/src/games/supported/Frostbite.hpp index 0225e2ade..5c64e09e2 100644 --- a/src/games/supported/Frostbite.hpp +++ b/src/games/supported/Frostbite.hpp @@ -64,7 +64,7 @@ class FrostbiteSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Galaxian.hpp b/src/games/supported/Galaxian.hpp index a5336d4e8..e546d5156 100644 --- a/src/games/supported/Galaxian.hpp +++ b/src/games/supported/Galaxian.hpp @@ -63,7 +63,7 @@ class GalaxianSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Gopher.hpp b/src/games/supported/Gopher.hpp index 4fc443cca..9716162d1 100644 --- a/src/games/supported/Gopher.hpp +++ b/src/games/supported/Gopher.hpp @@ -67,7 +67,7 @@ class GopherSettings : public RomSettings { // Gopher requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Gravitar.hpp b/src/games/supported/Gravitar.hpp index 503f57c41..18768a170 100644 --- a/src/games/supported/Gravitar.hpp +++ b/src/games/supported/Gravitar.hpp @@ -67,7 +67,7 @@ class GravitarSettings : public RomSettings { // Gravitar requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Hero.hpp b/src/games/supported/Hero.hpp index d4a0ef84e..a8782f631 100644 --- a/src/games/supported/Hero.hpp +++ b/src/games/supported/Hero.hpp @@ -64,7 +64,7 @@ class HeroSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/IceHockey.hpp b/src/games/supported/IceHockey.hpp index 2e2a68f8c..168233aaf 100644 --- a/src/games/supported/IceHockey.hpp +++ b/src/games/supported/IceHockey.hpp @@ -64,7 +64,7 @@ class IceHockeySettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/JamesBond.hpp b/src/games/supported/JamesBond.hpp index 7544ca705..155beb334 100644 --- a/src/games/supported/JamesBond.hpp +++ b/src/games/supported/JamesBond.hpp @@ -64,7 +64,7 @@ class JamesBondSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/JourneyEscape.hpp b/src/games/supported/JourneyEscape.hpp index 25220e255..aaf82a35c 100644 --- a/src/games/supported/JourneyEscape.hpp +++ b/src/games/supported/JourneyEscape.hpp @@ -67,7 +67,7 @@ class JourneyEscapeSettings : public RomSettings { // Journey Escape requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Kangaroo.hpp b/src/games/supported/Kangaroo.hpp index 9ee79b24a..133773308 100644 --- a/src/games/supported/Kangaroo.hpp +++ b/src/games/supported/Kangaroo.hpp @@ -64,7 +64,7 @@ class KangarooSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/KeystoneKapers.hpp b/src/games/supported/KeystoneKapers.hpp index ee67d5d8e..4385ba456 100644 --- a/src/games/supported/KeystoneKapers.hpp +++ b/src/games/supported/KeystoneKapers.hpp @@ -52,7 +52,7 @@ class KeystoneKapersSettings : public RomSettings { // Keystone Kapers requires the reset button to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: bool m_terminal; diff --git a/src/games/supported/Kingkong.hpp b/src/games/supported/Kingkong.hpp index dc3b7abae..8462b5f71 100644 --- a/src/games/supported/Kingkong.hpp +++ b/src/games/supported/Kingkong.hpp @@ -64,7 +64,7 @@ class KingkongSettings : public RomSettings { // Kingkong requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: bool m_terminal; diff --git a/src/games/supported/Koolaid.hpp b/src/games/supported/Koolaid.hpp index aa410396b..f6377a1d0 100644 --- a/src/games/supported/Koolaid.hpp +++ b/src/games/supported/Koolaid.hpp @@ -49,7 +49,7 @@ class KoolaidSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Krull.hpp b/src/games/supported/Krull.hpp index 12da53a0d..7af6a4ce0 100644 --- a/src/games/supported/Krull.hpp +++ b/src/games/supported/Krull.hpp @@ -64,7 +64,7 @@ class KrullSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/KungFuMaster.hpp b/src/games/supported/KungFuMaster.hpp index e6f7bdff0..e8c42eab1 100644 --- a/src/games/supported/KungFuMaster.hpp +++ b/src/games/supported/KungFuMaster.hpp @@ -64,7 +64,7 @@ class KungFuMasterSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/LaserGates.hpp b/src/games/supported/LaserGates.hpp index 68119959d..b5973425f 100644 --- a/src/games/supported/LaserGates.hpp +++ b/src/games/supported/LaserGates.hpp @@ -51,7 +51,7 @@ class LaserGatesSettings : public RomSettings { // LaserGates requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: bool m_terminal; diff --git a/src/games/supported/LostLuggage.hpp b/src/games/supported/LostLuggage.hpp index d1fd31cbf..f1ed84565 100644 --- a/src/games/supported/LostLuggage.hpp +++ b/src/games/supported/LostLuggage.hpp @@ -53,7 +53,7 @@ class LostLuggageSettings : public RomSettings { // LostLuggage requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: bool m_terminal; diff --git a/src/games/supported/MontezumaRevenge.hpp b/src/games/supported/MontezumaRevenge.hpp index 4c542240f..7c7c27145 100644 --- a/src/games/supported/MontezumaRevenge.hpp +++ b/src/games/supported/MontezumaRevenge.hpp @@ -64,7 +64,7 @@ class MontezumaRevengeSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/MrDo.hpp b/src/games/supported/MrDo.hpp index 363ba5d1d..01614b8ee 100644 --- a/src/games/supported/MrDo.hpp +++ b/src/games/supported/MrDo.hpp @@ -52,7 +52,7 @@ class MrDoSettings : public RomSettings { // Mr. Do requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/MsPacman.hpp b/src/games/supported/MsPacman.hpp index 655c873e8..051bf0e6a 100644 --- a/src/games/supported/MsPacman.hpp +++ b/src/games/supported/MsPacman.hpp @@ -64,7 +64,7 @@ class MsPacmanSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/NameThisGame.hpp b/src/games/supported/NameThisGame.hpp index d5f2a1cf5..a420b820a 100644 --- a/src/games/supported/NameThisGame.hpp +++ b/src/games/supported/NameThisGame.hpp @@ -64,7 +64,7 @@ class NameThisGameSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Phoenix.hpp b/src/games/supported/Phoenix.hpp index 0253040b3..a5abc3a93 100644 --- a/src/games/supported/Phoenix.hpp +++ b/src/games/supported/Phoenix.hpp @@ -64,7 +64,7 @@ class PhoenixSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Pitfall.hpp b/src/games/supported/Pitfall.hpp index 4b211312d..8e5e88d33 100644 --- a/src/games/supported/Pitfall.hpp +++ b/src/games/supported/Pitfall.hpp @@ -66,7 +66,7 @@ class PitfallSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Pong.hpp b/src/games/supported/Pong.hpp index 94c9e9783..4c057f9b4 100644 --- a/src/games/supported/Pong.hpp +++ b/src/games/supported/Pong.hpp @@ -64,7 +64,7 @@ class PongSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Pooyan.hpp b/src/games/supported/Pooyan.hpp index 6a192af55..b812428e9 100644 --- a/src/games/supported/Pooyan.hpp +++ b/src/games/supported/Pooyan.hpp @@ -64,7 +64,7 @@ class PooyanSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/PrivateEye.hpp b/src/games/supported/PrivateEye.hpp index 5af2c5c97..8008b0639 100644 --- a/src/games/supported/PrivateEye.hpp +++ b/src/games/supported/PrivateEye.hpp @@ -66,7 +66,7 @@ class PrivateEyeSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/QBert.hpp b/src/games/supported/QBert.hpp index ccf1244b9..afbe8cec6 100644 --- a/src/games/supported/QBert.hpp +++ b/src/games/supported/QBert.hpp @@ -64,7 +64,7 @@ class QBertSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/RiverRaid.hpp b/src/games/supported/RiverRaid.hpp index 4586971f9..22371c0ef 100644 --- a/src/games/supported/RiverRaid.hpp +++ b/src/games/supported/RiverRaid.hpp @@ -65,7 +65,7 @@ class RiverRaidSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : numericLives(); } + virtual int lives() { return isTerminal() ? 0 : numericLives(); } private: diff --git a/src/games/supported/RoadRunner.hpp b/src/games/supported/RoadRunner.hpp index af576ed27..d9fe7a096 100644 --- a/src/games/supported/RoadRunner.hpp +++ b/src/games/supported/RoadRunner.hpp @@ -64,7 +64,7 @@ class RoadRunnerSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/RoboTank.hpp b/src/games/supported/RoboTank.hpp index af93525f0..3d800f376 100644 --- a/src/games/supported/RoboTank.hpp +++ b/src/games/supported/RoboTank.hpp @@ -64,7 +64,7 @@ class RoboTankSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Seaquest.hpp b/src/games/supported/Seaquest.hpp index 145c4f668..6b29546da 100644 --- a/src/games/supported/Seaquest.hpp +++ b/src/games/supported/Seaquest.hpp @@ -64,7 +64,7 @@ class SeaquestSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/SirLancelot.hpp b/src/games/supported/SirLancelot.hpp index 9e1fe0fa9..6eb57843c 100644 --- a/src/games/supported/SirLancelot.hpp +++ b/src/games/supported/SirLancelot.hpp @@ -51,7 +51,7 @@ class SirLancelotSettings : public RomSettings { // SirLancelot requires the reset+left action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: bool m_terminal; diff --git a/src/games/supported/Skiing.hpp b/src/games/supported/Skiing.hpp index 8dde08e59..e4c368898 100644 --- a/src/games/supported/Skiing.hpp +++ b/src/games/supported/Skiing.hpp @@ -68,7 +68,7 @@ class SkiingSettings : public RomSettings { ActionVect getStartingActions(); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Solaris.hpp b/src/games/supported/Solaris.hpp index 3cb098ea7..732a1118b 100644 --- a/src/games/supported/Solaris.hpp +++ b/src/games/supported/Solaris.hpp @@ -64,7 +64,7 @@ class SolarisSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/SpaceInvaders.hpp b/src/games/supported/SpaceInvaders.hpp index a8d2b96bf..82ccff1c4 100644 --- a/src/games/supported/SpaceInvaders.hpp +++ b/src/games/supported/SpaceInvaders.hpp @@ -64,7 +64,7 @@ class SpaceInvadersSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/StarGunner.hpp b/src/games/supported/StarGunner.hpp index d7cf46be3..6e64d0eef 100644 --- a/src/games/supported/StarGunner.hpp +++ b/src/games/supported/StarGunner.hpp @@ -64,7 +64,7 @@ class StarGunnerSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Tennis.hpp b/src/games/supported/Tennis.hpp index b234213af..66d0b304a 100644 --- a/src/games/supported/Tennis.hpp +++ b/src/games/supported/Tennis.hpp @@ -64,7 +64,7 @@ class TennisSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return 0; } + virtual int lives() { return 0; } private: diff --git a/src/games/supported/Tetris.hpp b/src/games/supported/Tetris.hpp index c79528aaf..509291b25 100644 --- a/src/games/supported/Tetris.hpp +++ b/src/games/supported/Tetris.hpp @@ -63,7 +63,7 @@ class TetrisSettings : public RomSettings { void loadState(Deserializer & ser); // remaining lives - const int lives() { return isTerminal() ? 0 : m_lives; } + int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/TimePilot.hpp b/src/games/supported/TimePilot.hpp index a9dfec565..ab81374bf 100644 --- a/src/games/supported/TimePilot.hpp +++ b/src/games/supported/TimePilot.hpp @@ -64,7 +64,7 @@ class TimePilotSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Trondead.hpp b/src/games/supported/Trondead.hpp index d585571a5..722f61805 100644 --- a/src/games/supported/Trondead.hpp +++ b/src/games/supported/Trondead.hpp @@ -49,7 +49,7 @@ class TrondeadSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Turmoil.hpp b/src/games/supported/Turmoil.hpp index c1d4d39c7..004b21ed8 100644 --- a/src/games/supported/Turmoil.hpp +++ b/src/games/supported/Turmoil.hpp @@ -54,7 +54,7 @@ class TurmoilSettings : public RomSettings { // Turmoil requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Tutankham.hpp b/src/games/supported/Tutankham.hpp index 67b215a5a..4d6ef77d8 100644 --- a/src/games/supported/Tutankham.hpp +++ b/src/games/supported/Tutankham.hpp @@ -64,7 +64,7 @@ class TutankhamSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal()? 0 : m_lives; } + virtual int lives() { return isTerminal()? 0 : m_lives; } private: diff --git a/src/games/supported/UpNDown.hpp b/src/games/supported/UpNDown.hpp index ea2e5483a..7c64da7ca 100644 --- a/src/games/supported/UpNDown.hpp +++ b/src/games/supported/UpNDown.hpp @@ -67,7 +67,7 @@ class UpNDownSettings : public RomSettings { // UpNDown requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Venture.hpp b/src/games/supported/Venture.hpp index b1914b937..ecf3f62aa 100644 --- a/src/games/supported/Venture.hpp +++ b/src/games/supported/Venture.hpp @@ -64,7 +64,7 @@ class VentureSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/VideoPinball.hpp b/src/games/supported/VideoPinball.hpp index 541ba8b89..47f9eca2b 100644 --- a/src/games/supported/VideoPinball.hpp +++ b/src/games/supported/VideoPinball.hpp @@ -64,7 +64,7 @@ class VideoPinballSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/WizardOfWor.hpp b/src/games/supported/WizardOfWor.hpp index c5a4834da..4e03930e7 100644 --- a/src/games/supported/WizardOfWor.hpp +++ b/src/games/supported/WizardOfWor.hpp @@ -64,7 +64,7 @@ class WizardOfWorSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/YarsRevenge.hpp b/src/games/supported/YarsRevenge.hpp index 98413d174..7482cdc19 100644 --- a/src/games/supported/YarsRevenge.hpp +++ b/src/games/supported/YarsRevenge.hpp @@ -67,7 +67,7 @@ class YarsRevengeSettings : public RomSettings { // Gopher requires the fire action to start the game ActionVect getStartingActions(); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: diff --git a/src/games/supported/Zaxxon.hpp b/src/games/supported/Zaxxon.hpp index a1978fff0..050f7ad93 100644 --- a/src/games/supported/Zaxxon.hpp +++ b/src/games/supported/Zaxxon.hpp @@ -64,7 +64,7 @@ class ZaxxonSettings : public RomSettings { // loads the state of the rom settings void loadState(Deserializer & ser); - virtual const int lives() { return isTerminal() ? 0 : m_lives; } + virtual int lives() { return isTerminal() ? 0 : m_lives; } private: From 9f777e9df52c47767cc2dd15e674cbbd464db7d9 Mon Sep 17 00:00:00 2001 From: "Marc G. Bellemare" Date: Sun, 2 Jul 2017 14:38:39 +0100 Subject: [PATCH 2/2] Update ale_interface.cpp Fix compile error --- src/ale_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ale_interface.cpp b/src/ale_interface.cpp index d091e4ad6..02f6bb178 100644 --- a/src/ale_interface.cpp +++ b/src/ale_interface.cpp @@ -242,7 +242,7 @@ bool ALEInterface::game_over() const { } // The remaining number of lives. -const int ALEInterface::lives() { +int ALEInterface::lives() { if (!romSettings.get()) { throw std::runtime_error("ROM not set"); }