DDraceNetwork Docs
auto_map.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_AUTO_MAP_H
2#define GAME_EDITOR_AUTO_MAP_H
3
4#include <vector>
5
6#include "component.h"
7
9{
11 {
12 int m_Id;
13 int m_Flag;
15 };
16
17 struct CPosRule
18 {
19 int m_X;
20 int m_Y;
22 std::vector<CIndexInfo> m_vIndexList;
23
24 enum
25 {
26 NORULE = 0,
29 };
30 };
31
33 {
34 int m_Id;
35 std::vector<CPosRule> m_vRules;
36 int m_Flag;
41 };
42
43 struct CRun
44 {
45 std::vector<CIndexRule> m_vIndexRules;
47 };
48
50 {
51 std::vector<CRun> m_vRuns;
52 char m_aName[128];
55 int m_EndX;
56 int m_EndY;
57 };
58
59public:
60 explicit CAutoMapper(CEditor *pEditor);
61
62 void Load(const char *pTileName);
63 void ProceedLocalized(class CLayerTiles *pLayer, int ConfigId, int Seed = 0, int X = 0, int Y = 0, int Width = -1, int Height = -1);
64 void Proceed(class CLayerTiles *pLayer, int ConfigId, int Seed = 0, int SeedOffsetX = 0, int SeedOffsetY = 0);
65
66 int ConfigNamesNum() const { return m_vConfigs.size(); }
67 const char *GetConfigName(int Index);
68
69 bool IsLoaded() const { return m_FileLoaded; }
70
71private:
72 std::vector<CConfiguration> m_vConfigs = {};
73 bool m_FileLoaded = false;
74};
75
76#endif
Definition: auto_map.h:9
std::vector< CConfiguration > m_vConfigs
Definition: auto_map.h:72
bool IsLoaded() const
Definition: auto_map.h:69
bool m_FileLoaded
Definition: auto_map.h:73
void ProceedLocalized(class CLayerTiles *pLayer, int ConfigId, int Seed=0, int X=0, int Y=0, int Width=-1, int Height=-1)
Definition: auto_map.cpp:400
int ConfigNamesNum() const
Definition: auto_map.h:66
void Proceed(class CLayerTiles *pLayer, int ConfigId, int Seed=0, int SeedOffsetX=0, int SeedOffsetY=0)
Definition: auto_map.cpp:454
const char * GetConfigName(int Index)
Definition: auto_map.cpp:392
CAutoMapper(CEditor *pEditor)
Definition: auto_map.cpp:43
void Load(const char *pTileName)
Definition: auto_map.cpp:48
Definition: component.h:9
Definition: editor.h:276
Definition: layer_tiles.h:35
Definition: auto_map.h:50
int m_EndX
Definition: auto_map.h:55
std::vector< CRun > m_vRuns
Definition: auto_map.h:51
char m_aName[128]
Definition: auto_map.h:52
int m_StartX
Definition: auto_map.h:53
int m_EndY
Definition: auto_map.h:56
int m_StartY
Definition: auto_map.h:54
Definition: auto_map.h:11
bool m_TestFlag
Definition: auto_map.h:14
int m_Id
Definition: auto_map.h:12
int m_Flag
Definition: auto_map.h:13
Definition: auto_map.h:33
float m_RandomProbability
Definition: auto_map.h:37
std::vector< CPosRule > m_vRules
Definition: auto_map.h:35
bool m_DefaultRule
Definition: auto_map.h:38
int m_Id
Definition: auto_map.h:34
int m_Flag
Definition: auto_map.h:36
bool m_SkipFull
Definition: auto_map.h:40
bool m_SkipEmpty
Definition: auto_map.h:39
Definition: auto_map.h:18
int m_X
Definition: auto_map.h:19
int m_Value
Definition: auto_map.h:21
int m_Y
Definition: auto_map.h:20
@ INDEX
Definition: auto_map.h:27
@ NORULE
Definition: auto_map.h:26
@ NOTINDEX
Definition: auto_map.h:28
std::vector< CIndexInfo > m_vIndexList
Definition: auto_map.h:22
Definition: auto_map.h:44
bool m_AutomapCopy
Definition: auto_map.h:46
std::vector< CIndexRule > m_vIndexRules
Definition: auto_map.h:45