Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/graphics/graphics_engine.cc


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r9406 r9869  
    1717
    1818#include "graphics_engine.h"
    19 #include "util/loading/resource_manager.h"
    2019#include "state.h"
    2120
     
    2827#include "debug.h"
    2928
    30 #include "util/preferences.h"
     29#include "parser/preferences/preferences.h"
    3130#include "substring.h"
    3231#include "text.h"
     
    3534#include "texture.h"
    3635
    37 #include "effects/graphics_effect.h"
    38 #include "effects/fog_effect.h"
    39 #include "effects/lense_flare.h"
     36#include "graphics_effect.h"
    4037
    4138#include "shell_command.h"
    42 
     39#include "loading/load_param_xml.h"
    4340
    4441#include "parser/tinyxml/tinyxml.h"
    4542#include "util/loading/load_param.h"
    4643#include "util/loading/factory.h"
    47 #include "class_list.h"
    4844
    4945#ifdef __WIN32__
     
    5450SHELL_COMMAND(fps, GraphicsEngine, toggleFPSdisplay);
    5551
     52ObjectListDefinition(GraphicsEngine);
     53
    5654/**
    5755 * @brief standard constructor
     
    5957GraphicsEngine::GraphicsEngine ()
    6058{
    61   this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
     59  this->registerObject(this, GraphicsEngine::_objectList);
    6260  this->setName("GraphicsEngine");
    6361
     
    117115{
    118116  LoadParamXML(root, "GraphicsEffect", this, GraphicsEngine, loadGraphicsEffects)
    119   .describe("loads a graphics effect");
     117   .describe("loads a graphics effect");
    120118}
    121119
     
    590588
    591589  // tick the graphics effects
    592   if (this->graphicsEffects != NULL || (this->graphicsEffects = ClassList::getList(CL_GRAPHICS_EFFECT)) != NULL)
    593   {
    594     std::list<BaseObject*>::const_iterator it;
    595     for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
    596       dynamic_cast<GraphicsEffect*>(*it)->tick(dt);
    597   }
     590  for (ObjectList<GraphicsEffect>::const_iterator it = GraphicsEffect::objectList().begin();
     591       it != GraphicsEffect::objectList().end();
     592       ++it)
     593    (*it)->tick(dt);
    598594}
    599595
     
    688684  {
    689685    case EV_VIDEO_RESIZE:
    690       this->resolutionChanged(event.resize);
    691       break;
    692   }
    693 }
     686    this->resolutionChanged(event.resize);
     687    break;
     688  }
     689}
Note: See TracChangeset for help on using the changeset viewer.