Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3618 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Mar 21, 2005, 3:26:26 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: adding TestGun to implement a test gun :) some smaller changes in ghe weapon.h interface. some doxytags for primitive

Location:
orxonox/trunk/src
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/Makefile.am

    r3610 r3618  
    4747                 world_entities/projectile.cc \
    4848                 world_entities/character_attributes.cc \
     49                 world_entities/test_gun.cc \
    4950                 ai/ai.cc \
    5051                 lib/coord/p_node.cc \
     
    9596                 world_entities/projectile.h \
    9697                 world_entities/character_attributes.h \
     98                 world_entities/test_gun.h \
    9799                 ai/ai.h \
    98100                 network/synchronisable.h \
  • orxonox/trunk/src/Makefile.in

    r3610 r3618  
    6161        terrain.$(OBJEXT) primitive.$(OBJEXT) weapon.$(OBJEXT) \
    6262        projectile.$(OBJEXT) character_attributes.$(OBJEXT) \
    63         ai.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) \
    64         helper_parent.$(OBJEXT) data_tank.$(OBJEXT) \
    65         graphics_engine.$(OBJEXT) light.$(OBJEXT) fontset.$(OBJEXT) \
    66         array.$(OBJEXT) objModel.$(OBJEXT) model.$(OBJEXT) \
    67         material.$(OBJEXT) texture.$(OBJEXT) base_entity.$(OBJEXT) \
    68         base_object.$(OBJEXT) ini_parser.$(OBJEXT) list.$(OBJEXT) \
    69         vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
     63        test_gun.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \
     64        null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
     65        data_tank.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \
     66        fontset.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
     67        model.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
     68        base_entity.$(OBJEXT) base_object.$(OBJEXT) \
     69        ini_parser.$(OBJEXT) list.$(OBJEXT) vector.$(OBJEXT) \
     70        curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
    7071orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    7172orxonox_LDADD = $(LDADD)
     
    9596@AMDEP_TRUE@    ./$(DEPDIR)/skysphere.Po \
    9697@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/terrain.Po \
    97 @AMDEP_TRUE@    ./$(DEPDIR)/texture.Po \
     98@AMDEP_TRUE@    ./$(DEPDIR)/test_gun.Po ./$(DEPDIR)/texture.Po \
    9899@AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po \
    99100@AMDEP_TRUE@    ./$(DEPDIR)/track_node.Po ./$(DEPDIR)/vector.Po \
     
    249250                 world_entities/projectile.cc \
    250251                 world_entities/character_attributes.cc \
     252                 world_entities/test_gun.cc \
    251253                 ai/ai.cc \
    252254                 lib/coord/p_node.cc \
     
    297299                 world_entities/projectile.h \
    298300                 world_entities/character_attributes.h \
     301                 world_entities/test_gun.h \
    299302                 ai/ai.h \
    300303                 network/synchronisable.h \
     
    427430@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
    428431@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terrain.Po@am__quote@
     432@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gun.Po@am__quote@
    429433@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
    430434@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
     
    642646@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    643647@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o character_attributes.obj `if test -f 'world_entities/character_attributes.cc'; then $(CYGPATH_W) 'world_entities/character_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/character_attributes.cc'; fi`
     648
     649test_gun.o: world_entities/test_gun.cc
     650@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_gun.o -MD -MP -MF "$(DEPDIR)/test_gun.Tpo" -c -o test_gun.o `test -f 'world_entities/test_gun.cc' || echo '$(srcdir)/'`world_entities/test_gun.cc; \
     651@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/test_gun.Tpo" "$(DEPDIR)/test_gun.Po"; else rm -f "$(DEPDIR)/test_gun.Tpo"; exit 1; fi
     652@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/test_gun.cc' object='test_gun.o' libtool=no @AMDEPBACKSLASH@
     653@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/test_gun.Po' tmpdepfile='$(DEPDIR)/test_gun.TPo' @AMDEPBACKSLASH@
     654@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     655@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_gun.o `test -f 'world_entities/test_gun.cc' || echo '$(srcdir)/'`world_entities/test_gun.cc
     656
     657test_gun.obj: world_entities/test_gun.cc
     658@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_gun.obj -MD -MP -MF "$(DEPDIR)/test_gun.Tpo" -c -o test_gun.obj `if test -f 'world_entities/test_gun.cc'; then $(CYGPATH_W) 'world_entities/test_gun.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/test_gun.cc'; fi`; \
     659@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/test_gun.Tpo" "$(DEPDIR)/test_gun.Po"; else rm -f "$(DEPDIR)/test_gun.Tpo"; exit 1; fi
     660@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/test_gun.cc' object='test_gun.obj' libtool=no @AMDEPBACKSLASH@
     661@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/test_gun.Po' tmpdepfile='$(DEPDIR)/test_gun.TPo' @AMDEPBACKSLASH@
     662@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     663@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_gun.obj `if test -f 'world_entities/test_gun.cc'; then $(CYGPATH_W) 'world_entities/test_gun.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/test_gun.cc'; fi`
    644664
    645665ai.o: ai/ai.cc
  • orxonox/trunk/src/world_entities/player.cc

    r3608 r3618  
    192192void Player::fire()
    193193{
    194   if(this->bFire)
     194  if( this->bFire)
    195195    {
    196196      if(this->activeWeapon != NULL)
    197197        this->activeWeapon->fire();
    198198    }
    199   if(this->bWeaponChange)
     199  if( this->bWeaponChange && this->weapons->getSize() > 1)
    200200    {
    201       Weapon* w = this->weapons->enumerate();
     201      PRINTF(1)("changing the weapon of the player: deactivate old, activate new\n");
     202      this->activeWeapon->deactivate();
     203      this->weapons->enumerate();
    202204      this->activeWeapon = this->weapons->nextElement(this->activeWeapon);
     205      this->activeWeapon->activate();
    203206    }
    204207}
  • orxonox/trunk/src/world_entities/primitive.h

    r3616 r3618  
     1/*!
     2    \primitive.h
     3    \brief representing a primitive body in the world: cube, sphere, cylinder  etc...
     4*/
     5
     6
    17#ifndef _PRIMITIVE_H
    28#define _PRIMITIVE_H
     
    3440  GLUquadricObj* object; //!< the object to be rendered
    3541  Material* material;    //!< A Material for the SkySphere.
    36   pForm form;
    37   char* textureName;
    38   float size;
    39   int segments;
     42  pForm form;            //!< the chooesen form for the entity
     43  char* textureName;     //!< if there is a texture. this is the name for it
     44  float size;            //!< size of the object, from [0..1]
     45  int segments;          //!< segment count
    4046
    4147  void glDrawCube();
  • orxonox/trunk/src/world_entities/projectile.cc

    r3579 r3618  
    1818
    1919#include "projectile.h"
    20 #include "stdincl.h"
     20
    2121#include "world_entity.h"
     22#include "objModel.h"
     23#include "primitive.h"
    2224#include "vector.h"
    23 #include "objModel.h"
    2425
    2526using namespace std;
     
    3132Projectile::Projectile () : WorldEntity()
    3233{
    33   this->model = new OBJModel("");
     34  //this->model = new OBJModel("");
     35  this->projectileModel = new Primitive(P_SPHERE);
    3436}
    3537
  • orxonox/trunk/src/world_entities/projectile.h

    r3583 r3618  
    99#include "world_entity.h"
    1010
     11class Primitive;
    1112
    1213class Projectile : public WorldEntity
     
    2627 private:
    2728  //physical attriutes like: force, speed, acceleration etc.
     29  Primitive* projectileModel;
    2830
    2931};
  • orxonox/trunk/src/world_entities/weapon.h

    r3583 r3618  
    5757  bool isActive(void);
    5858
    59   virtual void setWeaponIdleTime(float time);
    60   virtual float getWeaponIdleTime(void);
    61   virtual bool hasWeaponIdleTimeElapsed(void);
     59  void setWeaponIdleTime(float time);
     60  float getWeaponIdleTime(void);
     61  bool hasWeaponIdleTimeElapsed(void);
    6262
    6363  virtual void fire(void);
Note: See TracChangeset for help on using the changeset viewer.