Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2636 in orxonox.OLD for orxonox/trunk/src/camera.cc


Ignore:
Timestamp:
Oct 25, 2004, 12:48:39 AM (21 years ago)
Author:
patrick
Message:
  • Added a GameLoader to the game. This enables orxonox to load a campaign consisting of multimple worlds and cinematics etc. However, cinematics are not yet implemented.

In the game you can jump from one level to the other by pressing x. Currently there are only two very simple levels defined. (DEBUG_LEVEL_0, DEBUG_LEVEL_1).

  • Added Error Handling structs to signal the error source and code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/camera.cc

    r2551 r2636  
    2727   This standard constructor sets all parameters to zero
    2828*/
    29 Camera::Camera ()
    30 {
     29Camera::Camera (World* world)
     30{
     31  this->world = world;
    3132  bound = NULL;
    3233  /* give it some physical live */
     
    3637  fs = new Vector(0.0, 0.0, 0.0);
    3738  cameraMode = NORMAL;
    38 
    3939  deltaTime = 3000.0;
    4040  cameraOffset = 1.0;
     
    179179      /* the camera is handled like an entity and rolls on the track */
    180180    case NORMAL:
    181       Orxonox *orx = Orxonox::getInstance();
    182181      Location lookat; 
    183       if( bound != NULL)
     182      if( bound != NULL && world != NULL )
    184183        {
    185184          bound->get_lookat (&lookat);
    186           orx->get_world()->calc_camera_pos (&lookat, &desired_place);
     185          world->calc_camera_pos (&lookat, &desired_place);
    187186        }
    188187      else
     
    293292    }
    294293}
     294
     295
     296void Camera::setWorld(World* world)
     297{
     298  this->world = world;
     299}
Note: See TracChangeset for help on using the changeset viewer.