DDraceNetwork Docs
layer_speedup.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_MAPITEMS_LAYER_SPEEDUP_H
2#define GAME_EDITOR_MAPITEMS_LAYER_SPEEDUP_H
3
4#include "layer_tiles.h"
5
7{
9 struct SData
10 {
14 int m_Type;
17};
18
20{
21public:
22 CLayerSpeedup(CEditor *pEditor, int w, int h);
23 CLayerSpeedup(const CLayerSpeedup &Other);
25
30
31 void Resize(int NewW, int NewH) override;
32 void Shift(int Direction) override;
33 bool IsEmpty(const std::shared_ptr<CLayerTiles> &pLayer) override;
34 void BrushDraw(std::shared_ptr<CLayer> pBrush, vec2 WorldPos) override;
35 void BrushFlipX() override;
36 void BrushFlipY() override;
37 void BrushRotate(float Amount) override;
38 void FillSelection(bool Empty, std::shared_ptr<CLayer> pBrush, CUIRect Rect) override;
39
41 void ClearHistory() override
42 {
44 m_History.clear();
45 }
46
47 std::shared_ptr<CLayer> Duplicate() const override;
48 const char *TypeName() const override;
49
50private:
52};
53
54#endif
Definition: editor.h:276
Definition: layer_speedup.h:20
void ClearHistory() override
Definition: layer_speedup.h:41
void Resize(int NewW, int NewH) override
Definition: layer_speedup.cpp:30
void BrushRotate(float Amount) override
Definition: layer_speedup.cpp:184
EditorTileStateChangeHistory< SSpeedupTileStateChange > m_History
Definition: layer_speedup.h:40
std::shared_ptr< CLayer > Duplicate() const override
Definition: layer_speedup.cpp:305
~CLayerSpeedup()
Definition: layer_speedup.cpp:25
void BrushFlipY() override
Definition: layer_speedup.cpp:178
int m_SpeedupMaxSpeed
Definition: layer_speedup.h:28
int m_SpeedupAngle
Definition: layer_speedup.h:29
void FillSelection(bool Empty, std::shared_ptr< CLayer > pBrush, CUIRect Rect) override
Definition: layer_speedup.cpp:218
void Shift(int Direction) override
Definition: layer_speedup.cpp:52
const char * TypeName() const override
Definition: layer_speedup.cpp:310
void BrushFlipX() override
Definition: layer_speedup.cpp:172
CSpeedupTile * m_pSpeedupTile
Definition: layer_speedup.h:26
void BrushDraw(std::shared_ptr< CLayer > pBrush, vec2 WorldPos) override
Definition: layer_speedup.cpp:68
bool IsEmpty(const std::shared_ptr< CLayerTiles > &pLayer) override
Definition: layer_speedup.cpp:58
void RecordStateChange(int x, int y, SSpeedupTileStateChange::SData Previous, SSpeedupTileStateChange::SData Current)
Definition: layer_speedup.cpp:164
CLayerSpeedup(CEditor *pEditor, int w, int h)
Definition: layer_speedup.cpp:5
int m_SpeedupForce
Definition: layer_speedup.h:27
Definition: layer_tiles.h:35
virtual void ClearHistory()
Definition: layer_tiles.h:189
Definition: mapitems.h:539
Definition: ui_rect.h:11
std::map< int, std::map< int, T > > EditorTileStateChangeHistory
Definition: layer_tiles.h:18
Definition: layer_speedup.h:10
int m_Index
Definition: layer_speedup.h:15
int m_MaxSpeed
Definition: layer_speedup.h:13
int m_Angle
Definition: layer_speedup.h:12
int m_Force
Definition: layer_speedup.h:11
int m_Type
Definition: layer_speedup.h:14
Definition: layer_speedup.h:7
struct SSpeedupTileStateChange::SData m_Previous
struct SSpeedupTileStateChange::SData m_Current
bool m_Changed
Definition: layer_speedup.h:8