Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3727 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
Apr 5, 2005, 7:44:05 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: added a third debug level, made SimpleAnimation singleton and restructured it to be more opengl command style

Location:
orxonox/trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3710 r3727  
    390390
    391391            lightMan->getLight(0)->setParent(trackManager->getTrackNode());
     392            break;
     393          }
     394        case DEBUG_WORLD_2:
     395          {
     396            lightMan->setPosition(-5.0, 10.0, -40.0);
     397            this->nullParent = NullParent::getInstance ();
     398            this->nullParent->setName ("NullParent");
     399
     400            // !\todo old track-system has to be removed
     401
     402            //create helper for player
     403            //HelperParent* hp = new HelperParent ();
     404            /* the player has to be added to this helper */
     405
     406            // create a player
     407            this->localPlayer = new Player ();
     408            this->localPlayer->setName ("player");
     409            this->spawn (this->localPlayer);
     410            /*monitor progress*/
     411            //this->glmis->step();         
     412            this->glmis->step();
     413
     414            // bind input
     415            Orxonox *orx = Orxonox::getInstance ();
     416            orx->getLocalInput()->bind (this->localPlayer);
     417           
     418            // bind camera
     419            this->localCamera = new Camera();
     420            this->localCamera->setName ("camera");
     421            this->localCamera->lookAt(this->localPlayer);
     422            this->localCamera->setParent(this->localPlayer);
     423           
     424            /*monitor progress*/
     425            this->glmis->step();
     426
     427            // Create SkySphere
     428            this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
     429            this->skySphere->setName("SkySphere");
     430            this->localCamera->addChild(this->skySphere);
     431            this->skySphere->setMode(PNODE_MOVEMENT);
     432
     433            /*monitor progress*/
     434            this->glmis->step();
     435
     436           
     437            WorldEntity* env = new Environment();
     438            env->setName ("env");
     439            this->spawn(env);
     440
     441           
     442            /*
     443            Vector* es = new Vector (10, 5, 0);
     444            Quaternion* qs = new Quaternion ();
     445            WorldEntity* pr = new Primitive(P_CYLINDER);
     446            pr->setName("primitive");
     447            this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
     448            */
     449
     450            /*monitor progress*/
     451            this->glmis->step();
     452
     453            //      trackManager->setBindSlave(env);
     454            PNode* tn = trackManager->getTrackNode();
     455            tn->addChild(this->localPlayer);
     456
     457            //localCamera->setParent(TrackNode::getInstance());
     458            tn->addChild(this->localCamera);
     459            //      localCamera->lookAt(tn);
     460            this->localPlayer->setMode(PNODE_ALL);
     461            //Vector* cameraOffset = new Vector (0, 5, -10);
     462            trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     463            this->glmis->step();
     464
    392465            break;
    393466          }
  • orxonox/trunk/src/story_entities/world.h

    r3646 r3727  
    2424class Terrain;
    2525class GarbageCollector;
     26class SimpleAnimation;
    2627
    2728//! The game world Interface
     
    8889  void init(char* name, int worldID);
    8990
    90   Uint32 lastFrame;             //!< last time of frame
    91   Uint32 dt;                    //!< time needed to calculate this frame
    92   double gameTime;              //!< this is where the game time is saved
    93   bool bQuitOrxonox;            //!< quit this application
    94   bool bQuitCurrentGame;        //!< quit only the current game and return to menu
    95   bool bPause;                  //!< pause mode
     91  Uint32 lastFrame;                   //!< last time of frame
     92  Uint32 dt;                          //!< time needed to calculate this frame
     93  double gameTime;                    //!< this is where the game time is saved
     94  bool bQuitOrxonox;                  //!< quit this application
     95  bool bQuitCurrentGame;              //!< quit only the current game and return to menu
     96  bool bPause;                        //!< pause mode
    9697
    97   FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
    98   GLMenuImageScreen* glmis;     //!< The Level-Loader Display
     98  FontSet* testFont;                  //!< A test Font. \todo fix this, so it is for real.
     99  GLMenuImageScreen* glmis;           //!< The Level-Loader Display
    99100
    100   char* worldName;              //!< The name of this World
    101   int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
     101  char* worldName;                    //!< The name of this World
     102  int debugWorldNr;                   //!< The Debug Nr. needed, if something goes wrong
    102103
    103   PNode* nullParent;            //!< The zero-point, that everything has as its parent.
    104   TrackManager* trackManager;   //!< The reference of the TrackManager that handles the course through the Level.
    105   Camera* localCamera;          //!< The current Camera
    106   Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
    107   LightManager* lightMan;       //!< The Lights of the Level
    108   Terrain* terrain;             //!< The Terrain of the World.
     104  PNode* nullParent;                  //!< The zero-point, that everything has as its parent.
     105  TrackManager* trackManager;         //!< The reference of the TrackManager that handles the course through the Level.
     106  Camera* localCamera;                //!< The current Camera
     107  Skysphere* skySphere;               //!< The Environmental Heaven of orxonox \todo insert this to environment insted
     108  LightManager* lightMan;             //!< The Lights of the Level
     109  Terrain* terrain;                   //!< The Terrain of the World.
    109110
    110   GLuint objectList;            //!< temporary: \todo this will be ereased soon
    111   tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
    112   WorldEntity* localPlayer;     //!< The Player, you fly through the level.
     111  GLuint objectList;                  //!< temporary: \todo this will be ereased soon
     112  tList<WorldEntity>* entities;       //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
     113  WorldEntity* localPlayer;           //!< The Player, you fly through the level.
    113114
    114115  GarbageCollector* garbageCollector; //!< reference to the garbage  collector
     116
     117  SimpleAnimation* simpleAnimation;   //!< reference to the SimpleAnimation object
    115118 
    116119  /* function for main-loop */
Note: See TracChangeset for help on using the changeset viewer.