- Timestamp:
- Jun 23, 2006, 11:22:37 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r8518 r8740 615 615 dynamic_cast<GraphicsEffect*>(*it)->draw(); 616 616 } 617 GraphicsEngine::storeMatrices();618 617 Shader::suspendShader(); 619 618 Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL); -
trunk/src/lib/gui/gl/glgui_button.cc
r8717 r8740 100 100 bool GLGuiButton::processEvent(const Event& event) 101 101 { 102 if (event.type == SDLK_SPACE && !event.bPressed)102 if (event.type == SDLK_SPACE) 103 103 { 104 emit(released()); 104 if (event.bPressed) 105 emit(pushed()); 106 else 107 emit(released()); 105 108 return true; 106 109 } -
trunk/src/story_entities/game_world.cc
r8724 r8740 193 193 //b->setName("b"); 194 194 195 195 196 196 LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams); 197 197 … … 305 305 this->tick (); 306 306 307 307 308 308 /* update the state */ 309 this->update (); 310 311 309 //this->update (); /// LESS REDUNDANCY. 310 PNode::getNullParent()->updateNode(this->dtS); 311 312 312 313 /* collision detection */ 313 314 this->collisionDetection (); … … 317 318 /* check the game rules */ 318 319 this->checkGameRules(); 319 320 320 321 /* update the state */ 321 322 this->update (); … … 438 439 PNode::getNullParent()->updateNode (this->dtS); 439 440 OrxSound::SoundEngine::getInstance()->update(); 441 442 this->applyCameraSettings(); 440 443 GraphicsEngine::getInstance()->update(this->dtS); 441 444 } … … 515 518 516 519 520 void GameWorld::applyCameraSettings() 521 { 522 this->dataTank->localCamera->apply (); 523 this->dataTank->localCamera->project (); 524 GraphicsEngine::storeMatrices(); 525 } 526 527 517 528 518 529 /** … … 523 534 // clear buffer 524 535 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 525 glLoadIdentity();536 // glLoadIdentity(); 526 537 527 538 const std::list<BaseObject*>* reflectedWaters; … … 536 547 537 548 //camera and light 538 this->dataTank->localCamera->apply ();539 this->dataTank->localCamera->project ();549 //this->dataTank->localCamera->apply (); 550 //this->dataTank->localCamera->project (); 540 551 541 552 LightManager::getInstance()->draw(); … … 565 576 // clear buffer 566 577 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 567 glLoadIdentity();578 //glLoadIdentity(); 568 579 569 580 const std::list<BaseObject*>* reflectedWaters; … … 578 589 579 590 //camera and light 580 this->dataTank->localCamera->apply ();581 this->dataTank->localCamera->project ();591 //this->dataTank->localCamera->apply (); 592 //this->dataTank->localCamera->project (); 582 593 // prepare for reflection rendering 583 594 mw->activateRefraction(); … … 607 618 608 619 609 glEnable(GL_DEPTH_TEST); 610 glEnable(GL_LIGHTING); 611 612 // set camera 613 this->dataTank->localCamera->apply (); 614 this->dataTank->localCamera->project (); 620 // glEnable(GL_DEPTH_TEST); 621 // glEnable(GL_LIGHTING); 622 623 // set Lighting 615 624 LightManager::getInstance()->draw(); 616 625 626 /* Draw the BackGround */ 617 627 this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND)); 618 628 engine->drawBackgroundElements(); -
trunk/src/story_entities/game_world.h
r8271 r8740 73 73 virtual void collisionReaction(); 74 74 75 void applyCameraSettings(); 75 76 void drawEntityList(const ObjectManager::EntityList& drawList ) const; 76 77 virtual void renderPassReflection(); -
trunk/src/story_entities/menu/glgui_imagebutton.cc
r8717 r8740 38 38 void GLGuiImageButton::releasing(const Vector2D& pos, bool focused) 39 39 { 40 GLGuiPushButton::releasing(pos, focused); 40 41 if (focused) 41 42 this->emit(startLevel(this->levelID)); … … 55 56 { 56 57 GLGuiPushButton::showing(); 57 this->image->show(); 58 59 //this->image->show(); 58 60 } 59 61 … … 62 64 GLGuiPushButton::hiding(); 63 65 64 this->image->hide(); 66 //this->image->hide(); 67 } 68 69 bool GLGuiImageButton::processEvent(const Event& event) 70 { 71 if (event.type == SDLK_SPACE) 72 { 73 if (event.bPressed) 74 // emit(pushed()); 75 ; 76 else 77 { 78 // emit(released()); 79 emit(startLevel(this->levelID)); 80 } 81 return true; 82 } 83 return false; 65 84 } 66 85 67 86 87 68 88 } -
trunk/src/story_entities/menu/glgui_imagebutton.h
r8717 r8740 1 1 /*! 2 * @file shell.h 3 * Definition of a on-screen-shell 2 * @file glgui_imagebutton.h 4 3 * 5 * @todo Buffer Display in different Colors for different debug mode.6 * @todo choose color of the Font and the background.7 4 */ 8 5 … … 25 22 26 23 24 void push(); 25 void release(); 26 27 27 DeclareSignal1(startLevel, int); 28 28 … … 35 35 virtual void hiding(); 36 36 37 37 virtual bool processEvent(const Event& event); 38 38 private: 39 39 unsigned int levelID;
Note: See TracChangeset
for help on using the changeset viewer.