-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathCreatureConfiguration.h
39 lines (34 loc) · 1.04 KB
/
CreatureConfiguration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "tinyxml.h"
#include "SpriteObjects.h"
#include "df/pronoun_type.h"
constexpr auto CREATURESTRLENGTH = 50;
enum enumCreatureSpecialCases {
eCSC_Any,
eCSC_Normal,
eCSC_Military,
eCSC_Ghost
};
class CreatureConfiguration
{
public:
std::string professionstr;
int professionID;
c_sprite sprite;
int shadow;
enumCreatureSpecialCases special;
df::pronoun_type sex;
int caste;
CreatureConfiguration() = delete;
CreatureConfiguration(int professionID, const char* professionStr, df::pronoun_type sex, int incaste, enumCreatureSpecialCases special, c_sprite& sprite, int shadow) :
professionstr{ professionStr ? std::string{professionStr} : std::string{} },
professionID(professionID),
sprite(sprite),
shadow(shadow),
special(special),
sex(sex),
caste(incaste)
{ }
~CreatureConfiguration() = default;
};
bool addCreaturesConfig(TiXmlElement* elemRoot, std::vector<std::unique_ptr<std::vector<CreatureConfiguration>>>& knownCreatures);