Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4326 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 27, 2005, 3:06:16 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: working on an alternativ flight mode and a new event handlig system at the same time. crazy…

Location:
orxonox/trunk/src
Files:
3 added
8 edited

Legend:

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

    r4315 r4326  
    7575                 lib/coord/null_parent.cc \
    7676                 lib/coord/helper_parent.cc \
     77                 lib/coord/pilot_node.cc \
    7778                 lib/graphics/graphics_engine.cc \
    7879                 lib/graphics/light.cc \
     
    100101                 defs/keynames.h \
    101102                 command_node.h \
     103                 action_listener.h \
    102104                 defs/message_structures.h \
    103105                 util/loading/game_loader.h \
     
    143145                 lib/coord/null_parent.h \
    144146                 lib/coord/helper_parent.h \
     147                 lib/coord/pilot_node.h \
    145148                 lib/graphics/graphics_engine.h \
    146149                 lib/graphics/light.h \
  • orxonox/trunk/src/Makefile.in

    r4315 r4326  
    6868        test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \
    6969        null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
    70         graphics_engine.$(OBJEXT) light.$(OBJEXT) \
     70        pilot_node.$(OBJEXT) graphics_engine.$(OBJEXT) light.$(OBJEXT) \
    7171        text_engine.$(OBJEXT) array.$(OBJEXT) objModel.$(OBJEXT) \
    7272        md2Model.$(OBJEXT) primitive_model.$(OBJEXT) model.$(OBJEXT) \
     
    105105@AMDEP_TRUE@    ./$(DEPDIR)/particle_engine.Po \
    106106@AMDEP_TRUE@    ./$(DEPDIR)/particle_system.Po \
    107 @AMDEP_TRUE@    ./$(DEPDIR)/player.Po \
     107@AMDEP_TRUE@    ./$(DEPDIR)/pilot_node.Po ./$(DEPDIR)/player.Po \
    108108@AMDEP_TRUE@    ./$(DEPDIR)/primitive_model.Po \
    109109@AMDEP_TRUE@    ./$(DEPDIR)/projectile.Po \
     
    290290                 lib/coord/null_parent.cc \
    291291                 lib/coord/helper_parent.cc \
     292                 lib/coord/pilot_node.cc \
    292293                 lib/graphics/graphics_engine.cc \
    293294                 lib/graphics/light.cc \
     
    315316                 defs/keynames.h \
    316317                 command_node.h \
     318                 action_listener.h \
    317319                 defs/message_structures.h \
    318320                 util/loading/game_loader.h \
     
    358360                 lib/coord/null_parent.h \
    359361                 lib/coord/helper_parent.h \
     362                 lib/coord/pilot_node.h \
    360363                 lib/graphics/graphics_engine.h \
    361364                 lib/graphics/light.h \
     
    498501@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_engine.Po@am__quote@
    499502@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_system.Po@am__quote@
     503@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pilot_node.Po@am__quote@
    500504@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
    501505@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
     
    10631067@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    10641068@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o helper_parent.obj `if test -f 'lib/coord/helper_parent.cc'; then $(CYGPATH_W) 'lib/coord/helper_parent.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/helper_parent.cc'; fi`
     1069
     1070pilot_node.o: lib/coord/pilot_node.cc
     1071@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pilot_node.o -MD -MP -MF "$(DEPDIR)/pilot_node.Tpo" -c -o pilot_node.o `test -f 'lib/coord/pilot_node.cc' || echo '$(srcdir)/'`lib/coord/pilot_node.cc; \
     1072@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/pilot_node.Tpo" "$(DEPDIR)/pilot_node.Po"; else rm -f "$(DEPDIR)/pilot_node.Tpo"; exit 1; fi
     1073@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='lib/coord/pilot_node.cc' object='pilot_node.o' libtool=no @AMDEPBACKSLASH@
     1074@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/pilot_node.Po' tmpdepfile='$(DEPDIR)/pilot_node.TPo' @AMDEPBACKSLASH@
     1075@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1076@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pilot_node.o `test -f 'lib/coord/pilot_node.cc' || echo '$(srcdir)/'`lib/coord/pilot_node.cc
     1077
     1078pilot_node.obj: lib/coord/pilot_node.cc
     1079@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pilot_node.obj -MD -MP -MF "$(DEPDIR)/pilot_node.Tpo" -c -o pilot_node.obj `if test -f 'lib/coord/pilot_node.cc'; then $(CYGPATH_W) 'lib/coord/pilot_node.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/pilot_node.cc'; fi`; \
     1080@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/pilot_node.Tpo" "$(DEPDIR)/pilot_node.Po"; else rm -f "$(DEPDIR)/pilot_node.Tpo"; exit 1; fi
     1081@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='lib/coord/pilot_node.cc' object='pilot_node.obj' libtool=no @AMDEPBACKSLASH@
     1082@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/pilot_node.Po' tmpdepfile='$(DEPDIR)/pilot_node.TPo' @AMDEPBACKSLASH@
     1083@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1084@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pilot_node.obj `if test -f 'lib/coord/pilot_node.cc'; then $(CYGPATH_W) 'lib/coord/pilot_node.cc'; else $(CYGPATH_W) '$(srcdir)/lib/coord/pilot_node.cc'; fi`
    10651085
    10661086graphics_engine.o: lib/graphics/graphics_engine.cc
  • orxonox/trunk/src/class_list.h

    r4318 r4326  
    1818  CL_CAMERA,
    1919  CL_CAMERA_TARGET,
     20  CL_PILOT_PARENT,
    2021
    2122  CL_WORLD_ENTITY,
  • orxonox/trunk/src/command_node.cc

    r4091 r4326  
    2424#include "list.h"
    2525#include "orxonox.h"
     26#include "p_node.h"
    2627
    2728#include <stdio.h>
     
    3738CommandNode::CommandNode (int ID)
    3839{
    39   this->bound = new tList<WorldEntity>();
     40  this->bound = new tList<PNode>();
    4041  this->aliases = NULL;
    4142  this->netID = ID;
     
    5455  this->bLocalInput = true;
    5556  this->netID = 0;
    56   this->bound = new tList<WorldEntity>();
     57  this->bound = new tList<PNode>();
    5758  this->bEnabled = true;
    5859  this->world = NULL;
     
    194195   \param entity: Pointer to the entity to bind
    195196*/
    196 void CommandNode::bind (WorldEntity* entity)
     197void CommandNode::bind (PNode* entity)
    197198{
    198199  bound->add (entity);
     
    203204   \param entity: Pointer to the entity to relese
    204205*/
    205 void CommandNode::unbind (WorldEntity* entity)
     206void CommandNode::unbind (PNode* entity)
    206207{
    207208  bound->remove (entity);
     
    264265          cmd.xrel = event.motion.xrel;
    265266          cmd.yrel = event.motion.yrel;
     267          if( strlen (cmd.cmd) > 0) relay(&cmd);
    266268          break;
    267269        case SDL_MOUSEBUTTONUP:
     
    308310  if( this->world->command(cmd)) return;
    309311
    310   tIterator<WorldEntity>* iterator = bound->getIterator();
    311   WorldEntity* entity = iterator->nextElement();
     312  tIterator<PNode>* iterator = bound->getIterator();
     313  PNode* entity = iterator->nextElement();
    312314  while( entity != NULL)
    313315    {
    314       entity->command (cmd); /*no absorbtion of command! strange*/
     316      ((WorldEntity*)entity)->command (cmd); /*no absorbtion of command! strange*/
    315317      entity = iterator->nextElement();
    316318    }
  • orxonox/trunk/src/command_node.h

    r4084 r4326  
    1515class WorldEntity;
    1616class World;
     17class PNode;
    1718
    1819#define N_STD_KEYS SDLK_LAST
     
    4546  int netID;    //!< Unique identifier that is used to determine between remote CommandNodes
    4647  KeyBindings* aliases;
    47   tList<WorldEntity>* bound;    //!< List of WorldEntites that recieve commands from this CommandNode
     48  tList<PNode>* bound;  //!< List of WorldEntites that recieve commands from this CommandNode
    4849  Sint32 coord[2];
    4950  World* world;
     
    6465  void enable (bool bEnabled);
    6566  void loadBindings (char* filename);
    66   void bind (WorldEntity* entity);
    67   void unbind (WorldEntity* entity);
     67  void bind (PNode* entity);
     68  void unbind (PNode* entity);
    6869  void addToWorld (World* world);
    6970  void process ();
  • orxonox/trunk/src/lib/coord/p_node.h

    r4145 r4326  
    9191  const char* getName ();
    9292
    93 
    9493  void debug ();
    9594
  • orxonox/trunk/src/story_entities/world.cc

    r4324 r4326  
    2525#include "null_parent.h"
    2626#include "helper_parent.h"
     27#include "pilot_node.h"
    2728#include "track_node.h"
    2829#include "world_entity.h"
     
    473474
    474475
     476/**
     477   \brief loads the debug world: only for experimental stuff
     478*/
    475479void World::loadDebugWorld(int worldID)
    476480{
     
    555559
    556560
    557         // create a player
    558561        this->localPlayer = new Player ();
    559562        this->localPlayer->setName ("player");
    560563        this->spawn (this->localPlayer);
    561564        /*monitor progress*/
    562         //this->glmis->step();
    563565        this->glmis->step();
    564566
    565         // bind input
    566         Orxonox *orx = Orxonox::getInstance ();
    567         orx->getLocalInput()->bind (this->localPlayer);
    568            
    569567        // bind camera
    570568        this->localCamera = new Camera();
    571569        this->localCamera->setName ("camera");
    572            
    573570        /*monitor progress*/
    574571        this->glmis->step();
     
    591588        this->glmis->step();
    592589
     590        this->pilotNode = new PilotNode();
     591        this->pilotNode->addChild(this->localPlayer);
     592        this->pilotNode->addChild(this->localCamera);
     593        // bind input
     594        Orxonox *orx = Orxonox::getInstance ();
     595        //orx->getLocalInput()->bind (this->pilotNode);     
     596       
     597        /*
    593598        PNode* tn = trackManager->getTrackNode();
    594599        tn->addChild(this->localPlayer);
    595600        this->localCamera->lookAt(tn);
    596 
    597 
     601       
    598602        tn->addChild(this->localCamera);
    599603        this->localPlayer->setMode(PNODE_ALL);
    600604        trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     605        */
    601606        this->glmis->step();
    602607        break;
     
    628633{
    629634  this->bPause = false;
     635  this->pilotNode = NULL;
    630636  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
    631637  cn->addToWorld(this);
     
    10991105  else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW4)) this->localCamera->setViewMode(VIEW_RIGHT);
    11001106  else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW5)) this->localCamera->setViewMode(VIEW_TOP);
    1101 
     1107  else if(this->pilotNode != NULL) if( !strcmp( cmd->cmd, "cursor")) this->pilotNode->command(cmd);
    11021108  return false;
    11031109}
  • orxonox/trunk/src/story_entities/world.h

    r4261 r4326  
    2424class Text;
    2525class TiXmlElement;
     26class PilotNode;
    2627
    2728//! The game world Interface
     
    120121  tList<WorldEntity>* entities;       //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
    121122  WorldEntity* localPlayer;           //!< The Player, you fly through the level.
     123  PilotNode* pilotNode;               //!< THe pilot node to fly with the mouse
    122124
    123125  GarbageCollector* garbageCollector; //!< reference to the garbage  collector
Note: See TracChangeset for help on using the changeset viewer.