DDraceNetwork Docs
layer_tele.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_MAPITEMS_LAYER_TELE_H
2#define GAME_EDITOR_MAPITEMS_LAYER_TELE_H
3
4#include "layer_tiles.h"
5
7{
9 struct SData
10 {
12 int m_Type;
15};
16
17class CLayerTele : public CLayerTiles
18{
19public:
20 CLayerTele(CEditor *pEditor, int w, int h);
21 CLayerTele(const CLayerTele &Other);
23
25 std::map<int, unsigned char> m_TeleNumbers;
26
27 void Resize(int NewW, int NewH) override;
28 void Shift(int Direction) override;
29 bool IsEmpty(const std::shared_ptr<CLayerTiles> &pLayer) override;
30 void BrushDraw(std::shared_ptr<CLayer> pBrush, vec2 WorldPos) override;
31 void BrushFlipX() override;
32 void BrushFlipY() override;
33 void BrushRotate(float Amount) override;
34 void FillSelection(bool Empty, std::shared_ptr<CLayer> pBrush, CUIRect Rect) override;
35 virtual bool ContainsElementWithId(int Id, int Index);
36 virtual void GetPos(int Number, int Offset, int &TeleX, int &TeleY);
37
40
42 inline void ClearHistory() override
43 {
45 m_History.clear();
46 }
47
48 std::shared_ptr<CLayer> Duplicate() const override;
49 const char *TypeName() const override;
50
51private:
53
54 friend class CLayerTiles;
55};
56
57#endif
Definition: editor.h:276
Definition: layer_tele.h:18
const char * TypeName() const override
Definition: layer_tele.cpp:372
virtual void GetPos(int Number, int Offset, int &TeleX, int &TeleY)
Definition: layer_tele.cpp:313
int m_GotoTeleOffset
Definition: layer_tele.h:38
void BrushFlipY() override
Definition: layer_tele.cpp:177
EditorTileStateChangeHistory< STeleTileStateChange > m_History
Definition: layer_tele.h:41
void ClearHistory() override
Definition: layer_tele.h:42
std::shared_ptr< CLayer > Duplicate() const override
Definition: layer_tele.cpp:367
virtual bool ContainsElementWithId(int Id, int Index)
Definition: layer_tele.cpp:297
void Shift(int Direction) override
Definition: layer_tele.cpp:55
void BrushFlipX() override
Definition: layer_tele.cpp:171
std::map< int, unsigned char > m_TeleNumbers
Definition: layer_tele.h:25
void Resize(int NewW, int NewH) override
Definition: layer_tele.cpp:33
~CLayerTele()
Definition: layer_tele.cpp:28
void FillSelection(bool Empty, std::shared_ptr< CLayer > pBrush, CUIRect Rect) override
Definition: layer_tele.cpp:217
CTeleTile * m_pTeleTile
Definition: layer_tele.h:24
void RecordStateChange(int x, int y, STeleTileStateChange::SData Previous, STeleTileStateChange::SData Current)
Definition: layer_tele.cpp:161
ivec2 m_GotoTeleLastPos
Definition: layer_tele.h:39
bool IsEmpty(const std::shared_ptr< CLayerTiles > &pLayer) override
Definition: layer_tele.cpp:61
void BrushDraw(std::shared_ptr< CLayer > pBrush, vec2 WorldPos) override
Definition: layer_tele.cpp:71
void BrushRotate(float Amount) override
Definition: layer_tele.cpp:183
CLayerTele(CEditor *pEditor, int w, int h)
Definition: layer_tele.cpp:5
Definition: layer_tiles.h:35
virtual void ClearHistory()
Definition: layer_tiles.h:189
Definition: mapitems.h:532
Definition: ui_rect.h:11
std::map< int, std::map< int, T > > EditorTileStateChangeHistory
Definition: layer_tiles.h:18
Definition: layer_tele.h:10
int m_Number
Definition: layer_tele.h:11
int m_Index
Definition: layer_tele.h:13
int m_Type
Definition: layer_tele.h:12
Definition: layer_tele.h:7
struct STeleTileStateChange::SData m_Previous
bool m_Changed
Definition: layer_tele.h:8
struct STeleTileStateChange::SData m_Current