- Timestamp:
- Jul 10, 2004, 1:15:22 PM (20 years ago)
- Location:
- orxonox/branches/chris/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/camera.cc
r2096 r2100 16 16 */ 17 17 18 19 18 #include "camera.h" 19 #include "world.h" 20 #include "world_entity.h" 20 21 21 22 using namespace std; … … 93 94 glLoadMatrixf (matrix); 94 95 // 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); 96 97 97 98 glMatrixMode (GL_MODELVIEW); … … 130 131 if( entity != NULL) 131 132 { 132 if( entity-> bFree) printf("Cannot bind camera to free entity");133 if( entity->isFree ()) printf("Cannot bind camera to free entity"); 133 134 else bound = entity; 134 135 } -
orxonox/branches/chris/src/camera.h
r2096 r2100 6 6 #ifndef CAMERA_H 7 7 #define CAMERA_H 8 9 #include "stdincl.h" 10 11 class WorldEntity; 8 12 9 13 //! Camera … … 26 30 ~Camera (); 27 31 28 void time_slice ( floatdeltaT);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); 32 36 33 37 }; -
orxonox/branches/chris/src/collision.cc
r2012 r2100 18 18 19 19 #include "collision.h" 20 21 20 22 21 using namespace std; -
orxonox/branches/chris/src/command_node.cc
r2096 r2100 18 18 #include "keynames.h" 19 19 #include "ini_parser.h" 20 #include "world_entity.h" 20 21 21 22 #include <stdio.h> -
orxonox/branches/chris/src/command_node.h
r2096 r2100 10 10 11 11 #include "stdincl.h" 12 13 class WorldEntity; 12 14 13 15 #define N_STD_KEYS SDLK_LAST -
orxonox/branches/chris/src/keynames.cc
r2066 r2100 13 13 co-programmer: ... 14 14 */ 15 #include <SDL/SDL.h> 15 16 16 17 #include "keynames.h" … … 25 26 if( !strcmp (name, "BUTTON_MIDDLE")) return SDL_BUTTON_MIDDLE; 26 27 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; 29 30 return -1; 30 31 } … … 32 33 char* SDLB_to_buttonname( int button) 33 34 { 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"; 40 41 } 41 42 … … 311 312 if( key == SDLK_POWER) return "POWER"; 312 313 if( key == SDLK_EURO) return "EURO"; 313 return "UNKNOWN" 314 return "UNKNOWN"; 314 315 } -
orxonox/branches/chris/src/orxonox.h
r2096 r2100 5 5 #include <SDL/SDL.h> 6 6 7 #include "stdincl.h" 8 9 class CommandNode; 10 class WorldEntity; 11 class DataTank; 7 12 class World; 13 class Camera; 8 14 9 15 class Orxonox { … … 41 47 int init_resources (); 42 48 int init_world (); 43 44 static void event_handler (SDL_Event* event);45 49 46 50 public: 47 51 static Orxonox* getInstance (); 48 52 static void quitGame(); 53 54 static void event_handler (SDL_Event* event); 49 55 50 56 int init (int argc, char** argv); -
orxonox/branches/chris/src/stdincl.h
r2066 r2100 9 9 #endif 10 10 #include <SDL/SDL.h> 11 #include <GL/GL.h> 11 12 13 #include "vector.h" 14 #include "coordinates.h" 12 15 #include "list.h" 13 16 #include "message_structures.h" 14 17 #include "orxonox.h" 15 #include "world_entity.h"16 18 17 19 #endif -
orxonox/branches/chris/src/vector.h
r2096 r2100 12 12 #define PI 3.14159265359f 13 13 14 CommandNode::15 14 class Vector { 16 15 … … 55 54 Rotation operator* (const Rotation& r); 56 55 57 glmatrix (float* buffer);56 void glmatrix (float* buffer); 58 57 }; 59 58 -
orxonox/branches/chris/src/world.h
r2096 r2100 2 2 #ifndef WORLD_H 3 3 #define WORLD_H 4 5 class Track; 4 6 5 7 class World { … … 9 11 ~World (); 10 12 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); 13 17 14 18 void time_slice (Uint32 deltaT); -
orxonox/branches/chris/src/world_entity.cc
r2096 r2100 53 53 { 54 54 return &place; 55 } 56 57 bool WorldEntity::isFree () 58 { 59 return bFree; 55 60 } 56 61 -
orxonox/branches/chris/src/world_entity.h
r2096 r2100 3 3 #define WORLD_ENTITY_H 4 4 5 #include "stdincl.h" 6 //#include "data_tank.h" 7 8 class Vector; 9 class Ability; 5 class CollisionCluster; 10 6 11 7 class WorldEntity … … 20 16 Placement* get_placement (); 21 17 void set_collision (CollisionCluster* newhull); 22 18 19 bool isFree (); 20 23 21 //void addAbility(Ability* ability); 24 22 //void removeAbility(Ability* ability);
Note: See TracChangeset
for help on using the changeset viewer.