/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Andreas Maechler, David Hasenfratz co-programmer: ... */ #include "atmospheric_engine.h" #include "util/loading/resource_manager.h" #include "effects/fog_effect.h" #include "util/loading/load_param.h" #include "util/loading/factory.h" #include "class_list.h" using namespace std; /** * @param root The XML-element to load the AtmosphericEngine from */ AtmosphericEngine::AtmosphericEngine() { this->setClassID(CL_ATMOSPHERIC_ENGINE, "AtmosphericEngine"); // this->bActivated = false; } /** * The Pointer to this AtmosphericEngine */ AtmosphericEngine* AtmosphericEngine::singletonRef = NULL; /** * destroys a AtmosphericEngine */ AtmosphericEngine::~AtmosphericEngine() { AtmosphericEngine::singletonRef = NULL; } /** * @param root The XML-element to load the AtmosphericEngine from */ void AtmosphericEngine::loadParams(const TiXmlElement* root) { LoadParamXML(root, "WeatherEffect", this, AtmosphericEngine, loadWeatherEffect); LoadParamXML(root, "SunEffect", this, AtmosphericEngine, loadSunEffect); } /** * @param root The XML-element to load WeatherEffects from */ void AtmosphericEngine::loadWeatherEffect(const TiXmlElement* root) { LOAD_PARAM_START_CYCLE(root, element); { PRINTF(4)("element is: %s\n", element->Value()); Factory::fabricate(element); } LOAD_PARAM_END_CYCLE(element); } /** * @param root The XML-element to load SunEffects from */ void AtmosphericEngine::loadSunEffect(const TiXmlElement* root) { LOAD_PARAM_START_CYCLE(root, element); { PRINTF(4)("element is: %s\n", element->Value()); Factory::fabricate(element); } LOAD_PARAM_END_CYCLE(element); } /** * initializes the graphics effect */ //bool AtmosphericEngine::init() //{} /** * draws the effect, if needed */ void AtmosphericEngine::draw() const {} /** * ticks the effect if there is any time dependancy */ void AtmosphericEngine::tick(float dt) {}