DDraceNetwork Docs
layer_tune.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_MAPITEMS_LAYER_TUNE_H
2#define GAME_EDITOR_MAPITEMS_LAYER_TUNE_H
3
4#include "layer_tiles.h"
5
7{
9 struct SData
10 {
12 int m_Type;
15};
16
17class CLayerTune : public CLayerTiles
18{
19public:
20 CLayerTune(CEditor *pEditor, int w, int h);
21 CLayerTune(const CLayerTune &Other);
23
25 unsigned char m_TuningNumber;
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
37 inline void ClearHistory() override
38 {
40 m_History.clear();
41 }
42
43 std::shared_ptr<CLayer> Duplicate() const override;
44 const char *TypeName() const override;
45
46private:
48};
49
50#endif
Definition: editor.h:276
Definition: layer_tiles.h:35
virtual void ClearHistory()
Definition: layer_tiles.h:189
Definition: layer_tune.h:18
CLayerTune(CEditor *pEditor, int w, int h)
Definition: layer_tune.cpp:5
void Resize(int NewW, int NewH) override
Definition: layer_tune.cpp:30
std::shared_ptr< CLayer > Duplicate() const override
Definition: layer_tune.cpp:271
~CLayerTune()
Definition: layer_tune.cpp:25
CTuneTile * m_pTuneTile
Definition: layer_tune.h:24
void ClearHistory() override
Definition: layer_tune.h:37
void FillSelection(bool Empty, std::shared_ptr< CLayer > pBrush, CUIRect Rect) override
Definition: layer_tune.cpp:199
void Shift(int Direction) override
Definition: layer_tune.cpp:52
EditorTileStateChangeHistory< STuneTileStateChange > m_History
Definition: layer_tune.h:36
void RecordStateChange(int x, int y, STuneTileStateChange::SData Previous, STuneTileStateChange::SData Current)
Definition: layer_tune.cpp:145
const char * TypeName() const override
Definition: layer_tune.cpp:276
unsigned char m_TuningNumber
Definition: layer_tune.h:25
void BrushFlipX() override
Definition: layer_tune.cpp:153
void BrushFlipY() override
Definition: layer_tune.cpp:159
void BrushRotate(float Amount) override
Definition: layer_tune.cpp:165
void BrushDraw(std::shared_ptr< CLayer > pBrush, vec2 WorldPos) override
Definition: layer_tune.cpp:68
bool IsEmpty(const std::shared_ptr< CLayerTiles > &pLayer) override
Definition: layer_tune.cpp:58
Definition: mapitems.h:565
Definition: ui_rect.h:11
std::map< int, std::map< int, T > > EditorTileStateChangeHistory
Definition: layer_tiles.h:18
Definition: layer_tune.h:10
int m_Type
Definition: layer_tune.h:12
int m_Index
Definition: layer_tune.h:13
int m_Number
Definition: layer_tune.h:11
Definition: layer_tune.h:7
struct STuneTileStateChange::SData m_Current
struct STuneTileStateChange::SData m_Previous
bool m_Changed
Definition: layer_tune.h:8