Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2100 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Jul 10, 2004, 1:15:22 PM (20 years ago)
Author:
chris
Message:

orxonox/branches/chris: First part of the "Getittocompile"-Project

Location:
orxonox/branches/chris/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/src/camera.cc

    r2096 r2100  
    1616*/
    1717
    18 
    1918#include "camera.h"
     19#include "world.h"
     20#include "world_entity.h"
    2021
    2122using namespace std;
     
    9394  glLoadMatrixf (matrix);
    9495        // translation
    95   glTranslatef (actual_place.v.x, actual_place.v.y, actual_place.v.z);
     96  glTranslatef (actual_place.r.x, actual_place.r.y, actual_place.r.z);
    9697 
    9798  glMatrixMode (GL_MODELVIEW);
     
    130131        if( entity != NULL)
    131132        {
    132                 if( entity->bFree) printf("Cannot bind camera to free entity");
     133                if( entity->isFree ()) printf("Cannot bind camera to free entity");
    133134                else bound = entity;
    134135        }
  • orxonox/branches/chris/src/camera.h

    r2096 r2100  
    66#ifndef CAMERA_H
    77#define CAMERA_H
     8
     9#include "stdincl.h"
     10
     11class WorldEntity;
    812
    913//! Camera
     
    2630  ~Camera ();
    2731
    28         void time_slice (float deltaT);
    29         apply ();
    30         bind (WorldEntity* entity);
    31         jump (Placement* plc);
     32        void time_slice (Uint32 deltaT);
     33        void apply ();
     34        void bind (WorldEntity* entity);
     35        void jump (Placement* plc);
    3236
    3337};
  • orxonox/branches/chris/src/collision.cc

    r2012 r2100  
    1818
    1919#include "collision.h"
    20 
    2120
    2221using namespace std;
  • orxonox/branches/chris/src/command_node.cc

    r2096 r2100  
    1818#include "keynames.h"
    1919#include "ini_parser.h"
     20#include "world_entity.h"
    2021
    2122#include <stdio.h>
  • orxonox/branches/chris/src/command_node.h

    r2096 r2100  
    1010
    1111#include "stdincl.h"
     12
     13class WorldEntity;
    1214
    1315#define N_STD_KEYS SDLK_LAST
  • orxonox/branches/chris/src/keynames.cc

    r2066 r2100  
    1313   co-programmer: ...
    1414*/
     15#include <SDL/SDL.h>
    1516
    1617#include "keynames.h"
     
    2526        if( !strcmp (name, "BUTTON_MIDDLE")) return SDL_BUTTON_MIDDLE;
    2627        if( !strcmp (name, "BUTTON_RIGHT")) return SDL_BUTTON_RIGHT;
    27         if( !strcmp (name, "BUTTON_WHEELUP")) return SDL_BUTTON_WHEELUP;
    28         if( !strcmp (name, "BUTTON_WHEELDOWN")) return SDL_BUTTON_WHEELDOWN;
     28//      if( !strcmp (name, "BUTTON_WHEELUP")) return SDL_BUTTON_WHEELUP;
     29//      if( !strcmp (name, "BUTTON_WHEELDOWN")) return SDL_BUTTON_WHEELDOWN;
    2930        return -1;
    3031}
     
    3233char* SDLB_to_buttonname( int button)
    3334{
    34         if( button == SDL_BUTTON_LEFT)) return "BUTTON_LEFT";
    35         if( button == BUTTON_MIDDLE)) return "BUTTON_MIDDLE";
    36         if( button == BUTTON_RIGHT)) return "BUTTON_RIGHT";
    37         if( button == BUTTON_WHEELUP)) return "BUTTON_WHEELUP";
    38         if( button == BUTTON_WHEELDOWN)) return "BUTTON_WHEELDOWN";
    39         return -1;
     35        if( button == SDL_BUTTON_LEFT) return "BUTTON_LEFT";
     36        if( button == SDL_BUTTON_MIDDLE) return "BUTTON_MIDDLE";
     37        if( button == SDL_BUTTON_RIGHT) return "BUTTON_RIGHT";
     38//      if( button == SDL_BUTTON_WHEELUP) return "BUTTON_WHEELUP";
     39//      if( button == SDL_BUTTON_WHEELDOWN) return "BUTTON_WHEELDOWN";
     40        return "UNKNOWN";
    4041}
    4142
     
    311312        if( key == SDLK_POWER) return "POWER";
    312313        if( key == SDLK_EURO) return "EURO";
    313         return "UNKNOWN"
     314        return "UNKNOWN";
    314315}
  • orxonox/branches/chris/src/orxonox.h

    r2096 r2100  
    55#include <SDL/SDL.h>
    66
     7#include "stdincl.h"
     8
     9class CommandNode;
     10class WorldEntity;
     11class DataTank;
    712class World;
     13class Camera;
    814
    915class Orxonox {
     
    4147  int init_resources ();
    4248  int init_world ();
    43 
    44   static void event_handler (SDL_Event* event);
    4549 
    4650 public:
    4751  static Orxonox* getInstance ();
    4852  static void quitGame();
     53
     54  static void event_handler (SDL_Event* event);
    4955
    5056  int init (int argc, char** argv);
  • orxonox/branches/chris/src/stdincl.h

    r2066 r2100  
    99#endif
    1010#include <SDL/SDL.h>
     11#include <GL/GL.h>
    1112
     13#include "vector.h"
     14#include "coordinates.h"
    1215#include "list.h"
    1316#include "message_structures.h"
    1417#include "orxonox.h"
    15 #include "world_entity.h"
    1618
    1719#endif
  • orxonox/branches/chris/src/vector.h

    r2096 r2100  
    1212#define PI 3.14159265359f
    1313
    14 CommandNode::
    1514class Vector {
    1615
     
    5554  Rotation operator* (const Rotation& r);
    5655 
    57   glmatrix (float* buffer);
     56  void glmatrix (float* buffer);
    5857};
    5958
  • orxonox/branches/chris/src/world.h

    r2096 r2100  
    22#ifndef WORLD_H
    33#define WORLD_H
     4
     5class Track;
    46
    57class World {
     
    911  ~World ();
    1012
    11         template<class T> T* spawn<T>(Location* loc, WorldEntity* owner);       // template to be able to spawn any derivation of WorldEntity
    12         template<class T> T* spawn<T>(Placement* plc, WorldEntity* owner = NULL)
     13        template<class T>
     14          T* spawn<T>(Location* loc, WorldEntity* owner);       // template to be able to spawn any derivation of WorldEntity
     15        template<class T>
     16          T* spawn<T>(Placement* plc, WorldEntity* owner);
    1317
    1418        void time_slice (Uint32 deltaT);
  • orxonox/branches/chris/src/world_entity.cc

    r2096 r2100  
    5353{
    5454        return &place;
     55}
     56
     57bool WorldEntity::isFree ()
     58{
     59  return bFree;
    5560}
    5661
  • orxonox/branches/chris/src/world_entity.h

    r2096 r2100  
    33#define WORLD_ENTITY_H
    44
    5 #include "stdincl.h"
    6 //#include "data_tank.h"
    7 
    8 class Vector;
    9 class Ability;
     5class CollisionCluster;
    106
    117class WorldEntity
     
    2016        Placement* get_placement ();
    2117        void set_collision (CollisionCluster* newhull);
    22                
     18       
     19        bool isFree ();
     20       
    2321  //void addAbility(Ability* ability);
    2422  //void removeAbility(Ability* ability);
Note: See TracChangeset for help on using the changeset viewer.