Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5434 in orxonox.OLD


Ignore:
Timestamp:
Oct 25, 2005, 11:38:46 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Turret Power Up defined

Location:
trunk/src
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r5433 r5434  
    6565                  world_entities/weapons/crosshair.cc \
    6666                  world_entities/power_ups/power_up.cc \
     67                  world_entities/power_ups/turret_power_up.cc \
    6768                  subprojects/benchmark.cc
    6869
     
    9394                 world_entities/weapons/test_bullet.h \
    9495                 world_entities/weapons/crosshair.h \
    95                  world_entities/power_ups/power_up.h \
     96                 world_entities/power_ups/power_up.h \
     97                 world_entities/power_ups/turret_power_up.h \
    9698                 defs/stdincl.h \
    9799                 defs/stdlibincl.h \
  • trunk/src/Makefile.in

    r5433 r5434  
    6666        orxonox-test_gun.$(OBJEXT) orxonox-turret.$(OBJEXT) \
    6767        orxonox-test_bullet.$(OBJEXT) orxonox-crosshair.$(OBJEXT) \
    68         orxonox-power_up.$(OBJEXT) orxonox-benchmark.$(OBJEXT)
     68        orxonox-power_up.$(OBJEXT) orxonox-turret_power_up.$(OBJEXT) \
     69        orxonox-benchmark.$(OBJEXT)
    6970orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    7071am__DEPENDENCIES_1 =
     
    9394@AMDEP_TRUE@    ./$(DEPDIR)/orxonox-test_gun.Po \
    9495@AMDEP_TRUE@    ./$(DEPDIR)/orxonox-turret.Po \
     96@AMDEP_TRUE@    ./$(DEPDIR)/orxonox-turret_power_up.Po \
    9597@AMDEP_TRUE@    ./$(DEPDIR)/orxonox-weapon.Po \
    9698@AMDEP_TRUE@    ./$(DEPDIR)/orxonox-weapon_manager.Po \
     
    280282                  world_entities/weapons/crosshair.cc \
    281283                  world_entities/power_ups/power_up.cc \
     284                  world_entities/power_ups/turret_power_up.cc \
    282285                  subprojects/benchmark.cc
    283286
     
    308311                 world_entities/weapons/test_bullet.h \
    309312                 world_entities/weapons/crosshair.h \
    310                  world_entities/power_ups/power_up.h \
     313                 world_entities/power_ups/power_up.h \
     314                 world_entities/power_ups/turret_power_up.h \
    311315                 defs/stdincl.h \
    312316                 defs/stdlibincl.h \
     
    426430@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-test_gun.Po@am__quote@
    427431@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-turret.Po@am__quote@
     432@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-turret_power_up.Po@am__quote@
    428433@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-weapon.Po@am__quote@
    429434@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-weapon_manager.Po@am__quote@
     
    830835@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    831836@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-power_up.obj `if test -f 'world_entities/power_ups/power_up.cc'; then $(CYGPATH_W) 'world_entities/power_ups/power_up.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/power_ups/power_up.cc'; fi`
     837
     838orxonox-turret_power_up.o: world_entities/power_ups/turret_power_up.cc
     839@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-turret_power_up.o -MD -MP -MF "$(DEPDIR)/orxonox-turret_power_up.Tpo" -c -o orxonox-turret_power_up.o `test -f 'world_entities/power_ups/turret_power_up.cc' || echo '$(srcdir)/'`world_entities/power_ups/turret_power_up.cc; \
     840@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/orxonox-turret_power_up.Tpo" "$(DEPDIR)/orxonox-turret_power_up.Po"; else rm -f "$(DEPDIR)/orxonox-turret_power_up.Tpo"; exit 1; fi
     841@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/power_ups/turret_power_up.cc' object='orxonox-turret_power_up.o' libtool=no @AMDEPBACKSLASH@
     842@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/orxonox-turret_power_up.Po' tmpdepfile='$(DEPDIR)/orxonox-turret_power_up.TPo' @AMDEPBACKSLASH@
     843@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     844@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-turret_power_up.o `test -f 'world_entities/power_ups/turret_power_up.cc' || echo '$(srcdir)/'`world_entities/power_ups/turret_power_up.cc
     845
     846orxonox-turret_power_up.obj: world_entities/power_ups/turret_power_up.cc
     847@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-turret_power_up.obj -MD -MP -MF "$(DEPDIR)/orxonox-turret_power_up.Tpo" -c -o orxonox-turret_power_up.obj `if test -f 'world_entities/power_ups/turret_power_up.cc'; then $(CYGPATH_W) 'world_entities/power_ups/turret_power_up.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/power_ups/turret_power_up.cc'; fi`; \
     848@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/orxonox-turret_power_up.Tpo" "$(DEPDIR)/orxonox-turret_power_up.Po"; else rm -f "$(DEPDIR)/orxonox-turret_power_up.Tpo"; exit 1; fi
     849@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/power_ups/turret_power_up.cc' object='orxonox-turret_power_up.obj' libtool=no @AMDEPBACKSLASH@
     850@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/orxonox-turret_power_up.Po' tmpdepfile='$(DEPDIR)/orxonox-turret_power_up.TPo' @AMDEPBACKSLASH@
     851@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     852@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-turret_power_up.obj `if test -f 'world_entities/power_ups/turret_power_up.cc'; then $(CYGPATH_W) 'world_entities/power_ups/turret_power_up.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/power_ups/turret_power_up.cc'; fi`
    832853
    833854orxonox-benchmark.o: subprojects/benchmark.cc
  • trunk/src/defs/class_id.h

    r5384 r5434  
    1818/*!
    1919 * @file class_id.h
    20   * list of orxonox classID's
    21 
    22     this File is used to identify an Object with its class and also with its sub/super-classes.
    23     this is also used by the ObjectManager to identify and load important classes
    24 
    25     !! important !!
    26     When adding a new CLASS be sure about the following:
    27       1. if it is a (SUB)SUPERCLASS make sure there is still space left (if not think of a new approach)
    28       2. if it is a (SUB)SUPERCLASS also add the CLASS to BaseObject::whatIs() so we have nice output :)
    29       3. check if the Number you add is not refered to twice, and that with (SUB)SUPERCLASSES there are no intersections
    30       4. be sure to add you stuff in the right section, and don't interest yourself for the order of things. :)
    31 */
     20 * @brief list of orxonox classID's
     21 *
     22 *  this File is used to identify an Object with its class and also with its sub/super-classes.
     23 *  this is also used by the ObjectManager to identify and load important classes
     24 *
     25 *  !! important !!
     26 *  When adding a new CLASS be sure about the following:
     27 *    1. if it is a (SUB)SUPERCLASS make sure there is still space left (if not think of a new approach)
     28 *    2. if it is a (SUB)SUPERCLASS also add the CLASS to BaseObject::whatIs() so we have nice output :)
     29 *    3. check if the Number you add is not refered to twice, and that with (SUB)SUPERCLASSES there are no intersections
     30 *    4. be sure to add you stuff in the right section, and don't interest yourself for the order of things. :)
     31 */
    3232
    3333#ifndef _CLASS_ID_H
     
    133133  CL_TURRET                     =    0x0000020b,
    134134
     135  CL_TURRET_POWER_UP            =    0x0000020b,
     136
    135137
    136138  // gamePlay (range from 0x00000500 0x000005ff)
  • trunk/src/world_entities/power_ups/power_up.cc

    r5433 r5434  
    2727{
    2828  this->setClassID(CL_POWER_UP, "PowerUp");
     29
    2930}
    3031
     
    3435
    3536
     37void PowerUp::loadParam(const TiXmlElement* root)
     38{
     39  static_cast<WorldEntity*>(this)->loadParams(root);
     40
     41}
     42
  • trunk/src/world_entities/power_ups/power_up.h

    r5433 r5434  
    99#include "world_entity.h"
    1010
    11 class PowerUp : WorldEntity {
     11class PowerUp : public WorldEntity {
    1212
    1313 public:
    1414  PowerUp ();
    1515  virtual ~PowerUp ();
    16 
     16  void loadParam(const TiXmlElement* root);
    1717};
    1818
  • trunk/src/world_entities/power_ups/turret_power_up.cc

    r5433 r5434  
    1 
    2 
    31/*
    42   orxonox - the future of 3D-vertical-scrollers
     
    1210
    1311   ### File Specific:
    14    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1513   co-programmer: ...
    1614*/
    1715
    1816
    19 #include "power_up.h"
    20 
     17#include "turret_power_up.h"
     18#include "factory.h"
    2119
    2220using namespace std;
    2321
     22CREATE_FACTORY(TurretPowerUp);
    2423
    2524
    26 PowerUp::PowerUp ()
     25TurretPowerUp::TurretPowerUp ()
    2726{
    28   this->setClassID(CL_POWER_UP, "PowerUp");
     27  this->init();
     28}
     29
     30TurretPowerUp::TurretPowerUp(const TiXmlElement* root)
     31{
     32  this->init();
     33
     34  this->loadParams(root);
    2935}
    3036
    3137
    32 
    33 PowerUp::~PowerUp () {}
     38TurretPowerUp::~TurretPowerUp () {}
    3439
    3540
     41void TurretPowerUp::init()
     42{
     43  this->setClassID(CL_TURRET_POWER_UP, "TurretPowerUp");
     44  this->loadModel("models/guns/turret1.obj");
     45}
     46
     47
     48void TurretPowerUp::loadParams(const TiXmlElement* root)
     49{
     50  static_cast<PowerUp*>(this)->loadParams(root);
     51
     52}
  • trunk/src/world_entities/power_ups/turret_power_up.h

    r5433 r5434  
    11/*!
    2  * @file power_up.h
     2 * @file turret_power_up.h
    33 * @brief A class representing a PowerUp in the world.
    44*/
    55
    6 #ifndef _POWER_UP_H
    7 #define _POWER_UP_H
     6#ifndef _TURRET_POWER_UP_H
     7#define _TURRET_POWER_UP_H
    88
    9 #include "world_entity.h"
     9#include "power_up.h"
    1010
    11 class PowerUp : WorldEntity {
     11class TurretPowerUp : public PowerUp {
    1212
    1313 public:
    14   PowerUp ();
    15   virtual ~PowerUp ();
     14  TurretPowerUp();
     15  TurretPowerUp(const TiXmlElement* root);
     16  virtual ~TurretPowerUp ();
    1617
     18  private:
     19   void init();
     20   void loadParams(const TiXmlElement* root);
    1721};
    1822
    19 #endif /* _POWER_UP_H */
     23#endif /* _TURRET_POWER_UP_H */
Note: See TracChangeset for help on using the changeset viewer.