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 public:
13 int m_Id;
14 int m_Flag;
16 };
17
19 {
20 public:
21 int m_X;
22 int m_Y;
24 std::vector<CIndexInfo> m_vIndexList;
26
27 enum
28 {
29 NORULE = 0,
32 };
33 };
34
36 {
37 public:
38 int m_ModX;
39 int m_ModY;
42 };
43
45 {
46 public:
47 int m_Id;
48 std::vector<CPosRule> m_vRules;
49 int m_Flag;
51 std::vector<CModuloRule> m_vModuloRules;
55 };
56 class CRun
57 {
58 public:
59 std::vector<CIndexRule> m_vIndexRules;
61 };
62
64 {
65 public:
66 std::vector<CRun> m_vRuns;
67 char m_aName[128];
70 int m_EndX;
71 int m_EndY;
72 };
73
74public:
75 explicit CAutoMapper(CEditor *pEditor);
76
77 void Load(const char *pTileName);
78 void Unload();
79 int CheckIndexFlag(int Flag, const char *pFlag, bool CheckNone) const;
80 void ProceedLocalized(class CLayerTiles *pLayer, class CLayerTiles *pGameLayer, int ReferenceId, int ConfigId, int Seed = 0, int X = 0, int Y = 0, int Width = -1, int Height = -1);
81 void Proceed(class CLayerTiles *pLayer, class CLayerTiles *pGameLayer, int ReferenceId, int ConfigId, int Seed = 0, int SeedOffsetX = 0, int SeedOffsetY = 0);
82 int ConfigNamesNum() const { return m_vConfigs.size(); }
83 const char *GetConfigName(int Index);
84
85 bool IsLoaded() const { return m_FileLoaded; }
86
87private:
88 std::vector<CConfiguration> m_vConfigs = {};
89 bool m_FileLoaded = false;
90};
91
92#endif
Definition: auto_map.h:64
int m_EndX
Definition: auto_map.h:70
std::vector< CRun > m_vRuns
Definition: auto_map.h:66
char m_aName[128]
Definition: auto_map.h:67
int m_StartX
Definition: auto_map.h:68
int m_EndY
Definition: auto_map.h:71
int m_StartY
Definition: auto_map.h:69
Definition: auto_map.h:11
bool m_TestFlag
Definition: auto_map.h:15
int m_Id
Definition: auto_map.h:13
int m_Flag
Definition: auto_map.h:14
Definition: auto_map.h:45
float m_RandomProbability
Definition: auto_map.h:50
std::vector< CModuloRule > m_vModuloRules
Definition: auto_map.h:51
std::vector< CPosRule > m_vRules
Definition: auto_map.h:48
bool m_DefaultRule
Definition: auto_map.h:52
int m_Id
Definition: auto_map.h:47
int m_Flag
Definition: auto_map.h:49
bool m_SkipFull
Definition: auto_map.h:54
bool m_SkipEmpty
Definition: auto_map.h:53
Definition: auto_map.h:36
int m_OffsetY
Definition: auto_map.h:41
int m_OffsetX
Definition: auto_map.h:40
int m_ModY
Definition: auto_map.h:39
int m_ModX
Definition: auto_map.h:38
Definition: auto_map.h:19
int m_X
Definition: auto_map.h:21
bool m_IsGuide
Definition: auto_map.h:25
int m_Value
Definition: auto_map.h:23
int m_Y
Definition: auto_map.h:22
@ INDEX
Definition: auto_map.h:30
@ NORULE
Definition: auto_map.h:29
@ NOTINDEX
Definition: auto_map.h:31
std::vector< CIndexInfo > m_vIndexList
Definition: auto_map.h:24
Definition: auto_map.h:57
bool m_AutomapCopy
Definition: auto_map.h:60
std::vector< CIndexRule > m_vIndexRules
Definition: auto_map.h:59
Definition: auto_map.h:9
std::vector< CConfiguration > m_vConfigs
Definition: auto_map.h:88
int CheckIndexFlag(int Flag, const char *pFlag, bool CheckNone) const
Definition: auto_map.cpp:366
void Unload()
Definition: auto_map.cpp:360
bool IsLoaded() const
Definition: auto_map.h:85
bool m_FileLoaded
Definition: auto_map.h:89
void Proceed(class CLayerTiles *pLayer, class CLayerTiles *pGameLayer, int ReferenceId, int ConfigId, int Seed=0, int SeedOffsetX=0, int SeedOffsetY=0)
Definition: auto_map.cpp:456
int ConfigNamesNum() const
Definition: auto_map.h:82
const char * GetConfigName(int Index)
Definition: auto_map.cpp:380
CAutoMapper(CEditor *pEditor)
Definition: auto_map.cpp:43
void Load(const char *pTileName)
Definition: auto_map.cpp:48
void ProceedLocalized(class CLayerTiles *pLayer, class CLayerTiles *pGameLayer, int ReferenceId, int ConfigId, int Seed=0, int X=0, int Y=0, int Width=-1, int Height=-1)
Definition: auto_map.cpp:388
Definition: component.h:9
Definition: editor.h:277
Definition: layer_tiles.h:35