[6741] | 1 | |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | orxonox - the future of 3D-vertical-scrollers |
---|
| 5 | |
---|
| 6 | Copyright (C) 2004 orx |
---|
| 7 | |
---|
| 8 | This program is free software; you can redistribute it and/or modify |
---|
| 9 | it under the terms of the GNU General Public License as published by |
---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 11 | any later version. |
---|
| 12 | |
---|
| 13 | ### File Specific: |
---|
| 14 | main-programmer: Patrick Boenzli |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #include "graphics_effect.h" |
---|
| 21 | |
---|
[6772] | 22 | #include "graphics_engine.h" |
---|
[6741] | 23 | #include "load_param.h" |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | using namespace std; |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | /** |
---|
| 31 | * @param root The XML-element to load the GraphicsEffect from |
---|
| 32 | |
---|
| 33 | @todo what to do, if no GraphicsEffect-Slots are open anymore ??? |
---|
| 34 | */ |
---|
| 35 | GraphicsEffect::GraphicsEffect(const TiXmlElement* root) |
---|
| 36 | { |
---|
[6977] | 37 | this->setClassID(CL_GRAPHICS_EFFECT, "GraphicsEffect"); |
---|
[6772] | 38 | this->bActivated = false; |
---|
[6741] | 39 | |
---|
[6772] | 40 | this->bActivated = GraphicsEngine::getInstance()->loadGraphicsEffect(this); |
---|
[6741] | 41 | } |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | /** |
---|
| 45 | * destroys a GraphicsEffect |
---|
| 46 | */ |
---|
| 47 | GraphicsEffect::~GraphicsEffect() |
---|
[6772] | 48 | { |
---|
| 49 | if( this->bActivated) |
---|
| 50 | GraphicsEngine::getInstance()->unloadGraphicsEffect(this); |
---|
| 51 | } |
---|
[6741] | 52 | |
---|
| 53 | |
---|
| 54 | /** |
---|
| 55 | * @param root The XML-element to load the GraphicsEffect from |
---|
| 56 | */ |
---|
| 57 | void GraphicsEffect::loadParams(const TiXmlElement* root) |
---|
| 58 | { |
---|
| 59 | BaseObject::loadParams(root); |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | /** |
---|
| 64 | * initializes the graphics effect |
---|
| 65 | */ |
---|
| 66 | bool GraphicsEffect::init() |
---|
[6772] | 67 | {} |
---|
[6815] | 68 | |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | /** |
---|
| 72 | * draws the effect, if needed |
---|
| 73 | */ |
---|
| 74 | void GraphicsEffect::draw() const |
---|
| 75 | {} |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | /** |
---|
| 80 | * ticks the effect if there is any time dependancy |
---|
| 81 | */ |
---|
| 82 | void GraphicsEffect::tick(float dt) |
---|
[6873] | 83 | {} |
---|