- Timestamp:
- Dec 16, 2004, 5:05:16 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/command_node.cc
r2816 r3194 62 62 63 63 64 /** 65 \brief this resets the command node 66 67 deleting all data contained in the command node to fill it up again 68 69 \todo coppling to different game-entities 70 \todo reset/destroy has to be redesigned 71 */ 72 64 73 void CommandNode::reset() 65 74 { 66 this->bound-> clear();75 this->bound->destroy(); 67 76 } 68 77 -
orxonox/trunk/src/environment.cc
r2816 r3194 67 67 void Environment::draw () 68 68 { 69 printf("Environment::draw()");70 71 69 glMatrixMode(GL_MODELVIEW); 72 70 glLoadIdentity(); … … 78 76 79 77 glBegin(GL_TRIANGLES); 80 glColor3f(1, 1,1);78 glColor3f(1,0,1); 81 79 glVertex3f(0,0,0.5); 82 80 glVertex3f(-0.5,0,-1); … … 89 87 90 88 glBegin(GL_QUADS); 91 glColor3f( 0,0,1);89 glColor3f(1,0,1); 92 90 glVertex3f(0.5,0.5,-1); 93 91 glVertex3f(0.5,-0.5,-1); -
orxonox/trunk/src/list.cc
r2818 r3194 77 77 78 78 79 void List:: clear()79 void List::destroy() 80 80 { 81 81 printf("List::clear() - clearing all world objects, releasing mem\n"); -
orxonox/trunk/src/list.h
r2822 r3194 22 22 void add(WorldEntity* entity); 23 23 void remove(WorldEntity* entity); 24 void clear();24 void destroy(); 25 25 WorldEntity* firstElement(); 26 26 bool isEmpty(); … … 80 80 void add(WorldEntity* entity); 81 81 void remove(WorldEntity* entity); 82 void clear();82 void destroy(); 83 83 T* firstElement(); 84 84 bool isEmpty(); … … 148 148 149 149 template<class T> 150 void tList<T>:: clear()150 void tList<T>::destroy() 151 151 { 152 152 printf("tList<T>::clear() - clearing all world objects, releasing mem\n"); -
orxonox/trunk/src/player.cc
r2969 r3194 26 26 { 27 27 28 obj = new Object ("reaplow.obj");28 this->obj = new Object ("reaplow.obj"); 29 29 /* 30 30 objectList = glGenLists(1); … … 55 55 56 56 Player::~Player () 57 { 57 58 58 { 59 delete this->obj; 59 60 } 60 61 -
orxonox/trunk/src/world.cc
r3175 r3194 75 75 this->bQuitCurrentGame = true; 76 76 this->localCamera->setWorld(NULL); 77 this->entities->clear(); 77 WorldEntity* entity = entities->enumerate(); 78 while( entity != NULL ) 79 { 80 entity->destroy(); 81 entity = entities->nextElement(); 82 } 83 this->entities->destroy(); 78 84 Orxonox::getInstance()->get_localinput()->reset(); 79 this->~World();80 85 } 81 86 … … 114 119 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]); 115 120 } 116 121 // !\todo old track-system has to be removed 122 117 123 // create a player 118 124 WorldEntity* myPlayer = new Player(); … … 154 160 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]); 155 161 } 156 162 157 163 // create a player 158 //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();159 164 WorldEntity* myPlayer = new Player(); 160 165 this->spawn(myPlayer); 161 this->localPlayer = myPlayer; 166 this->localPlayer = myPlayer; 162 167 163 168 // bind input … … 539 544 else 540 545 { 541 printf("fps = 1000 but 0ms!\n"); 546 printf("fps = 1000 - frame rate is adjusted\n"); 547 SDL_Delay(10); 548 dt = 10; 542 549 } 543 550
Note: See TracChangeset
for help on using the changeset viewer.