Changeset 4334 in orxonox.OLD
- Timestamp:
- May 27, 2005, 7:53:19 PM (19 years ago)
- Location:
- orxonox/branches/physics/src/subprojects/particles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/subprojects/particles/framework.cc
r4333 r4334 38 38 39 39 // keyhandler returns false if sdl gets quit by some event 40 framework-> keyHandler();40 framework->eventHandler(); 41 41 42 42 // tick the scene … … 76 76 77 77 78 bool Framework:: keyHandler()78 bool Framework::eventHandler() 79 79 { 80 80 // This is the main loop for the entire program and it will run until done==TRUE … … 84 84 while(SDL_PollEvent(&event)) 85 85 { 86 moduleEventHandler(&event); 87 86 88 switch (event.type) { 87 89 case SDL_MOUSEMOTION: … … 141 143 quitGui(NULL, NULL); 142 144 break; 143 case SDLK_c:144 145 break;146 case SDLK_i:147 // ParticleEngine::getInstance()->debug();148 break;149 145 case SDLK_a: 150 146 camera->setRelCoor(camera->getRelCoor() + (camera->getTarget()->getAbsCoor() - camera->getAbsCoor())*.1); -
orxonox/branches/physics/src/subprojects/particles/framework.h
r4333 r4334 4 4 #include "vector.h" 5 5 #include "glincl.h" 6 #include "SDL_events.h" 6 7 7 8 #include "gui_gtk.h" … … 37 38 38 39 void moduleInit(); 39 void* moduleInitGui(void); 40 40 void moduleInitGui(void); 41 void moduleEventHandler(SDL_Event* event); 42 void moduleTick(float dt); 41 43 void moduleDraw(float dt); 42 void moduleTick(float dt);43 44 44 45 void moduleHelp(void) const; … … 49 50 bool draw(float dt); 50 51 float tick(); 51 bool keyHandler();52 bool eventHandler(); 52 53 void quit(); 53 54 -
orxonox/branches/physics/src/subprojects/particles/particle_fun.cc
r4333 r4334 18 18 #include "framework.h" 19 19 20 #include "gui_gtk.h"21 20 #include "physics_engine.h" 22 21 #include "particle_engine.h" … … 34 33 } 35 34 35 void Framework::moduleEventHandler(SDL_Event* event) 36 { 37 switch (event->type) 38 { 39 case SDL_KEYDOWN: 40 switch (event->key.keysym.sym) 41 { 42 case SDLK_i: 43 ParticleEngine::getInstance()->debug(); 44 break; 45 } 46 47 } 48 49 } 50 51 void Framework::moduleTick(float dt) 52 { 53 ParticleEngine::getInstance()->tick(dt); 54 } 36 55 37 56 void Framework::moduleDraw(float dt) 38 57 { 39 58 ParticleEngine::getInstance()->draw(dt); 40 }41 42 43 void Framework::moduleTick(float dt)44 {45 ParticleEngine::getInstance()->tick(dt);46 59 } 47 60 … … 161 174 162 175 163 void *Framework::moduleInitGui(void)176 void Framework::moduleInitGui(void) 164 177 { 165 178 Window* guiMainWindow = NULL;
Note: See TracChangeset
for help on using the changeset viewer.