diff options
| author | oy <Tom_Adams@web.de> | 2011-07-09 01:09:06 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-07-09 01:09:06 +0200 |
| commit | 7bc07b613f9fed3dcef26f63332ea68db1e1f381 (patch) | |
| tree | d357af2b1d1db1dd6d5d62874326c739890402a4 /src/game/editor/auto_map.h | |
| parent | f44094490549a46781a7d85a137ddf748021d00f (diff) | |
| download | zcatch-7bc07b613f9fed3dcef26f63332ea68db1e1f381.tar.gz zcatch-7bc07b613f9fed3dcef26f63332ea68db1e1f381.zip | |
added auto mapping feature by LordSkelethom
Diffstat (limited to 'src/game/editor/auto_map.h')
| -rw-r--r-- | src/game/editor/auto_map.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/game/editor/auto_map.h b/src/game/editor/auto_map.h new file mode 100644 index 00000000..4f4cf92e --- /dev/null +++ b/src/game/editor/auto_map.h @@ -0,0 +1,54 @@ +#ifndef GAME_EDITOR_ED_AUTO_MAP_H +#define GAME_EDITOR_ED_AUTO_MAP_H + +#include <base/tl/array.h> + +class CAutoMapper +{ + struct CPosRule + { + int m_X; + int m_Y; + int m_Value; + bool m_IndexValue; + + enum + { + EMPTY=0, + FULL + }; + }; + + struct CIndexRule + { + int m_ID; + array<CPosRule> m_aRules; + int m_Flag; + int m_RandomValue; + bool m_BaseTile; + }; + + struct CConfiguration + { + array<CIndexRule> m_aIndexRules; + char m_aName[128]; + }; + +public: + CAutoMapper(class CEditor *pEditor); + + void Load(const char* pTileName); + void Proceed(class CLayerTiles *pLayer, int ConfigID); + + int ConfigNamesNum() { return m_lConfigs.size(); } + const char* GetConfigName(int Index); + + const bool IsLoaded() { return m_FileLoaded; } +private: + array<CConfiguration> m_lConfigs; + class CEditor *m_pEditor; + bool m_FileLoaded; +}; + + +#endif |