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 unsigned char m_TeleNum;
26 unsigned char m_TeleCheckpointNum;
27
28 void Resize(int NewW, int NewH) override;
29 void Shift(int Direction) override;
30 bool IsEmpty(const std::shared_ptr<CLayerTiles> &pLayer) override;
31 void BrushDraw(std::shared_ptr<CLayer> pBrush, vec2 WorldPos) override;
32 void BrushFlipX() override;
33 void BrushFlipY() override;
34 void BrushRotate(float Amount) override;
35 void FillSelection(bool Empty, std::shared_ptr<CLayer> pBrush, CUIRect Rect) override;
36 virtual bool ContainsElementWithId(int Id, bool Checkpoint);
37 virtual void GetPos(int Number, int Offset, int &TeleX, int &TeleY);
38
41
43 inline void ClearHistory() override
44 {
46 m_History.clear();
47 }
48
49 std::shared_ptr<CLayer> Duplicate() const override;
50 const char *TypeName() const override;
51
52private:
54
55 friend class CLayerTiles;
56};
57
58#endif
Definition: editor.h:276
Definition: layer_tele.h:18
const char * TypeName() const override
Definition: layer_tele.cpp:374
virtual void GetPos(int Number, int Offset, int &TeleX, int &TeleY)
Definition: layer_tele.cpp:315
int m_GotoTeleOffset
Definition: layer_tele.h:39
void BrushFlipY() override
Definition: layer_tele.cpp:177
EditorTileStateChangeHistory< STeleTileStateChange > m_History
Definition: layer_tele.h:42
void ClearHistory() override
Definition: layer_tele.h:43
std::shared_ptr< CLayer > Duplicate() const override
Definition: layer_tele.cpp:369
virtual bool ContainsElementWithId(int Id, bool Checkpoint)
Definition: layer_tele.cpp:299
void Shift(int Direction) override
Definition: layer_tele.cpp:55
void BrushFlipX() override
Definition: layer_tele.cpp:171
void Resize(int NewW, int NewH) override
Definition: layer_tele.cpp:33
unsigned char m_TeleCheckpointNum
Definition: layer_tele.h:26
~CLayerTele()
Definition: layer_tele.cpp:28
unsigned char m_TeleNum
Definition: layer_tele.h:25
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:40
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