Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2007, 10:30:29 PM (16 years ago)
Author:
rgrieder
Message:
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
Location:
code/branches/FICN/src/orxonox/objects/weapon_system
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc

    r668 r708  
    5959  }
    6060
    61   void AmmunitionDump::setDumpSize(const Ogre::String &name, int size)
     61  void AmmunitionDump::setDumpSize(const String &name, int size)
    6262  {
    6363    if (size < 0)
     
    7070
    7171
    72   int AmmunitionDump::store(const Ogre::String &name, int quantity)
     72  int AmmunitionDump::store(const String &name, int quantity)
    7373  {
    7474    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
     
    8787
    8888
    89   int AmmunitionDump::getAmmunition(const Ogre::String &name, int quantity)
     89  int AmmunitionDump::getAmmunition(const String &name, int quantity)
    9090  {
    9191    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
     
    103103
    104104
    105   int AmmunitionDump::getStockSize(const Ogre::String &name)
     105  int AmmunitionDump::getStockSize(const String &name)
    106106  {
    107107    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
  • code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "network/Synchronisable.h"
    3737//#include "../core/CoreIncludes.h"
     38#include "misc/String.h"
    3839#include "../BaseObject.h"
    3940
     
    4647          ~AmmunitionDump();
    4748
    48     void setDumpSize(const Ogre::String &name, int size);
     49    void setDumpSize(const String &name, int size);
    4950
    50     int store(const Ogre::String &name, int quantiy);
     51    int store(const String &name, int quantiy);
    5152
    52     int getAmmunition(const Ogre::String &name, int quantity);
     53    int getAmmunition(const String &name, int quantity);
    5354
    54     int getStockSize(const Ogre::String &name);
     55    int getStockSize(const String &name);
    5556
    5657    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
  • code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc

    r668 r708  
    2626 */
    2727
    28 #include "OgreMath.h"
    29 #include "OgreVector3.h"
    30 #include "OgreStringConverter.h"
    31 #include "OgreSceneNode.h"
    32 #include "OgreEntity.h"
    33 #include "OgreSceneManager.h"
     28#include <OgreStringConverter.h>
     29#include <OgreSceneNode.h>
     30#include <OgreEntity.h>
     31#include <OgreSceneManager.h>
    3432
     33#include "misc/Vector3.h"
    3534#include "Bullet.h"
    3635#include "BulletManager.h"
     
    4241
    4342namespace orxonox {
    44   using namespace Ogre;
    45 
    4643  CreateFactory(BarrelGun);
    4744
     
    7875
    7976    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
    80           + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
     77      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
    8178
    8279    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
     
    106103
    107104
    108 
    109105  void BarrelGun::secondaryFire()
    110106  {
     
    120116
    121117    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
    122           + StringConverter::toString(bulletCounter_++), "Barrel.mesh");
     118      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
    123119
    124120    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
  • code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "BaseWeapon.h"
  • code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc

    r680 r708  
    2626 */
    2727
    28 #include "OgreMath.h"
    29 #include "OgreVector3.h"
    30 #include "OgreStringConverter.h"
    31 #include "OgreSceneNode.h"
    32 #include "OgreEntity.h"
    33 #include "OgreSceneManager.h"
     28#include <OgreStringConverter.h>
     29#include <OgreSceneNode.h>
     30#include <OgreEntity.h>
     31#include <OgreSceneManager.h>
    3432
     33#include "misc/Vector3.h"
    3534#include "../../Orxonox.h"
    36 
    3735#include "Bullet.h"
    3836#include "BulletManager.h"
     
    4341
    4442namespace orxonox {
    45   using namespace Ogre;
    46  
    47   //CreateFactory(BaseWeapon);
    48 
    4943  float BaseWeapon::nextActionValidityPeriod_s = 0.5;
    5044
  • code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h

    r680 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "../Model.h"
     
    116116    float primaryFiringRate_;
    117117    float secondaryFiringRate_;
    118     Ogre::Real primaryBulletSpeed_;
    119     Ogre::Real secondaryBulletSpeed_;
     118    Real primaryBulletSpeed_;
     119    Real secondaryBulletSpeed_;
    120120
    121121    int magazineSize_;
  • code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.cc

    r669 r708  
    2626 */
    2727
    28 #include "OgreSceneNode.h"
    29 #include "OgreEntity.h"
    30 #include "OgreVector3.h"
    31 
    3228#include "Bullet.h"
    3329
    34 
    3530namespace orxonox {
    36   using namespace Ogre;
    37 
    3831  CreateFactory(Bullet);
    3932
  • code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "../Model.h"
  • code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc

    r680 r708  
    2626 */
    2727
    28 #include "OgreSceneNode.h"
    29 
    3028#include "BulletManager.h"
    3129#include "Bullet.h"
     
    3331
    3432namespace orxonox {
    35   using namespace Ogre;
    36 
    3733  CreateFactory(BulletManager);
    3834
     
    8682  }
    8783
    88   int BulletManager::getAmmunitionID(const Ogre::String &ammoName)
     84  int BulletManager::getAmmunitionID(const String &ammoName)
    8985  {
    90     Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
     86    String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
    9187    int ammoTypesLength = 3;
    9288
  • code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636#include "network/Synchronisable.h"
    3737#include "tinyxml/tinyxml.h"
    3838//#include "../core/CoreIncludes.h"
     39#include "misc/String.h"
    3940#include "../BaseObject.h"
    4041#include "../Tickable.h"
     
    4950    void addBullet(Bullet*);
    5051
    51     int getAmmunitionID(const Ogre::String&);
     52    int getAmmunitionID(const String&);
    5253
    5354    int getNumberOfAmmos();
  • code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc

    r680 r708  
    2626 */
    2727
    28 #include "OgreMath.h"
    29 #include "OgreVector3.h"
    30 #include "OgreStringConverter.h"
    31 #include "OgreSceneNode.h"
    32 #include "OgreEntity.h"
    33 #include "OgreSceneManager.h"
    34 
    3528#include "BaseWeapon.h"
    36 
    3729#include "WeaponStation.h"
    3830
    3931
    4032namespace orxonox {
    41   using namespace Ogre;
    42 
    4333  WeaponStation::WeaponStation(int stationSize)
    4434        : slots_(new BaseWeapon*[stationSize]),
  • code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h

    r673 r708  
    3232#include <OgrePrerequisites.h>
    3333
    34 #include "orxonox/OrxonoxPrereqs.h"
     34#include "../../OrxonoxPrereqs.h"
    3535
    3636
Note: See TracChangeset for help on using the changeset viewer.