mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
ULTIMA: Added override keywords
This commit is contained in:
parent
95714e95ce
commit
2b17ee563c
@ -64,14 +64,15 @@ public:
|
||||
|
||||
#define CLASSDEF \
|
||||
static ::Ultima::Shared::ClassDef type(); \
|
||||
virtual ::Ultima::Shared::ClassDef getType() const { return type(); }
|
||||
virtual ::Ultima::Shared::ClassDef getType() const override { return type(); }
|
||||
|
||||
/**
|
||||
* Defines the most basic root of the engine's object hierarchy.
|
||||
*/
|
||||
class BaseObject {
|
||||
public:
|
||||
CLASSDEF
|
||||
static ::Ultima::Shared::ClassDef type();
|
||||
virtual ::Ultima::Shared::ClassDef getType() const { return type(); }
|
||||
virtual ~BaseObject() {
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,11 @@ struct MSGMAP {
|
||||
};
|
||||
|
||||
#define DECLARE_MESSAGE_MAP \
|
||||
protected: \
|
||||
static const Ultima::Shared::MSGMAP *getThisMessageMap(); \
|
||||
virtual const Ultima::Shared::MSGMAP *getMessageMap() const override
|
||||
|
||||
#define DECLARE_MESSAGE_MAP_BASE \
|
||||
protected: \
|
||||
static const Ultima::Shared::MSGMAP *getThisMessageMap(); \
|
||||
virtual const Ultima::Shared::MSGMAP *getMessageMap() const
|
||||
@ -91,7 +96,7 @@ protected: \
|
||||
* that can receive messages
|
||||
*/
|
||||
class MessageTarget: public BaseObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
DECLARE_MESSAGE_MAP_BASE;
|
||||
public:
|
||||
CLASSDEF;
|
||||
};
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
/**
|
||||
* Gets the name of the item, if any
|
||||
*/
|
||||
virtual const Common::String getName() const { return _name; }
|
||||
virtual const Common::String getName() const override { return _name; }
|
||||
};
|
||||
|
||||
} // End of namespace Shared
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
* @param isPreUpdate Update is called twice in succesion during the end of turn update.
|
||||
* Once with true for all widgets, then with it false
|
||||
*/
|
||||
virtual void update(bool isPreUpdate);
|
||||
virtual void update(bool isPreUpdate) override;
|
||||
|
||||
/**
|
||||
* True true if the creature is dead
|
||||
|
@ -66,7 +66,7 @@ protected:
|
||||
/**
|
||||
* Do the attack in a given direction
|
||||
*/
|
||||
virtual void doAttack(Shared::Maps::Direction dir);
|
||||
virtual void doAttack(Shared::Maps::Direction dir) override;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
@ -86,7 +86,7 @@ protected:
|
||||
/**
|
||||
* Do the attack in a given direction
|
||||
*/
|
||||
virtual void doAttack(Shared::Maps::Direction dir);
|
||||
virtual void doAttack(Shared::Maps::Direction dir) override;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
/**
|
||||
* Returns true if the current video mode is VGA
|
||||
*/
|
||||
virtual bool isVGA() const { return _videoMode == VIDEOMODE_VGA; }
|
||||
virtual bool isVGA() const override { return _videoMode == VIDEOMODE_VGA; }
|
||||
|
||||
/**
|
||||
* Called when the game starts
|
||||
@ -72,7 +72,7 @@ public:
|
||||
/**
|
||||
* Returns true if the game can currently be saved
|
||||
*/
|
||||
virtual bool canSaveGameStateCurrently();
|
||||
virtual bool canSaveGameStateCurrently() override;
|
||||
|
||||
/**
|
||||
* Give some treasure
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
/**
|
||||
* Clears all map data
|
||||
*/
|
||||
virtual void clear();
|
||||
virtual void clear() override;
|
||||
|
||||
/**
|
||||
* Load a given map
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
* Constructor
|
||||
*/
|
||||
MapBase(Ultima1Game *game, Ultima1Map *map);
|
||||
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
@ -112,7 +112,7 @@ public:
|
||||
/**
|
||||
* Cast a specific spell
|
||||
*/
|
||||
virtual void castSpell(uint spell);
|
||||
virtual void castSpell(uint spell) override;
|
||||
|
||||
/**
|
||||
* Handles dropping an amount of coins
|
||||
|
@ -76,12 +76,12 @@ public:
|
||||
/**
|
||||
* Handles loading and saving viewport
|
||||
*/
|
||||
void synchronize(Common::Serializer &s);
|
||||
void synchronize(Common::Serializer &s) override;
|
||||
|
||||
/**
|
||||
* Load the map
|
||||
*/
|
||||
virtual void load(Shared::Maps::MapId mapId);
|
||||
virtual void load(Shared::Maps::MapId mapId) override;
|
||||
|
||||
/**
|
||||
* Gets a tile at a given position
|
||||
@ -103,7 +103,7 @@ public:
|
||||
/**
|
||||
* Updates the map at the end of a turn
|
||||
*/
|
||||
void update();
|
||||
void update() override;
|
||||
|
||||
/**
|
||||
* Spawns a monster within dungeons
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
/**
|
||||
* Load the map
|
||||
*/
|
||||
virtual void load(Shared::Maps::MapId mapId);
|
||||
virtual void load(Shared::Maps::MapId mapId) override;
|
||||
|
||||
/**
|
||||
* Returns whether the map wraps around to the other side at it's edges (i.e. the overworld)
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
/**
|
||||
* Update the cursor
|
||||
*/
|
||||
virtual void update();
|
||||
virtual void update() override;
|
||||
|
||||
/**
|
||||
* Draw the cursor
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
/**
|
||||
* Talk to an NPC
|
||||
*/
|
||||
virtual void talk();
|
||||
virtual void talk() override;
|
||||
|
||||
/**
|
||||
* Removes hit points from a creature
|
||||
|
@ -163,7 +163,7 @@ public:
|
||||
/**
|
||||
* Get the name of a transport's weapons
|
||||
*/
|
||||
virtual Common::String getWeaponsName();
|
||||
virtual Common::String getWeaponsName() override;
|
||||
|
||||
/**
|
||||
* Get the tile for the transport method
|
||||
@ -188,7 +188,7 @@ public:
|
||||
/**
|
||||
* Get the name of a transport's weapons
|
||||
*/
|
||||
virtual Common::String getWeaponsName();
|
||||
virtual Common::String getWeaponsName() override;
|
||||
|
||||
/**
|
||||
* Get the tile for the transport method
|
||||
|
@ -31,7 +31,7 @@ namespace Ultima1 {
|
||||
namespace Widgets {
|
||||
|
||||
/**
|
||||
* Base class for widgets in urban maps
|
||||
* Base class for widgets in urban maps
|
||||
*/
|
||||
class UrbanWidget : public Shared::Maps::MapWidget {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
@ -66,7 +66,7 @@ public:
|
||||
/**
|
||||
* Returns true if the given widget can move to a given position on the map
|
||||
*/
|
||||
virtual CanMove canMoveTo(const Point &destPos);
|
||||
virtual CanMove canMoveTo(const Point &destPos) override;
|
||||
|
||||
/**
|
||||
* Handles loading and saving games
|
||||
|
Loading…
x
Reference in New Issue
Block a user