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 | |
---|
22 | #include "graphics_engine.h" |
---|
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 | { |
---|
37 | this->bActivated = false; |
---|
38 | |
---|
39 | this->bActivated = GraphicsEngine::getInstance()->loadGraphicsEffect(this); |
---|
40 | |
---|
41 | if (root != NULL) |
---|
42 | this->loadParams(root); |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | /** |
---|
47 | * destroys a GraphicsEffect |
---|
48 | */ |
---|
49 | GraphicsEffect::~GraphicsEffect() |
---|
50 | { |
---|
51 | if( this->bActivated) |
---|
52 | GraphicsEngine::getInstance()->unloadGraphicsEffect(this); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | /** |
---|
57 | * @param root The XML-element to load the GraphicsEffect from |
---|
58 | */ |
---|
59 | void GraphicsEffect::loadParams(const TiXmlElement* root) |
---|
60 | { |
---|
61 | BaseObject::loadParams(root); |
---|
62 | |
---|
63 | // LoadParam(root, "diffuse-color", this, GraphicsEffect, setDiffuseColor) |
---|
64 | // .describe("sets the diffuse color of the GraphicsEffect (red [0-1], green [0-1], blue [0-1])"); |
---|
65 | |
---|
66 | } |
---|
67 | |
---|
68 | |
---|
69 | /** |
---|
70 | * initializes the graphics effect |
---|
71 | */ |
---|
72 | bool GraphicsEffect::init() |
---|
73 | {} |
---|