| 1 |
#ifndef DIFFICULTY_ENTITY_H_ |
| 2 |
#define DIFFICULTY_ENTITY_H_ |
| 3 |
|
| 4 |
#include "ientity.h" |
| 5 |
#include "Setting.h" |
| 6 |
|
| 7 |
namespace difficulty { |
| 8 |
|
| 9 |
/** |
| 10 |
* greebo: A DifficultyEntity encapsulates a doom3-compatible map entity |
| 11 |
* and provides methods to save/load difficulty settings to/from spawargs. |
| 12 |
*/ |
| 13 |
class DifficultyEntity |
| 14 |
{ |
| 15 |
// The actual entity we're working with |
| 16 |
Entity* _entity; |
| 17 |
|
| 18 |
// The unique ID needed to write the spawnargs |
| 19 |
int _curId; |
| 20 |
|
| 21 |
public: |
| 22 |
DifficultyEntity(Entity* source); |
| 23 |
|
| 24 |
// Removes all difficulty settings from the entity |
| 25 |
void clear(); |
| 26 |
|
| 27 |
// Write the setting to this entity |
| 28 |
void writeSetting(const SettingPtr& setting, int _level); |
| 29 |
}; |
| 30 |
typedef std::shared_ptr<DifficultyEntity> DifficultyEntityPtr; |
| 31 |
|
| 32 |
} // namespace difficulty |
| 33 |
|
| 34 |
#endif /* DIFFICULTY_ENTITY_H_ */ |