From 7bc07b613f9fed3dcef26f63332ea68db1e1f381 Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 9 Jul 2011 01:09:06 +0200 Subject: added auto mapping feature by LordSkelethom --- src/game/editor/auto_map.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/game/editor/auto_map.h (limited to 'src/game/editor/auto_map.h') 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 + +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 m_aRules; + int m_Flag; + int m_RandomValue; + bool m_BaseTile; + }; + + struct CConfiguration + { + array 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 m_lConfigs; + class CEditor *m_pEditor; + bool m_FileLoaded; +}; + + +#endif -- cgit 1.4.1 From 188e6223730e577a1cdfc5891f832c53c23cc146 Mon Sep 17 00:00:00 2001 From: Choupom Date: Mon, 18 Jul 2011 10:34:30 +0200 Subject: fixed auto_map.h header guard --- src/game/editor/auto_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game/editor/auto_map.h') diff --git a/src/game/editor/auto_map.h b/src/game/editor/auto_map.h index 4f4cf92e..ee570378 100644 --- a/src/game/editor/auto_map.h +++ b/src/game/editor/auto_map.h @@ -1,5 +1,5 @@ -#ifndef GAME_EDITOR_ED_AUTO_MAP_H -#define GAME_EDITOR_ED_AUTO_MAP_H +#ifndef GAME_EDITOR_AUTO_MAP_H +#define GAME_EDITOR_AUTO_MAP_H #include -- cgit 1.4.1