2
// C++ Interface: TerrainMod
4
// Description: The purpose of this class is to wrap an Eris::TerrainMod instance
6
// TerrainGenerator listens for changes in the modifier and
7
// updates or removes the modifiers from the terrain as needed.
10
// Author: Tamas Bates <rhymer@gmail.com>, (C) 2008
11
// Author: Erik Hjortsberg <erik.hjortsberg@gmail.com>, (C) 2008
13
// This program is free software; you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation; either version 2 of the License, or
16
// (at your option) any later version.
18
// This program is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU General Public License for more details.
23
// You should have received a copy of the GNU General Public License
24
// along with this program; if not, write to the Free Software
25
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.//
27
#ifndef EMBEROGRETERRAINMOD_H
28
#define EMBEROGRETERRAINMOD_H
30
#include <sigc++/signal.h>
31
#include <Eris/Entity.h>
36
class CraterTerrainMod;
53
@author Erik Hjortsberg
54
@brief Wrapper class that envelopes an Eris::TerrainMod.
55
The heavy lifting occurs in Eris::TerrainMod, but this class allows some additional features to be added if so needed.
62
* @param entity The entity to which this mod belongs.
64
TerrainMod(EmberEntity* entity);
72
* @brief Sets up the observation of the entity, and parses the mod info, creating the initial mod instance.
73
* @return True if the atlas data was conformant and successfully parsed.
78
* @brief Used to retrieve a pointer to this modifier
79
* @returns a pointer to this modifier
81
Eris::TerrainMod* getErisMod() const;
84
* Emitted whenever the modifier is changed or moved.
86
sigc::signal<void> EventModChanged;
89
*Emitted just before the entity owning this mod is deleted.
90
*Should be caught by TerrainGenerator to remove this mod from the terrain.
92
sigc::signal<void> EventModDeleted;
97
* @brief Listen for the mod changed event and pass it on.
99
void terrainMod_ModChanged();
102
* @brief Listen for the mod deleted event and pass it on.
104
void terrainMod_ModDeleted();
107
* @brief The actual Eris::TerrainMod implementation responsible for the parsing and updating of the mod.
109
Eris::TerrainMod* mInnerMod;