From fd778219e40c5fbb4d0af1839cbc313caaf10d9d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 28 Sep 2008 15:05:13 +0000 Subject: move base game module to new subdirectory --- src/game/base/shipmodel.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/game/base/shipmodel.h (limited to 'src/game/base/shipmodel.h') diff --git a/src/game/base/shipmodel.h b/src/game/base/shipmodel.h new file mode 100644 index 0000000..d92b840 --- /dev/null +++ b/src/game/base/shipmodel.h @@ -0,0 +1,70 @@ +/* + base/shipmodel.h + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_BASE_SHIPMODEL_H__ +#define __INCLUDED_BASE_SHIPMODEL_H__ + +#include +#include + +namespace base { + +/// ship model specifications +class ShipModel +{ +public: + ShipModel(); + ~ShipModel(); + + /// acceleration + inline float acceleration() const { return shipmodel_acceleration; } + + /// maximum speed + inline float maxspeed() const { return shipmodel_maxspeed; } + + /// turn speed in rotations per second + inline float turnspeed() const { return shipmodel_turnspeed; } + + /// label of the ship model + inline std::string const &label() const { return shipmodel_label; } + + /// name of the ship model + inline std::string const & name() const { return shipmodel_name; } + + /// name of the model of the ship + inline std::string const & modelname() const { return shipmodel_modelname; } + + float shipmodel_acceleration; + float shipmodel_maxspeed; + float shipmodel_turnspeed; + std::string shipmodel_label; + std::string shipmodel_name; + std::string shipmodel_modelname; + + /// indicates of this model can be equiped with a jump drive + bool shipmodel_jumpdrive; + + static ShipModel *find(const std::string label); + + /// the ship model registry + static std::map registry; + + typedef std::map::iterator iterator; + + /// clear the ship model registry + static void clear(); + + /// list the ship model registry + static void list(); + + /// add a new ship model + static void add(ShipModel *shipmodel); +}; + +} + +#endif // __INCLUDED_BASE_SHIPMODEL_H__ + -- cgit v1.2.3