ULTIMA: Add override keywords

This commit is contained in:
Bastien Bouclet 2020-02-09 12:05:34 +01:00
parent 31771a565e
commit aedcefea74
318 changed files with 1617 additions and 1617 deletions

View file

@ -61,30 +61,30 @@ struct UltimaGameDescription {
class UltimaMetaEngine : public AdvancedMetaEngine { class UltimaMetaEngine : public AdvancedMetaEngine {
public: public:
UltimaMetaEngine(); UltimaMetaEngine();
virtual ~UltimaMetaEngine(); ~UltimaMetaEngine() override;
virtual const char *getEngineId() const override { const char *getEngineId() const override {
return "ultima"; return "ultima";
} }
virtual const char *getName() const override { const char *getName() const override {
return "Ultima"; return "Ultima";
} }
virtual const char *getOriginalCopyright() const override { const char *getOriginalCopyright() const override {
return "Ultima Games (C) 1980-1995 Origin Systems Inc."; return "Ultima Games (C) 1980-1995 Origin Systems Inc.";
} }
virtual const char *getSavegamePattern(const char *target = nullptr) const override; const char *getSavegamePattern(const char *target = nullptr) const override;
virtual const char *getSavegameFile(int saveGameIdx, const char *target = nullptr) const override; const char *getSavegameFile(int saveGameIdx, const char *target = nullptr) const override;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override; bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
virtual int getMaximumSaveSlot() const override; int getMaximumSaveSlot() const override;
/** /**
* Return a list of all save states associated with the given target. * Return a list of all save states associated with the given target.
*/ */
virtual SaveStateList listSaves(const char *target) const override; SaveStateList listSaves(const char *target) const override;
}; };
namespace Ultima { namespace Ultima {

View file

@ -34,9 +34,9 @@ protected:
public: public:
MDActor(Map *m, ObjManager *om, GameClock *c); MDActor(Map *m, ObjManager *om, GameClock *c);
~MDActor(); ~MDActor() override;
virtual bool init(uint8 unused = 0) override; bool init(uint8 unused = 0) override;
bool will_not_talk() override; bool will_not_talk() override;
uint8 get_maxhp() override { uint8 get_maxhp() override {
return (((level * 24 + strength * 2) < 255) ? (level * 24 + strength * 2) : 255); return (((level * 24 + strength * 2) < 255) ? (level * 24 + strength * 2) : 255);
@ -47,7 +47,7 @@ public:
bool is_immobile() override; bool is_immobile() override;
bool check_move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0) override; bool check_move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0) override;
virtual uint16 get_downward_facing_tile_num() override; uint16 get_downward_facing_tile_num() override;
void set_direction(uint8 d) override; void set_direction(uint8 d) override;
bool is_passable() override; bool is_passable() override;

View file

@ -35,9 +35,9 @@ protected:
public: public:
SEActor(Map *m, ObjManager *om, GameClock *c); SEActor(Map *m, ObjManager *om, GameClock *c);
~SEActor(); ~SEActor() override;
virtual bool init(uint8 unused = 0) override; bool init(uint8 unused = 0) override;
bool will_not_talk() override; bool will_not_talk() override;
uint8 get_maxhp() override { uint8 get_maxhp() override {
return (((level * 4 + strength * 2) < 255) ? (level * 4 + strength * 2) : 255); return (((level * 4 + strength * 2) < 255) ? (level * 4 + strength * 2) : 255);

View file

@ -69,64 +69,64 @@ protected:
public: public:
U6Actor(Map *m, ObjManager *om, GameClock *c); U6Actor(Map *m, ObjManager *om, GameClock *c);
~U6Actor(); ~U6Actor() override;
bool init(uint8 obj_status = NO_OBJ_STATUS); bool init(uint8 obj_status = NO_OBJ_STATUS) override;
virtual uint16 get_downward_facing_tile_num(); uint16 get_downward_facing_tile_num() override;
bool updateSchedule(uint8 hour, bool teleport = false); bool updateSchedule(uint8 hour, bool teleport = false) override;
void set_worktype(uint8 new_worktype, bool init = false); void set_worktype(uint8 new_worktype, bool init = false) override;
void revert_worktype(); void revert_worktype() override;
void change_base_obj_n(uint16 val); void change_base_obj_n(uint16 val) override;
void set_direction(uint8 d); void set_direction(uint8 d) override;
void face_location(uint16 lx, uint16 ly); void face_location(uint16 lx, uint16 ly) override;
void clear(); void clear() override;
bool move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0); bool move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0) override;
bool check_move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0); bool check_move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0) override;
void twitch(); void twitch() override;
void do_twitch(); void do_twitch();
void die(bool create_body = true); void die(bool create_body = true) override;
void set_paralyzed(bool paralyzed); void set_paralyzed(bool paralyzed) override;
void set_protected(bool val); void set_protected(bool val) override;
void set_charmed(bool val); void set_charmed(bool val) override;
void set_corpser_flag(bool val); void set_corpser_flag(bool val) override;
void set_cursed(bool val); void set_cursed(bool val) override;
void set_asleep(bool val); void set_asleep(bool val) override;
void set_ethereal(bool val) { void set_ethereal(bool val) override {
current_movetype = val ? MOVETYPE_U6_ETHEREAL : actor_type->movetype; current_movetype = val ? MOVETYPE_U6_ETHEREAL : actor_type->movetype;
ethereal = val; ethereal = val;
} }
uint8 get_object_readiable_location(Obj *obj); uint8 get_object_readiable_location(Obj *obj) override;
const CombatType *get_object_combat_type(uint16 objN); const CombatType *get_object_combat_type(uint16 objN) override;
ActorTileType get_tile_type() { ActorTileType get_tile_type() override {
return (actor_type->tile_type); return (actor_type->tile_type);
} }
Obj *inventory_get_food(Obj *container = 0); Obj *inventory_get_food(Obj *container = 0) override;
uint8 get_maxhp() { uint8 get_maxhp() override {
return (((level * 30) <= 255) ? (level * 30) : 255); // U6 return (((level * 30) <= 255) ? (level * 30) : 255); // U6
} }
uint8 get_maxmagic(); uint8 get_maxmagic() override;
bool weapon_can_hit(const CombatType *weapon, Actor *target, uint16 *hit_x, uint16 *hit_y); bool weapon_can_hit(const CombatType *weapon, Actor *target, uint16 *hit_x, uint16 *hit_y) override;
bool is_immobile(); // frozen by worktype or status bool is_immobile() override; // frozen by worktype or status
bool can_twitch(); bool can_twitch();
bool get_corpser_flag() { bool get_corpser_flag() override {
return (movement_flags & ACTOR_MOVEMENT_FLAGS_CORPSER); return (movement_flags & ACTOR_MOVEMENT_FLAGS_CORPSER);
} }
bool can_be_passed(Actor *other); bool can_be_passed(Actor *other) override;
bool will_not_talk(); bool will_not_talk() override;
void set_actor_obj_n(uint16 new_obj_n); void set_actor_obj_n(uint16 new_obj_n);
void pathfind_to(MapCoord &d); void pathfind_to(MapCoord &d) override;
void handle_lightsource(uint8 hour); void handle_lightsource(uint8 hour) override;
uint8 get_hp_text_color(); uint8 get_hp_text_color() override;
uint8 get_str_text_color() { uint8 get_str_text_color() override {
return 0x48; return 0x48;
} }
uint8 get_dex_text_color() { uint8 get_dex_text_color() override {
return 0x48; return 0x48;
} }
@ -166,10 +166,10 @@ protected:
inline void clear_surrounding_objs_list(bool delete_objs = false); inline void clear_surrounding_objs_list(bool delete_objs = false);
inline void init_surrounding_obj(uint16 x, uint16 y, uint8 z, uint16 actor_obj_n, uint16 obj_frame_n); inline void init_surrounding_obj(uint16 x, uint16 y, uint8 z, uint16 actor_obj_n, uint16 obj_frame_n);
const CombatType *get_hand_combat_type(); const CombatType *get_hand_combat_type() override;
void print(); void print() override;
const char *get_worktype_string(uint32 wt); const char *get_worktype_string(uint32 wt) override;
void inventory_make_all_objs_ok_to_take(); void inventory_make_all_objs_ok_to_take();
}; };

View file

@ -34,10 +34,10 @@ protected:
public: public:
WOUActor(Map *m, ObjManager *om, GameClock *c) : Actor(m, om, c) { } WOUActor(Map *m, ObjManager *om, GameClock *c) : Actor(m, om, c) { }
~WOUActor() { } ~WOUActor() override { }
virtual bool can_carry_object(uint16 obj_n, uint32 qty = 0); bool can_carry_object(uint16 obj_n, uint32 qty = 0) override;
virtual bool can_carry_object(Obj *obj); bool can_carry_object(Obj *obj) override;
}; };

View file

@ -137,7 +137,7 @@ protected:
public: public:
NuvieAnim(); NuvieAnim();
~NuvieAnim(); ~NuvieAnim() override;
void pause() { void pause() {
paused = true; paused = true;
@ -208,13 +208,13 @@ protected:
vector<PositionedTile *> tiles; vector<PositionedTile *> tiles;
virtual void display(); void display() override;
public: public:
TileAnim(); TileAnim();
~TileAnim(); ~TileAnim() override;
MapCoord get_location() { MapCoord get_location() override {
return (MapCoord(tx, ty, 0)); return (MapCoord(tx, ty, 0));
} }
void get_offset(uint32 &x_add, uint32 &y_add) { void get_offset(uint32 &x_add, uint32 &y_add) {
@ -223,13 +223,13 @@ public:
} }
sint32 get_tile_id(PositionedTile *find_tile); sint32 get_tile_id(PositionedTile *find_tile);
void move(uint32 x, uint32 y, uint32 add_x = 0, uint32 add_y = 0) { void move(uint32 x, uint32 y, uint32 add_x = 0, uint32 add_y = 0) override {
tx = x; tx = x;
ty = y; ty = y;
px = add_x; px = add_x;
py = add_y; py = add_y;
} }
void shift(sint32 sx, sint32 sy); void shift(sint32 sx, sint32 sy) override;
void shift_tile(uint32 ptile_num, sint32 sx, sint32 sy); void shift_tile(uint32 ptile_num, sint32 sx, sint32 sy);
void move_tile(PositionedTile *ptile, uint32 x, uint32 y); void move_tile(PositionedTile *ptile, uint32 x, uint32 y);
@ -249,7 +249,7 @@ public:
TimedAnim() { TimedAnim() {
timer = NULL; timer = NULL;
} }
~TimedAnim() { ~TimedAnim() override {
stop_timer(); stop_timer();
} }
void start_timer(uint32 delay) { void start_timer(uint32 delay) {
@ -262,7 +262,7 @@ public:
} }
} }
void stop() { void stop() override {
stop_timer(); stop_timer();
NuvieAnim::stop(); NuvieAnim::stop();
} }
@ -297,19 +297,19 @@ protected:
float x_left, y_left; // when unable to move in a call, fractional movement values are collected here float x_left, y_left; // when unable to move in a call, fractional movement values are collected here
uint16 x_dist, y_dist; // distances from start->target on X-axis & Y-axis uint16 x_dist, y_dist; // distances from start->target on X-axis & Y-axis
bool update(); bool update() override;
MapCoord get_location(); MapCoord get_location() override;
virtual void display(); void display() override;
public: public:
TossAnim(Tile *tile, const MapCoord &start, const MapCoord &stop, uint16 pixels_per_sec, uint8 stop_flags = 0); TossAnim(Tile *tile, const MapCoord &start, const MapCoord &stop, uint16 pixels_per_sec, uint8 stop_flags = 0);
TossAnim(Obj *obj, uint16 degrees, const MapCoord &start, const MapCoord &stop, uint16 pixels_per_sec, uint8 stop_flags = 0); TossAnim(Obj *obj, uint16 degrees, const MapCoord &start, const MapCoord &stop, uint16 pixels_per_sec, uint8 stop_flags = 0);
~TossAnim(); ~TossAnim() override;
void init(Tile *tile, uint16 degrees, const MapCoord &start, const MapCoord &stop, uint16 pixels_per_sec, uint8 stop_flags); void init(Tile *tile, uint16 degrees, const MapCoord &start, const MapCoord &stop, uint16 pixels_per_sec, uint8 stop_flags);
void start(); void start() override;
void stop(); void stop() override;
uint32 update_position(uint32 max_move = 0); uint32 update_position(uint32 max_move = 0);
inline void accumulate_moves(float moves, sint32 &x_move, sint32 &y_move, sint8 xdir, sint8 ydir); inline void accumulate_moves(float moves, sint32 &x_move, sint32 &y_move, sint8 xdir, sint8 ydir);
@ -346,9 +346,9 @@ class ExplosiveAnim : public TimedAnim {
public: public:
ExplosiveAnim(MapCoord *start, uint32 size); ExplosiveAnim(MapCoord *start, uint32 size);
~ExplosiveAnim(); ~ExplosiveAnim() override;
void start() override; void start() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
bool update() override; bool update() override;
bool already_hit(MapEntity ent); bool already_hit(MapEntity ent);
void hit_object(Obj *obj); void hit_object(Obj *obj);
@ -380,10 +380,10 @@ class ProjectileAnim : public TileAnim {
bool leaveTrailFlag; bool leaveTrailFlag;
public: public:
ProjectileAnim(uint16 tileNum, MapCoord *start, vector<MapCoord> target, uint8 animSpeed, bool leaveTrailFlag = false, uint16 initialTileRotation = 0, uint16 rotationAmount = 0, uint8 src_y_offset = 0); ProjectileAnim(uint16 tileNum, MapCoord *start, vector<MapCoord> target, uint8 animSpeed, bool leaveTrailFlag = false, uint16 initialTileRotation = 0, uint16 rotationAmount = 0, uint8 src_y_offset = 0);
~ProjectileAnim(); ~ProjectileAnim() override;
void start(); void start() override;
bool update(); bool update() override;
protected: protected:
void hit_entity(MapEntity entity); void hit_entity(MapEntity entity);
@ -403,9 +403,9 @@ class WingAnim : public TileAnim {
public: public:
WingAnim(MapCoord target); WingAnim(MapCoord target);
~WingAnim(); ~WingAnim() override;
void start(); void start() override;
bool update(); bool update() override;
}; };
@ -427,9 +427,9 @@ class HailstormAnim : public TileAnim {
public: public:
HailstormAnim(MapCoord t); HailstormAnim(MapCoord t);
~HailstormAnim(); ~HailstormAnim() override;
void start(); void start() override;
bool update(); bool update() override;
protected: protected:
sint8 find_free_hailstone(); sint8 find_free_hailstone();
@ -447,7 +447,7 @@ public:
HitAnim(MapCoord *loc); HitAnim(MapCoord *loc);
HitAnim(Actor *actor); HitAnim(Actor *actor);
virtual uint16 callback(uint16 msg, CallBack *caller, void *msg_data) override; uint16 callback(uint16 msg, CallBack *caller, void *msg_data) override;
void start() override { void start() override {
start_timer(300); start_timer(300);
} }
@ -460,13 +460,13 @@ class TextAnim : public TimedAnim {
public: public:
TextAnim(Std::string text, MapCoord loc, uint32 dur); TextAnim(Std::string text, MapCoord loc, uint32 dur);
~TextAnim(); ~TextAnim() override;
uint16 callback(uint16 msg, CallBack *caller, void *msg_data); uint16 callback(uint16 msg, CallBack *caller, void *msg_data) override;
void start() { void start() override {
start_timer(duration); start_timer(duration);
} }
void display(); void display() override;
}; };
class TileFadeAnim : public TileAnim { class TileFadeAnim : public TileAnim {
@ -481,9 +481,9 @@ public:
TileFadeAnim(); TileFadeAnim();
TileFadeAnim(MapCoord *loc, Tile *from, Tile *to, uint16 speed); TileFadeAnim(MapCoord *loc, Tile *from, Tile *to, uint16 speed);
TileFadeAnim(MapCoord *loc, Tile *from, uint8 color_from, uint8 color_to, bool reverse, uint16 speed); TileFadeAnim(MapCoord *loc, Tile *from, uint8 color_from, uint8 color_to, bool reverse, uint16 speed);
~TileFadeAnim(); ~TileFadeAnim() override;
bool update(); bool update() override;
protected: protected:
void init(uint16 speed); void init(uint16 speed);
}; };

View file

@ -320,7 +320,7 @@ public:
WOUConverseInterpret(Converse *owner) : ConverseInterpret(owner) { } WOUConverseInterpret(Converse *owner) : ConverseInterpret(owner) { }
protected: protected:
virtual bool op_create_new(stack<converse_typed_value> &i); bool op_create_new(stack<converse_typed_value> &i) override;
}; };
class SETalkInterpret : public ConverseInterpret { class SETalkInterpret : public ConverseInterpret {

View file

@ -34,7 +34,7 @@ namespace Nuvie {
class Debugger : public Shared::Debugger { class Debugger : public Shared::Debugger {
public: public:
Debugger(); Debugger();
virtual ~Debugger() {} ~Debugger() override {}
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -75,7 +75,7 @@ protected:
public: public:
Effect(); Effect();
~Effect(); ~Effect() override;
void retain() { void retain() {
retain_count++; retain_count++;
@ -95,7 +95,7 @@ public:
bool is_defunct() { bool is_defunct() {
return (defunct); return (defunct);
} }
uint16 callback(uint16, CallBack *, void *) { uint16 callback(uint16, CallBack *, void *) override {
return (0); return (0);
} }
}; };
@ -117,7 +117,7 @@ public:
CannonballEffect(Obj *src_obj, sint8 direction = -1); CannonballEffect(Obj *src_obj, sint8 direction = -1);
// CannonballEffect(Actor *src_actor, Actor *target_actor); from a ship // CannonballEffect(Actor *src_actor, Actor *target_actor); from a ship
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
class ProjectileEffect : public Effect { class ProjectileEffect : public Effect {
@ -152,7 +152,7 @@ public:
void init(uint16 tileNum, MapCoord start, vector<MapCoord> t, uint8 speed, bool trailFlag, uint16 initialTileRotation, uint16 rotationAmount, uint8 src_y_offset); void init(uint16 tileNum, MapCoord start, vector<MapCoord> t, uint8 speed, bool trailFlag, uint16 initialTileRotation, uint16 rotationAmount, uint8 src_y_offset);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
vector<MapEntity> *get_hit_entities() { vector<MapEntity> *get_hit_entities() {
return &hit_entities; return &hit_entities;
@ -167,7 +167,7 @@ class ExpEffect : public ProjectileEffect {
uint16 exp_tile_num; uint16 exp_tile_num;
protected: protected:
void start_anim(); void start_anim() override;
public: public:
ExpEffect(uint16 tileNum, MapCoord location); ExpEffect(uint16 tileNum, MapCoord location);
@ -187,7 +187,7 @@ public:
timer = NULL; timer = NULL;
start_timer(delay); start_timer(delay);
} }
~TimedEffect() { ~TimedEffect() override {
stop_timer(); stop_timer();
} }
@ -199,7 +199,7 @@ public:
Effect::delete_self(); Effect::delete_self();
} }
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override { uint16 callback(uint16 msg, CallBack *caller, void *data) override {
if (msg == MESG_TIMED) delete_self(); //= 0; if (msg == MESG_TIMED) delete_self(); //= 0;
return (0); return (0);
} }
@ -219,8 +219,8 @@ class QuakeEffect : public TimedEffect {
public: public:
QuakeEffect(uint8 magnitude, uint32 duration, Actor *keep_on = NULL); QuakeEffect(uint8 magnitude, uint32 duration, Actor *keep_on = NULL);
~QuakeEffect(); ~QuakeEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
void init_directions(); void init_directions();
void recenter_map(); void recenter_map();
@ -234,7 +234,7 @@ class HitEffect : public Effect {
public: public:
HitEffect(Actor *target, uint32 duration = 300); HitEffect(Actor *target, uint32 duration = 300);
HitEffect(MapCoord location); HitEffect(MapCoord location);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
/* Print text to MapWindow for a given duration /* Print text to MapWindow for a given duration
@ -244,7 +244,7 @@ class TextEffect : public Effect {
public: public:
TextEffect(Std::string text); TextEffect(Std::string text);
TextEffect(Std::string text, MapCoord location); TextEffect(Std::string text, MapCoord location);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
@ -263,7 +263,7 @@ protected:
public: public:
ExplosiveEffect(uint16 x, uint16 y, uint32 size, uint16 dmg = 0); ExplosiveEffect(uint16 x, uint16 y, uint32 size, uint16 dmg = 0);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
// children can override // children can override
virtual void delete_self() { virtual void delete_self() {
@ -286,8 +286,8 @@ public:
UseCodeExplosiveEffect(Obj *src_obj, uint16 x, uint16 y, uint32 size, uint16 dmg = 0, Obj *dont_hit_me = NULL) UseCodeExplosiveEffect(Obj *src_obj, uint16 x, uint16 y, uint32 size, uint16 dmg = 0, Obj *dont_hit_me = NULL)
: ExplosiveEffect(x, y, size, dmg), obj(src_obj), original_obj(dont_hit_me) { : ExplosiveEffect(x, y, size, dmg), obj(src_obj), original_obj(dont_hit_me) {
} }
void delete_self(); void delete_self() override;
bool hit_object(Obj *hit_obj); // explosion hit something bool hit_object(Obj *hit_obj) override; // explosion hit something
@ -312,12 +312,12 @@ protected:
public: public:
ThrowObjectEffect(); ThrowObjectEffect();
virtual ~ThrowObjectEffect() { } ~ThrowObjectEffect() override { }
void hit_target(); // stops effect void hit_target(); // stops effect
void start_anim(); void start_anim();
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) = 0; uint16 callback(uint16 msg, CallBack *caller, void *data) override = 0;
}; };
@ -333,7 +333,7 @@ public:
void hit_target(); void hit_target();
void get_obj(Obj *obj, uint16 qty); void get_obj(Obj *obj, uint16 qty);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
#define MISSILE_DEFAULT_SPEED 200 #define MISSILE_DEFAULT_SPEED 200
@ -366,7 +366,7 @@ public:
const MapCoord &target, uint32 dmg, uint8 intercept, uint32 speed); const MapCoord &target, uint32 dmg, uint8 intercept, uint32 speed);
void hit_target(); void hit_target();
void hit_blocking(); void hit_blocking();
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
#if 0 #if 0
@ -398,9 +398,9 @@ class SleepEffect : public Effect {
public: public:
SleepEffect(Std::string until); SleepEffect(Std::string until);
SleepEffect(uint8 to_hour); SleepEffect(uint8 to_hour);
~SleepEffect(); ~SleepEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
void delete_self(); void delete_self();
}; };
@ -438,8 +438,8 @@ public:
FadeEffect(FadeType fade, FadeDirection dir, uint32 color = 0, uint32 speed = 0); FadeEffect(FadeType fade, FadeDirection dir, uint32 color = 0, uint32 speed = 0);
FadeEffect(FadeType fade, FadeDirection dir, Graphics::ManagedSurface *capture, uint32 speed = 0); FadeEffect(FadeType fade, FadeDirection dir, Graphics::ManagedSurface *capture, uint32 speed = 0);
FadeEffect(FadeType fade, FadeDirection dir, Graphics::ManagedSurface *capture, uint16 x, uint16 y, uint32 speed = 0); FadeEffect(FadeType fade, FadeDirection dir, Graphics::ManagedSurface *capture, uint16 x, uint16 y, uint32 speed = 0);
~FadeEffect(); ~FadeEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
bool pixelated_fade_out(); bool pixelated_fade_out();
bool pixelated_fade_in(); bool pixelated_fade_in();
@ -465,8 +465,8 @@ protected:
class GameFadeInEffect : public FadeEffect { class GameFadeInEffect : public FadeEffect {
public: public:
GameFadeInEffect(uint32 color); GameFadeInEffect(uint32 color);
~GameFadeInEffect(); ~GameFadeInEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
@ -479,8 +479,8 @@ class FadeObjectEffect : public Effect {
FadeDirection fade_dir; FadeDirection fade_dir;
public: public:
FadeObjectEffect(Obj *obj, FadeDirection dir); FadeObjectEffect(Obj *obj, FadeDirection dir);
~FadeObjectEffect(); ~FadeObjectEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
@ -493,8 +493,8 @@ class VanishEffect : public Effect {
bool input_blocked; bool input_blocked;
public: public:
VanishEffect(bool pause_user = VANISH_NOWAIT); VanishEffect(bool pause_user = VANISH_NOWAIT);
~VanishEffect(); ~VanishEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
class TileFadeEffect : public TimedEffect { class TileFadeEffect : public TimedEffect {
@ -511,8 +511,8 @@ public:
TileFadeEffect(MapCoord loc, Tile *from, Tile *to, FadeType type, uint16 speed); TileFadeEffect(MapCoord loc, Tile *from, Tile *to, FadeType type, uint16 speed);
//TileFadeEffect(MapCoord loc, Tile *from, uint8 color_from, uint8 color_to, bool reverse, uint16 speed); //TileFadeEffect(MapCoord loc, Tile *from, uint8 color_from, uint8 color_to, bool reverse, uint16 speed);
TileFadeEffect(Actor *a, uint16 speed); TileFadeEffect(Actor *a, uint16 speed);
~TileFadeEffect(); ~TileFadeEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
protected: protected:
void add_actor_anim(); void add_actor_anim();
@ -532,8 +532,8 @@ class TileBlackFadeEffect : public TimedEffect {
public: public:
TileBlackFadeEffect(Actor *a, uint8 fade_color, uint16 speed); TileBlackFadeEffect(Actor *a, uint8 fade_color, uint16 speed);
TileBlackFadeEffect(Obj *o, uint8 fade_color, uint16 speed); TileBlackFadeEffect(Obj *o, uint8 fade_color, uint16 speed);
~TileBlackFadeEffect(); ~TileBlackFadeEffect() override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
protected: protected:
void init(uint8 fade_color, uint16 speed); void init(uint8 fade_color, uint16 speed);
void add_actor_anim(); void add_actor_anim();
@ -555,10 +555,10 @@ class XorEffect : public TimedEffect {
public: public:
/* eff_ms=length of visual effect */ /* eff_ms=length of visual effect */
XorEffect(uint32 eff_ms); XorEffect(uint32 eff_ms);
~XorEffect() { } ~XorEffect() override { }
/* Called by the timer between each effect stage. */ /* Called by the timer between each effect stage. */
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
/* Briefly modify the mapwindow colors, disable map-blacking and player /* Briefly modify the mapwindow colors, disable map-blacking and player
@ -577,10 +577,10 @@ class U6WhitePotionEffect : public TimedEffect {
public: public:
/* eff_ms=length of visual effect; delay_ms=length of x-ray effect */ /* eff_ms=length of visual effect; delay_ms=length of x-ray effect */
U6WhitePotionEffect(uint32 eff_ms, uint32 delay_ms, Obj *callback_obj = NULL); U6WhitePotionEffect(uint32 eff_ms, uint32 delay_ms, Obj *callback_obj = NULL);
~U6WhitePotionEffect() { } ~U6WhitePotionEffect() override { }
/* Called by the timer between each effect stage. */ /* Called by the timer between each effect stage. */
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
@ -591,21 +591,21 @@ class XRayEffect : public TimedEffect {
public: public:
/* eff_ms=length of x-ray effect */ /* eff_ms=length of x-ray effect */
XRayEffect(uint32 eff_ms); XRayEffect(uint32 eff_ms);
~XRayEffect() { } ~XRayEffect() override { }
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
/* Pause the game, create an effect, and wait for user input to continue. */ /* Pause the game, create an effect, and wait for user input to continue. */
class PauseEffect: public Effect { class PauseEffect: public Effect {
public: public:
/* Called by the Effect handler when input is available. */ /* Called by the Effect handler when input is available. */
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
virtual void delete_self() { virtual void delete_self() {
Effect::delete_self(); Effect::delete_self();
} }
PauseEffect(); PauseEffect();
~PauseEffect() { } ~PauseEffect() override { }
}; };
/* Gather text from scroll input then continue. */ /* Gather text from scroll input then continue. */
@ -613,9 +613,9 @@ class TextInputEffect: public Effect {
Std::string input; Std::string input;
public: public:
/* Called by the Effect handler when input is available. */ /* Called by the Effect handler when input is available. */
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
TextInputEffect(const char *allowed_chars, bool can_escape); TextInputEffect(const char *allowed_chars, bool can_escape);
~TextInputEffect() { } ~TextInputEffect() override { }
Std::string get_input() { Std::string get_input() {
return input; return input;
} }
@ -624,12 +624,12 @@ public:
class WizardEyeEffect: public Effect { class WizardEyeEffect: public Effect {
public: public:
/* Called by the Effect handler when input is available. */ /* Called by the Effect handler when input is available. */
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
virtual void delete_self() { virtual void delete_self() {
Effect::delete_self(); Effect::delete_self();
} }
WizardEyeEffect(MapCoord location, uint16 duration); WizardEyeEffect(MapCoord location, uint16 duration);
~WizardEyeEffect() { } ~WizardEyeEffect() override { }
}; };
/* colors for PeerEffect */ /* colors for PeerEffect */
@ -668,9 +668,9 @@ class PeerEffect : public PauseEffect {
public: public:
PeerEffect(uint16 x, uint16 y, uint8 z, Obj *callback_obj = 0); PeerEffect(uint16 x, uint16 y, uint8 z, Obj *callback_obj = 0);
~PeerEffect() { } ~PeerEffect() override { }
void init_effect(); void init_effect();
void delete_self(); void delete_self() override;
}; };
class WingStrikeEffect : public Effect { class WingStrikeEffect : public Effect {
@ -681,7 +681,7 @@ protected:
public: public:
WingStrikeEffect(Actor *target_actor); WingStrikeEffect(Actor *target_actor);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
class HailStormEffect : public Effect { class HailStormEffect : public Effect {
@ -690,7 +690,7 @@ protected:
public: public:
HailStormEffect(MapCoord target); HailStormEffect(MapCoord target);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
#define EFFECT_PROCESS_GUI_INPUT true #define EFFECT_PROCESS_GUI_INPUT true
@ -703,9 +703,9 @@ protected:
public: public:
AsyncEffect(Effect *e); AsyncEffect(Effect *e);
~AsyncEffect(); ~AsyncEffect() override;
void run(bool process_gui_input = false); void run(bool process_gui_input = false);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -236,14 +236,14 @@ private:
protected: protected:
inline uint32 TimeLeft(); inline uint32 TimeLeft();
virtual uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override; uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override;
bool handleSDL_KEYDOWN(const Common::Event *event); bool handleSDL_KEYDOWN(const Common::Event *event);
const char *print_mode(EventMode mode); const char *print_mode(EventMode mode);
void try_next_attack(); void try_next_attack();
public: public:
Events(Shared::EventsCallback *callback, Configuration *cfg); Events(Shared::EventsCallback *callback, Configuration *cfg);
virtual ~Events(); ~Events() override;
void clear(); void clear();

View file

@ -94,7 +94,7 @@ private:
*/ */
public: public:
Magic(); Magic();
~Magic(); ~Magic() override;
bool init(Events *evt); bool init(Events *evt);
bool read_spell_list(); bool read_spell_list();
@ -107,7 +107,7 @@ public:
bool cast(); bool cast();
void cast_spell_directly(uint8 spell_num); void cast_spell_directly(uint8 spell_num);
virtual uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override; uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override;
bool process_script_return(uint8 ret); bool process_script_return(uint8 ret);
bool resume(MapCoord location); bool resume(MapCoord location);
bool resume(uint8 dir); bool resume(uint8 dir);

View file

@ -126,7 +126,7 @@ public:
: TimedEvent(reltime), msg(m) { : TimedEvent(reltime), msg(m) {
repeat_count = repeat ? -1 : 0; repeat_count = repeat ? -1 : 0;
} }
void timed(uint32 evtime) { void timed(uint32 evtime) override {
DEBUG(0, LEVEL_NOTIFICATION, "Activate! evtime=%d msg=\"%s\"\n", evtime, msg.c_str()); DEBUG(0, LEVEL_NOTIFICATION, "Activate! evtime=%d msg=\"%s\"\n", evtime, msg.c_str());
} }
}; };
@ -151,11 +151,11 @@ public:
TimedPartyMove(MapCoord *d, MapCoord *t, uint32 step_delay = 500); TimedPartyMove(MapCoord *d, MapCoord *t, uint32 step_delay = 500);
TimedPartyMove(MapCoord *d, MapCoord *t, Obj *use_obj, uint32 step_delay = 500); TimedPartyMove(MapCoord *d, MapCoord *t, Obj *use_obj, uint32 step_delay = 500);
TimedPartyMove(uint32 step_delay = 500); TimedPartyMove(uint32 step_delay = 500);
~TimedPartyMove(); ~TimedPartyMove() override;
void init(MapCoord *d, MapCoord *t, Obj *use_obj); void init(MapCoord *d, MapCoord *t, Obj *use_obj);
void timed(uint32 evtime) override; void timed(uint32 evtime) override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override; uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override;
protected: protected:
bool move_party(); bool move_party();
@ -171,7 +171,7 @@ class TimedPartyMoveToVehicle : public TimedPartyMove {
Obj *ship_obj; // vehicle center Obj *ship_obj; // vehicle center
public: public:
TimedPartyMoveToVehicle(MapCoord *d, Obj *obj, uint32 step_delay = 125); TimedPartyMoveToVehicle(MapCoord *d, Obj *obj, uint32 step_delay = 125);
void timed(uint32 evtime); void timed(uint32 evtime) override;
}; };
@ -199,7 +199,7 @@ class TimedContainerSearch : public TimedEvent {
Obj *prev_obj; // removed from container Obj *prev_obj; // removed from container
public: public:
TimedContainerSearch(Obj *obj); TimedContainerSearch(Obj *obj);
void timed(uint32 evtime); void timed(uint32 evtime) override;
}; };
@ -211,8 +211,8 @@ class TimedCallback : public TimedEvent, public CallBack {
public: public:
TimedCallback(CallBack *t, void *d, uint32 wait_time, TimedCallback(CallBack *t, void *d, uint32 wait_time,
bool repeat = false); bool repeat = false);
virtual ~TimedCallback() { } ~TimedCallback() override { }
virtual void timed(uint32 evtime); void timed(uint32 evtime) override;
void clear_target() { void clear_target() {
set_target(NULL); set_target(NULL);
} }
@ -222,7 +222,7 @@ public:
class GameTimedCallback : public TimedCallback { class GameTimedCallback : public TimedCallback {
public: public:
GameTimedCallback(CallBack *t, void *d, uint32 wait_time, bool repeat = false); GameTimedCallback(CallBack *t, void *d, uint32 wait_time, bool repeat = false);
~GameTimedCallback() { } ~GameTimedCallback() override { }
}; };
@ -241,11 +241,11 @@ protected:
public: public:
TimedAdvance(uint8 hours, uint16 r = 60); TimedAdvance(uint8 hours, uint16 r = 60);
TimedAdvance(Std::string timestring, uint16 r = 60); // "HH:MM" TimedAdvance(Std::string timestring, uint16 r = 60); // "HH:MM"
virtual ~TimedAdvance() { } ~TimedAdvance() override { }
void init(uint16 min, uint16 r); // start time advance void init(uint16 min, uint16 r); // start time advance
virtual void timed(uint32 evtime); void timed(uint32 evtime) override;
bool time_passed(); // returns true if stop time has passed bool time_passed(); // returns true if stop time has passed
void get_time_from_string(uint8 &hour, uint8 &minute, Std::string timestring); void get_time_from_string(uint8 &hour, uint8 &minute, Std::string timestring);
}; };
@ -258,7 +258,7 @@ class TimedRestGather : public TimedPartyMove {
public: public:
TimedRestGather(uint16 x, uint16 y); TimedRestGather(uint16 x, uint16 y);
void timed(uint32 evtime); void timed(uint32 evtime) override;
protected: protected:
bool move_party(); bool move_party();
@ -278,9 +278,9 @@ class TimedRest : public TimedAdvance {
uint8 number_that_had_food; uint8 number_that_had_food;
public: public:
TimedRest(uint8 hours, Actor *lookout, Obj *campfire_obj); TimedRest(uint8 hours, Actor *lookout, Obj *campfire_obj);
~TimedRest(); ~TimedRest() override;
void timed(uint32 evtime); void timed(uint32 evtime) override;
void eat(Actor *actor); void eat(Actor *actor);
void bard_play(); void bard_play();
void sleep(); void sleep();

View file

@ -58,7 +58,7 @@ class Weather: public CallBack {
public: public:
Weather(Configuration *cfg, GameClock *c, nuvie_game_t type); Weather(Configuration *cfg, GameClock *c, nuvie_game_t type);
~Weather(); ~Weather() override;
bool load(NuvieIO *objlist); bool load(NuvieIO *objlist);
bool save(NuvieIO *objlist); bool save(NuvieIO *objlist);
@ -79,7 +79,7 @@ public:
bool is_eclipse(); bool is_eclipse();
bool is_moon_visible(); bool is_moon_visible();
virtual uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override; uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override;
protected: protected:

View file

@ -112,28 +112,28 @@ protected:
public: public:
NuvieIOBuffer(); NuvieIOBuffer();
virtual ~NuvieIOBuffer(); ~NuvieIOBuffer() override;
bool open(unsigned char *buf, uint32 buf_size, bool copy_buf = NUVIE_BUF_COPY); bool open(unsigned char *buf, uint32 buf_size, bool copy_buf = NUVIE_BUF_COPY);
void close(); void close() override;
unsigned char *get_raw_data() { unsigned char *get_raw_data() {
return data; return data;
}; //hehe evil }; //hehe evil
uint8 read1(); uint8 read1() override;
uint16 read2(); uint16 read2() override;
uint32 read4(); uint32 read4() override;
bool readToBuf(unsigned char *buf, uint32 buf_size); bool readToBuf(unsigned char *buf, uint32 buf_size) override;
bool write1(uint8 src); bool write1(uint8 src) override;
bool write2(uint16 src); bool write2(uint16 src) override;
bool write4(uint32 src); bool write4(uint32 src) override;
uint32 writeBuf(const unsigned char *src, uint32 src_size); uint32 writeBuf(const unsigned char *src, uint32 src_size) override;
uint32 write(NuvieIO *src); uint32 write(NuvieIO *src) override;
void seek(uint32 new_pos); void seek(uint32 new_pos) override;
}; };
extern char *strgets(char *str, int n, Common::ReadStream *stream); extern char *strgets(char *str, int n, Common::ReadStream *stream);

View file

@ -35,7 +35,7 @@ namespace Nuvie {
class NuvieIOFile : public NuvieIO { class NuvieIOFile : public NuvieIO {
public: public:
NuvieIOFile() {} NuvieIOFile() {}
virtual ~NuvieIOFile() {} ~NuvieIOFile() override {}
virtual bool open(const Common::String &filename) { virtual bool open(const Common::String &filename) {
return false; return false;
@ -48,18 +48,18 @@ private:
Common::File _srcFile; Common::File _srcFile;
public: public:
NuvieIOFileRead() : NuvieIOFile(), _file(nullptr) {} NuvieIOFileRead() : NuvieIOFile(), _file(nullptr) {}
virtual ~NuvieIOFileRead(); ~NuvieIOFileRead() override;
virtual bool open(const Common::String &filename) override; bool open(const Common::String &filename) override;
virtual bool open(Common::InSaveFile *saveFile); virtual bool open(Common::InSaveFile *saveFile);
virtual void close() override; void close() override;
virtual void seek(uint32 new_pos) override; void seek(uint32 new_pos) override;
virtual uint8 read1() override; uint8 read1() override;
virtual uint16 read2() override; uint16 read2() override;
virtual uint32 read4() override; uint32 read4() override;
virtual bool readToBuf(unsigned char *buf, uint32 buf_size) override; bool readToBuf(unsigned char *buf, uint32 buf_size) override;
bool isOpen() const { bool isOpen() const {
return _file != nullptr; return _file != nullptr;
@ -86,10 +86,10 @@ protected:
} }
public: public:
NuvieIOFileWrite(); NuvieIOFileWrite();
virtual ~NuvieIOFileWrite(); ~NuvieIOFileWrite() override;
virtual bool open(const Common::String &filename) override; bool open(const Common::String &filename) override;
virtual void close() override; void close() override;
virtual void seek(uint32 new_pos) override; void seek(uint32 new_pos) override;
bool write1(uint8 src) override; bool write1(uint8 src) override;
bool write2(uint16 src) override; bool write2(uint16 src) override;
@ -98,7 +98,7 @@ public:
_description = desc; _description = desc;
} }
virtual uint32 writeBuf(const unsigned char *src, uint32 src_size) override; uint32 writeBuf(const unsigned char *src, uint32 src_size) override;
uint32 write(NuvieIO *src) override; uint32 write(NuvieIO *src) override;
}; };

View file

@ -37,9 +37,9 @@ private:
public: public:
U6Bmp(); U6Bmp();
~U6Bmp(); ~U6Bmp() override;
bool load(Std::string filename); bool load(Std::string filename) override;
}; };

View file

@ -43,17 +43,17 @@ class BMPFont : public Font {
public: public:
BMPFont(); BMPFont();
~BMPFont(); ~BMPFont() override;
bool init(Std::string bmp_filename, bool dual_fontmap = false); bool init(Std::string bmp_filename, bool dual_fontmap = false);
uint16 getCharWidth(uint8 c); uint16 getCharWidth(uint8 c) override;
uint16 getCharHeight() { uint16 getCharHeight() override {
return 16; return 16;
} }
uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y, uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y,
uint8 color); uint8 color) override;
uint16 getStringWidth(const char *str, uint16 string_len); uint16 getStringWidth(const char *str, uint16 string_len) override;
protected: protected:
}; };

View file

@ -38,16 +38,16 @@ class ConvFont : public Font {
public: public:
ConvFont(); ConvFont();
~ConvFont(); ~ConvFont() override;
bool init(unsigned char *data, uint8 *width_data, uint16 num_chars, uint16 char_offset); bool init(unsigned char *data, uint8 *width_data, uint16 num_chars, uint16 char_offset);
uint16 getCharWidth(uint8 c); uint16 getCharWidth(uint8 c) override;
uint16 getCharHeight() { uint16 getCharHeight() override {
return 0; return 0;
} }
uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y, uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y,
uint8 color); uint8 color) override;
protected: protected:
}; };

View file

@ -41,18 +41,18 @@ private:
public: public:
U6Font(); U6Font();
~U6Font(); ~U6Font() override;
bool init(unsigned char *data, uint16 num_chars, uint16 char_offset); bool init(unsigned char *data, uint16 num_chars, uint16 char_offset);
uint16 getCharWidth(uint8 c) { uint16 getCharWidth(uint8 c) override {
return 8; return 8;
} }
uint16 getCharHeight() { uint16 getCharHeight() override {
return 8; return 8;
} }
uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y, uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y,
uint8 color); uint8 color) override;
protected: protected:
}; };

View file

@ -42,20 +42,20 @@ private:
public: public:
WOUFont(); WOUFont();
virtual ~WOUFont(); ~WOUFont() override;
bool init(const char *filename); bool init(const char *filename);
bool initWithBuffer(unsigned char *buffer, uint32 buffer_len); bool initWithBuffer(unsigned char *buffer, uint32 buffer_len);
virtual uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y, uint16 drawChar(Screen *screen, uint8 char_num, uint16 x, uint16 y,
uint8 color); uint8 color) override;
uint16 drawStringToShape(U6Shape *shp, const char *str, uint16 x, uint16 y, uint8 color); uint16 drawStringToShape(U6Shape *shp, const char *str, uint16 x, uint16 y, uint8 color);
uint8 drawCharToShape(U6Shape *shp, uint8 char_num, uint16 x, uint16 y, uint8 color); uint8 drawCharToShape(U6Shape *shp, uint8 char_num, uint16 x, uint16 y, uint8 color);
virtual uint16 getCharWidth(uint8 c); uint16 getCharWidth(uint8 c) override;
virtual uint16 getCharHeight() { uint16 getCharHeight() override {
return height; return height;
} }
private: private:

View file

@ -45,10 +45,10 @@ public:
uint8 fr, uint8 fg, uint8 fb, int fthick, int aShape = AREA_ANGULAR); uint8 fr, uint8 fg, uint8 fb, int fthick, int aShape = AREA_ANGULAR);
/* Map the color to the display */ /* Map the color to the display */
virtual void SetDisplay(Screen *s); void SetDisplay(Screen *s) override;
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
protected: protected:

View file

@ -84,18 +84,18 @@ public:
GUI_Font *font, int alignment, int is_checkbutton, GUI_Font *font, int alignment, int is_checkbutton,
GUI_CallBack *callback, int flat = 0); GUI_CallBack *callback, int flat = 0);
~GUI_Button(); ~GUI_Button() override;
/* change features of a text button (if one of the dimensions is negativ, it's ignored) */ /* change features of a text button (if one of the dimensions is negativ, it's ignored) */
virtual void ChangeTextButton(int x, int y, int w, int h, const char *text, int alignment); virtual void ChangeTextButton(int x, int y, int w, int h, const char *text, int alignment);
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
/* Mouse hits activate us */ /* Mouse hits activate us */
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
/* Clickable or not ... */ /* Clickable or not ... */
virtual void Disable(); virtual void Disable();

View file

@ -43,18 +43,18 @@ class GUI_Console : public GUI_Widget {
public: public:
GUI_Console(uint16 x, uint16 y, uint16 w, uint16 h); GUI_Console(uint16 x, uint16 y, uint16 w, uint16 h);
~GUI_Console(); ~GUI_Console() override;
/* Map the color to the display */ /* Map the color to the display */
virtual void SetDisplay(Screen *s); void SetDisplay(Screen *s) override;
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
/* events, used for dragging the area. */ /* events, used for dragging the area. */
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
virtual void AddLine(Std::string line); virtual void AddLine(Std::string line);

View file

@ -50,18 +50,18 @@ class GUI_Dialog : public GUI_Widget {
public: public:
/* Passed the area, color and shape */ /* Passed the area, color and shape */
GUI_Dialog(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b, bool is_moveable); GUI_Dialog(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b, bool is_moveable);
~GUI_Dialog(); ~GUI_Dialog() override;
/* Map the color to the display */ /* Map the color to the display */
virtual void SetDisplay(Screen *s); void SetDisplay(Screen *s) override;
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
/* events, used for dragging the area. */ /* events, used for dragging the area. */
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
void MoveRelative(int dx, int dy); void MoveRelative(int dx, int dy) override;
protected: protected:
bool can_drag; bool can_drag;
void loadBorderImages(); void loadBorderImages();

View file

@ -73,16 +73,16 @@ public:
void set_slider_position(float percentage); void set_slider_position(float percentage);
/* Map the color to the display */ /* Map the color to the display */
virtual void SetDisplay(Screen *s); void SetDisplay(Screen *s) override;
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
/* events, used for dragging the area. */ /* events, used for dragging the area. */
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
protected: protected:
void loadButtons(); void loadButtons();
@ -90,7 +90,7 @@ protected:
void send_slider_moved_msg(); void send_slider_moved_msg();
bool move_slider(int new_slider_y); bool move_slider(int new_slider_y);
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
void send_up_button_msg(); void send_up_button_msg();
void send_down_button_msg(); void send_down_button_msg();

View file

@ -48,8 +48,8 @@ public:
GUI_Scroller(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b, uint16 r_height); GUI_Scroller(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b, uint16 r_height);
/* Map the color to the display */ /* Map the color to the display */
virtual void SetDisplay(Screen *s); void SetDisplay(Screen *s) override;
void PlaceOnScreen(Screen *s, GUI_DragManager *dm, int x, int y); void PlaceOnScreen(Screen *s, GUI_DragManager *dm, int x, int y) override;
void move_up(); void move_up();
void move_down(); void move_down();
void page_up(bool all = false); void page_up(bool all = false);
@ -58,18 +58,18 @@ public:
int AddWidget(GUI_Widget *widget); int AddWidget(GUI_Widget *widget);
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
/* events, used for dragging the area. */ /* events, used for dragging the area. */
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
protected: protected:
void update_viewport(bool update_slider); void update_viewport(bool update_slider);
void move_percentage(float offset_percentage); void move_percentage(float offset_percentage);
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -40,10 +40,10 @@ protected:
public: public:
GUI_Text(int x, int y, uint8 r, uint8 g, uint8 b, GUI_Font *gui_font, uint16 line_length); GUI_Text(int x, int y, uint8 r, uint8 g, uint8 b, GUI_Font *gui_font, uint16 line_length);
GUI_Text(int x, int y, uint8 r, uint8 g, uint8 b, const char *str, GUI_Font *gui_font, uint16 line_length = 0); GUI_Text(int x, int y, uint8 r, uint8 g, uint8 b, const char *str, GUI_Font *gui_font, uint16 line_length = 0);
~GUI_Text(); ~GUI_Text() override;
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
}; };

View file

@ -48,12 +48,12 @@ public:
GUI_TextInput(int x, int y, uint8 r, uint8 g, uint8 b, GUI_TextInput(int x, int y, uint8 r, uint8 g, uint8 b,
const char *str, GUI_Font *gui_font, uint16 width, uint16 height, GUI_CallBack *callback); const char *str, GUI_Font *gui_font, uint16 width, uint16 height, GUI_CallBack *callback);
~GUI_TextInput(); ~GUI_TextInput() override;
void release_focus(); void release_focus() override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
void add_char(char c); void add_char(char c);
void remove_char(); void remove_char();
@ -61,11 +61,11 @@ public:
char *get_text() { char *get_text() {
return text; return text;
} }
void SetDisplay(Screen *s); void SetDisplay(Screen *s) override;
void display_cursor(); void display_cursor();
/* Show the widget */ /* Show the widget */
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
}; };

View file

@ -43,12 +43,12 @@ public:
GUI_Font *font, int alignment, GUI_Font *font, int alignment,
GUI_CallBack *callback, int flat = 0); GUI_CallBack *callback, int flat = 0);
~GUI_TextToggleButton(); ~GUI_TextToggleButton() override;
virtual int GetSelection() const; virtual int GetSelection() const;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status Activate_button(int x = 0, int y = 0, Shared::MouseButton button = Shared::BUTTON_LEFT); GUI_status Activate_button(int x = 0, int y = 0, Shared::MouseButton button = Shared::BUTTON_LEFT) override;
protected: protected:
int selection; int selection;

View file

@ -47,11 +47,11 @@ private:
public: public:
GUI_YesNoDialog(GUI *gui, int x, int y, int w, int h, const char *msg, GUI_YesNoDialog(GUI *gui, int x, int y, int w, int h, const char *msg,
CallBack *yesCallback, CallBack *noCallback); CallBack *yesCallback, CallBack *noCallback);
~GUI_YesNoDialog(); ~GUI_YesNoDialog() override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -42,15 +42,15 @@ class Background: public GUI_Widget {
public: public:
Background(Configuration *cfg); Background(Configuration *cfg);
~Background(); ~Background() override;
bool init(); bool init();
uint16 get_border_width() { uint16 get_border_width() {
return border_width; return border_width;
} }
void Display(bool full_redraw); void Display(bool full_redraw) override;
bool drag_accept_drop(int x, int y, int message, void *data); // needed for original+_full_map bool drag_accept_drop(int x, int y, int message, void *data) override; // needed for original+_full_map
void drag_perform_drop(int x, int y, int message, void *data); // needed for original+_full_map void drag_perform_drop(int x, int y, int message, void *data) override; // needed for original+_full_map
U6Shape *get_bg_shape() { U6Shape *get_bg_shape() {
return background; return background;
} }

View file

@ -69,11 +69,11 @@ protected:
public: public:
CommandBar(); CommandBar();
CommandBar(Game *g); CommandBar(Game *g);
~CommandBar(); ~CommandBar() override;
virtual bool init_buttons(); virtual bool init_buttons();
virtual void Display(bool full_redraw) override; void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button) override; GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
void update() { void update() {
update_display = true; update_display = true;
} }
@ -90,10 +90,10 @@ public:
return selected_action; return selected_action;
} }
virtual GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override { GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override {
return GUI_PASS; return GUI_PASS;
} }
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
bool load(NuvieIO *objlist); bool load(NuvieIO *objlist);
bool save(NuvieIO *objlist); bool save(NuvieIO *objlist);
bool drag_accept_drop(int x, int y, int message, void *data) override; // needed for !orig_style bool drag_accept_drop(int x, int y, int message, void *data) override; // needed for !orig_style

View file

@ -50,12 +50,12 @@ protected:
Font *font; Font *font;
public: public:
CommandBarNewUI(Game *g); CommandBarNewUI(Game *g);
~CommandBarNewUI(); ~CommandBarNewUI() override;
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
private: private:
const char *get_command_name(sint8 command_num); const char *get_command_name(sint8 command_num);

View file

@ -41,9 +41,9 @@ protected:
public: public:
Console(Configuration *c, Screen *s, GUI *g, uint16 x, uint16 y, uint16 w, uint16 h); Console(Configuration *c, Screen *s, GUI *g, uint16 x, uint16 y, uint16 w, uint16 h);
~Console(); ~Console() override;
void AddLine(Std::string line); void AddLine(Std::string line) override;
protected: protected:

View file

@ -66,47 +66,47 @@ class ConverseGump: public MsgScroll {
public: public:
ConverseGump(Configuration *cfg, Font *f, Screen *s); ConverseGump(Configuration *cfg, Font *f, Screen *s);
~ConverseGump(); ~ConverseGump() override;
void set_actor_portrait(Actor *a); void set_actor_portrait(Actor *a);
unsigned char *create_framed_portrait(Actor *a); unsigned char *create_framed_portrait(Actor *a);
virtual bool parse_token(MsgText *token); bool parse_token(MsgText *token) override;
virtual Std::string get_token_string_at_pos(uint16 x, uint16 y); Std::string get_token_string_at_pos(uint16 x, uint16 y) override;
virtual void display_string(Std::string s, Font *f, bool include_on_map_window); void display_string(Std::string s, Font *f, bool include_on_map_window) override;
virtual void set_talking(bool state, Actor *actor = NULL); void set_talking(bool state, Actor *actor = NULL) override;
virtual void set_font(uint8 font_type) {} void set_font(uint8 font_type) override {}
//bool get_solid_bg() { return solid_bg; } //bool get_solid_bg() { return solid_bg; }
void set_solid_bg(bool val) { void set_solid_bg(bool val) {
solid_bg = val; solid_bg = val;
} }
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button) { GUI_status MouseDown(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseMotion(int x, int y, uint8 state) { GUI_status MouseMotion(int x, int y, uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseEnter(uint8 state) { GUI_status MouseEnter(uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseLeave(uint8 state) { GUI_status MouseLeave(uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseClick(int x, int y, Shared::MouseButton button) { GUI_status MouseClick(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDouble(int x, int y, Shared::MouseButton button) { GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) { GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseHeld(int x, int y, Shared::MouseButton button) { GUI_status MouseHeld(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
@ -114,21 +114,21 @@ public:
found_break_char = val; found_break_char = val;
} }
virtual bool input_buf_add_char(char c); bool input_buf_add_char(char c) override;
virtual bool input_buf_remove_char(); bool input_buf_remove_char() override;
virtual bool is_converse_finished() { bool is_converse_finished() override {
return (is_holding_buffer_empty() && msg_buf.size() == 1 && msg_buf.back()->total_length == 0); return (is_holding_buffer_empty() && msg_buf.size() == 1 && msg_buf.back()->total_length == 0);
} }
virtual void drawCursor(uint16 x, uint16 y); void drawCursor(uint16 x, uint16 y) override;
protected: protected:
Std::string strip_whitespace_after_break(Std::string s); Std::string strip_whitespace_after_break(Std::string s);
void add_keyword(Std::string keyword); void add_keyword(Std::string keyword);
virtual void set_permitted_input(const char *allowed); void set_permitted_input(const char *allowed) override;
virtual void clear_permitted_input(); void clear_permitted_input() override;
bool cursor_at_input_section() { bool cursor_at_input_section() {
return (keyword_list && cursor_position == keyword_list->size()); return (keyword_list && cursor_position == keyword_list->size());

View file

@ -52,52 +52,52 @@ class ConverseGumpWOU: public MsgScroll {
public: public:
ConverseGumpWOU(Configuration *cfg, Font *f, Screen *s); ConverseGumpWOU(Configuration *cfg, Font *f, Screen *s);
~ConverseGumpWOU(); ~ConverseGumpWOU() override;
virtual void set_talking(bool state, Actor *actor = NULL); void set_talking(bool state, Actor *actor = NULL) override;
virtual void set_font(uint8 font_type) {} void set_font(uint8 font_type) override {}
virtual void display_converse_prompt(); void display_converse_prompt() override;
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button) { GUI_status MouseUp(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDown(int x, int y, Shared::MouseButton button) { GUI_status MouseDown(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseMotion(int x, int y, uint8 state) { GUI_status MouseMotion(int x, int y, uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseEnter(uint8 state) { GUI_status MouseEnter(uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseLeave(uint8 state) { GUI_status MouseLeave(uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseClick(int x, int y, Shared::MouseButton button) { GUI_status MouseClick(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDouble(int x, int y, Shared::MouseButton button) { GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) { GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseHeld(int x, int y, Shared::MouseButton button) { GUI_status MouseHeld(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
virtual bool is_converse_finished() { bool is_converse_finished() override {
return (is_holding_buffer_empty() && !page_break); return (is_holding_buffer_empty() && !page_break);
} }
protected: protected:
void input_add_string(Std::string token_str); void input_add_string(Std::string token_str);
virtual void process_page_break(); void process_page_break() override;
virtual uint8 get_input_font_color() { uint8 get_input_font_color() override {
return FONT_COLOR_WOU_CONVERSE_INPUT; return FONT_COLOR_WOU_CONVERSE_INPUT;
} }
void display_bg(); void display_bg();

View file

@ -41,11 +41,11 @@ protected:
public: public:
FpsCounter(Game *g); FpsCounter(Game *g);
~FpsCounter(); ~FpsCounter() override;
void setFps(float fps); void setFps(float fps);
virtual void Display(bool full_redraw); void Display(bool full_redraw) override;
void update() { void update() {
update_display = true; update_display = true;

View file

@ -85,7 +85,7 @@ public:
GUI_Widget(void *data); GUI_Widget(void *data);
GUI_Widget(void *data, int x, int y, int w, int h); GUI_Widget(void *data, int x, int y, int w, int h);
virtual ~GUI_Widget(); ~GUI_Widget() override;
int AddWidget(GUI_Widget *widget); int AddWidget(GUI_Widget *widget);
@ -184,8 +184,8 @@ public:
virtual GUI_status MouseHeld(int x, int y, Shared::MouseButton button); virtual GUI_status MouseHeld(int x, int y, Shared::MouseButton button);
// </SB-X> // </SB-X>
bool drag_accept_drop(int x, int y, int message, void *data); bool drag_accept_drop(int x, int y, int message, void *data) override;
void drag_perform_drop(int x, int y, int message, void *data); void drag_perform_drop(int x, int y, int message, void *data) override;
/* Main event handler function. /* Main event handler function.
This function gets raw SDL events from the GUI. This function gets raw SDL events from the GUI.

View file

@ -150,7 +150,7 @@ class MapWindow: public GUI_Widget {
public: public:
MapWindow(Configuration *cfg, Map *m); MapWindow(Configuration *cfg, Map *m);
~MapWindow(); ~MapWindow() override;
bool init(TileManager *tm, ObjManager *om, ActorManager *am); bool init(TileManager *tm, ObjManager *om, ActorManager *am);
@ -289,31 +289,31 @@ public:
void updateBlacking(); void updateBlacking();
void updateAmbience(); void updateAmbience();
void update(); void update();
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
GUI_status MouseDouble(int x, int y, Shared::MouseButton button); GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override;
GUI_status MouseClick(int x, int y, Shared::MouseButton button); GUI_status MouseClick(int x, int y, Shared::MouseButton button) override;
GUI_status Idle(void); GUI_status Idle(void) override;
GUI_status MouseLeave(uint8 state); GUI_status MouseLeave(uint8 state) override;
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button); GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override;
GUI_status MouseHeld(int x, int y, Shared::MouseButton button); GUI_status MouseHeld(int x, int y, Shared::MouseButton button) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
void drag_drop_success(int x, int y, int message, void *data); void drag_drop_success(int x, int y, int message, void *data) override;
void drag_drop_failed(int x, int y, int message, void *data); void drag_drop_failed(int x, int y, int message, void *data) override;
bool drag_accept_drop(int x, int y, int message, void *data); bool drag_accept_drop(int x, int y, int message, void *data) override;
void drag_perform_drop(int x, int y, int message, void *data); void drag_perform_drop(int x, int y, int message, void *data) override;
bool move_on_drop(Obj *obj); bool move_on_drop(Obj *obj);
void set_interface(); void set_interface();
InterfaceType get_interface(); InterfaceType get_interface();
bool is_interface_fullscreen_in_combat(); bool is_interface_fullscreen_in_combat();
void drag_draw(int x, int y, int message, void *data); void drag_draw(int x, int y, int message, void *data) override;
void update_mouse_cursor(uint32 mx, uint32 my); void update_mouse_cursor(uint32 mx, uint32 my);

View file

@ -204,7 +204,7 @@ public:
discard_whitespace = false; discard_whitespace = false;
left_margin = 0; left_margin = 0;
} }
~MsgScroll(); ~MsgScroll() override;
void init(Configuration *cfg, Font *f); void init(Configuration *cfg, Font *f);
@ -278,12 +278,12 @@ public:
return (page_break); return (page_break);
} }
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
virtual Std::string get_token_string_at_pos(uint16 x, uint16 y); virtual Std::string get_token_string_at_pos(uint16 x, uint16 y);
//void updateScroll(); //void updateScroll();
void Display(bool full_redraw); void Display(bool full_redraw) override;
void clearCursor(uint16 x, uint16 y); void clearCursor(uint16 x, uint16 y);
virtual void drawCursor(uint16 x, uint16 y); virtual void drawCursor(uint16 x, uint16 y);

View file

@ -62,12 +62,12 @@ class MsgScrollNewUI: public MsgScroll {
public: public:
MsgScrollNewUI(Configuration *cfg, Screen *s); MsgScrollNewUI(Configuration *cfg, Screen *s);
~MsgScrollNewUI(); ~MsgScrollNewUI() override;
virtual GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override { GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override {
return GUI_PASS; return GUI_PASS;
} }
virtual uint16 callback(uint16 msg, CallBack *caller, void *data) override; uint16 callback(uint16 msg, CallBack *caller, void *data) override;
bool can_display_prompt() override { bool can_display_prompt() override {
return false; return false;
} }

View file

@ -46,12 +46,12 @@ protected:
public: public:
AudioDialog(GUI_CallBack *callback); AudioDialog(GUI_CallBack *callback);
~AudioDialog(); ~AudioDialog() override;
bool init(); bool init();
GUI_status close_dialog(); GUI_status close_dialog();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -44,12 +44,12 @@ protected:
public: public:
CheatsDialog(GUI_CallBack *callback); CheatsDialog(GUI_CallBack *callback);
~CheatsDialog(); ~CheatsDialog() override;
bool init(); bool init();
GUI_status close_dialog(); GUI_status close_dialog();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -45,12 +45,12 @@ protected:
GUI_Button *button_index[9]; // add to here when you add a button. Keep buttons in order by height GUI_Button *button_index[9]; // add to here when you add a button. Keep buttons in order by height
public: public:
GameMenuDialog(CallBack *callback); GameMenuDialog(CallBack *callback);
~GameMenuDialog(); ~GameMenuDialog() override;
bool init(); bool init();
GUI_status close_dialog(); GUI_status close_dialog();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -48,12 +48,12 @@ protected:
public: public:
GameplayDialog(GUI_CallBack *callback); GameplayDialog(GUI_CallBack *callback);
~GameplayDialog(); ~GameplayDialog() override;
bool init(); bool init();
GUI_status close_dialog(); GUI_status close_dialog();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -47,12 +47,12 @@ protected:
public: public:
InputDialog(GUI_CallBack *callback); InputDialog(GUI_CallBack *callback);
~InputDialog(); ~InputDialog() override;
bool init(); bool init();
GUI_status close_dialog(); GUI_status close_dialog();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -47,12 +47,12 @@ protected:
void rebuild_buttons(bool init); void rebuild_buttons(bool init);
public: public:
VideoDialog(GUI_CallBack *callback); VideoDialog(GUI_CallBack *callback);
~VideoDialog(); ~VideoDialog() override;
bool init(); bool init();
GUI_status close_dialog(); GUI_status close_dialog();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -55,41 +55,41 @@ private:
bool playIntro(); bool playIntro();
protected: protected:
virtual bool initialize() override; bool initialize() override;
/** /**
* Returns the data archive folder and version that's required * Returns the data archive folder and version that's required
*/ */
virtual bool isDataRequired(Common::String &folder, int &majorVersion, int &minorVersion) override; bool isDataRequired(Common::String &folder, int &majorVersion, int &minorVersion) override;
public: public:
const Std::string c_empty_string; const Std::string c_empty_string;
public: public:
NuvieEngine(OSystem *syst, const Ultima::UltimaGameDescription *gameDesc); NuvieEngine(OSystem *syst, const Ultima::UltimaGameDescription *gameDesc);
~NuvieEngine(); ~NuvieEngine() override;
/** /**
* Play the game * Play the game
*/ */
virtual Common::Error run() override; Common::Error run() override;
/** /**
* Indicates whether a game state can be loaded. * Indicates whether a game state can be loaded.
* @param isAutosave Flags whether it's an autosave check * @param isAutosave Flags whether it's an autosave check
*/ */
virtual bool canLoadGameStateCurrently(bool isAutosave) override; bool canLoadGameStateCurrently(bool isAutosave) override;
/** /**
* Indicates whether a game state can be saved. * Indicates whether a game state can be saved.
* @param isAutosave Flags whether it's an autosave check * @param isAutosave Flags whether it's an autosave check
*/ */
virtual bool canSaveGameStateCurrently(bool isAutosave) override; bool canSaveGameStateCurrently(bool isAutosave) override;
/** /**
* Load a game state. * Load a game state.
* @param slot the slot from which a savestate should be loaded * @param slot the slot from which a savestate should be loaded
* @return returns kNoError on success, else an error code. * @return returns kNoError on success, else an error code.
*/ */
virtual Common::Error loadGameState(int slot) override; Common::Error loadGameState(int slot) override;
/** /**
* Save a game state. * Save a game state.
@ -98,9 +98,9 @@ public:
* @param isAutosave If true, autosave is being created * @param isAutosave If true, autosave is being created
* @return returns kNoError on success, else an error code. * @return returns kNoError on success, else an error code.
*/ */
virtual Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override; Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override;
virtual ::GUI::Debugger *getDebugger() override { ::GUI::Debugger *getDebugger() const override {
return _debugger; return _debugger;
} }

View file

@ -37,21 +37,21 @@ protected:
public: public:
ActorPathFinder(Actor *a, MapCoord g); ActorPathFinder(Actor *a, MapCoord g);
virtual ~ActorPathFinder(); ~ActorPathFinder() override;
void set_actor(Actor *a); void set_actor(Actor *a);
virtual bool update_location(); /* get location from actor (use any time) */ virtual bool update_location(); /* get location from actor (use any time) */
virtual void actor_moved(); /* the actor moved ON PATH... virtual void actor_moved(); /* the actor moved ON PATH...
(use after get_next_move()) */ (use after get_next_move()) */
virtual bool check_loc(const MapCoord &loc); bool check_loc(const MapCoord &loc) override;
void get_closest_dir(MapCoord &rel_step); // relative dir loc->goal void get_closest_dir(MapCoord &rel_step); // relative dir loc->goal
virtual bool get_next_move(MapCoord &step); bool get_next_move(MapCoord &step) override;
protected: protected:
bool search_towards_target(const MapCoord &g, MapCoord &rel_step); bool search_towards_target(const MapCoord &g, MapCoord &rel_step);
virtual bool check_dir(const MapCoord &loc, MapCoord &rel, sint8 rot = 0); bool check_dir(const MapCoord &loc, MapCoord &rel, sint8 rot = 0) override;
bool check_dir_and_distance(MapCoord loc, MapCoord g, MapCoord &rel_step, sint8 rotate); bool check_dir_and_distance(MapCoord loc, MapCoord g, MapCoord &rel_step, sint8 rotate);
}; };

View file

@ -55,18 +55,18 @@ protected:
sint32 &nnode_to_neighbor); sint32 &nnode_to_neighbor);
public: public:
AStarPath(); AStarPath();
~AStarPath() { } ~AStarPath() override { }
bool path_search(MapCoord &start, MapCoord &goal); bool path_search(MapCoord &start, MapCoord &goal) override;
virtual uint32 path_cost_est(MapCoord &s, MapCoord &g) { uint32 path_cost_est(MapCoord &s, MapCoord &g) override {
return (Path::path_cost_est(s, g)); return (Path::path_cost_est(s, g));
} }
virtual uint32 get_max_score(uint32 cost) { uint32 get_max_score(uint32 cost) override {
return (Path::get_max_score(cost)); return (Path::get_max_score(cost));
} }
uint32 path_cost_est(astar_node &n1, astar_node &n2) { uint32 path_cost_est(astar_node &n1, astar_node &n2) {
return (Path::path_cost_est(n1.loc, n2.loc)); return (Path::path_cost_est(n1.loc, n2.loc));
} }
sint32 step_cost(MapCoord &c1, MapCoord &c2); sint32 step_cost(MapCoord &c1, MapCoord &c2) override;
protected: protected:
/* FIXME: These node functions can be replaced with a priority_queue and a list. */ /* FIXME: These node functions can be replaced with a priority_queue and a list. */
astar_node *find_open_node(astar_node *ncmp); astar_node *find_open_node(astar_node *ncmp);

View file

@ -39,14 +39,14 @@ protected:
Actor *target; Actor *target;
CombatPathFinderMode target_mode; CombatPathFinderMode target_mode;
bool update_location(); bool update_location() override;
uint8 max_dist; uint8 max_dist;
public: public:
CombatPathFinder(Actor *a); CombatPathFinder(Actor *a);
CombatPathFinder(Actor *a, Actor *t); CombatPathFinder(Actor *a, Actor *t);
~CombatPathFinder(); ~CombatPathFinder() override;
bool set_flee_mode(Actor *actor); bool set_flee_mode(Actor *actor);
bool set_chase_mode(Actor *actor); bool set_chase_mode(Actor *actor);
bool set_mode(CombatPathFinderMode mode, Actor *actor); bool set_mode(CombatPathFinderMode mode, Actor *actor);
@ -54,8 +54,8 @@ public:
max_dist = dist; max_dist = dist;
} }
bool get_next_move(MapCoord &step); bool get_next_move(MapCoord &step) override;
bool reached_goal(); bool reached_goal() override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -38,13 +38,13 @@ public:
/* Pass 'path_type' to define search rules and methods to be used. The /* Pass 'path_type' to define search rules and methods to be used. The
PathFinder is responsible for deleting it when finished. */ PathFinder is responsible for deleting it when finished. */
SchedPathFinder(Actor *a, MapCoord g, Path *path_type); SchedPathFinder(Actor *a, MapCoord g, Path *path_type);
~SchedPathFinder(); ~SchedPathFinder() override;
bool get_next_move(MapCoord &step); /* returns the next step in the path */ bool get_next_move(MapCoord &step) override; /* returns the next step in the path */
bool find_path(); /* gets a NEW path from location->goal */ bool find_path() override; /* gets a NEW path from location->goal */
void actor_moved(); /* update location and step counters */ void actor_moved() override; /* update location and step counters */
virtual bool check_loc(const MapCoord &loc); // ignores other actors bool check_loc(const MapCoord &loc) override; // ignores other actors
protected: protected:
bool is_location_in_path(); bool is_location_in_path();
void incr_step(); void incr_step();

View file

@ -45,11 +45,11 @@ protected:
public: public:
SeekPath(); SeekPath();
~SeekPath(); ~SeekPath() override;
sint32 step_cost(MapCoord &c1, MapCoord &c2) { sint32 step_cost(MapCoord &c1, MapCoord &c2) override {
return -1; return -1;
} }
bool path_search(MapCoord &start, MapCoord &goal); bool path_search(MapCoord &start, MapCoord &goal) override;
void delete_path() { void delete_path() {
Path::delete_path(); Path::delete_path();
delete_nodes(); delete_nodes();

View file

@ -31,8 +31,8 @@ namespace Nuvie {
/* This provides a U6-specific step_cost() method. */ /* This provides a U6-specific step_cost() method. */
class U6AStarPath: public AStarPath { class U6AStarPath: public AStarPath {
public: public:
sint32 step_cost(MapCoord &c1, MapCoord &c2); sint32 step_cost(MapCoord &c1, MapCoord &c2) override;
uint32 path_cost_est(MapCoord &s, MapCoord &g); uint32 path_cost_est(MapCoord &s, MapCoord &g) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -39,13 +39,13 @@ class PortraitMD : public Portrait {
public: public:
PortraitMD(Configuration *cfg): Portrait(cfg) {}; PortraitMD(Configuration *cfg): Portrait(cfg) {};
bool init(); bool init() override;
bool load(NuvieIO *objlist); bool load(NuvieIO *objlist) override;
unsigned char *get_portrait_data(Actor *actor); unsigned char *get_portrait_data(Actor *actor) override;
protected: protected:
uint8 get_portrait_num(Actor *actor); uint8 get_portrait_num(Actor *actor) override;
private: private:
U6Shape *get_background_shape(uint8 actor_num); U6Shape *get_background_shape(uint8 actor_num);

View file

@ -40,15 +40,15 @@ class PortraitSE : public Portrait {
public: public:
PortraitSE(Configuration *cfg): Portrait(cfg) {}; PortraitSE(Configuration *cfg): Portrait(cfg) {};
bool init(); bool init() override;
bool load(NuvieIO *objlist); bool load(NuvieIO *objlist) override;
unsigned char *get_portrait_data(Actor *actor); unsigned char *get_portrait_data(Actor *actor) override;
private: private:
U6Shape *get_background_shape(Actor *actor); U6Shape *get_background_shape(Actor *actor);
uint8 get_background_shape_num(Actor *actor); uint8 get_background_shape_num(Actor *actor);
uint8 get_portrait_num(Actor *actor); uint8 get_portrait_num(Actor *actor) override;
}; };

View file

@ -41,15 +41,15 @@ class PortraitU6 : public Portrait {
public: public:
PortraitU6(Configuration *cfg) : Portrait(cfg) {}; PortraitU6(Configuration *cfg) : Portrait(cfg) {};
~PortraitU6() {}; ~PortraitU6() override {};
bool init(); bool init() override;
bool load(NuvieIO *objlist); bool load(NuvieIO *objlist) override;
unsigned char *get_portrait_data(Actor *actor); unsigned char *get_portrait_data(Actor *actor) override;
private: private:
uint8 get_portrait_num(Actor *actor); uint8 get_portrait_num(Actor *actor) override;
}; };

View file

@ -81,8 +81,8 @@ private:
} stars[STAR_FIELD_NUM_STARS]; } stars[STAR_FIELD_NUM_STARS];
public: public:
CSStarFieldImage(U6Shape *shape); CSStarFieldImage(U6Shape *shape);
virtual ~CSStarFieldImage() {} ~CSStarFieldImage() override {}
virtual void updateEffect(); void updateEffect() override;
}; };
struct CSSprite { struct CSSprite {
@ -137,7 +137,7 @@ private:
public: public:
ScriptCutscene(GUI *g, Configuration *cfg, SoundManager *sm); ScriptCutscene(GUI *g, Configuration *cfg, SoundManager *sm);
~ScriptCutscene(); ~ScriptCutscene() override;
Std::vector<Std::string> load_text(const char *filename, uint8 idx); Std::vector<Std::string> load_text(const char *filename, uint8 idx);
@ -164,8 +164,8 @@ public:
void update(); void update();
void wait(); void wait();
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual void Hide(); void Hide() override;
void print_text(CSImage *image, const char *string, uint16 *x, uint16 *y, uint16 startx, uint16 width, uint8 color); void print_text(CSImage *image, const char *string, uint16 *x, uint16 *y, uint16 startx, uint16 width, uint8 color);

View file

@ -35,10 +35,10 @@ namespace Nuvie {
class AdLibSfxManager : public SfxManager { class AdLibSfxManager : public SfxManager {
public: public:
AdLibSfxManager(Configuration *cfg, Audio::Mixer *m); AdLibSfxManager(Configuration *cfg, Audio::Mixer *m);
virtual ~AdLibSfxManager(); ~AdLibSfxManager() override;
bool playSfx(SfxIdType sfx_id, uint8 volume); bool playSfx(SfxIdType sfx_id, uint8 volume) override;
bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume); bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume) override;
private: private:
void playSoundSample(Audio::AudioStream *stream, Audio::SoundHandle *looping_handle, uint8 volume); void playSoundSample(Audio::AudioStream *stream, Audio::SoundHandle *looping_handle, uint8 volume);

View file

@ -32,7 +32,7 @@ namespace Nuvie {
class CEmuopl: public Copl { class CEmuopl: public Copl {
public: public:
CEmuopl(int rate, bool bit16, bool usestereo); // rate = sample rate CEmuopl(int rate, bool bit16, bool usestereo); // rate = sample rate
virtual ~CEmuopl(); ~CEmuopl() override;
int getRate() { int getRate() {
return oplRate; return oplRate;
@ -41,8 +41,8 @@ public:
void update(short *buf, int samples); // fill buffer void update(short *buf, int samples); // fill buffer
// template methods // template methods
void write(int reg, int val); void write(int reg, int val) override;
void init(); void init() override;
private: private:
bool use16bit, stereo; bool use16bit, stereo;

View file

@ -32,29 +32,29 @@ public:
static CPlayer *factory(Copl *newopl); static CPlayer *factory(Copl *newopl);
CmidPlayer(Copl *newopl); CmidPlayer(Copl *newopl);
~CmidPlayer(); ~CmidPlayer() override;
bool load(const Std::string &filename); bool load(const Std::string &filename) override;
bool load(Std::string &filename, int song_index); bool load(Std::string &filename, int song_index);
//bool load(const Std::string &filename, const CFileProvider &fp); //bool load(const Std::string &filename, const CFileProvider &fp);
bool update(); bool update() override;
void rewind(int subsong); void rewind(int subsong) override;
float getrefresh(); float getrefresh() override;
Std::string gettype(); Std::string gettype() override;
Std::string gettitle() { Std::string gettitle() override {
return Std::string(title); return Std::string(title);
} }
Std::string getauthor() { Std::string getauthor() override {
return Std::string(author); return Std::string(author);
} }
Std::string getdesc() { Std::string getdesc() override {
return Std::string(remarks); return Std::string(remarks);
} }
unsigned int getinstruments() { unsigned int getinstruments() override {
return tins; return tins;
} }
unsigned int getsubsongs() { unsigned int getsubsongs() override {
return subsongs; return subsongs;
} }

View file

@ -213,7 +213,7 @@ private:
public: public:
OplClass(int rate, bool bit16, bool usestereo); // rate = sample rate OplClass(int rate, bool bit16, bool usestereo); // rate = sample rate
~OplClass() { ~OplClass() override {
YM3812Shutdown(); YM3812Shutdown();
} }
@ -224,8 +224,8 @@ public:
void update(short *buf, int samples); // fill buffer void update(short *buf, int samples); // fill buffer
// template methods // template methods
void write(int reg, int val); void write(int reg, int val) override;
void init(); void init() override;
private: private:
int YM3812Init(int num, int clock, int rate); int YM3812Init(int num, int clock, int rate);

View file

@ -27,8 +27,8 @@ namespace Nuvie {
class CSilentopl : public Copl { class CSilentopl : public Copl {
public: public:
void write(int reg, int val) { }; void write(int reg, int val) override { };
void init() { }; void init() override { };
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -37,16 +37,16 @@ public:
songend(0), song_pos(0), loop_position(0), read_delay(0) { songend(0), song_pos(0), loop_position(0), read_delay(0) {
} }
~Cu6mPlayer(); ~Cu6mPlayer() override;
bool load(const Std::string &filename); bool load(const Std::string &filename) override;
bool update(); bool update() override;
void rewind(int subsong); void rewind(int subsong) override;
float getrefresh(); float getrefresh() override;
Std::string gettype() { Std::string gettype() override {
return Std::string("Ultima 6 Music"); return Std::string("Ultima 6 Music");
}; };

View file

@ -36,10 +36,10 @@ namespace Nuvie {
class CustomSfxManager : public SfxManager { class CustomSfxManager : public SfxManager {
public: public:
CustomSfxManager(Configuration *cfg, Audio::Mixer *m); CustomSfxManager(Configuration *cfg, Audio::Mixer *m);
virtual ~CustomSfxManager(); ~CustomSfxManager() override;
bool playSfx(SfxIdType sfx_id, uint8 volume); bool playSfx(SfxIdType sfx_id, uint8 volume) override;
bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume); bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume) override;
void playSoundSample(uint16 sample_num, Audio::SoundHandle *looping_handle, uint8 volume); void playSoundSample(uint16 sample_num, Audio::SoundHandle *looping_handle, uint8 volume);

View file

@ -44,21 +44,21 @@ public:
} }
AdLibSfxStream(Configuration *cfg, int rate, uint8 channel, sint8 note, uint8 velocity, uint8 program_number, uint32 d); AdLibSfxStream(Configuration *cfg, int rate, uint8 channel, sint8 note, uint8 velocity, uint8 program_number, uint32 d);
~AdLibSfxStream(); ~AdLibSfxStream() override;
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
/** Is this a stereo stream? */ /** Is this a stereo stream? */
bool isStereo() const { bool isStereo() const override {
return true; return true;
} }
/** Sample rate of the stream. */ /** Sample rate of the stream. */
int getRate() const { int getRate() const override {
return opl->getRate(); return opl->getRate();
} }
bool rewind() { bool rewind() override {
return false; return false;
} }
@ -69,7 +69,7 @@ public:
* This is used by e.g. a rate converter to decide whether to keep on * This is used by e.g. a rate converter to decide whether to keep on
* converting data or stop. * converting data or stop.
*/ */
bool endOfData() const { bool endOfData() const override {
if (total_samples_played >= duration) { if (total_samples_played >= duration) {
return true; return true;
} }

View file

@ -40,19 +40,19 @@ public:
FMtownsDecoderStream(unsigned char *buf, uint32 len); FMtownsDecoderStream(unsigned char *buf, uint32 len);
FMtownsDecoderStream(Std::string filename, uint16 sample_num, bool isCompressed = true); FMtownsDecoderStream(Std::string filename, uint16 sample_num, bool isCompressed = true);
~FMtownsDecoderStream(); ~FMtownsDecoderStream() override;
uint32 getLengthInMsec(); uint32 getLengthInMsec();
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
/** Is this a stereo stream? */ /** Is this a stereo stream? */
bool isStereo() const { bool isStereo() const override {
return false; return false;
} }
/** Sample rate of the stream. */ /** Sample rate of the stream. */
int getRate() const { int getRate() const override {
return 14700; return 14700;
} }
@ -63,11 +63,11 @@ public:
* This is used by e.g. a rate converter to decide whether to keep on * This is used by e.g. a rate converter to decide whether to keep on
* converting data or stop. * converting data or stop.
*/ */
bool endOfData() const { bool endOfData() const override {
return (buf_pos >= buf_len); return (buf_pos >= buf_len);
} }
bool rewind() { bool rewind() override {
buf_pos = 0; buf_pos = 0;
return true; return true;
} }

View file

@ -37,17 +37,17 @@ public:
finished = false; finished = false;
} }
~PCSpeakerStream() { ~PCSpeakerStream() override {
delete pcspkr; delete pcspkr;
} }
/** Is this a stereo stream? */ /** Is this a stereo stream? */
bool isStereo() const { bool isStereo() const override {
return false; return false;
} }
/** Sample rate of the stream. */ /** Sample rate of the stream. */
int getRate() const { int getRate() const override {
return SPKR_OUTPUT_RATE; return SPKR_OUTPUT_RATE;
} }
@ -58,11 +58,11 @@ public:
* This is used by e.g. a rate converter to decide whether to keep on * This is used by e.g. a rate converter to decide whether to keep on
* converting data or stop. * converting data or stop.
*/ */
bool endOfData() const { bool endOfData() const override {
return finished; return finished;
} }
bool rewind() { bool rewind() override {
return false; return false;
} }
@ -79,9 +79,9 @@ public:
} }
PCSpeakerFreqStream(uint start, uint16 d); PCSpeakerFreqStream(uint start, uint16 d);
~PCSpeakerFreqStream(); ~PCSpeakerFreqStream() override;
uint32 getLengthInMsec(); uint32 getLengthInMsec();
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
protected: protected:
@ -98,9 +98,9 @@ public:
} }
PCSpeakerSweepFreqStream(uint start, uint end, uint16 d, uint16 s); PCSpeakerSweepFreqStream(uint start, uint end, uint16 d, uint16 s);
~PCSpeakerSweepFreqStream(); ~PCSpeakerSweepFreqStream() override;
uint32 getLengthInMsec(); uint32 getLengthInMsec();
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
protected: protected:
@ -126,10 +126,10 @@ public:
} }
PCSpeakerRandomStream(uint start, uint16 d, uint16 s); PCSpeakerRandomStream(uint start, uint16 d, uint16 s);
~PCSpeakerRandomStream(); ~PCSpeakerRandomStream() override;
uint32 getLengthInMsec(); uint32 getLengthInMsec();
uint16 getNextFreqValue(); uint16 getNextFreqValue();
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
protected: protected:
@ -153,9 +153,9 @@ public:
} }
PCSpeakerStutterStream(sint16 a0, uint16 a2, uint16 a4, uint16 a6, uint16 a8); PCSpeakerStutterStream(sint16 a0, uint16 a2, uint16 a4, uint16 a6, uint16 a8);
~PCSpeakerStutterStream(); ~PCSpeakerStutterStream() override;
uint32 getLengthInMsec(); uint32 getLengthInMsec();
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
protected: protected:

View file

@ -68,24 +68,24 @@ public:
_currentStream = NULL; _currentStream = NULL;
} }
~RandomCollectionAudioStreamImpl(); ~RandomCollectionAudioStreamImpl() override;
// Implement the AudioStream API // Implement the AudioStream API
virtual int readBuffer(int16 *buffer, const int numSamples); int readBuffer(int16 *buffer, const int numSamples) override;
virtual bool isStereo() const { bool isStereo() const override {
return _stereo; return _stereo;
} }
virtual int getRate() const { int getRate() const override {
return _rate; return _rate;
} }
virtual bool endOfData() const { bool endOfData() const override {
return false; return false;
} }
virtual bool endOfStream() const { bool endOfStream() const override {
return _finished; return _finished;
} }
virtual void finish() { void finish() override {
_finished = true; _finished = true;
} }
}; };

View file

@ -44,21 +44,21 @@ public:
} }
U6AdPlugDecoderStream(CEmuopl *o, Std::string filename, uint16 song_num); U6AdPlugDecoderStream(CEmuopl *o, Std::string filename, uint16 song_num);
~U6AdPlugDecoderStream(); ~U6AdPlugDecoderStream() override;
int readBuffer(sint16 *buffer, const int numSamples); int readBuffer(sint16 *buffer, const int numSamples) override;
/** Is this a stereo stream? */ /** Is this a stereo stream? */
bool isStereo() const { bool isStereo() const override {
return true; return true;
} }
/** Sample rate of the stream. */ /** Sample rate of the stream. */
int getRate() const { int getRate() const override {
return opl->getRate(); return opl->getRate();
} }
bool rewind() { bool rewind() override {
if (player) { if (player) {
player->rewind(); //FIXME this would need to be locked if called outside mixer thread. player->rewind(); //FIXME this would need to be locked if called outside mixer thread.
return true; return true;
@ -73,7 +73,7 @@ public:
* This is used by e.g. a rate converter to decide whether to keep on * This is used by e.g. a rate converter to decide whether to keep on
* converting data or stop. * converting data or stop.
*/ */
bool endOfData() const { bool endOfData() const override {
return false; return false;
} }
private: private:

View file

@ -35,10 +35,10 @@ namespace Nuvie {
class PCSpeakerSfxManager : public SfxManager { class PCSpeakerSfxManager : public SfxManager {
public: public:
PCSpeakerSfxManager(Configuration *cfg, Audio::Mixer *m); PCSpeakerSfxManager(Configuration *cfg, Audio::Mixer *m);
virtual ~PCSpeakerSfxManager(); ~PCSpeakerSfxManager() override;
bool playSfx(SfxIdType sfx_id, uint8 volume); bool playSfx(SfxIdType sfx_id, uint8 volume) override;
bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume); bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume) override;
private: private:
void playSoundSample(Audio::AudioStream *stream, Audio::SoundHandle *looping_handle, uint8 volume); void playSoundSample(Audio::AudioStream *stream, Audio::SoundHandle *looping_handle, uint8 volume);

View file

@ -34,16 +34,16 @@ public:
virtual bool Init(const char *filename) { virtual bool Init(const char *filename) {
return false; return false;
} }
bool Play(bool looping = false) { bool Play(bool looping = false) override {
return false; return false;
} }
bool Stop() { bool Stop() override {
return false; return false;
} }
bool SetVolume(uint8 volume) { bool SetVolume(uint8 volume) override {
return false; return false;
} }
bool FadeOut(float seconds) { bool FadeOut(float seconds) override {
return false; return false;
} }

View file

@ -37,15 +37,15 @@ public:
uint16 samples_left; uint16 samples_left;
SongAdPlug(Audio::Mixer *m, CEmuopl *o); SongAdPlug(Audio::Mixer *m, CEmuopl *o);
~SongAdPlug(); ~SongAdPlug() override;
bool Init(const char *filename) { bool Init(const char *filename) override {
return Init(filename, 0); return Init(filename, 0);
} }
bool Init(const char *filename, uint16 song_num); bool Init(const char *filename, uint16 song_num);
bool Play(bool looping = false); bool Play(bool looping = false) override;
bool Stop(); bool Stop() override;
bool SetVolume(uint8 volume); bool SetVolume(uint8 volume) override;
bool FadeOut(float seconds) { bool FadeOut(float seconds) override {
return false; return false;
} }
CEmuopl *get_opl() { CEmuopl *get_opl() {

View file

@ -43,10 +43,10 @@ typedef struct {
class TownsSfxManager : public SfxManager { class TownsSfxManager : public SfxManager {
public: public:
TownsSfxManager(Configuration *cfg, Audio::Mixer *m); TownsSfxManager(Configuration *cfg, Audio::Mixer *m);
virtual ~TownsSfxManager(); ~TownsSfxManager() override;
bool playSfx(SfxIdType sfx_id, uint8 volume); bool playSfx(SfxIdType sfx_id, uint8 volume) override;
bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume); bool playSfxLooping(SfxIdType sfx_id, Audio::SoundHandle *handle, uint8 volume) override;
private: private:
Std::string sounds2dat_filepath; Std::string sounds2dat_filepath;

View file

@ -74,7 +74,7 @@ class U6UseCode: public UseCode, public CallBack {
public: public:
U6UseCode(Game *g, Configuration *cfg); U6UseCode(Game *g, Configuration *cfg);
~U6UseCode(); ~U6UseCode() override;
bool use_obj(Obj *obj, Actor *actor) override; bool use_obj(Obj *obj, Actor *actor) override;
bool look_obj(Obj *obj, Actor *actor) override; bool look_obj(Obj *obj, Actor *actor) override;
@ -142,7 +142,7 @@ public:
bool is_container(uint16 obj_n, uint8 frame_n) override; bool is_container(uint16 obj_n, uint8 frame_n) override;
bool is_readable(Obj *obj) override; bool is_readable(Obj *obj) override;
virtual uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override; uint16 callback(uint16 msg, CallBack *caller, void *data = NULL) override;
protected: protected:
bool uc_event(const U6ObjectType *type, UseCodeEvent ev, Obj *obj); bool uc_event(const U6ObjectType *type, UseCodeEvent ev, Obj *obj);

View file

@ -50,13 +50,13 @@ class ActorView : public View {
public: public:
ActorView(Configuration *cfg); ActorView(Configuration *cfg);
~ActorView(); ~ActorView() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Portrait *port); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Portrait *port);
bool set_party_member(uint8 party_member); bool set_party_member(uint8 party_member) override;
void Display(bool full_redraw); void Display(bool full_redraw) override;
void update() { void update() {
update_display = true; update_display = true;
} }
@ -69,9 +69,9 @@ protected:
void display_name(); void display_name();
void display_actor_stats(); void display_actor_stats();
bool in_party; bool in_party;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
void update_cursor(); void update_cursor();
void select_button(); void select_button();
}; };

View file

@ -57,11 +57,11 @@ class ContainerViewGump : public DraggableView {
public: public:
ContainerViewGump(Configuration *cfg); ContainerViewGump(Configuration *cfg);
~ContainerViewGump(); ~ContainerViewGump() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Obj *container_obj_type); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Obj *container_obj_type);
void Display(bool full_redraw); void Display(bool full_redraw) override;
void set_actor(Actor *a); void set_actor(Actor *a);
Actor *get_actor() { Actor *get_actor() {
@ -76,20 +76,20 @@ public:
return (container_obj == NULL); return (container_obj == NULL);
} }
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state) { GUI_status MouseMotion(int x, int y, uint8 state) override {
return DraggableView::MouseMotion(x, y, state); return DraggableView::MouseMotion(x, y, state);
} }
virtual GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
virtual void MoveRelative(int dx, int dy) { void MoveRelative(int dx, int dy) override {
return DraggableView::MoveRelative(dx, dy); return DraggableView::MoveRelative(dx, dy);
} }
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
protected: protected:
void init_container_type(Std::string datadir, Obj *obj_type); void init_container_type(Std::string datadir, Obj *obj_type);

View file

@ -65,7 +65,7 @@ protected:
public: public:
ContainerWidget(Configuration *cfg, GUI_CallBack *callback = NULL); ContainerWidget(Configuration *cfg, GUI_CallBack *callback = NULL);
~ContainerWidget(); ~ContainerWidget() override;
bool init(Actor *a, uint16 x, uint16 y, TileManager *tm, ObjManager *om, Font *f); bool init(Actor *a, uint16 x, uint16 y, TileManager *tm, ObjManager *om, Font *f);
virtual void set_actor(Actor *a); virtual void set_actor(Actor *a);
@ -83,22 +83,22 @@ public:
bool is_showing_container() { bool is_showing_container() {
return (container_obj != NULL ? true : false); return (container_obj != NULL ? true : false);
} }
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
GUI_status MouseDouble(int x, int y, Shared::MouseButton button); GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override;
GUI_status MouseClick(int x, int y, Shared::MouseButton button); GUI_status MouseClick(int x, int y, Shared::MouseButton button) override;
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button); GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override;
void drag_drop_success(int x, int y, int message, void *data); void drag_drop_success(int x, int y, int message, void *data) override;
void drag_drop_failed(int x, int y, int message, void *data); void drag_drop_failed(int x, int y, int message, void *data) override;
bool drag_accept_drop(int x, int y, int message, void *data); bool drag_accept_drop(int x, int y, int message, void *data) override;
void drag_perform_drop(int x, int y, int message, void *data); void drag_perform_drop(int x, int y, int message, void *data) override;
void drag_draw(int x, int y, int message, void *data); void drag_draw(int x, int y, int message, void *data) override;
protected: protected:

View file

@ -46,14 +46,14 @@ private:
public: public:
ContainerWidgetGump(Configuration *cfg, GUI_CallBack *callback = NULL); ContainerWidgetGump(Configuration *cfg, GUI_CallBack *callback = NULL);
~ContainerWidgetGump(); ~ContainerWidgetGump() override;
bool init(Actor *a, uint16 x, uint16 y, uint8 Cols, uint8 Rows, TileManager *tm, ObjManager *om, Font *f, uint8 check_xoff, uint8 check_yoff); bool init(Actor *a, uint16 x, uint16 y, uint8 Cols, uint8 Rows, TileManager *tm, ObjManager *om, Font *f, uint8 check_xoff, uint8 check_yoff);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
virtual void set_actor(Actor *a); void set_actor(Actor *a) override;
private: private:
void cursor_right(); void cursor_right();

View file

@ -61,7 +61,7 @@ class DollViewGump : public DraggableView {
public: public:
DollViewGump(Configuration *cfg); DollViewGump(Configuration *cfg);
~DollViewGump(); ~DollViewGump() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Actor *a, Font *f, Party *p, TileManager *tm, ObjManager *om); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Actor *a, Font *f, Party *p, TileManager *tm, ObjManager *om);
@ -70,20 +70,20 @@ public:
return actor; return actor;
} }
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state) { GUI_status MouseMotion(int x, int y, uint8 state) override {
return DraggableView::MouseMotion(x, y, state); return DraggableView::MouseMotion(x, y, state);
} }
virtual GUI_status MouseWheel(sint32 xpos, sint32 ypos); GUI_status MouseWheel(sint32 xpos, sint32 ypos) override;
virtual void MoveRelative(int dx, int dy) { void MoveRelative(int dx, int dy) override {
return DraggableView::MoveRelative(dx, dy); return DraggableView::MoveRelative(dx, dy);
} }
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
protected: protected:
void displayEquipWeight(); void displayEquipWeight();
@ -98,7 +98,7 @@ private:
void setColorKey(Graphics::ManagedSurface *image); void setColorKey(Graphics::ManagedSurface *image);
GUI_status set_cursor_pos(gumpCursorPos pos); GUI_status set_cursor_pos(gumpCursorPos pos);
GUI_status moveCursorRelative(uint8 direction); GUI_status moveCursorRelative(uint8 direction);
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
}; };

View file

@ -56,28 +56,28 @@ class DollWidget : public GUI_Widget {
public: public:
DollWidget(Configuration *cfg, GUI_CallBack *callback = NULL); DollWidget(Configuration *cfg, GUI_CallBack *callback = NULL);
~DollWidget(); ~DollWidget() override;
bool init(Actor *a, uint16 x, uint16 y, TileManager *tm, ObjManager *om, bool in_portrat_view = false); bool init(Actor *a, uint16 x, uint16 y, TileManager *tm, ObjManager *om, bool in_portrat_view = false);
void free_doll_shapes(); void free_doll_shapes();
void setColorKey(Graphics::ManagedSurface *image); void setColorKey(Graphics::ManagedSurface *image);
void set_actor(Actor *a); void set_actor(Actor *a);
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
GUI_status MouseDouble(int x, int y, Shared::MouseButton button); GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override;
GUI_status MouseClick(int x, int y, Shared::MouseButton button); GUI_status MouseClick(int x, int y, Shared::MouseButton button) override;
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button); GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override;
void drag_drop_success(int x, int y, int message, void *data); void drag_drop_success(int x, int y, int message, void *data) override;
void drag_drop_failed(int x, int y, int message, void *data); void drag_drop_failed(int x, int y, int message, void *data) override;
bool drag_accept_drop(int x, int y, int message, void *data); bool drag_accept_drop(int x, int y, int message, void *data) override;
void drag_perform_drop(int x, int y, int message, void *data); void drag_perform_drop(int x, int y, int message, void *data) override;
void drag_draw(int x, int y, int message, void *data); void drag_draw(int x, int y, int message, void *data) override;
Common::Rect *get_item_hit_rect(uint8 location); Common::Rect *get_item_hit_rect(uint8 location);

View file

@ -43,13 +43,13 @@ private:
public: public:
DraggableView(Configuration *config); DraggableView(Configuration *config);
virtual ~DraggableView(); ~DraggableView() override;
/* events, used for dragging the area. */ /* events, used for dragging the area. */
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
void MoveRelative(int dx, int dy); void MoveRelative(int dx, int dy) override;
protected: protected:
void set_bg_color_key(uint8 r, uint8 g, uint8 b); void set_bg_color_key(uint8 r, uint8 g, uint8 b);

View file

@ -64,10 +64,10 @@ class InventoryView : public View {
public: public:
InventoryView(Configuration *cfg); InventoryView(Configuration *cfg);
~InventoryView(); ~InventoryView() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
bool set_party_member(uint8 party_member); bool set_party_member(uint8 party_member) override;
bool set_actor(Actor *actor, bool pickpocket = false); bool set_actor(Actor *actor, bool pickpocket = false);
void set_show_cursor(bool state); void set_show_cursor(bool state);
void moveCursorToSlot(uint8 slot_num); void moveCursorToSlot(uint8 slot_num);
@ -82,9 +82,9 @@ public:
return (inventory_widget); return (inventory_widget);
}; };
void Display(bool full_redraw); void Display(bool full_redraw) override;
void PlaceOnScreen(Screen *s, GUI_DragManager *dm, int x, int y); void PlaceOnScreen(Screen *s, GUI_DragManager *dm, int x, int y) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
void simulate_CB_callback(); void simulate_CB_callback();
bool is_picking_pocket() { bool is_picking_pocket() {
return picking_pocket; return picking_pocket;
@ -102,9 +102,9 @@ protected:
void update_cursor(); void update_cursor();
void hide_buttons(); void hide_buttons();
void show_buttons(); void show_buttons();
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -62,7 +62,7 @@ protected:
public: public:
InventoryWidget(Configuration *cfg, GUI_CallBack *callback = NULL); InventoryWidget(Configuration *cfg, GUI_CallBack *callback = NULL);
~InventoryWidget(); ~InventoryWidget() override;
bool init(Actor *a, uint16 x, uint16 y, TileManager *tm, ObjManager *om, Font *f); bool init(Actor *a, uint16 x, uint16 y, TileManager *tm, ObjManager *om, Font *f);
void set_actor(Actor *a); void set_actor(Actor *a);
@ -82,22 +82,22 @@ public:
bool is_showing_container() { bool is_showing_container() {
return (container_obj != NULL ? true : false); return (container_obj != NULL ? true : false);
} }
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
GUI_status MouseDouble(int x, int y, Shared::MouseButton button); GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override;
GUI_status MouseClick(int x, int y, Shared::MouseButton button); GUI_status MouseClick(int x, int y, Shared::MouseButton button) override;
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button); GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
void drag_drop_success(int x, int y, int message, void *data); void drag_drop_success(int x, int y, int message, void *data) override;
void drag_drop_failed(int x, int y, int message, void *data); void drag_drop_failed(int x, int y, int message, void *data) override;
bool drag_accept_drop(int x, int y, int message, void *data); bool drag_accept_drop(int x, int y, int message, void *data) override;
void drag_perform_drop(int x, int y, int message, void *data); void drag_perform_drop(int x, int y, int message, void *data) override;
void drag_draw(int x, int y, int message, void *data); void drag_draw(int x, int y, int message, void *data) override;
uint8 get_num_rows() { uint8 get_num_rows() {
return game_type == NUVIE_GAME_U6 ? 3 : 4; return game_type == NUVIE_GAME_U6 ? 3 : 4;

View file

@ -42,17 +42,17 @@ private:
GUI_Button *down_button; GUI_Button *down_button;
public: public:
MapEditorView(Configuration *config); MapEditorView(Configuration *config);
virtual ~MapEditorView(); ~MapEditorView() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseMotion(int x, int y, uint8 state); GUI_status MouseMotion(int x, int y, uint8 state) override;
virtual void close_view(); void close_view() override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
protected: protected:
void setTile(uint16 x, uint16 y, uint8 level); void setTile(uint16 x, uint16 y, uint8 level);
void toggleGrid(); void toggleGrid();

View file

@ -43,10 +43,10 @@ protected:
public: public:
MDSkyStripWidget(Configuration *cfg, GameClock *c, Player *p); MDSkyStripWidget(Configuration *cfg, GameClock *c, Player *p);
~MDSkyStripWidget(); ~MDSkyStripWidget() override;
void init(sint16 x, sint16 y); void init(sint16 x, sint16 y);
void Display(bool full_redraw); void Display(bool full_redraw) override;
private: private:
void display_surface(); void display_surface();

View file

@ -47,17 +47,17 @@ class PartyView : public View {
public: public:
PartyView(Configuration *cfg); PartyView(Configuration *cfg);
~PartyView(); ~PartyView() override;
bool init(void *vm, uint16 x, uint16 y, Font *f, Party *p, Player *pl, TileManager *tm, ObjManager *om); bool init(void *vm, uint16 x, uint16 y, Font *f, Party *p, Player *pl, TileManager *tm, ObjManager *om);
GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button) { GUI_status MouseDown(int x, int y, Shared::MouseButton button) override {
return (GUI_YUM); return (GUI_YUM);
} }
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
bool drag_accept_drop(int x, int y, int message, void *data); bool drag_accept_drop(int x, int y, int message, void *data) override;
void drag_perform_drop(int x, int y, int message, void *data); void drag_perform_drop(int x, int y, int message, void *data) override;
void Display(bool full_redraw); void Display(bool full_redraw) override;
void update() { void update() {
update_display = true; update_display = true;
} }

View file

@ -62,11 +62,11 @@ class PortraitView : public View {
public: public:
PortraitView(Configuration *cfg); PortraitView(Configuration *cfg);
~PortraitView(); ~PortraitView() override;
bool init(uint16 x, uint16 y, Font *f, Party *p, Player *player, TileManager *tm, ObjManager *om, Portrait *port); bool init(uint16 x, uint16 y, Font *f, Party *p, Player *player, TileManager *tm, ObjManager *om, Portrait *port);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status HandleEvent(const Common::Event *event); GUI_status HandleEvent(const Common::Event *event) override;
bool set_portrait(Actor *actor, const char *name); bool set_portrait(Actor *actor, const char *name);
void set_show_cursor(bool state) { void set_show_cursor(bool state) {

View file

@ -53,23 +53,23 @@ class PortraitViewGump : public DraggableView {
public: public:
PortraitViewGump(Configuration *cfg); PortraitViewGump(Configuration *cfg);
~PortraitViewGump(); ~PortraitViewGump() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Portrait *por, Actor *a); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om, Portrait *por, Actor *a);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
protected: protected:
void set_actor(Actor *a); void set_actor(Actor *a);
void left_arrow(); void left_arrow();
void right_arrow(); void right_arrow();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status set_cursor_pos(gumpCursorPos pos); GUI_status set_cursor_pos(gumpCursorPos pos);
}; };

View file

@ -40,19 +40,19 @@ class ScrollViewGump : public DraggableView {
public: public:
ScrollViewGump(Configuration *cfg); ScrollViewGump(Configuration *cfg);
~ScrollViewGump(); ~ScrollViewGump() override;
bool init(Screen *tmp_screen, void *view_manager, Font *f, Party *p, TileManager *tm, ObjManager *om, Std::string text_string); bool init(Screen *tmp_screen, void *view_manager, Font *f, Party *p, TileManager *tm, ObjManager *om, Std::string text_string);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button) { GUI_status MouseUp(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
protected: protected:

View file

@ -70,7 +70,7 @@ class ScrollWidgetGump: public MsgScroll {
public: public:
ScrollWidgetGump(Configuration *cfg, Screen *s); ScrollWidgetGump(Configuration *cfg, Screen *s);
~ScrollWidgetGump(); ~ScrollWidgetGump() override;
bool parse_token(MsgText *token) override; bool parse_token(MsgText *token) override;
@ -82,7 +82,7 @@ public:
void display_prompt() override {} void display_prompt() override {}
void display_string(Std::string s); void display_string(Std::string s);
virtual void display_string(Std::string s, Font *f, bool include_on_map_window) override { void display_string(Std::string s, Font *f, bool include_on_map_window) override {
return MsgScroll::display_string(s, f, include_on_map_window); return MsgScroll::display_string(s, f, include_on_map_window);
} }

View file

@ -42,16 +42,16 @@ class SignViewGump : public DraggableView {
public: public:
SignViewGump(Configuration *cfg); SignViewGump(Configuration *cfg);
~SignViewGump(); ~SignViewGump() override;
bool init(Screen *tmp_screen, void *view_manager, Font *f, Party *p, TileManager *tm, ObjManager *om, const char *text_string, uint16 length); bool init(Screen *tmp_screen, void *view_manager, Font *f, Party *p, TileManager *tm, ObjManager *om, const char *text_string, uint16 length);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
protected: protected:

View file

@ -59,7 +59,7 @@ protected:
public: public:
SpellView(Configuration *cfg); SpellView(Configuration *cfg);
~SpellView(); ~SpellView() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
@ -69,37 +69,37 @@ public:
return spell_container->quality; return spell_container->quality;
} else return -1; } else return -1;
} }
void Display(bool full_redraw); void Display(bool full_redraw) override;
void PlaceOnScreen(Screen *s, GUI_DragManager *dm, int x, int y); void PlaceOnScreen(Screen *s, GUI_DragManager *dm, int x, int y) override;
void close_look(); void close_look();
GUI_status KeyDown(const Common::KeyState &key); GUI_status KeyDown(const Common::KeyState &key) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
GUI_status MouseUp(int x, int y, Shared::MouseButton button) { GUI_status MouseUp(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseMotion(int x, int y, uint8 state) { GUI_status MouseMotion(int x, int y, uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseEnter(uint8 state) { GUI_status MouseEnter(uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseLeave(uint8 state) { GUI_status MouseLeave(uint8 state) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseClick(int x, int y, Shared::MouseButton button) { GUI_status MouseClick(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDouble(int x, int y, Shared::MouseButton button) { GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) { GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseHeld(int x, int y, Shared::MouseButton button) { GUI_status MouseHeld(int x, int y, Shared::MouseButton button) override {
return GUI_YUM; return GUI_YUM;
} }
GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
protected: protected:
@ -128,7 +128,7 @@ protected:
GUI_status cancel_spell(); GUI_status cancel_spell();
uint16 get_available_spell_count(Spell *s); uint16 get_available_spell_count(Spell *s);
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
}; };
} // End of namespace Nuvie } // End of namespace Nuvie

View file

@ -48,29 +48,29 @@ class SpellViewGump : public SpellView {
NuvieBmpFile bmp; NuvieBmpFile bmp;
public: public:
SpellViewGump(Configuration *cfg); SpellViewGump(Configuration *cfg);
~SpellViewGump(); ~SpellViewGump() override;
bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om); bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
void Display(bool full_redraw); void Display(bool full_redraw) override;
virtual GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseUp(int x, int y, Shared::MouseButton button); GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
virtual GUI_status MouseMotion(int x, int y, uint8 state) { GUI_status MouseMotion(int x, int y, uint8 state) override {
return DraggableView::MouseMotion(x, y, state); return DraggableView::MouseMotion(x, y, state);
} }
virtual GUI_status MouseWheel(sint32 x, sint32 y); GUI_status MouseWheel(sint32 x, sint32 y) override;
virtual void MoveRelative(int dx, int dy) { void MoveRelative(int dx, int dy) override {
return DraggableView::MoveRelative(dx, dy); return DraggableView::MoveRelative(dx, dy);
} }
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
protected: protected:
sint16 getSpell(int x, int y); sint16 getSpell(int x, int y);
virtual uint8 fill_cur_spell_list(); uint8 fill_cur_spell_list() override;
void loadCircleString(Std::string datadir); void loadCircleString(Std::string datadir);
void loadCircleSuffix(Std::string datadir, Std::string image); void loadCircleSuffix(Std::string datadir, Std::string image);
void printSpellQty(uint8 spell_num, uint16 x, uint16 y); void printSpellQty(uint8 spell_num, uint16 x, uint16 y);

View file

@ -38,12 +38,12 @@ private:
public: public:
SunMoonRibbon(Player *p, Weather *w, TileManager *tm); SunMoonRibbon(Player *p, Weather *w, TileManager *tm);
~SunMoonRibbon(); ~SunMoonRibbon() override;
void init(Screen *screen); void init(Screen *screen);
void Display(bool full_redraw); void Display(bool full_redraw) override;
GUI_status MouseDown(int x, int y, Shared::MouseButton button); GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
void extend() { void extend() {
@ -54,7 +54,7 @@ public:
} }
protected: protected:
void display_sun_moon(Tile *tile, uint8 pos); void display_sun_moon(Tile *tile, uint8 pos) override;
private: private:
void loadBgImage(uint8 num); void loadBgImage(uint8 num);

View file

@ -39,10 +39,10 @@ protected:
public: public:
SunMoonStripWidget(Player *p, TileManager *tm); SunMoonStripWidget(Player *p, TileManager *tm);
~SunMoonStripWidget(); ~SunMoonStripWidget() override;
void init(sint16 x, sint16 y); void init(sint16 x, sint16 y);
void Display(bool full_redraw); void Display(bool full_redraw) override;
protected: protected:
virtual void display_sun_moon(Tile *tile, uint8 pos); virtual void display_sun_moon(Tile *tile, uint8 pos);

View file

@ -58,7 +58,7 @@ protected:
public: public:
View(Configuration *cfg); View(Configuration *cfg);
virtual ~View(); ~View() override;
bool init(uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om); bool init(uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
@ -76,7 +76,7 @@ public:
protected: protected:
GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data); GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
GUI_Button *loadButton(Std::string dir, Std::string name, uint16 x, uint16 y); GUI_Button *loadButton(Std::string dir, Std::string name, uint16 x, uint16 y);
}; };

View file

@ -54,7 +54,7 @@ public:
/** /**
* Destructor * Destructor
*/ */
virtual ~Action() {} ~Action() override {}
/** /**
* Jumps up through the parents to find the root game * Jumps up through the parents to find the root game

View file

@ -46,7 +46,7 @@ public:
/** /**
* Destructor * Destructor
*/ */
virtual ~Huh() {} ~Huh() override {}
}; };
} // End of namespace Actions } // End of namespace Actions

View file

@ -46,7 +46,7 @@ public:
/** /**
* Destructor * Destructor
*/ */
virtual ~Pass() {} ~Pass() override {}
}; };
} // End of namespace Actions } // End of namespace Actions

Some files were not shown because too many files have changed in this diff Show more