Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10618 in orxonox.OLD for trunk


Ignore:
Timestamp:
Apr 4, 2007, 12:13:53 PM (18 years ago)
Author:
bknecht
Message:

merged cleanup into trunk (only improvements)

Location:
trunk
Files:
69 deleted
104 edited
57 copied

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1616OrxonoxPlayability.kdevses
        1717OrxonoxPlayability.kdevelop.pcs
         18orxonox.backtrace
         19orxonox.kdevses
         20orxonox.kdevelop.pcs
  • trunk/src/Makefile.am

    r10376 r10618  
    4141                util/singleplayer_shootemup.cc \
    4242                \
    43                 util/kill_target.cc \
    44                 \
    45                 subprojects/benchmark.cc
     43                util/kill_target.cc
    4644
    4745noinst_HEADERS = \
    4846                $(StoryEntities_HEADERS_) \
    4947                orxonox.h \
    50                 ability.h \
    51                 defs/message_structures.h \
    52                 defs/stdincl.h \
    5348                defs/stdlibincl.h \
    5449                defs/sdlincl.h \
    55                 defs/glincl.h \
    56                 defs/alincl.h \
    57                 defs/comincl.h \
    5850                defs/confincl.h \
    5951                defs/error.h \
    60                 defs/globals.h \
    61                 defs/compiler.h \
    62                 subprojects/benchmark.h
     52                defs/orxonox_globals.h \
     53                defs/compiler.h
    6354
    6455## orxonox.conf will be used from home-dir instead.
  • trunk/src/ai

    • Property svn:ignore set to
      Makefile.in
      Makefile
      .deps
      *.a
  • trunk/src/ai/swarm_attack.cc

    r10376 r10618  
    3030void SwarmAttack::process(float dt)
    3131{
    32         std::map<WorldEntity*,AIModule*>::iterator it;
     32  WorldEntity* taskRelObject = NULL;
     33  if ( taskRelObjectName != "" )
     34  {
     35    taskRelObject = dynamic_cast<WorldEntity*>(WorldEntity::objectList().getBaseObject( taskRelObjectName ));
     36         
     37         
     38    std::map<WorldEntity*,AIModule*>::iterator it;
     39    Vector sideL=taskRelPos.cross(Vector(0,1,0)).getNormalized();
     40    Vector sideR=sideL*-1;
     41    Vector posL=Vector(0,0,0);
     42    Vector posR=Vector(0,0,0);
     43       
    3344
    34         Vector sideL=taskRelPos.cross(Vector(0,1,0)).getNormalized();
    35         Vector sideR=sideL*-1;
    36         Vector posL=Vector(0,0,0);
    37         Vector posR=Vector(0,0,0);
     45       
     46        //tell positions to swarm-members...
     47    float radius;
     48    Vector objectPos=taskRelObject->getAbsCoor();
    3849
    39         //tell positions to swarm-members...
    40         float radius;
    41         Vector objectPos=taskRelObject->getAbsCoor();
     50    for (it=members.begin(); it!= members.end(); it++ ){
     51      radius=it->second->getNPCRadius();
     52      posR=posR+sideR*radius*1.5;
     53      it->second->setDestination(objectPos+taskRelPos+posR);
     54      it->second->setDestinationMovement(Vector(0,0,0));
     55      it->second->setTarget(taskRelObject);
     56      it->second->process(dt);
     57      posR=posR+sideR*radius*1.5;
    4258
    43         for (it=members.begin(); it!= members.end(); it++ ){
    44                 radius=it->second->getNPCRadius();
    45                 posR=posR+sideR*radius*1.5;
    46                 it->second->setDestination(objectPos+taskRelPos+posR);
    47                 it->second->setDestinationMovement(Vector(0,0,0));
    48                 it->second->setTarget(taskRelObject);
    49                 it->second->process(dt);
    50                 posR=posR+sideR*radius*1.5;
     59      it++;
     60      if(it==members.end())break;
     61      radius=it->second->getNPCRadius();
     62      posL=posL+sideL*radius*1.5;
     63      it->second->setDestination(objectPos+taskRelPos+posL);
     64      it->second->setDestinationMovement(Vector(0,0,0));
     65      it->second->setTarget(taskRelObject);
     66      it->second->process(dt);
     67      posL=posL+sideL*radius*1.5;
     68    }
    5169
    52                 it++;
    53                 if(it==members.end())break;
    54                 radius=it->second->getNPCRadius();
    55                 posL=posL+sideL*radius*1.5;
    56                 it->second->setDestination(objectPos+taskRelPos+posL);
    57                 it->second->setDestinationMovement(Vector(0,0,0));
    58                 it->second->setTarget(taskRelObject);
    59                 it->second->process(dt);
    60                 posL=posL+sideL*radius*1.5;
    61         }
    62 
    63         //check time..
    64         taskMaxTime-=dt;
    65         if(taskMaxTime<0)taskComplete=true;
     70        //check time..
     71    taskMaxTime-=dt;
     72    if(taskMaxTime<0)taskComplete=true;
     73  }
    6674}
  • trunk/src/ai/swarm_gorel.cc

    r10376 r10618  
    4848        Vector correction=Vector(0,0,0);
    4949        Vector destination;
     50       
     51        WorldEntity* taskRelObject = NULL;
     52        if ( taskRelObjectName != "" )
     53          taskRelObject = dynamic_cast<WorldEntity*>(WorldEntity::objectList().getBaseObject( taskRelObjectName ));
    5054
    5155        if(taskRelObject!=NULL && taskMaxTime>0){
  • trunk/src/ai/swarm_module.h

    r10376 r10618  
    2424        inline void orderView(Vector taskView){this->taskView=taskView;}
    2525        inline void orderSpeed(float taskSpeed){this->taskSpeed=taskSpeed;}
    26         inline void orderRelObject(WorldEntity* taskRelObject){this->taskRelObject=taskRelObject;}
     26        inline void orderRelObject(WorldEntity* taskRelObject){if (taskRelObject) this->taskRelObjectName=taskRelObject->getName(); else taskRelObjectName = ""; }
    2727        inline void orderMaxTime(float taskMaxTime){this->taskMaxTime=taskMaxTime;}
    2828
     
    4444        Vector taskView;
    4545        float taskSpeed;
    46         WorldEntity* taskRelObject;
     46        std::string taskRelObjectName;
    4747        bool taskComplete;
    4848        float taskMaxTime;
  • trunk/src/ai/swarm_wait.cc

    r10555 r10618  
    1919void SwarmWait::process(float dt)
    2020{
    21         if(taskRelObject!=NULL){
    22                 Vector distVect=taskRelObject->getAbsCoor()-getSwarmPosition();
    23                 float distance=distVect.len();
    24                 if(distance<attackDistance+100)taskComplete=true;               //### change wakeup distance here
     21        if(taskRelObjectName!=""){
     22          WorldEntity* taskRelObject = dynamic_cast<WorldEntity*>(WorldEntity::objectList().getBaseObject( taskRelObjectName ));
     23          Vector distVect=taskRelObject->getAbsCoor()-getSwarmPosition();
     24          float distance=distVect.len();
     25          if(distance<attackDistance+100)taskComplete=true;             //### change wakeup distance here
    2526        }
    2627
  • trunk/src/lib/collision_detection/cd_engine.cc

    r10033 r10618  
    2222#include "model.h"
    2323#include "world_entity.h"
    24 #include "terrain.h"
     24#include "environments/terrain.h"
    2525// #include "player.h"
    2626
     
    3030
    3131#include "bsp/bsp_manager.h"
    32 #include "bsp_entity.h"
     32#include "environments/bsp_entity.h"
    3333
    3434
  • trunk/src/lib/collision_detection/obb_tree_node.cc

    r10033 r10618  
    629629    PRINTF(5)("s = %f, rA+rB = %f\n", fabs(t.dot(l)), rA+rB);
    630630
     631    //TODO valgrind complains about uninitialised value here
    631632    if( (rA + rB) < fabs(t.dot(l)))
    632633    {
  • trunk/src/lib/collision_reaction

    • Property svn:ignore set to
      .deps
      *.a
      Makefile.in
      Makefile
  • trunk/src/lib/collision_reaction/cr_engine.h

    r10013 r10618  
    6262      CR_COLLISION_TYPE_AXIS_Z,            //!< collision on z axis
    6363      CR_COLLISION_TYPE_AXIS_Z_NEG,        //!< collision on negative z axis
     64      CR_COLLISION_TYPE_WAY,               //!< collision on the way from last to current position
    6465      CR_COLLISION_TYPE_OBB,               //!< object aligned bounding box collide
    6566
  • trunk/src/lib/collision_reaction/cr_physics_full_walk.cc

    r10013 r10618  
    163163
    164164
     165 case CoRe::CREngine::CR_COLLISION_TYPE_WAY:
     166          // calulate the height above ground
     167          height = collPos.len() - box->halfLength[1];
     168
     169
     170          // object is beneath the plane (ground)
     171          //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
     172          if( height < 0.0f  )
     173          {
     174            entity->shiftCoor(Vector(0.0f, -height + 0.5f, 0.0f));
     175            entity->setOnGround(true);
     176          }
     177          // object is already in the wall
     178          else if( ce->isInWall())
     179          {
     180            entity->setAbsCoor(entity->getLastAbsCoor());
     181            PRINTF(0)("ground collision: reset pos\n");
     182          }
     183          else
     184          {
     185            // entity is not on ground
     186            entity->setOnGround(false);
     187          }
     188          break;
     189
     190
    165191          /* collision in the Z-AXIS */
    166192        case CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z:
  • trunk/src/lib/event/key_mapper.cc

    r9880 r10618  
    2323#include "event_def.h"
    2424
    25 #include "globals.h"
     25#include "orxonox_globals.h"
    2626#include "parser/ini_parser/ini_parser.h"
    2727#include "parser/preferences/preferences.h"
  • trunk/src/lib/graphics/Makefile.am

    r9869 r10618  
    2525
    2626noinst_HEADERS =\
     27                glincl.h \
    2728                graphics_engine.h \
    2829                graphics_effect.h \
     
    4647
    4748
     49
    4850SUBDIRS =       importer \
    4951                spatial_separation
  • trunk/src/lib/graphics/graphics_engine.cc

    r10320 r10618  
    3131#include "text.h"
    3232
    33 #include "globals.h"
     33#include "orxonox_globals.h"
    3434#include "texture.h"
    3535
  • trunk/src/lib/graphics/importer/bsp/bsp_manager.cc

    r10519 r10618  
    3030#include "debug.h"
    3131#include "material.h"
    32 #include "camera.h"
     32#include "tools/camera.h"
    3333#include "vertex_array_model.h"
    3434#include "world_entities/player.h"
     
    982982  float endDistance = end->dot(node->plane) - node->d;
    983983  float startDistance = start->dot(node->plane) - node->d;
    984 
    985 
     984 
    986985  if( node->isLeaf) {
    987986    leaf& curLeaf = this->bspFile->leaves[node->leafIndex];
     
    999998  }
    1000999
    1001 
     1000  //TODO valgrind complains about uninitialised value here
    10021001  if (startDistance >= 0 && endDistance >= 0)     // A
    10031002  {   // both points are in front of the plane
     
    11021101  this->outputFraction = 1.0f;
    11031102
    1104 
    11051103  this->checkCollisionX(worldEntity);
    1106   this->checkCollisionY(worldEntity);
    11071104  this->checkCollisionZ(worldEntity);
     1105
     1106  if(!(this->checkCollisionY(worldEntity)))
     1107  this->checkCollisionWay(worldEntity);
    11081108
    11091109
     
    12881288 * check the collision in the x direction (forward, backward)
    12891289 */
    1290 void BspManager::checkCollisionX(WorldEntity* entity)
     1290bool BspManager::checkCollisionX(WorldEntity* entity)
    12911291{
    12921292  // Retrieve Bounding box
     
    13981398                              SolidFlag);
    13991399  }
     1400
     1401 return (xCollisionBackward || xCollisionForward);
    14001402}
    14011403
     
    14041406 * check the collision in the z direction (up, down)
    14051407 */
    1406 void BspManager::checkCollisionY(WorldEntity* entity)
     1408bool BspManager::checkCollisionY(WorldEntity* entity)
    14071409{
    14081410
     
    15461548                              collPos, SolidFlag);
    15471549  }
     1550
     1551 return (yCollisionUp || yCollisionDown);
    15481552}
    15491553
     
    15541558 * check the collision in the z direction (left, right)
    15551559 */
    1556 void BspManager::checkCollisionZ(WorldEntity* entity)
     1560bool BspManager::checkCollisionZ(WorldEntity* entity)
    15571561{
    15581562  // Retrieve Bounding box
     
    16641668                               collPos , SolidFlag);
    16651669  }
     1670
     1671 return (zCollisionLeft || zCollisionRight);
     1672
     1673}
     1674
     1675
     1676
     1677
     1678/**
     1679 * check wether a collision occured on the way from the last position to the current position
     1680 */
     1681bool BspManager::checkCollisionWay(WorldEntity* entity)
     1682{
     1683
     1684
     1685 
     1686  plane*            testPlane          = NULL;  //!< the collision test plane
     1687  Vector            to;
     1688  Vector            collPos;                    //!< the collision position
     1689
     1690  bool              yCollisionUp       = false; //!< flag true if right collision
     1691  bool              SolidFlag          = false; //!< flag set true if solid
     1692
     1693  Vector            from;                   //!< current position of the entity
     1694  Vector            dirY;                       //!< direction x
     1695
     1696  from = entity->getLastAbsCoor();
     1697  to    = entity->getAbsCoor();
     1698  collPos = from;
     1699  dirY =  Vector(0.0, 1.0, 0.0);
     1700
     1701
     1702
     1703
     1704  /*   Y Ray up */
     1705  // init some member variables before collision check
     1706  this->inputStart = from;
     1707  this->inputEnd   = to;
     1708  this->checkCollisionRayN(this->root,0.0f,1.0f, &from, &to );
     1709
     1710  if( !this->outputStartsOut )
     1711  {
     1712    this->collPlane = new plane;
     1713    this->collPlane->x = 0.0f;
     1714    this->collPlane->y = 0.0f;
     1715    this->collPlane->z = 0.0f;
     1716    yCollisionUp = true;
     1717  }
     1718  else
     1719  {
     1720    if( this->outputFraction == 1.0f)
     1721    {
     1722      if( this->outputAllSolid )
     1723      {
     1724        this->collPlane = new plane;
     1725        this->collPlane->x = 0.0f;
     1726        this->collPlane->y = 0.0f;
     1727        this->collPlane->z = 0.0f;
     1728        yCollisionUp = true;
     1729        SolidFlag = true;
     1730      }
     1731      else
     1732      {
     1733        yCollisionUp = false;
     1734        collPos = to;
     1735      }
     1736    }
     1737    else
     1738    {
     1739      yCollisionUp = true;
     1740      collPos = from + (to - from) * this->outputFraction;
     1741      this->out = collPos;        // why this????
     1742    }
     1743  }
     1744  testPlane = this->collPlane;
     1745
     1746  // collision registration
     1747  if( yCollisionUp)
     1748  {
     1749    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_WAY,
     1750                              entity, this->parent,
     1751                              Vector(testPlane->x, testPlane->y, testPlane->z),
     1752                              collPos, SolidFlag);
     1753  }
     1754
     1755 return yCollisionUp;
    16661756
    16671757}
  • trunk/src/lib/graphics/importer/bsp/bsp_manager.h

    r10519 r10618  
    8888  void  checkCollisionRayN(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end);
    8989
    90   void checkCollisionX(WorldEntity* entity);
    91   void checkCollisionY(WorldEntity* entity);
    92   void checkCollisionZ(WorldEntity* entity);
     90  bool checkCollisionX(WorldEntity* entity);
     91  bool checkCollisionY(WorldEntity* entity);
     92  bool checkCollisionZ(WorldEntity* entity);
     93  bool checkCollisionWay(WorldEntity* entity);
    9394
    9495  void  checkCollisionBox(void);
  • trunk/src/lib/graphics/light.h

    r9869 r10618  
    102102  void setAmbientColor(GLfloat r, GLfloat g, GLfloat b);
    103103  // HACK: Assuming r = g = b values
    104 inline GLfloat getAmbientColor() {  return this->ambientColor[0]; }
     104  // SOLVED: nobody uses it anyway
     105  // inline GLfloat getAmbientColor() {  return this->ambientColor[0]; }
    105106
    106107  Light* getLight(int lightNumber) const;
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r9869 r10618  
    2424#include "state.h"
    2525#include "p_node.h"
    26 #include "camera.h"
     26#include "tools/camera.h"
    2727///////////////////////////
    2828
  • trunk/src/lib/gui/qt/gui_audio.cc

    r8145 r10618  
    3030#include <QtGui/QLCDNumber>
    3131#include "debug.h"
    32 #include "globals.h"
     32#include "orxonox_globals.h"
    3333
    3434#include "qt_gui_elements.h"
  • trunk/src/lib/gui/qt/gui_control.cc

    r8495 r10618  
    3535#include "lib/event/key_names.h"
    3636
    37 #include "globals.h"
     37#include "orxonox_globals.h"
    3838#include "debug.h"
    3939#include "qt_gui_elements.h"
  • trunk/src/lib/gui/qt/gui_general.cc

    r8145 r10618  
    3131
    3232#include "debug.h"
    33 #include "globals.h"
     33#include "orxonox_globals.h"
    3434
    3535#include "qt_gui_elements.h"
  • trunk/src/lib/gui/qt/gui_video.cc

    r9406 r10618  
    2828
    2929#include <QtGui/QLayout>
    30 #include "globals.h"
     30#include "orxonox_globals.h"
    3131#include "debug.h"
    3232
  • trunk/src/lib/lang

    • Property svn:ignore set to
      *.a
      .deps
      Makefile.in
      Makefile

  • trunk/src/lib/math/curve.h

    r10368 r10618  
    1010#define _CURVE_H
    1111
     12#include <list>
    1213#include "vector.h"
    1314#include "quaternion.h"
    14 
    15 template<class T> class tList;
    16 template<class T> class tIterator;
    1715
    1816//! An Enumerator that defines what sort of Curves are availible
     
    7371  Curve*                dirCurve;        //!< The derivation-curve of this Curve.
    7472
    75   tList<PathNode>*      nodeList;        //!< A list of all the Nodes of a Curve.
    76   tIterator<PathNode>*  nodeIterator;    //!< An iterator that should point to the current Node
     73  std::list<PathNode>   nodeList;        //!< A list of all the Nodes of a Curve.
    7774  PathNode*             firstNode;       //!< First node of the curve.
    7875  PathNode*             currentNode;     //!< The node we are working with (the Last node).
     
    105102
    106103
    107 //! B-Spline
    108 /**
    109    class to handle b-spline in 3d space
    110 */
    111 class BSplieCurve : public Curve
    112 {
    113 
    114 
    115 };
    116 
    117104#endif /* _CURVE_H */
  • trunk/src/lib/parser/cmdline_parser

    • Property svn:ignore
      •  

        old new  
        22Makefile.in
        33.deps
        4 libORX*
         4*.a
  • trunk/src/lib/physics/physics_interface.cc

    r9869 r10618  
    2727
    2828#include "string.h"
    29 #include "stdincl.h"
    3029
    3130
  • trunk/src/lib/script_engine

    • Property svn:ignore set to
      *.a
      Makefile.in
      Makefile
      .deps

  • trunk/src/lib/script_engine/Makefile.am

    r9916 r10618  
    2828                script_method.h \
    2929                executor_lua_state.h
    30 
    31 
    32 
    33 
    34 check_PROGRAMS = example
    35 example_DEPENDENCIES = \
    36                 $(MAINSRCDIR)/world_entities/libORXwe.a \
    37                 $(libORXlibs_a_LIBRARIES_) \
    38                 $(MAINSRCDIR)/util/libORXutils.a
    39 example_LDADD = \
    40                 $(MAINSRCDIR)/util/libORXutils.a \
    41                 $(libORXlibs_a_LIBRARIES_) \
    42                 libORXscript.a -L../../../extern_libs @LUA_LIBS@ \
    43                 $(MAINSRCDIR)/world_entities/libORXwe.a \
    44                 $(libORXlibs_a_LIBRARIES_) \
    45                 $(MAINSRCDIR)/util/libORXutils.a
    46 
    47 example_SOURCES= \
    48                 example.cc \
    49                 \
    50                 ../util/executor/executor_lua.cc
  • trunk/src/lib/script_engine/script_manager.cc

    r9869 r10618  
    2525
    2626#include "script.h"
    27 #include "script_trigger.h"
     27#include "tools/script_trigger.h"
    2828#include "luaincl.h"
    2929#include "loading/load_param_xml.h"
  • trunk/src/lib/shell/shell_input.cc

    r9916 r10618  
    2424#include "compiler.h"
    2525#include "key_names.h"
     26
     27#include "game_world.h"
     28#include "state.h"
    2629
    2730
     
    284287  {
    285288    if (this->delayed > 0.0)
    286       this->delayed -= dt;
     289    {
     290      StoryEntity* storyEntity = State::getCurrentStoryEntity();
     291      float speed = 1;
     292      if ( storyEntity && storyEntity->isA( GameWorld::staticClassID() ) )
     293      {
     294        speed = ((GameWorld*)storyEntity)->getSpeed();
     295      }
     296      this->delayed -= dt / speed;
     297    }
    287298    else if (this->pressedKey != SDLK_FIRST )
    288299    {
  • trunk/src/lib/sound/Makefile.am

    r9869 r10618  
    1111                        ogg_player.cc
    1212
    13 noinst_HEADERS = sound_engine.h \
    14                  sound_source.h \
    15                  sound_buffer.h \
    16                  sound_buffer_data.h \
    17                  resource_sound_buffer.h \
    18                  ogg_player.h
     13noinst_HEADERS = \
     14                alincl.h \
     15                sound_engine.h \
     16                sound_source.h \
     17                sound_buffer.h \
     18                sound_buffer_data.h \
     19                resource_sound_buffer.h \
     20                ogg_player.h
  • trunk/src/lib/sound/ogg_player.cc

    r9869 r10618  
    7979  bool OggPlayer::open(const std::string& fileName)
    8080  {
    81     OrxThread::MutexLock musicLock(&this->musicMutex);
     81    OrxThread::MutexLocker musicLock(&this->musicMutex);
    8282    // release old Ogg-File (if loaded)
    8383    if (this->state & OggPlayer::FileOpened)
     
    212212    if (this->state & OggPlayer::FileOpened)
    213213    {
    214       OrxThread::MutexLock musicLock(&this->musicMutex);
     214      OrxThread::MutexLocker musicLock(&this->musicMutex);
    215215      ov_time_seek(&this->oggStream, timeCode);
    216216    }
     
    263263    {
    264264      {
    265         OrxThread::MutexLock musicLock(&ogg->musicMutex);
     265        OrxThread::MutexLocker musicLock(&ogg->musicMutex);
    266266        ogg->update();
    267267      }
     
    286286    this->state |= OggPlayer::Playing;
    287287
    288     OrxThread::MutexLock musicLock(&this->musicMutex);
     288    OrxThread::MutexLocker musicLock(&this->musicMutex);
    289289    if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1]))
    290290    {
  • trunk/src/lib/sound/ogg_player.h

    r9869 r10618  
    1313#include <ogg/ogg.h>
    1414#include <vorbis/vorbisfile.h>
    15 #include "util/threading.h"
     15#include "util/threads/mutex_locker.h"
    1616
    1717struct File;
  • trunk/src/lib/sound/sound_engine.cc

    r9869 r10618  
    2424#include "debug.h"
    2525#include "parser/preferences/preferences.h"
    26 #include "globals.h"
     26#include "orxonox_globals.h"
    2727#include "resource_sound_buffer.h"
    2828
  • trunk/src/lib/sound/sound_engine.h

    r9869 r10618  
    1515#include <list>
    1616#include <stack>
    17 #include "threading.h"
     17#include "threads/mutex.h"
    1818
    1919#define SOUND_DOPPLER_FACTOR       0.001          //!< A factor for the audible doppler effect
  • trunk/src/lib/util

    • Property svn:ignore set to
      .deps
      Makefile
      Makefile.in
      *.a
  • trunk/src/lib/util/Makefile.am

    r9869 r10618  
    2929                filesys/net_link.cc \
    3030                \
    31                 threading.cc \
     31                threads/thread.cc \
    3232                timer.cc
    3333
     
    6363                filesys/net_link.h \
    6464                \
    65                 threading.h \
     65                threads/threading.h \
     66                threads/thread.h \
     67                threads/mutex.h \
     68                threads/mutex_locker.h \
     69                \
    6670                timer.h \
    6771                \
     
    7781                loading/dynamic_loader.h \
    7882                \
    79                 count_pointer.h \
    80                 list.h
     83                count_pointer.h
  • trunk/src/lib/util/debug_buffer.cc

    r9869 r10618  
    2020#include "debug.h"
    2121#include "compiler.h"
    22 #include "threading.h"
     22#include "threads/mutex_locker.h"
    2323
    2424/**
     
    6464  static OrxThread::Mutex DebugBuffer__bufferMutex;
    6565
    66   OrxThread::MutexLock bufferLock(&DebugBuffer__bufferMutex);
     66  OrxThread::MutexLocker bufferLock(&DebugBuffer__bufferMutex);
    6767
    6868  va_list arguments;
  • trunk/src/lib/util/filesys/net_link.cc

    r9406 r10618  
    1717#include "debug.h"
    1818
     19#include "threads/mutex_locker.h"
    1920
    2021#ifdef __OSX__
     
    4546int NetLink::openupInBrowser(void* url)
    4647{
    47   OrxThread::MutexLock lock(&NetLink::_mutex);
     48  OrxThread::MutexLocker lock(&NetLink::_mutex);
    4849
    4950  std::string URL = *(std::string*)url;
     
    6970void NetLink::setDefaultBrowser(const std::string& browserName)
    7071{
    71   OrxThread::MutexLock lock(&NetLink::_mutex);
     72  OrxThread::MutexLocker lock(&NetLink::_mutex);
    7273  NetLink::_defaultBrowser = browserName;
    7374}
  • trunk/src/lib/util/filesys/net_link.h

    r9406 r10618  
    1919#include <list>
    2020
    21 #include "threading.h"
     21#include "threads/mutex.h"
    2222
    2323//! NetLink is a File and Link executer for Internet Links
  • trunk/src/lib/util/loading/game_loader.cc

    r9869 r10618  
    2323#include "debug.h"
    2424#include "campaign.h"
     25#include "compiler.h"
    2526
    2627#include "key_mapper.h"
  • trunk/src/lib/util/loading/game_loader.h

    r9869 r10618  
    99//#include "stdincl.h"
    1010#include "story_def.h"
    11 #include "comincl.h"
    1211#include "event_listener.h"
    1312
  • trunk/src/orxonox.cc

    r10317 r10618  
    2828#include "orxonox.h"
    2929
    30 #include "globals.h"
     30#include "orxonox_globals.h"
    3131
    3232#include "gui/qt/qt_gui.h"
     
    4646
    4747#include "loading/fast_factory.h"
    48 
    49 #include "subprojects/benchmark.h"
    5048
    5149#include "shell_command_class.h"
  • trunk/src/story_entities/game_world.cc

    r10523 r10618  
    2727
    2828#include "player.h"
    29 #include "camera.h"
    30 #include "environment.h"
    31 #include "terrain.h"
    32 #include "test_entity.h"
    33 #include "terrain.h"
     29#include "tools/camera.h"
     30#include "tools/cameraman.h"
     31#include "environments/environment.h"
     32#include "environments/terrain.h"
    3433#include "playable.h"
    3534#include "environments/mapped_water.h"
     
    193192  this->dataXML = (TiXmlElement*)root->Clone();
    194193
    195   //remove this after finished testing !!!!
    196   //Object* obj= new Object();
    197   //obj->setName("Obj");
    198   //Account* a = new Account();
    199   //a->setName("a");
    200   //Account *b = new Account(30);
    201   //b->setName("b");
    202 
    203 
    204194  LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams);
    205195
     
    454444
    455445    // tick camera first
    456     CameraMan* man = State::getCameraman();
    457     (man->getCurrentCam())->tick(this->dtS);
     446    (State::getCamera())->tick(this->dtS);
    458447    // TICK everything
    459448    for (i = 0; i < this->dataTank->tickLists.size(); ++i)
     
    590579void GameWorld::applyCameraSettings()
    591580{
    592   CameraMan* man = State::getCameraman();
    593   Camera* c = man->getCurrentCam();
     581  Camera* c = State::getCamera();
     582
    594583  if( c != NULL)
    595584  {
  • trunk/src/story_entities/game_world.h

    r10428 r10618  
    5656  inline double getGameTime() { return this->gameTime; }
    5757  /** sets the game speed @param speed speed of the Game */
    58   inline void setSpeed(float speed) { this->speed = speed; };
     58  inline void setSpeed(float speed) { this->speed = speed; }
     59  inline float getSpeed(){ return this->speed; }
    5960  /**  returns the track path of this world @returns the track path */
    6061
  • trunk/src/story_entities/game_world_data.cc

    r10513 r10618  
    2929#include "world_entity.h"
    3030#include "player.h"
    31 #include "camera.h"
    32 #include "cameraman.h"
    33 #include "terrain.h"
    34 #include "skybox.h"
     31#include "tools/camera.h"
     32#include "tools/cameraman.h"
     33#include "environments/terrain.h"
     34#include "environments/skybox.h"
    3535#include "md2/md2Model.h"
    3636#include "world_entities/projectiles/projectile.h"
     
    101101  PNode::getNullParent();
    102102  Camera* localCamera = new Camera();
    103     localCamera->setName ("GameWorld-Camera");
     103    localCamera->setName ("GameWorldCamera");
    104104  State::setCamera(localCamera, localCamera->getTarget());
    105105  //CameraMan* camMan = new CameraMan();
     
    205205
    206206    glmis->setBackgroundImage("textures/load_screens/default.jpg");
     207    glmis->setPosScale(0.0,0.0,1.0,1.0);
     208    glmis->setBarImage("textures/load_screens/default_bar.png");
     209    glmis->setBarPosScale(0.65,0.87,0.3,0.05);
     210
    207211    this->glmis->setMaximum(8);
    208212    //     this->glmis->draw();
  • trunk/src/story_entities/menu/game_menu.cc

    r10403 r10618  
    2727
    2828#include "graphics_engine.h"
    29 #include "camera.h"
     29#include "tools/camera.h"
    3030#include "sound_engine.h"
    3131
  • trunk/src/story_entities/multi_player_world_data.cc

    r10114 r10618  
    2727#include "world_entity.h"
    2828#include "player.h"
    29 #include "camera.h"
    30 #include "environment.h"
    31 #include "terrain.h"
    32 #include "test_entity.h"
    33 #include "terrain.h"
    34 #include "md2/md2Model.h"
     29#include "tools/camera.h"
     30#include "environments/environment.h"
     31#include "environments/terrain.h"
    3532#include "world_entities/projectiles/projectile.h"
    3633#include "npcs/npc_test1.h"
  • trunk/src/subprojects/collision_detection/collision_detection.cc

    r8490 r10618  
    2828#include "model.h"
    2929#include "collision_test_entity.h"
    30 #include "list.h"
    3130
    3231#include "graphics_engine.h"
  • trunk/src/subprojects/particles/Makefile.am

    r6302 r10618  
    55bin_PROGRAMS = particles
    66
    7 particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a \
    8                   $(MAINSRCDIR)/lib/event/libORXevent.a \
    9                   $(MAINSRCDIR)/lib/particles/libORXparticles.a \
    10                   $(MAINSRCDIR)/lib/shell/libORXshell.a \
    11                   $(MAINSRCDIR)/lib/sound/libORXsound.a \
    12                   $(MAINSRCDIR)/lib/graphics/libORXgraphics.a \
    13                   $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a \
    14                   $(MAINSRCDIR)/lib/physics/libORXphysics.a \
    15                   $(MAINSRCDIR)/lib/tinyxml/libtinyxml.a \
    16                   $(MAINSRCDIR)/lib/collision_detection/libORXcd.a \
    17                   $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    18 
     7particles_LDADD =
    198particles_CPPFLAGS =  -DGUI_MODULE  \
    209                      $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    2110
    2211particles_SOURCES= ../framework.cc \
    23                    particle_fun.cc \
    24                    $(MAINSRCDIR)/lib/graphics/light.cc \
    25                    $(MAINSRCDIR)/util/state.cc \
    26                    $(MAINSRCDIR)/world_entities/camera.cc \
    27                    $(MAINSRCDIR)/world_entities/world_entity.cc \
    28                    $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
    29                    $(MAINSRCDIR)/lib/lang/base_object.cc \
    30                    $(MAINSRCDIR)/lib/lang/class_list.cc \
    31                    $(MAINSRCDIR)/lib/math/vector.cc \
    32                    $(MAINSRCDIR)/util/loading/resource_manager.cc \
    33                    $(MAINSRCDIR)/lib/coord/p_node.cc \
    34                    $(MAINSRCDIR)/lib/gui/gtk_gui/gui_gtk.cc \
    35                    $(MAINSRCDIR)/lib/util/substring.cc \
    36                    $(MAINSRCDIR)/util/loading/load_param.cc \
    37                    $(MAINSRCDIR)/util/loading/load_param_description.cc \
    38                    $(MAINSRCDIR)/lib/util/helper_functions.cc \
    39                    $(MAINSRCDIR)/util/loading/factory.cc \
    40                    $(MAINSRCDIR)/lib/util/color.cc \
    41                    $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc
    42 
     12                   particle_fun.cc
  • trunk/src/util/Makefile.am

    r10368 r10618  
    2626                        animation/animation_player.cc \
    2727                        \
    28                         track/pilot_node.cc \
    29                         track/track.cc \
    30                         track/track_manager.cc \
    31                         track/track_node.cc
     28                        track/track.cc
    3229
    3330noinst_HEADERS =        \
     
    5249                        animation/t_animation.h \
    5350                        \
    54                         track/pilot_node.h \
    55                         track/track.h \
    56                         track/track_manager.h \
    57                         track/track_node.h
    58 
     51                        track/track.h
  • trunk/src/util/animation/animation.h

    r9869 r10618  
    1010#include "debug.h"
    1111
    12 #include "list.h"
     12#include <list>
    1313// FORWARD DECLARATION
    1414
  • trunk/src/util/animation/animation3d.cc

    r9406 r10618  
    3535
    3636  // create a new List
    37   this->keyFrameList = new tList<KeyFrame3D>();
    38   KeyFrame3D* tmpKeyFrame = new KeyFrame3D;
    39   tmpKeyFrame->position = Vector();
    40   tmpKeyFrame->direction = Quaternion();
    41   keyFrameList->add(tmpKeyFrame);
    42 
    43   this->currentKeyFrame = tmpKeyFrame;
    44   this->nextKeyFrame = tmpKeyFrame;
     37  KeyFrame3D tmpKeyFrame;
     38  keyFrameList.push_back(tmpKeyFrame);
     39
     40  this->currentKeyFrame = keyFrameList.begin();
     41  this->nextKeyFrame = keyFrameList.begin();
    4542
    4643  this->animFuncMov = NULL;//&Animation3D::mLinear;
    4744  this->animFuncRot = NULL;//&Animation3D::rLinear;
    48 
    4945}
    5046
     
    5652Animation3D::~Animation3D()
    5753{
    58   // delete all the KeyFrames
    59   tIterator<KeyFrame3D>* itKF = keyFrameList->getIterator();
    60   KeyFrame3D*  enumKF = itKF->firstElement();
    61   while (enumKF)
    62     {
    63       delete enumKF;
    64       enumKF = itKF->nextElement();
    65     }
    66   delete itKF;
    67   delete this->keyFrameList;
    6854}
    6955
     
    7359void Animation3D::rewind()
    7460{
    75   this->currentKeyFrame = keyFrameList->firstElement();
    76   this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement());
     61  this->currentKeyFrame = keyFrameList.begin();
     62  this->nextKeyFrame = keyFrameList.begin()++;
    7763  this->localTime = 0.0;
    78   this->setAnimFuncMov(this->currentKeyFrame->animFuncMov);
    79   this->setAnimFuncRot(this->currentKeyFrame->animFuncRot);
     64  this->setAnimFuncMov((*this->currentKeyFrame).animFuncMov);
     65  this->setAnimFuncRot((*this->currentKeyFrame).animFuncRot);
    8066}
    8167
     
    10086//    animFuncRot = animFuncMov;
    10187
    102   KeyFrame3D* tmpKeyFrame;
     88  KeyFrame3D& tmpKeyFrame = keyFrameList.front();
    10389
    10490  // when adding the first frame
    10591  if (this->keyFrameCount == 0)
    10692    {
    107       tmpKeyFrame = this->keyFrameList->firstElement();
    10893      //this->setAnimFuncMov(animFuncMov);
    10994      //this->setAnimFuncRot(animFuncRot);
     
    11196  else
    11297    {
    113       tmpKeyFrame = new KeyFrame3D;
    11498      // when adding the second frame
     99      this->keyFrameList.push_back(KeyFrame3D());
    115100      if (this->currentKeyFrame == this->nextKeyFrame)
    116         this->nextKeyFrame = tmpKeyFrame;
    117       this->keyFrameList->add(tmpKeyFrame);
     101        this->nextKeyFrame = --keyFrameList.end();
    118102    }
    119103
    120   tmpKeyFrame->position = position;
     104  tmpKeyFrame.position = position;
    121105  //tmpKeyFrame->lastPosition = position;
    122   tmpKeyFrame->direction = direction;
    123   tmpKeyFrame->duration = duration;
    124   tmpKeyFrame->animFuncMov = animFuncMov;
    125   tmpKeyFrame->animFuncRot = animFuncRot;
     106  tmpKeyFrame.direction = direction;
     107  tmpKeyFrame.duration = duration;
     108  tmpKeyFrame.animFuncMov = animFuncMov;
     109  tmpKeyFrame.animFuncRot = animFuncRot;
    126110  this->keyFrameCount++;
    127111}
     
    146130              this->currentKeyFrame = this->nextKeyFrame;
    147131              // checking, if we should still Play the animation
    148               if (this->currentKeyFrame == this->keyFrameList->lastElement())
     132              if (this->currentKeyFrame == --this->keyFrameList.end())
    149133                this->handleInfinity();
    150               this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
     134              this->nextKeyFrame = this->currentKeyFrame;
     135              this->nextKeyFrame++;
    151136              this->setAnimFuncMov(this->currentKeyFrame->animFuncMov);
    152137              this->setAnimFuncRot(this->currentKeyFrame->animFuncRot);
  • trunk/src/util/animation/animation3d.h

    r6616 r10618  
    1616   This represents one point with direction of the animation
    1717*/
    18 typedef struct KeyFrame3D {
     18typedef struct KeyFrame3D
     19{
    1920  float             duration;              //!< The duration of this KeyFrame
    2021  Vector            position;              //!< The position of this KeyFrame
     
    3132class Animation3D : public Animation
    3233{
    33  public:
     34public:
    3435  Animation3D(PNode* object);
    3536  virtual ~Animation3D();
     
    4445  virtual void tick(float dt);
    4546
    46  private:
     47private:
    4748  // animation functions
    4849  void setAnimFuncMov(ANIM_FUNCTION animFunc);
     
    6970
    7071
    71  private:
    72   KeyFrame3D*          currentKeyFrame;               //!< The current KeyFrame
    73   KeyFrame3D*          nextKeyFrame;                  //!< The KeyFrame we iterate to
    74   tList<KeyFrame3D>*   keyFrameList;                  //!< The KeyFrameList
     72private:
     73  typedef std::list<KeyFrame3D>  KeyFrameList;        //!< A Type definition for th KeyFrame List
     74  typedef KeyFrameList::iterator KeyFrameIterator;        //!< A Type definition for th KeyFrame List
     75
     76  KeyFrameIterator     currentKeyFrame;               //!< The current KeyFrame
     77  KeyFrameIterator     nextKeyFrame;                  //!< The KeyFrame we iterate to
     78  KeyFrameList         keyFrameList;                  //!< The KeyFrameList
    7579
    7680
  • trunk/src/util/animation/t_animation.h

    r8315 r10618  
    11/*
    22   orxonox - the future of 3D-vertical-scrollers
    3 
     3 
    44   Copyright (C) 2004 orx
    5 
     5 
    66   This program is free software; you can redistribute it and/or modify
    77   it under the terms of the GNU General Public License as published by
    88   the Free Software Foundation; either version 2, or (at your option)
    99   any later version.
    10 
     10 
    1111   ### File Specific:
    1212   main-programmer: Benjamin Grauer
     
    3737template<class T> class tAnimation : public Animation
    3838{
    39  public:
     39public:
    4040  tAnimation(T* object = NULL, void (T::*funcToAnim)(float) = NULL);
    41   virtual ~tAnimation();
    4241
    4342  void setFuncToAnim(T* object, void (T::*funcToAnim)(float));
     
    4847  virtual void tick(float dt);
    4948
    50  private:
     49private:
    5150  // animation functions
    5251  void setAnimFunc(ANIM_FUNCTION animFunc);
     
    6160
    6261
     62private:
     63  typedef std::list<KeyFrameF> KeyFrameList;
     64  typedef typename KeyFrameList::iterator KeyFrameIterator;
     65
    6366  //  ANIM_FUNCTION animFunc
    6467  float (tAnimation<T>::*animFunc)(float) const;  //!< A Function for the AnimationType
    6568
    66   KeyFrameF* currentKeyFrame;                     //!< The current KeyFrame
    67   KeyFrameF* nextKeyFrame;                        //!< The KeyFrame we iterate to
    68   tList<KeyFrameF>* keyFrameList;                 //!< The KeyFrameList
     69  KeyFrameIterator  currentKeyFrame;                     //!< The current KeyFrame
     70  KeyFrameIterator  nextKeyFrame;                        //!< The KeyFrame we iterate to
     71  KeyFrameList      keyFrameList;                 //!< The KeyFrameList
    6972
    7073  T* object;                                      //!< The Object from which to Animate something
     
    8386{
    8487  // create a new List
    85   this->keyFrameList = new tList<KeyFrameF>();
    86   KeyFrameF* tmpKeyFrame = new KeyFrameF;
    87   tmpKeyFrame->value = 0.0;
    88   tmpKeyFrame->duration = 1.0;
    89   keyFrameList->add(tmpKeyFrame);
    90 
    91   this->currentKeyFrame = tmpKeyFrame;
    92   this->nextKeyFrame = tmpKeyFrame;
     88  KeyFrameF tmpKeyFrame;
     89  tmpKeyFrame.value = 0.0;
     90  tmpKeyFrame.duration = 1.0;
     91  keyFrameList.push_back(tmpKeyFrame);
     92
     93  this->currentKeyFrame = keyFrameList.begin();
     94  this->nextKeyFrame = keyFrameList.begin();
    9395
    9496  this->animFunc = &tAnimation<T>::linear;
     
    99101
    100102/**
    101  *  standard deconstructor
    102 
    103    deletes all the Keyframes
    104 */
    105 template<class T>
    106 tAnimation<T>::~tAnimation ()
    107 {
    108   // delete all the KeyFrames
    109   tIterator<KeyFrameF>* itKF = keyFrameList->getIterator();
    110   KeyFrameF*  enumKF = itKF->firstElement();
    111   while (enumKF)
    112     {
    113       delete enumKF;
    114       enumKF = itKF->nextElement();
    115     }
    116   delete itKF;
    117   delete this->keyFrameList;
    118 }
    119 
    120 /**
    121103 *  rewinds the Animation to the beginning (first KeyFrame and time == 0)
    122104*/
     
    124106void tAnimation<T>::rewind()
    125107{
    126   this->currentKeyFrame = keyFrameList->firstElement();
    127   this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement());
     108  this->currentKeyFrame = keyFrameList.begin();
     109  this->nextKeyFrame = ++keyFrameList.begin();
    128110  this->localTime = 0.0;
    129   this->setAnimFunc(this->currentKeyFrame->animFunc);
     111  this->setAnimFunc((*this->currentKeyFrame).animFunc);
    130112}
    131113
     
    157139    animFunc = ANIM_DEFAULT_FUNCTION;
    158140
    159   KeyFrameF* tmpKeyFrame;
     141  KeyFrameF& tmpKeyFrame = keyFrameList.front();
    160142
    161143  // when adding the first frame
    162144  if (this->keyFrameCount == 0)
    163     {
    164       tmpKeyFrame = this->keyFrameList->firstElement();
    165       this->setAnimFunc(animFunc);
    166     }
     145  {
     146    this->setAnimFunc(animFunc);
     147  }
    167148  else
    168     {
    169       tmpKeyFrame = new KeyFrameF;
    170       // when adding the second frame
    171       if (this->currentKeyFrame == this->nextKeyFrame)
    172         this->nextKeyFrame = tmpKeyFrame;
    173       this->keyFrameList->add(tmpKeyFrame);
    174     }
    175 
    176   tmpKeyFrame->value = value;
    177   tmpKeyFrame->duration = duration;
    178   tmpKeyFrame->animFunc = animFunc;
     149  {
     150    this->keyFrameList.push_back(KeyFrameF());
     151    tmpKeyFrame = keyFrameList.back();
     152    // when adding the second frame
     153    if (this->currentKeyFrame == this->nextKeyFrame)
     154      this->nextKeyFrame = --keyFrameList.end();
     155  }
     156
     157  tmpKeyFrame.value = value;
     158  tmpKeyFrame.duration = duration;
     159  tmpKeyFrame.animFunc = animFunc;
    179160  this->keyFrameCount++;
    180161}
     
    188169{
    189170  if (this->bRunning)
     171  {
     172    this->localTime += dt;
     173    if (localTime >= this->currentKeyFrame->duration)
    190174    {
    191       this->localTime += dt;
    192       if (localTime >= this->currentKeyFrame->duration)
    193         {
    194           if (likely(this->keyFramesToPlay != 0))
    195             {
    196               if (unlikely(this->keyFramesToPlay > 0))
    197                 --this->keyFramesToPlay;
    198               // switching to the next Key-Frame
    199               this->localTime -= this->currentKeyFrame->duration;
    200 
    201               this->currentKeyFrame = this->nextKeyFrame;
    202               // checking, if we should still Play the animation
    203               if (this->currentKeyFrame == this->keyFrameList->lastElement())
    204                 this->handleInfinity();
    205               this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
    206 
    207               //printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
    208               this->setAnimFunc(this->currentKeyFrame->animFunc);
    209             }
    210           else
    211             this->pause();
    212         }
    213 
    214       (this->object->*(funcToAnim))((this->*animFunc)(this->localTime));
     175      if (likely(this->keyFramesToPlay != 0))
     176      {
     177        if (unlikely(this->keyFramesToPlay > 0))
     178          --this->keyFramesToPlay;
     179        // switching to the next Key-Frame
     180        this->localTime -= this->currentKeyFrame->duration;
     181
     182        this->currentKeyFrame = this->nextKeyFrame;
     183        // checking, if we should still Play the animation
     184        if (this->currentKeyFrame == --this->keyFrameList.end())
     185          this->handleInfinity();
     186        this->nextKeyFrame = this->currentKeyFrame;
     187        this->nextKeyFrame++;
     188
     189        //printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
     190        this->setAnimFunc(this->currentKeyFrame->animFunc);
     191      }
     192      else
     193        this->pause();
    215194    }
     195
     196    (this->object->*(funcToAnim))((this->*animFunc)(this->localTime));
     197  }
    216198}
    217199
     
    224206{
    225207  switch (animFunc)
    226     {
    227     default:
    228     case ANIM_CONSTANT:
    229       this->animFunc = &tAnimation<T>::constant;
    230       break;
    231     case ANIM_LINEAR:
    232       this->animFunc = &tAnimation<T>::linear;
    233       break;
    234     case ANIM_SINE:
    235       this->animFunc = &tAnimation<T>::sine;
    236       break;
    237     case ANIM_COSINE:
    238       this->animFunc = &tAnimation<T>::cosine;
    239       break;
    240     case ANIM_EXP:
    241       this->animFunc = &tAnimation<T>::exp;
    242       break;
    243     case ANIM_NEG_EXP:
    244         this->animFunc = &tAnimation<T>::negExp;
    245         expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
    246         break;
    247     case ANIM_QUADRATIC:
    248       this->animFunc = &tAnimation<T>::quadratic;
    249       break;
    250     case ANIM_RANDOM:
    251       this->animFunc = &tAnimation<T>::random;
    252       break;
    253     }
     208  {
     209  default:
     210  case ANIM_CONSTANT:
     211    this->animFunc = &tAnimation<T>::constant;
     212    break;
     213  case ANIM_LINEAR:
     214    this->animFunc = &tAnimation<T>::linear;
     215    break;
     216  case ANIM_SINE:
     217    this->animFunc = &tAnimation<T>::sine;
     218    break;
     219  case ANIM_COSINE:
     220    this->animFunc = &tAnimation<T>::cosine;
     221    break;
     222  case ANIM_EXP:
     223    this->animFunc = &tAnimation<T>::exp;
     224    break;
     225  case ANIM_NEG_EXP:
     226    this->animFunc = &tAnimation<T>::negExp;
     227    expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
     228    break;
     229  case ANIM_QUADRATIC:
     230    this->animFunc = &tAnimation<T>::quadratic;
     231    break;
     232  case ANIM_RANDOM:
     233    this->animFunc = &tAnimation<T>::random;
     234    break;
     235  }
    254236}
    255237
     
    274256{
    275257  return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value)
    276     * (timePassed / this->currentKeyFrame->duration);
     258         * (timePassed / this->currentKeyFrame->duration);
    277259}
    278260
     
    286268  if (timePassed * 2.0 < this->currentKeyFrame->duration)
    287269    return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value)
    288       * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2;
     270           * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2;
    289271  else
    290272    return this->nextKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
    291       * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2;
     273           * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2;
    292274  /*
    293275  printf("::%f::::%f::\n",timePassed/this->currentKeyFrame->duration,retVal);
     
    304286{
    305287  return ((this->nextKeyFrame->value + this->currentKeyFrame->value) +
    306     (this->currentKeyFrame->value - this->nextKeyFrame->value) *
    307     cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;
     288          (this->currentKeyFrame->value - this->nextKeyFrame->value) *
     289          cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;
    308290}
    309291
     
    348330{
    349331  return this->currentKeyFrame->value +
    350     (this->nextKeyFrame->value - this->currentKeyFrame->value) *
    351     (float)rand()/(float)RAND_MAX;
     332         (this->nextKeyFrame->value - this->currentKeyFrame->value) *
     333         (float)rand()/(float)RAND_MAX;
    352334}
    353335
  • trunk/src/util/multiplayer_team_deathmatch.cc

    r10114 r10618  
    3131
    3232#include "shared_network_data.h"
    33 #include "terrain.h"
     33#include "environments/terrain.h"
    3434#include "space_ships/space_ship.h"
    3535
     
    4444#include "shell_command.h"
    4545
    46 #include "spawning_point.h"
     46#include "tools/spawning_point.h"
    4747
    4848#include "creatures/fps_player.h"
  • trunk/src/util/state.cc

    r10379 r10618  
    1919
    2020
    21 #include "camera.h"
    22 #include "cameraman.h"
     21#include "tools/camera.h"
     22#include "tools/cameraman.h"
    2323
    2424#ifndef NULL
  • trunk/src/util/track/track.cc

    r10512 r10618  
    2525#include "util/loading/load_param.h"
    2626#include "track/track.h"
    27 
     27#include "glincl.h"
    2828#include "p_node.h"
    29 
    30 #include "stdincl.h"
    3129
    3230#include "debug.h"
  • trunk/src/world_entities/Makefile.am

    r10437 r10618  
    77## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES
    88libORXwe_a_SOURCES = world_entity.cc \
    9                      cameraman.cc \
     9                     tools/cameraman.cc \
    1010                     playable.cc\
    1111                     player.cc \
     
    1818                     projectiles/projectile.cc \
    1919                     extendable.cc\
    20                      power_ups/power_up.cc \
    21                      power_ups/param_power_up.cc \
    22                      power_ups/weapon_power_up.cc\
    23                      spawning_point.cc\
     20                     items/power_ups/power_up.cc \
     21                     items/power_ups/param_power_up.cc \
     22                     items/power_ups/weapon_power_up.cc\
     23                     tools/spawning_point.cc\
    2424                     effects/explosion.cc\
    2525                     effects/billboard.cc\
     
    3131
    3232noinst_HEADERS = world_entity.h\
    33                  cameraman.h\
     33                 tools/cameraman.h\
    3434                 extendable.h\
    3535                 playable.h \
     
    4242                 weapons/ammo_container.h\
    4343                 projectiles/projectile.h \
    44                  power_ups/power_up.h\
    45                  power_ups/param_power_up.h\
    46                  power_ups/weapon_power_up.h \
    47                  spawning_point.h\
     44                 items/power_ups/power_up.h\
     45                 items/power_ups/param_power_up.h\
     46                 items/power_ups/weapon_power_up.h \
     47                 tools/spawning_point.h\
    4848                 effects/explosion.h\
    4949                 effects/billboard.h\
  • trunk/src/world_entities/WorldEntities.am

    r10516 r10618  
    1414                world_entities/npcs/mover.cc \
    1515                \
    16                 world_entities/environment.cc \
    17                 world_entities/skysphere.cc \
    18                 world_entities/skybox.cc \
    19                 world_entities/skydome.cc \
    20                 world_entities/terrain.cc \
    21                 world_entities/satellite.cc \
    22                 world_entities/movie_entity.cc \
    23                 world_entities/recorder.cc \
    24                 world_entities/character_attributes.cc \
    25                 world_entities/test_entity.cc \
    26                 world_entities/test_entity2.cc \
    27                 world_entities/blackscreen.cc \
    28                 world_entities/scrolling_screen.cc \
    29                 world_entities/planet.cc \
    30                 world_entities/bsp_entity.cc \
    31                 world_entities/mount_point.cc \
    32                 world_entities/sound_entity.cc \
    33                 world_entities/camera.cc \
    34                 \
    35                 world_entities/questGUI/quest_gui.cc \
    36                 world_entities/questGUI/quest.cc \
    3716                \
    3817                world_entities/weapons/weapon_slot.cc \
     
    5231                world_entities/weapons/heavy_blaster.cc \
    5332                world_entities/weapons/swarm_launcher.cc \
    54                 world_entities/weapons/spike_launcher.cc \
    5533                world_entities/weapons/spike_thrower.cc \
    5634                world_entities/weapons/acid_launcher.cc \
     
    7452                world_entities/projectiles/spike_ball.cc \
    7553                \
    76                 world_entities/power_ups/turret_power_up.cc \
    77                 world_entities/power_ups/laser_power_up.cc \
     54                world_entities/items/power_ups/turret_power_up.cc \
     55                world_entities/items/power_ups/laser_power_up.cc \
    7856                \
    7957                world_entities/space_ships/space_ship.cc \
     
    9270                world_entities/environments/model_entity.cc \
    9371                world_entities/environments/building.cc \
    94                 world_entities/environments/rotor.cc \
     72                world_entities/environments/rotor.cc \
    9573                world_entities/environments/mapped_water.cc \
    96                 \
    97                 world_entities/elements/image_entity.cc \
    98                 world_entities/elements/text_element.cc \
    99                 world_entities/elements/glgui_radar.cc \
    100                 \
    101                 world_entities/effects/lightning_bolt.cc \
    102                 world_entities/effects/blink.cc \
    103                 \
    104                 world_entities/script_trigger.cc \
    105                 \
    106                 \
    107                 world_entities/particles/particle_emitter.cc \
    108                 world_entities/particles/dot_emitter.cc \
    109                 world_entities/particles/box_emitter.cc \
    110                 world_entities/particles/plane_emitter.cc \
    111         world_entities/particles/emitter_node.cc \
    112                 \
    113                 world_entities/particles/particle_system.cc \
    114                 world_entities/particles/sprite_particles.cc \
    115                 world_entities/particles/spark_particles.cc \
    116                 world_entities/particles/model_particles.cc \
    117                 world_entities/particles/dot_particles.cc \
    118                 \
    119                 world_entities/particles/quick_animation.cc \
     74                world_entities/environments/environment.cc \
     75                world_entities/environments/skysphere.cc \
     76                world_entities/environments/skybox.cc \
     77                world_entities/environments/skydome.cc \
     78                world_entities/environments/terrain.cc \
     79                world_entities/environments/planet.cc \
     80                world_entities/environments/bsp_entity.cc \
    12081                \
    12182                \
     
    12990                world_entities/weather_effects/snow_effect.cc \
    13091                world_entities/weather_effects/lightning_effect.cc \
    131                 world_entities/weather_effects/lense_flare.cc
     92                world_entities/weather_effects/lense_flare.cc \
     93                world_entities/elements/image_entity.cc \
     94                \
     95                world_entities/elements/text_element.cc \
     96                world_entities/elements/glgui_radar.cc \
     97                \
     98                world_entities/effects/lightning_bolt.cc \
     99                world_entities/effects/blink.cc \
     100                \
     101                world_entities/tools/movie_entity.cc \
     102                world_entities/tools/recorder.cc \
     103                world_entities/tools/blackscreen.cc \
     104                world_entities/tools/scrolling_screen.cc \
     105                world_entities/tools/mount_point.cc \
     106                world_entities/tools/sound_entity.cc \
     107                world_entities/tools/camera.cc \
     108                world_entities/tools/script_trigger.cc \
     109                \
     110                \
     111                world_entities/particles/particle_emitter.cc \
     112                world_entities/particles/dot_emitter.cc \
     113                world_entities/particles/box_emitter.cc \
     114                world_entities/particles/plane_emitter.cc \
     115                world_entities/particles/emitter_node.cc \
     116                world_entities/particles/particle_system.cc \
     117                world_entities/particles/sprite_particles.cc \
     118                world_entities/particles/spark_particles.cc \
     119                world_entities/particles/model_particles.cc \
     120                world_entities/particles/dot_particles.cc \
     121                world_entities/particles/quick_animation.cc \
     122                \
     123                \
     124                \
     125                world_entities/questGUI/quest_gui.cc \
     126                world_entities/questGUI/quest.cc
     127
    132128
    133129
     
    147143                npcs/mover.h \
    148144                \
    149                 environment.h \
    150                 skysphere.h \
    151                 skybox.h \
    152                 skydome.h \
    153                 terrain.h \
    154                 satellite.h \
    155                 movie_entity.h \
    156                 recorder.h \
     145                environments/environment.h \
     146                environments/skysphere.h \
     147                environments/skybox.h \
     148                environments/skydome.h \
     149                environments/terrain.h \
     150                tools/movie_entity.h \
     151                tools/recorder.h \
    157152                character_attributes.h \
    158                 test_entity.h \
    159                 test_entity2.h \
    160                 blackscreen.h \
    161                 scrolling_screen.h \
    162                 planet.h \
    163                 bsp_entity.h \
    164                 mount_point.h \
    165                 sound_entity.h \
    166                 camera.h \
     153                tools/blackscreen.h \
     154                tools/scrolling_screen.h \
     155                environments/planet.h \
     156                environments/bsp_entity.h \
     157                tools/mount_point.h \
     158                tools/sound_entity.h \
     159                tools/camera.h \
    167160                \
    168161                questGUI/quest_gui.h \
     
    185178                weapons/heavy_blaster.h \
    186179                weapons/swarm_launcher.h \
    187                 weapons/spike_launcher.h \
    188180                weapons/spike_thrower.h \
    189181                weapons/acid_launcher.h \
     
    208200                projectiles/spike_ball.h \
    209201                \
    210                 power_ups/turret_power_up.h \
    211                 power_ups/laser_power_up.h \
     202                items/power_ups/turret_power_up.h \
     203                items/power_ups/laser_power_up.h \
    212204                \
    213205                space_ships/space_ship.h \
  • trunk/src/world_entities/creatures/fps_player.cc

    r10567 r10618  
    3232
    3333#include "aabb.h"
    34 #include "bsp_entity.h"
     34#include "environments/bsp_entity.h"
    3535
    3636#include "key_mapper.h"
     
    381381  if( !this->isOnGround())
    382382  {
    383     this->fallVelocity += 300.0f * time;
     383    if(this->fallVelocity + 300.0F*time < 10000.0f)this->fallVelocity += 300.0f * time;
    384384    velocity -= Vector(0.0, 1.0, 0.0) * this->fallVelocity;
    385385
     
    390390    this->fallVelocity = 0.0f;
    391391  }
    392 
    393   this->shiftCoor( velocity*time );
    394 
    395 
     392  if((velocity *time).len() < 10.0f) this->shiftCoor( velocity*time );
     393  else{ 
     394         velocity.normalize();
     395         velocity *= 10.0f;
     396         this->shiftCoor( velocity );
     397       }
    396398
    397399
  • trunk/src/world_entities/effects/billboard.cc

    r10501 r10618  
    2222#include "glincl.h"
    2323#include "state.h"
    24 #include "cameraman.h"
    25 #include "camera.h"
     24#include "tools/cameraman.h"
     25#include "tools/camera.h"
    2626
    2727#include "debug.h"
     
    134134  this->material->select();
    135135
    136   const CameraMan* man = State::getCameraman();
    137   const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different
     136  const Camera* camera = State::getCamera();
    138137  Vector cameraPos = camera->getAbsCoor();
    139138  Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
  • trunk/src/world_entities/effects/blink.cc

    r10530 r10618  
    11/*
     2   orxonox - the future of 3D-vertical-scrollers
    23
    34   Copyright (C) 2006 orx
  • trunk/src/world_entities/effects/trail.cc

    r10511 r10618  
    2121#include "util/loading/load_param.h"
    2222#include "util/loading/factory.h"
    23 
    24 #include "quaternion.h"
    25 #include "vector.h"
    2623
    2724#include "graphics_engine.h"
  • trunk/src/world_entities/effects/wobblegrid.cc

    r10557 r10618  
    2424#include "grid.h"
    2525
    26 #include "cameraman.h"
    27 #include "camera.h"
    28 
    29 #include <assert.h>
     26#include "tools/cameraman.h"
     27#include "tools/camera.h"
     28
     29#include <cassert>
    3030#include "debug.h"
    3131
     
    9393  this->angularSpeed = M_PI; //180;
    9494  this->setModel(this->grid);
     95 
     96  this->angle = 0;
    9597
    9698  this->setUpdateFunction((*sinf));
     
    201203void Wobblegrid::orient()
    202204{
    203      
    204      CameraMan* cman = State::getCameraman();
    205      Camera* c = cman->getCurrentCam();
     205
     206  Camera* c = State::getCamera();
    206207
    207208  Vector view = this->getAbsCoor() - c->getAbsCoor();
  • trunk/src/world_entities/elements/glgui_energywidgetvertical.cc

    r10516 r10618  
    6666    this->_image->setBackgroundTexture(Texture());
    6767    this->_image->setBackgroundColor(Color(1,1,1,0));
    68     this->_image->loadImageFromFile("textures/evil-flower.png");
     68//     this->_image->loadImageFromFile("textures/evil-flower.png");
    6969    //this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
    7070    this->_image->setRelCoor2D(0,0);
  • trunk/src/world_entities/extendable.h

    r9869 r10618  
    1313
    1414
    15 #include "power_ups/power_up.h"
     15#include "items/power_ups/power_up.h"
    1616//! A class for Extendable Entities
    1717class Extendable : virtual public BaseObject {
  • trunk/src/world_entities/npcs/generic_npc.cc

    r10511 r10618  
    3131#include "sound/resource_sound_buffer.h"
    3232
    33 #include "bsp_entity.h"
     33#include "environments/bsp_entity.h"
    3434
    3535
  • trunk/src/world_entities/npcs/mover.cc

    r10519 r10618  
    2121#include "mover.h"
    2222#include "state.h"
    23 #include "camera.h"
     23#include "tools/camera.h"
    2424
    2525
  • trunk/src/world_entities/npcs/npc.cc

    r10552 r10618  
    4646#include "weapons/heavy_blaster.h"
    4747#include "weapons/swarm_launcher.h"
    48 #include "weapons/spike_launcher.h"
    4948#include "weapons/spike_thrower.h"
    5049#include "weapons/acid_launcher.h"
     
    5352#include "weapons/cannon.h"
    5453
    55 #include "mount_point.h"
     54#include "tools/mount_point.h"
    5655#include "weapons/weapon_slot.h"
    5756
  • trunk/src/world_entities/npcs/npc_test1.cc

    r9869 r10618  
    2222
    2323#include "state.h"
    24 #include "power_ups/turret_power_up.h"
    25 #include "power_ups/laser_power_up.h"
     24#include "items/power_ups/turret_power_up.h"
     25#include "items/power_ups/laser_power_up.h"
    2626
    2727ObjectListDefinition(NPCTest1);
  • trunk/src/world_entities/particles/sprite_particles.cc

    r10532 r10618  
    2323#include "state.h"
    2424#include "shell_command.h"
    25 #include "camera.h"
    26 #include "cameraman.h"
     25#include "tools/camera.h"
     26#include "tools/cameraman.h"
    2727
    2828
     
    141141//     Vector view = cameraTargetPos - cameraPos;
    142142
    143     const CameraMan* man = State::getCameraman();
    144     const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different
     143    Camera* camera = State::getCamera();
    145144    Vector cameraPos = camera->getAbsCoor();
    146145    Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
  • trunk/src/world_entities/playable.cc

    r10368 r10618  
    2121#include "player.h"
    2222#include "state.h"
    23 #include "camera.h"
     23#include "tools/camera.h"
    2424
    2525#include "util/loading/load_param.h"
    2626
    27 #include "power_ups/weapon_power_up.h"
    28 #include "power_ups/param_power_up.h"
     27#include "items/power_ups/weapon_power_up.h"
     28#include "items/power_ups/param_power_up.h"
    2929
    3030#include "game_rules.h"
  • trunk/src/world_entities/projectiles/hbolt.cc

    r10545 r10618  
    4949
    5050  this->angle = 0;
    51   this->rotationSpeed = 600;
     51//   this->rotationSpeed = 600;
    5252
    5353  this->emitter = new DotEmitter(100, 5, M_2_PI);
     
    146146    this->deactivate();
    147147
    148   this->angle += this->rotationSpeed * dt;
     148  this->angle += HBolt::rotationSpeed * dt;
    149149
    150150  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
     
    177177  glPushAttrib(GL_ENABLE_BIT);
    178178  glDisable(GL_LIGHTING);
    179   glDisable(GL_FOG);
     179//   glDisable(GL_FOG);
    180180
    181181  glMatrixMode(GL_MODELVIEW);
    182182  glPushMatrix();
    183183
    184 
    185   glTranslatef (this->getAbsCoor ().x,
    186                   this->getAbsCoor ().y,
    187                   this->getAbsCoor ().z);
    188 
    189   this->halo->draw();
    190 
    191   Vector tmpRot = this->getAbsDir().getSpacialAxis();
    192   glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    193   glRotatef(this->angle, 0.0, 0.0, 1.0);
    194 
    195   this->getModel()->draw();
     184//     float matrix[4][4];
     185    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     186    Vector tmpRot = this->getAbsDir().getSpacialAxis();
     187    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     188    glRotatef(this->angle, 0.0, 0.0, 1.0);
     189//     glMultMatrixf((float*)matrix);
     190    this->getModel()->draw();
     191    this->halo->draw();
    196192
    197193  glPopMatrix();
  • trunk/src/world_entities/projectiles/hbolt.h

    r10368 r10618  
    4242
    4343    float                             angle;
    44     float                             rotationSpeed;
     44    static const float                rotationSpeed = 600;
    4545
    4646    Billboard*                        halo;
  • trunk/src/world_entities/projectiles/lbolt.cc

    r10545 r10618  
    5959
    6060  this->angle = 0;
    61   this->rotationSpeed = 130;
    6261
    6362  this->halo = new Billboard();
     
    148147    this->deactivate();
    149148
    150   angle += rotationSpeed * dt;
     149  angle += LBolt::rotationSpeed * dt;
    151150
    152151  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
     
    182181  glPushMatrix();
    183182
    184   float matrix[4][4];
    185   glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     183    float matrix[4][4];
     184    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     185    Vector tmpRot = this->getAbsDir().getSpacialAxis();
     186    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     187    glRotatef(this->angle, 1.0, 0.0, 0.0);
     188    this->getAbsDir().matrix (matrix);
     189    glMultMatrixf((float*)matrix);
     190    this->getModel()->draw();
    186191
    187   glRotatef(angle, 1.0, 0.0, 0.0);
    188   this->getAbsDir().matrix (matrix);
    189   glMultMatrixf((float*)matrix);
    190   this->getModel()->draw();
    191 
    192   this->halo->draw();
     192    this->halo->draw();
    193193
    194194  glPopMatrix();
    195 
    196195  glPopAttrib();
    197196}
  • trunk/src/world_entities/projectiles/lbolt.h

    r10368 r10618  
    4343
    4444    float                             angle;
    45     float                             rotationSpeed;
     45    static const float                rotationSpeed = 1080;
    4646
    4747    Billboard*                        halo;
  • trunk/src/world_entities/projectiles/mbolt.cc

    r10545 r10618  
    8282  //this->trail->setParent( this);
    8383  this->trail->setTexture( "textures/laser.png");
    84   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
     84//   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
     85  this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7);
    8586
    8687}
  • trunk/src/world_entities/projectiles/projectile_weapon.h

    r10368 r10618  
    11/*!
    22 * @file projectile_weapon.h
    3  * a projectile_weapon, that is been shooted by a weapon
     3 * a projectile_weapon is a projetile fireing projectile.
    44 *
    5  * You can use this class to make some ProjectileWeapons/Bullets/Lasers/Rockets/etc.
     5 * You can use this class to make some Multi-Stage Projectiles.
     6 * See Spike_Ball for an implemeted example.
    67 *
    78 */
  • trunk/src/world_entities/projectiles/swarm_projectile.cc

    r10547 r10618  
    3939SwarmProjectile::SwarmProjectile () : Projectile()
    4040{
    41 
    42 /*  this->loadModel("models/projectiles/orx-rocket.obj", 0.5);*/
    43   this->loadModel("models/projectiles/swarm_projectile.obj", .25); // no double rescale (see draw())
     41  this->loadModel("models/projectiles/swarm_projectile.obj", .333); // no double rescale (see draw())
    4442  this->loadExplosionSound("sounds/explosions/explosion_4.wav");
    4543
     
    5957  this->elecDamage = 0;
    6058
    61   this->trail = new Trail(2.5,4,.2, this);
    62   //this->trail->setParent( this);
     59  this->trail = new Trail(2.5, 4, .2, this);
    6360  this->trail->setTexture( "textures/laser.png");
     61
     62//   this->maxVelocity = 300;
     63
     64  this->smoke = new Trail(20, 10, .3, this);
     65  this->smoke->setTexture ("textures/engine.png");
     66
     67  this->angle = 0;
     68
    6469
    6570
     
    8388  // delete this->emitter;
    8489  delete this->trail;
     90  delete this->smoke;
    8591}
    8692
     
    113119  this->setHealth(10.0* (float)rand()/(float)RAND_MAX);
    114120
    115   this->maxVelocity = 300;
    116 
    117   this->rotationSpeed = 360;
     121//   this->maxVelocity = 300;
     122
     123//   this->rotationSpeed = 360;
    118124  this->angle = 0;
    119125
     
    216222
    217223  this->trail->tick(time);
     224  this->smoke->tick(time);
    218225
    219226  this->angle += this->rotationSpeed * time;
     227
    220228  while (this->angle > 360)
     229  {
    221230    this->angle -= 360;
     231  }
    222232
    223233  this->lastDir = this->curDir;
     
    272282  glTranslatef(-.9,0,0);
    273283  this->trail->draw();
     284  glTranslatef( -1.1, 0, 0);
     285  this->smoke->draw();
    274286  glPopMatrix();
    275287}
  • trunk/src/world_entities/projectiles/swarm_projectile.h

    r10368 r10618  
    11/*!
    22 * @file swarm_projectile.h
    3  * @brief a SwarmProjectile Projectile
     3 * @brief a Swarm_Missile Projectile
    44*/
    55
     
    4040
    4141    Trail*                            trail;
     42    Trail*                            smoke;
    4243
    4344    ParticleEmitter*                  emitter;
    4445    float                             agility;
    45     float                             maxVelocity;
     46    const static float                maxVelocity = 100;
    4647    float                             speed;
    4748    Vector                            diffVector ;
     
    5758
    5859    // spinning missle
    59     float                             rotationSpeed;
     60    const static float                rotationSpeed = 360;
    6061    float                             angle;
    6162};
  • trunk/src/world_entities/questGUI/quest.cc

    r10374 r10618  
    2222#include "quest.h"
    2323
    24 #include "event_handler.h"
    25 
    26 #include "state.h"
    27 
    2824#include "util/loading/load_param.h"
    2925#include "util/loading/factory.h"
    3026
    31 #include "graphics_engine.h"
    32 #include "camera.h"
    33 #include "sound_engine.h"
     27#include "glgui.h"
    3428
    35 #include "sound_source.h"
    36 
    37 #include "glgui.h"
    38 #include "menu/glgui_imagebutton.h"
    39 #include "glgui_multiline_text.h"
    40 #include <glgui_image.h>
    41 
    42 
    43 #include "shell_command.h"
    4429
    4530
     
    5237  this->registerObject(this, Quest::_objectList);
    5338 
    54   this->Status = false;
     39  this->status = false;
    5540
    5641  if( root != NULL)
     
    9681void Quest::setQuestActive()
    9782{
    98   this->Status = true;
     83  this->status = true;
    9984}
    10085
    10186void Quest::setQuestInactive()
    10287{
    103   this->Status = false;
     88  this->status = false;
    10489}
    105 
    106 const bool Quest::getQuestStatus()
    107 {
    108   return this->Status;
    109 }
  • trunk/src/world_entities/questGUI/quest.h

    r10374 r10618  
    2020   virtual void loadParams(const TiXmlElement* root = NULL);
    2121   
    22    inline void setQuestName(const std::string& questName)                { this->questName = questName; }
    23    inline const std::string& getQuestName()                              { return this->questName; }
    24    inline void setQuestDescription(const std::string& questDescription)  { this->questDescription = questDescription; }
    25    inline const std::string& getQuestDescription()                       { return this->questDescription; }
    26    inline void setQuestPicture(const std::string& questPicture)          { this->questPicture = questPicture; }
    27    inline const std::string& getQuestPicture()                           { return this->questPicture; }
    28    inline void setQuestDifficulty(const std::string& questDifficulty)    { this->questDifficulty = questDifficulty; }
    29    inline const std::string& getQuestDifficulty()                        { return this->questDifficulty; }
     22   inline void setQuestName(const std::string& questName) { this->questName = questName; }
     23   inline const std::string& getQuestName() const { return this->questName; }
    3024   
    31    inline void setQuestPersons(const std::string& questPersons)          { this->questPersons = questPersons; }
    32    inline const std::string& getQuestPersons()                        { return this->questPersons; }
     25   inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; }
     26   inline const std::string& getQuestDescription() const { return this->questDescription; }
    3327   
    34    inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription  = rewardDescription; }
    35    inline const std::string& getRewardDescription()                      { return this->rewardDescription; }
    36    inline void setRewardPicture(const std::string& rewardPicture)        { this->rewardPicture  = rewardPicture; }
    37    inline const std::string& getRewardPicture()                          { return this->rewardPicture; }
     28   inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; }
     29   inline const std::string& getQuestPicture() const { return this->questPicture; }
     30   
     31   inline void setQuestDifficulty(const std::string& questDifficulty) { this->questDifficulty = questDifficulty; }
     32   inline const std::string& getQuestDifficulty() const { return this->questDifficulty; }
     33   
     34   inline void setQuestPersons(const std::string& questPersons) { this->questPersons = questPersons; }
     35   inline const std::string& getQuestPersons() const { return this->questPersons; }
     36   
     37   inline void setRewardDescription(const std::string& rewardDescription) { this->rewardDescription  = rewardDescription; }
     38   inline const std::string& getRewardDescription() const { return this->rewardDescription; }
     39   
     40   inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture  = rewardPicture; }
     41   inline const std::string& getRewardPicture() const { return this->rewardPicture; }
     42   
    3843   void setQuestActive();
    3944   void setQuestInactive();
    40    const bool getQuestStatus();
     45   const bool getQuestStatus() const { return status; };
    4146   
    4247
    4348   
    4449  private:
    45     bool                    Status;
     50    bool                    status;
    4651    std::string             questName;
    4752    std::string             questDescription;
  • trunk/src/world_entities/questGUI/quest_gui.cc

    r10507 r10618  
    33/*
    44   orxonox - the future of 3D-vertical-scrollers
    5 
     5 
    66   Copyright (C) 1004 orx
    7 
     7 
    88   This program is free software; you can redistribute it and/or modify
    99   it under the terms of the GNU General Public License as published by
    1010   the Free Software Foundation; either version 2, or (at your option)
    1111   any later version.
    12 
     12 
    1313   ### File Specific:
    1414   main-programmer    std::string             questName;
     
    1818    std::string             rewardDescription;
    1919    std::string             rewardPicture;: Andreas Hejj
    20 
     20 
    2121*/
    2222
     
    2727#include "quest_gui.h"
    2828
    29 #include "event_handler.h"
    30 
    31 #include "state.h"
    32 
    3329#include "util/loading/load_param.h"
    3430#include "util/loading/factory.h"
    3531
    36 #include "graphics_engine.h"
    37 #include "camera.h"
    3832#include "sound_engine.h"
    3933
    40 #include "sound_source.h"
    41 
    42 #include "glgui_widget.h"
     34
    4335#include "glgui.h"
    4436#include "menu/glgui_imagebutton.h"
    4537#include "glgui_multiline_text.h"
    46 #include <glgui_image.h>
    4738
    4839#include "event_handler.h"
     
    5041#include "quest.h"
    5142
    52 #include "shell_command.h"
    53 
    5443ObjectListDefinition(QuestGUI);
    55 
    5644CREATE_FACTORY(QuestGUI);
    57 
    58 
    5945
    6046#include "script_class.h"
    6147CREATE_SCRIPTABLE_CLASS(QuestGUI,
    6248                        addMethod("startGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::startGUI))
    63                       ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
    64                       ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
     49                        ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
     50                        ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
    6551                       );
    6652
     
    6955QuestGUI::QuestGUI(const TiXmlElement* root)
    7056{
     57  this->questBox = NULL;
     58  this->bKillGui = false;
     59  this->bActive = false;
     60
    7161  if (root != NULL)
    7262  {
    73   this->registerObject(this, QuestGUI::_objectList);
    74 
    75   this->toList(OM_GROUP_00);
    76 
    77   this->questBox = NULL;
    78 
    79   this->bKillGui = false;
    80 
    81   this->bActive = false;
    82 
    83   this->myQuest = new Quest(root);
    84 
    85   if(root)
    86     this->loadParams( root);
     63    this->registerObject(this, QuestGUI::_objectList);
     64    this->toList(OM_GROUP_00);
     65    this->myQuest = new Quest(root);
     66
     67    if(root)
     68      this->loadParams( root);
    8769  }
    8870}
     
    11597{
    11698  this->bKillGui = false;
    117 
    11899
    119100  if (questBox == NULL)
     
    254235void QuestGUI::stopGUI()
    255236{
    256     this->bKillGui = true;
     237  this->bKillGui = true;
    257238}
    258239
  • trunk/src/world_entities/questGUI/quest_gui.h

    r10492 r10618  
    44
    55#include "world_entity.h"
    6 #include "glgui.h"
    7 #include <glgui_image.h>
    8 #include <vector>
    96
    107class Quest;
     8namespace OrxGui { class GLGuiBox; }
    119
    1210class QuestGUI : public WorldEntity
     
    2826
    2927  private:
    30     Quest*                  myQuest;
    31     bool                    bKillGui;
    32     bool                    bActive;
     28    Quest*                 myQuest;
     29    bool                   bKillGui;
     30    bool                   bActive;
    3331
    34     OrxGui::GLGuiBox*       headerBox;
    35     OrxGui::GLGuiBox*       outlineBox;
    36     OrxGui::GLGuiBox*       labelBox;
    37     OrxGui::GLGuiImage*     placeImage;
    3832    OrxGui::GLGuiBox*       questBox;
    39     OrxGui::GLGuiImage*     questImage;
    40     OrxGui::GLGuiBox*       rewardBox;
    41     OrxGui::GLGuiImage*     rewardImage;
    42     OrxGui::GLGuiBox*       answerBox;
    43     OrxGui::GLGuiImage*     placeImage2;
    44     OrxGui::GLGuiBox*       acceptBox;
    45     OrxGui::GLGuiBox*       refuseBox;
    46 
    47 
    48     OrxSound::SoundSource*  selectorSource;
     33   
     34   
    4935
    5036    void accept();
  • trunk/src/world_entities/space_ships/space_ship.cc

    r10552 r10618  
    2727#include "weapons/heavy_blaster.h"
    2828#include "weapons/swarm_launcher.h"
    29 #include "weapons/spike_launcher.h"
    3029#include "weapons/spike_thrower.h"
    3130#include "weapons/acid_launcher.h"
     
    5049#include "shared_network_data.h"
    5150
    52 #include "power_ups/weapon_power_up.h"
    53 #include "power_ups/param_power_up.h"
     51#include "items/power_ups/weapon_power_up.h"
     52#include "items/power_ups/param_power_up.h"
    5453
    5554#include "graphics_engine.h"
     
    5958#include "state.h"
    6059#include "player.h"
    61 #include "camera.h"
    62 #include "cameraman.h"
     60#include "tools/camera.h"
     61#include "tools/cameraman.h"
    6362
    6463
     
    6766
    6867#include "track/track.h"
    69 #include "math.h"
    7068
    7169
     
    616614  {
    617615    this->bRight = event.bPressed;
    618     printf("ShipCoors: %f , %f, %f \n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);
     616//     printf("ShipCoors: %f , %f, %f \n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);
    619617  }
    620618  else if( event.type == KeyMapper::PEV_FORWARD)
     
    11431141void SpaceShip::setCameraDistance(float dist)
    11441142{
    1145 
    1146   CameraMan* cm = State::getCameraman();
    1147   Camera* c = cm->getCurrentCam();
     1143  Camera* c = State::getCamera();
    11481144  c->setViewTopDistance(dist);
    11491145
     
    11551151{
    11561152
    1157   CameraMan* cm = State::getCameraman();
    1158   Camera* c = cm->getCurrentCam();
     1153  Camera* c = State::getCamera();
    11591154  c->setViewTopFovy(fovy);
    11601155
     
    11651160void SpaceShip::updateTravelDistance()
    11661161{
    1167      CameraMan* cm = State::getCameraman();
    1168      Camera* c = cm->getCurrentCam();
    1169 
     1162
     1163  Camera* c = State::getCamera();
    11701164
    11711165  float x = 1.25 * this->actionWidthPercentage * fabsf(c->getAbsCoor().y) * tan(c->getFovy()*M_PI /360.0);
  • trunk/src/world_entities/spectator.cc

    r10401 r10618  
    2525#include "src/world_entities/npcs/generic_npc.h"
    2626
     27#include "src/lib/util/loading/load_param.h"
     28
     29#include "player.h"
     30
    2731
    2832ObjectListDefinition(Spectator);
    2933CREATE_FACTORY(Spectator);
    3034
    31 
     35Spectator* Spectator::ghost = NULL;
     36Playable* Spectator::regularPlayable = NULL;
    3237
    3338#include "state.h"
     39#include "shell_command.h"
     40             
     41SHELL_COMMAND( enableGhost, Spectator, enableGhost )
     42             ->describe("fly around")
     43             ->setAlias("ghost");
    3444
    3545
     
    109119/**
    110120 * loads the Settings of a Spectator from an XML-element.
    111  * @param root the XML-element to load the Spaceship's properties from
     121 * @param root the XML-element to load the Spectator's properties from
    112122 */
    113123void Spectator::loadParams(const TiXmlElement* root)
    114124{
    115125  Playable::loadParams(root);
     126 
     127  LoadParam(root, "allowGhost", this, Spectator, allowGhost)
     128    .describe("Allows the Player to fly around");
     129}
     130
     131
     132
     133void Spectator::allowGhost( bool flag )
     134{
     135  PRINTF(0)( "SPECTATOR ALLOWGHOST: %d\n", flag );
     136  if ( flag )
     137  {
     138    assert( ghost == NULL && "only one flySpectator allowed" );
     139   
     140    ghost = this;
     141  }
     142  else
     143  {
     144    ghost = NULL;
     145  }
     146}
     147
     148
     149void Spectator::enableGhost( )
     150{
     151  if ( !ghost )
     152  {
     153    Spectator* spec = new Spectator();
     154    spec->allowGhost( true );
     155  }
     156 
     157  if ( !regularPlayable )
     158  {
     159    if ( !State::getPlayer() || !State::getPlayer()->getPlayable() )
     160      return;
     161   
     162    regularPlayable = State::getPlayer()->getPlayable();
     163   
     164    ghost->setAbsCoor( regularPlayable->getAbsCoor() );
     165    ghost->setAbsDir( regularPlayable->getAbsDir() );
     166   
     167    State::getPlayer()->setPlayable( ghost );
     168  }
     169  else
     170  {
     171    if ( !State::getPlayer() || !State::getPlayer()->getPlayable() )
     172      return;
     173   
     174    State::getPlayer()->setPlayable( regularPlayable );
     175    regularPlayable = NULL;
     176  }
    116177}
    117178
     
    242303    this->yMouse += event.yRel;
    243304  }
    244   else if( event.type == KeyMapper::PEV_JUMP)
    245   {
     305  else if( event.type == KeyMapper::PEV_FIRE1 )
     306  {
     307    PRINTF(0)( "CURRENT POS: (%f, %f, %f) ROT (%f, (%f, %f, %f))\n", this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ(), this->getAbsDir().w, this->getAbsDir().v.x, this->getAbsDir().v.y, this->getAbsDir().v.z );
    246308//     FPSPlayer * fps = new FPSPlayer();
    247309//     //GenericNPC* fps = new GenericNPC();
     
    263325
    264326
     327
  • trunk/src/world_entities/spectator.h

    r9869 r10618  
    3030
    3131    virtual void process(const Event &event);
     32   
     33    void allowGhost( bool flag );
     34   
     35    static void enableGhost();
    3236
    3337  private:
     
    4549    float                 angleX;
    4650    float                 angleY;
     51   
     52    static Spectator*     ghost;
     53    static Playable*      regularPlayable;
    4754
    4855};
  • trunk/src/world_entities/weapons/acid_launcher.cc

    r10539 r10618  
    2929#include "util/state.h"
    3030
    31 #include "math/quaternion.h"
    32 
    3331#include "util/loading/factory.h"
    3432
     
    3937using namespace std;
    4038
    41 ObjectListDefinition(AcidLauncher);
    42 CREATE_FACTORY(AcidLauncher);
     39ObjectListDefinition ( AcidLauncher );
     40CREATE_FACTORY ( AcidLauncher );
    4341
    4442/**
     
    4846 */
    4947AcidLauncher::AcidLauncher()
    50   : Weapon()
     48    : Weapon()
    5149{
    5250  this->init();
     
    5654 * creates a new AcidLauncher from a TiXmlElement
    5755 */
    58 AcidLauncher::AcidLauncher(const TiXmlElement* root)
     56AcidLauncher::AcidLauncher ( const TiXmlElement* root )
    5957{
    6058  this->init();
    61   if (root != NULL)
    62     this->loadParams(root);
     59  if ( root != NULL )
     60    this->loadParams ( root );
    6361}
    6462
     
    7371void AcidLauncher::init()
    7472{
    75   this->registerObject(this, AcidLauncher::_objectList);
    76 /*
    77   Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
    78   Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this);
     73  this->registerObject ( this, AcidLauncher::_objectList );
     74  /*
     75    Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
     76    Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this);
    7977
    80   animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    81   animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    82   animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    83   animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     78    animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     79    animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     80    animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     81    animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    8482
    85   animation1->setInfinity(ANIM_INF_CONSTANT);
    86   animation2->setInfinity(ANIM_INF_CONSTANT);
    87 */
    88   this->setStateDuration(WS_SHOOTING, 1.0f);
     83    animation1->setInfinity(ANIM_INF_CONSTANT);
     84    animation2->setInfinity(ANIM_INF_CONSTANT);
     85  */
     86  this->setStateDuration ( WS_SHOOTING, 1.0f );
    8987
    90   this->setStateDuration(WS_RELOADING, 1.0f);
    91   this->setStateDuration(WS_ACTIVATING, .4);
    92   this->setStateDuration(WS_DEACTIVATING, .4);
     88  this->setStateDuration ( WS_RELOADING, 1.0f );
     89  this->setStateDuration ( WS_ACTIVATING, .4 );
     90  this->setStateDuration ( WS_DEACTIVATING, .4 );
    9391
    94   this->setEnergyMax(100);
    95   this->increaseEnergy(100);
     92  this->setEnergyMax ( 100 );
     93  this->increaseEnergy ( 100 );
    9694  //this->minCharge = 2;
    9795
    98   this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    99   this->setProjectileTypeC("AcidSplash");
     96  this->setCapability ( WTYPE_ALLDIRS | WTYPE_TURRET | WTYPE_DIRECTIONAL | WTYPE_LIGHT );
     97  this->setProjectileTypeC ( "AcidSplash" );
    10098//   this->loadModel("models/guns/turret1.obj", 1.0);
    10199
    102   this->setEmissionPoint(2.0, 0, 0);
    103   this->getProjectileFactory()->prepare(10);
     100  this->setEmissionPoint ( 2.0, 0, 0 );
     101  this->getProjectileFactory()->prepare ( 10 );
    104102
    105   this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav");
    106   this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    107   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     103  this->setActionSound ( WA_SHOOT, "sounds/explosions/explosion_1.wav" );
     104  this->setActionSound ( WA_ACTIVATE, "sounds/voices/rockets.wav" );
     105//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    108106
    109107}
    110108
    111 void AcidLauncher::loadParams(const TiXmlElement* root)
     109void AcidLauncher::loadParams ( const TiXmlElement* root )
    112110{
    113   Weapon::loadParams(root);
     111  Weapon::loadParams ( root );
    114112}
    115113
    116114void AcidLauncher::activate()
    117 {
    118 }
     115{}
    119116
    120117void AcidLauncher::deactivate()
     118{}
     119
     120void AcidLauncher::tick ( float dt )
    121121{
    122 }
    123 
    124 void AcidLauncher::tick(float dt)
    125 {
    126   if (!Weapon::tickW(dt))
     122  if ( !Weapon::tickW ( dt ) )
    127123    return;
    128   if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized)
    129   {
    130     this->energyWidget->setDisplayedImage("textures/gui/gui_acid.png");
     124  if ( this->energyWidget != NULL && !this->isEnergyWidgetInitialized ) {
     125    this->energyWidget->setDisplayedImage ( "textures/gui/gui_acid.png" );
    131126    this->isEnergyWidgetInitialized = true;
    132127  }
     
    157152
    158153  Projectile* pj = NULL;
    159   for( int i=0; i < 1; i++)
    160   {
    161       pj  = this->getProjectile();
    162       if (pj == NULL)
    163         return;
     154  for ( int i=0; i < 1; i++ ) {
     155    pj  = this->getProjectile();
     156    if ( pj == NULL )
     157      return;
    164158
    165       fired = true;
    166       pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*165.0 + VECTOR_RAND(10)));
     159    fired = true;
     160    pj->setVelocity ( this->getVelocity() + ( this->getAbsDir().apply ( Vector ( 1,0,0 ) ) *165.0 + VECTOR_RAND ( 10 ) ) );
    167161
    168       pj->setParent(PNode::getNullParent());
    169       pj->setAbsCoor(this->getEmissionPoint() + VECTOR_RAND(.1));
    170       pj->setAbsDir(this->getAbsDir()+Quaternion(0,VECTOR_RAND(5)));
    171       pj->activate();
     162    pj->setParent ( PNode::getNullParent() );
     163    pj->setAbsCoor ( this->getEmissionPoint() + VECTOR_RAND ( .1 ) );
     164    pj->setAbsDir ( this->getAbsDir() +Quaternion ( 0,VECTOR_RAND ( 5 ) ) );
     165    pj->activate();
    172166  }
    173167}
  • trunk/src/world_entities/weapons/acid_launcher.h

    r10368 r10618  
    1212
    1313class AcidLauncher : public Weapon
    14   {
    15   ObjectListDeclaration(AcidLauncher);
     14{
     15    ObjectListDeclaration ( AcidLauncher );
    1616  public:
    1717    AcidLauncher ();
    18     AcidLauncher(const TiXmlElement* root);
     18    AcidLauncher ( const TiXmlElement* root );
    1919    virtual ~AcidLauncher ();
    2020
    2121    void init();
    22     virtual void loadParams(const TiXmlElement* root);
     22    virtual void loadParams ( const TiXmlElement* root );
    2323
    2424    virtual void activate();
    2525    virtual void deactivate();
    2626
    27     virtual void tick(float dt);
     27    virtual void tick ( float dt );
    2828    virtual void fire();
    2929
    3030
    3131  private:
    32   };
     32};
    3333
    3434#endif /* _ACID_LAUNCHER_H */
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r10419 r10618  
    100100  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    101101  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    102   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     102//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    103103
    104104}
  • trunk/src/world_entities/weapons/boomerang_gun.cc

    r10419 r10618  
    9696  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    9797  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    98   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     98//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    9999
    100100}
  • trunk/src/world_entities/weapons/heavy_blaster.cc

    r10548 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "heavy_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
  • trunk/src/world_entities/weapons/light_blaster.cc

    r10539 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "light_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
     
    3955  for (int i = 0; i < this->getBarrels(); i++)
    4056  {
    41    delete [] this->shootAnim[i];
     57   //delete [] this->shootAnim[i];
    4258   delete [] this->objComp[i];
    4359  }
    4460  delete [] this->emissionPoint;
    45    delete [] this->shootAnim;
     61   //delete [] this->shootAnim;
    4662   delete [] this->objComp;
    4763
     
    8298  this->objComp = new PNode**[this->getBarrels()];
    8399  this->emissionPoint = new PNode*[this->getBarrels()];
    84   this->shootAnim = new Animation3D**[this->getBarrels()];
     100//   this->shootAnim = new Animation3D**[this->getBarrels()];
    85101  for (int i = 0; i < this->getBarrels(); i++)
    86102  {
    87103    this->objComp[i] = new PNode* [this->getSegs()];
    88104    this->emissionPoint[i] = new PNode;
    89     this->emissionPoint[i]->setParent(this);             //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles
     105    this->emissionPoint[i]->setParent(this);
    90106    this->emissionPoint[i]->setName("EmissionPoint");
    91107    this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
    92     this->shootAnim[i] = new Animation3D* [this->getSegs()];
     108//     this->shootAnim[i] = new Animation3D* [this->getSegs()];
    93109    for(int j = 0; j < this->getSegs(); j++)
    94110    {
    95111      this->objComp[i][j] = new PNode;
    96       this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);
    97       this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);
     112//       this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);
     113//       this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);
    98114    }
    99115  }
    100 
    101   for (int i = 0; i < this->getBarrels(); i++ )
    102     this->emissionPoint[i]->setRelCoor(Vector(1.19, 0.0, 0.1));
     116/*
     117  this->emissionPoint[0]->setRelCoor(Vector(1.19, 0.0, 0.1));
     118  this->emissionPoint[1]->setRelCoor(Vector(1.19, -0.07, -0.05));
     119  this->emissionPoint[2]->setRelCoor(Vector(1.19, 0.07, -0.05));*/
     120
     121  this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1));
     122  this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05));
     123  this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05));
    103124
    104125//   Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this);
     
    112133//   this->setEmissionPoint(3.8, 1.2, 0);
    113134
    114   for (int i = 0; i < this->getBarrels(); i++){
    115     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);
    116     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);
    117   }
     135//   for (int i = 0; i < this->getBarrels(); i++){
     136//     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);
     137//     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);
     138//   }
    118139
    119140
     
    144165  pj->activate();
    145166
    146   for (int i = 0; i < this->getSegs(); i++)
    147     this->shootAnim[this->activeBarrel][i]->replay();
     167//   for (int i = 0; i < this->getSegs(); i++)
     168//     this->shootAnim[this->activeBarrel][i]->replay();
    148169
    149170  // switch barrel
  • trunk/src/world_entities/weapons/medium_blaster.cc

    r10548 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "medium_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
  • trunk/src/world_entities/weapons/spike_thrower.cc

    r10516 r10618  
    1010
    1111   ### File Specific
    12    main-programmer: Marc Schaerrer
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
    1313   co-programmer:
    1414*/
     
    2828
    2929#include <list>
    30 #include <iterator>
    3130#include "util/state.h"
    32 
    33 #include "math/quaternion.h"
    3431
    3532#include "util/loading/factory.h"
     
    108105  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav");
    109106  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    110   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     107//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    111108
    112109}
  • trunk/src/world_entities/weapons/swarm_launcher.cc

    r10545 r10618  
    3030#include <iterator>
    3131#include "util/state.h"
    32 
    33 #include "math/quaternion.h"
    3432
    3533#include "util/loading/factory.h"
     
    10098  this->setProjectileTypeC("SwarmProjectile");
    10199
    102   this->loadModel("models/guns/turret1.obj", 1.0);
     100//   this->loadModel("models/guns/turret1.obj", 1.0);
    103101
    104102  this->setEmissionPoint(1.684, 0.472, 0);
    105   this->getProjectileFactory()->prepare(50);
     103  this->getProjectileFactory()->prepare(10);
    106104
    107105  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav");
    108   this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    109   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     106//   this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
     107//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    110108
    111109}
  • trunk/src/world_entities/weapons/targeting_turret.cc

    r10419 r10618  
    9494  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    9595  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    96   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     96//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    9797}
    9898
  • trunk/src/world_entities/weapons/turret.cc

    r10419 r10618  
    9595  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    9696  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    97   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     97//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    9898
    9999}
  • trunk/src/world_entities/weather_effects/cloud_effect.h

    r9869 r10618  
    1212#include "sound_source.h"
    1313
    14 #include "skydome.h"
     14#include "environments/skydome.h"
    1515#include "material.h"
    1616#include "shader.h"
  • trunk/src/world_entities/weather_effects/lense_flare.cc

    r10114 r10618  
    3232
    3333#include "light.h"
    34 #include "camera.h"
     34#include "tools/camera.h"
    3535
    3636
  • trunk/src/world_entities/weather_effects/lightning_effect.cc

    r10511 r10618  
    263263
    264264  if (this->thunderTextureA) {
    265     this->thunderBolt[0]->setTexture("textures/thunderbA1.png");
    266     this->thunderBolt[1]->setTexture("textures/thunderbA2.png");
    267     this->thunderBolt[2]->setTexture("textures/thunderbA3.png");
    268     this->thunderBolt[3]->setTexture("textures/thunderbA4.png");
     265    this->thunderBolt[0]->setTexture("textures/effects/thunderbA1.png");
     266    this->thunderBolt[1]->setTexture("textures/effects/thunderbA2.png");
     267    this->thunderBolt[2]->setTexture("textures/effects/thunderbA3.png");
     268    this->thunderBolt[3]->setTexture("textures/effects/thunderbA4.png");
    269269  }
    270270  else {
    271     this->thunderBolt[0]->setTexture("textures/thunderbB1.png");
    272     this->thunderBolt[1]->setTexture("textures/thunderbB2.png");
    273     this->thunderBolt[2]->setTexture("textures/thunderbB3.png");
    274     this->thunderBolt[3]->setTexture("textures/thunderbB4.png");
     271    this->thunderBolt[0]->setTexture("textures/effects/thunderbB1.png");
     272    this->thunderBolt[1]->setTexture("textures/effects/thunderbB2.png");
     273    this->thunderBolt[2]->setTexture("textures/effects/thunderbB3.png");
     274    this->thunderBolt[3]->setTexture("textures/effects/thunderbB4.png");
    275275  }
    276276
  • trunk/src/world_entities/world_entity.cc

    r10546 r10618  
    2727
    2828#include "oif/object_information_file.h"
    29 #include "mount_point.h"
     29#include "tools/mount_point.h"
    3030
    3131#include "aabb_tree_node.h"
     
    4141
    4242#include "state.h"
    43 #include "camera.h"
     43#include "tools/camera.h"
    4444
    4545#include "collision_filter.h"
Note: See TracChangeset for help on using the changeset viewer.