diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-08 14:35:58 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-08 14:35:58 +0000 |
commit | 343896eeaa97009fb06096dc5bcc097bf1bd287d (patch) | |
tree | 204384094ae725f1d9d33f73be867545a049e241 /src/game/shipmodel.h | |
parent | ada8263817ed45e29d4bd63ab0ac635a83eec4f8 (diff) |
added ships.ini
Diffstat (limited to 'src/game/shipmodel.h')
-rw-r--r-- | src/game/shipmodel.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/game/shipmodel.h b/src/game/shipmodel.h new file mode 100644 index 0000000..fd42c81 --- /dev/null +++ b/src/game/shipmodel.h @@ -0,0 +1,59 @@ +/* + game/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_GAME_SHIPMODEL_H__ +#define __INCLUDED_GAME_SHIPMODEL_H__ + +#include <list> +#include <string> + +namespace game { + +/// 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; } + + /// name of the model to use + inline std::string const & modelname() const { return shipmodel_modelname; } + + /// name of the ship model + inline std::string const & name() const { return shipmodel_name; } + + float shipmodel_acceleration; + float shipmodel_maxspeed; + float shipmodel_turnspeed; + std::string shipmodel_name; + std::string shipmodel_modelname; + + /// the ship model registry + static std::list<ShipModel *> registry; + + /// clear the ship model registry + static void clear(); + + /// list the ship model registry + static void list(); +private: + /// add a new ship model + static void add(ShipModel *shipmodel); +}; + +} + +#endif // __INCLUDED_GAME_SHIPMODEL_H__ + |