1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 10:22:52 +01:00

add missing override

This commit is contained in:
Aldoxtor 2017-05-03 09:54:21 +02:00 committed by Daniel Evans
parent fd5acc2be2
commit 7a8c602c75
14 changed files with 58 additions and 58 deletions

View File

@ -143,7 +143,7 @@ public:
#define DECL_ACTIVITY(activity_name) \ #define DECL_ACTIVITY(activity_name) \
static constexpr auto ActivityName = #activity_name; \ static constexpr auto ActivityName = #activity_name; \
std::string name() const { \ std::string name() const override { \
return ActivityName; \ return ActivityName; \
} }
@ -165,9 +165,9 @@ struct GoTo : public CharacterController::Activity {
: target(target), sprint(_sprint) { : target(target), sprint(_sprint) {
} }
bool update(CharacterObject* character, CharacterController* controller); bool update(CharacterObject* character, CharacterController* controller) override;
bool canSkip(CharacterObject*, CharacterController*) const { bool canSkip(CharacterObject*, CharacterController*) const override {
return true; return true;
} }
}; };
@ -180,7 +180,7 @@ struct Jump : public CharacterController::Activity {
Jump() : jumped(false) { Jump() : jumped(false) {
} }
bool update(CharacterObject* character, CharacterController* controller); bool update(CharacterObject* character, CharacterController* controller) override;
}; };
struct EnterVehicle : public CharacterController::Activity { struct EnterVehicle : public CharacterController::Activity {
@ -202,7 +202,7 @@ struct EnterVehicle : public CharacterController::Activity {
bool canSkip(CharacterObject* character, bool canSkip(CharacterObject* character,
CharacterController*) const override; CharacterController*) const override;
bool update(CharacterObject* character, CharacterController* controller); bool update(CharacterObject* character, CharacterController* controller) override;
}; };
struct ExitVehicle : public CharacterController::Activity { struct ExitVehicle : public CharacterController::Activity {
@ -213,7 +213,7 @@ struct ExitVehicle : public CharacterController::Activity {
ExitVehicle(bool jacked_ = false) : jacked(jacked_) { ExitVehicle(bool jacked_ = false) : jacked(jacked_) {
} }
bool update(CharacterObject* character, CharacterController* controller); bool update(CharacterObject* character, CharacterController* controller) override;
}; };
struct UseItem : public CharacterController::Activity { struct UseItem : public CharacterController::Activity {
@ -226,7 +226,7 @@ struct UseItem : public CharacterController::Activity {
UseItem(int slot) : itemslot(slot) { UseItem(int slot) : itemslot(slot) {
} }
bool update(CharacterObject* character, CharacterController* controller); bool update(CharacterObject* character, CharacterController* controller) override;
}; };
} }

View File

@ -86,11 +86,11 @@ public:
~CharacterObject(); ~CharacterObject();
Type type() { Type type() const override {
return Character; return Character;
} }
void tick(float dt); void tick(float dt) override;
const CharacterState& getCurrentState() const { const CharacterState& getCurrentState() const {
return currentState; return currentState;
@ -111,7 +111,7 @@ public:
*/ */
void updateCharacter(float dt); void updateCharacter(float dt);
virtual void setPosition(const glm::vec3& pos); virtual void setPosition(const glm::vec3& pos) override;
bool isPlayer() const; bool isPlayer() const;

View File

@ -16,11 +16,11 @@ public:
BaseModelInfo* modelinfo); BaseModelInfo* modelinfo);
~CutsceneObject(); ~CutsceneObject();
Type type() { Type type() const override {
return Cutscene; return Cutscene;
} }
void tick(float dt); void tick(float dt) override;
void setParentActor(GameObject* parent, ModelFrame* bone); void setParentActor(GameObject* parent, ModelFrame* bone);

View File

@ -130,7 +130,7 @@ public:
* @brief determines what type of object this is. * @brief determines what type of object this is.
* @return one of Type * @return one of Type
*/ */
virtual Type type() { virtual Type type() const {
return Unknown; return Unknown;
} }
@ -183,7 +183,7 @@ public:
float impulse; float impulse;
}; };
virtual bool takeDamage(const DamageInfo& /*damage*/) { virtual bool takeDamage(const DamageInfo& damage) {
return false; return false;
} }

View File

@ -31,7 +31,7 @@ public:
std::shared_ptr<DynamicObjectData> dyn); std::shared_ptr<DynamicObjectData> dyn);
~InstanceObject(); ~InstanceObject();
Type type() { Type type() const override {
return Instance; return Instance;
} }
@ -39,14 +39,14 @@ public:
return atomic_; return atomic_;
} }
void tick(float dt); void tick(float dt) override;
void changeModel(BaseModelInfo* incoming); void changeModel(BaseModelInfo* incoming);
virtual void setPosition(const glm::vec3& pos); virtual void setPosition(const glm::vec3& pos) override;
virtual void setRotation(const glm::quat& r); virtual void setRotation(const glm::quat& r) override;
virtual bool takeDamage(const DamageInfo& damage); virtual bool takeDamage(const DamageInfo& damage) override;
void setSolid(bool solid); void setSolid(bool solid);

View File

@ -42,11 +42,11 @@ public:
~PickupObject(); ~PickupObject();
Type type() { Type type() const override {
return Pickup; return Pickup;
} }
void tick(float dt); void tick(float dt) override;
virtual bool onCharacterTouch(CharacterObject* character) { virtual bool onCharacterTouch(CharacterObject* character) {
RW_UNUSED(character); RW_UNUSED(character);

View File

@ -53,9 +53,9 @@ public:
~ProjectileObject(); ~ProjectileObject();
void tick(float dt); void tick(float dt) override;
Type type() { Type type() const override {
return Projectile; return Projectile;
} }

View File

@ -58,9 +58,9 @@ public:
virtual ~VehicleObject(); virtual ~VehicleObject();
void setPosition(const glm::vec3& pos); void setPosition(const glm::vec3& pos) override;
void setRotation(const glm::quat& orientation); void setRotation(const glm::quat& orientation) override;
void updateTransform(const glm::vec3& pos, const glm::quat& rot) override; void updateTransform(const glm::vec3& pos, const glm::quat& rot) override;
@ -71,7 +71,7 @@ public:
Atomic* getHighLOD() const { return chassishigh_; } Atomic* getHighLOD() const { return chassishigh_; }
Atomic* getLowLOD() const { return chassislow_; } Atomic* getLowLOD() const { return chassislow_; }
Type type() { Type type() const override {
return Vehicle; return Vehicle;
} }
@ -91,7 +91,7 @@ public:
bool getHandbraking() const; bool getHandbraking() const;
void tick(float dt); void tick(float dt) override;
void tickPhysics(float dt); void tickPhysics(float dt);
@ -130,7 +130,7 @@ public:
Part* getSeatEntryDoor(size_t seat); Part* getSeatEntryDoor(size_t seat);
virtual bool takeDamage(const DamageInfo& damage); virtual bool takeDamage(const DamageInfo& damage) override;
enum FrameState { OK, DAM, BROKEN }; enum FrameState { OK, DAM, BROKEN };

View File

@ -22,13 +22,13 @@ class BenchmarkState : public State {
public: public:
BenchmarkState(RWGame* game, const std::string& benchfile); BenchmarkState(RWGame* game, const std::string& benchfile);
virtual void enter(); virtual void enter() override;
virtual void exit(); virtual void exit() override;
virtual void tick(float dt); virtual void tick(float dt) override;
virtual void draw(GameRenderer* r); virtual void draw(GameRenderer* r) override;
virtual void handleEvent(const SDL_Event& event); virtual void handleEvent(const SDL_Event& event) override;
const ViewCamera& getCamera(); const ViewCamera& getCamera();
}; };

View File

@ -21,13 +21,13 @@ public:
DebugState(RWGame* game, const glm::vec3& vp = {}, DebugState(RWGame* game, const glm::vec3& vp = {},
const glm::quat& vd = {}); const glm::quat& vd = {});
virtual void enter(); virtual void enter() override;
virtual void exit(); virtual void exit() override;
virtual void tick(float dt); virtual void tick(float dt) override;
virtual void draw(GameRenderer* r); virtual void draw(GameRenderer* r) override;
virtual void handleEvent(const SDL_Event& event); virtual void handleEvent(const SDL_Event& event) override;
void printCameraDetails(); void printCameraDetails();

View File

@ -46,16 +46,16 @@ public:
void startTest(); void startTest();
void startGame(); void startGame();
virtual void enter(); virtual void enter() override;
virtual void exit(); virtual void exit() override;
virtual void tick(float dt); virtual void tick(float dt) override;
virtual void draw(GameRenderer* r); virtual void draw(GameRenderer* r);
virtual void handleEvent(const SDL_Event& event); virtual void handleEvent(const SDL_Event& event) override;
virtual void handlePlayerInput(const SDL_Event& event); virtual void handlePlayerInput(const SDL_Event& event);
virtual bool shouldWorldUpdate(); virtual bool shouldWorldUpdate() override;
const ViewCamera& getCamera(float alpha); const ViewCamera& getCamera(float alpha);
private: private:

View File

@ -10,16 +10,16 @@ class LoadingState : public State {
public: public:
LoadingState(RWGame* game, std::function<void(void)> callback); LoadingState(RWGame* game, std::function<void(void)> callback);
virtual void enter(); virtual void enter() override;
virtual void exit(); virtual void exit() override;
virtual void tick(float dt); virtual void tick(float dt) override;
virtual void draw(GameRenderer* r); virtual void draw(GameRenderer* r) override;
virtual bool shouldWorldUpdate(); virtual bool shouldWorldUpdate() override;
virtual void handleEvent(const SDL_Event& event); virtual void handleEvent(const SDL_Event& event) override;
}; };
#endif // LOADINGSTATE_HPP #endif // LOADINGSTATE_HPP

View File

@ -7,15 +7,15 @@ class MenuState : public State {
public: public:
MenuState(RWGame* game); MenuState(RWGame* game);
virtual void enter(); virtual void enter() override;
virtual void exit(); virtual void exit() override;
virtual void tick(float dt); virtual void tick(float dt) override;
virtual void enterMainMenu(); virtual void enterMainMenu();
virtual void enterLoadMenu(); virtual void enterLoadMenu();
virtual void handleEvent(const SDL_Event& event); virtual void handleEvent(const SDL_Event& event) override;
}; };
#endif // MENUSTATE_HPP #endif // MENUSTATE_HPP

View File

@ -7,14 +7,14 @@ class PauseState : public State {
public: public:
PauseState(RWGame* game); PauseState(RWGame* game);
virtual void enter(); virtual void enter() override;
virtual void exit(); virtual void exit() override;
virtual void tick(float dt); virtual void tick(float dt) override;
virtual void draw(GameRenderer* r); virtual void draw(GameRenderer* r) override;
virtual void handleEvent(const SDL_Event& event); virtual void handleEvent(const SDL_Event& event) override;
}; };
#endif // PAUSESTATE_HPP #endif // PAUSESTATE_HPP