1
/*
2
 *  An effects manager
3
 *  Copyright (C) 2008  Fate <fate.tmw@googlemail.com>
4
 *  Copyright (C) 2008  Chuck Miller <shadowmil@gmail.com>
5
 *
6
 *  This file is part of The Mana World.
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 of the License, or
11
 *  any later version.
12
 *
13
 *  This program is distributed in the hope that it will be useful,
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *  GNU General Public License for more details.
17
 *
18
 *  You should have received a copy of the GNU General Public License
19
 *  along with this program; if not, write to the Free Software
20
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
 */
22
23
#ifndef EFFECT_MANAGER_H
24
#define EFFECT_MANAGER_H
25
26
#include <list>
27
#include <string>
28
29
class Being;
30
31
class EffectManager
32
{
33
    public:
34
        struct EffectDescription
35
        {
36
             int id;
37
             std::string GFX;
38
             std::string SFX;
39
        };
40
41
        EffectManager();
42
        ~EffectManager();
43
44
        /**
45
         * Triggers a effect with the id, at
46
         * the specified being.
47
         */
48
        bool trigger(int id, Being* being);
49
50
        /**
51
         * Triggers a effect with the id, at
52
         * the specified x and y coordinate.
53
         */
54
        bool trigger(int id, int x, int y);
55
56
   private:
57
        std::list<EffectDescription> mEffects;
58
};
59
60
extern EffectManager *effectManager;
61
62
#endif // EFFECT_MANAGER_H