supertux
fish_harmless.hpp
1 // SuperTux
2 // Copyright (C) 2022 Daniel Ward <weluvgoatz@gmail.com>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HEADER_SUPERTUX_BADGUY_FISH_HARMLESS_HPP
18 #define HEADER_SUPERTUX_BADGUY_FISH_HARMLESS_HPP
19 
20 #include "badguy/fish_swimming.hpp"
21 
23 class FishHarmless final : public FishSwimming
24 {
25 public:
26  FishHarmless(const ReaderMapping& reader);
27 
28  static std::string class_name() { return "fish-harmless"; }
29  virtual std::string get_class_name() const override { return class_name(); }
30  static std::string display_name() { return _("Harmless Fish"); }
31  virtual std::string get_display_name() const override { return display_name(); }
32  virtual GameObjectClasses get_class_types() const override { return FishSwimming::get_class_types().add(typeid(FishHarmless)); }
33  virtual std::string get_overlay_size() const override { return "1x1"; }
34 
35  GameObjectTypes get_types() const override { return {}; }
36 
37 protected:
38  virtual void initialize() override;
39 
40 private:
41  FishHarmless(const FishHarmless&) = delete;
42  FishHarmless& operator=(const FishHarmless&) = delete;
43 };
44 
45 #endif
46 
47 /* EOF */
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: fish_harmless.hpp:32
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: fish_swimming.hpp:43
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user&#39;s locale.
Definition: fish_harmless.hpp:31
Fish, which doesn&#39;t harm the player.
Definition: fish_harmless.hpp:23
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
Definition: fish_swimming.hpp:23
virtual void initialize() override
called immediately before the first call to initialize
Definition: fish_harmless.cpp:26
Definition: reader_mapping.hpp:32
GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: fish_harmless.hpp:35