DDraceNetwork Docs
editor_actions.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_EDITOR_ACTIONS_H
2#define GAME_EDITOR_EDITOR_ACTIONS_H
3
4#include "editor.h"
5#include "editor_action.h"
6
8{
9public:
10 CEditorActionLayerBase(CEditor *pEditor, int GroupIndex, int LayerIndex);
11
12 virtual void Undo() override {}
13 virtual void Redo() override {}
14
15protected:
18 std::shared_ptr<CLayer> m_pLayer;
19};
20
22{
23public:
24 CEditorBrushDrawAction(CEditor *pEditor, int Group);
25
26 void Undo() override;
27 void Redo() override;
28 bool IsEmpty() override;
29
30private:
32 // m_vTileChanges is a list of changes for each layer that was modified.
33 // The std::pair is used to pair one layer (index) with its history (2D map).
34 // EditorTileStateChangeHistory<T> is a 2D map, storing a change item at a specific y,x position.
35 std::vector<std::pair<int, EditorTileStateChangeHistory<STileStateChange>>> m_vTileChanges;
40
43
44 void Apply(bool Undo);
45 void SetInfos();
46};
47
48// ---------------------------------------------------------
49
51{
52public:
53 CEditorActionQuadPlace(CEditor *pEditor, int GroupIndex, int LayerIndex, std::vector<CQuad> &vBrush);
54
55 void Undo() override;
56 void Redo() override;
57
58private:
59 std::vector<CQuad> m_vBrush;
60};
61
63{
64public:
65 CEditorActionSoundPlace(CEditor *pEditor, int GroupIndex, int LayerIndex, std::vector<CSoundSource> &vBrush);
66
67 void Undo() override;
68 void Redo() override;
69
70private:
71 std::vector<CSoundSource> m_vBrush;
72};
73
74// -------------------------------------------------------------
75
77{
78public:
79 CEditorActionDeleteQuad(CEditor *pEditor, int GroupIndex, int LayerIndex, std::vector<int> const &vQuadsIndices, std::vector<CQuad> const &vDeletedQuads);
80
81 void Undo() override;
82 void Redo() override;
83
84private:
85 std::vector<int> m_vQuadsIndices;
86 std::vector<CQuad> m_vDeletedQuads;
87};
88
89// -------------------------------------------------------------
90
92{
93public:
94 CEditorActionEditQuadPoint(CEditor *pEditor, int GroupIndex, int LayerIndex, int QuadIndex, std::vector<CPoint> const &vPreviousPoints, std::vector<CPoint> const &vCurrentPoints);
95
96 void Undo() override;
97 void Redo() override;
98
99private:
101 std::vector<CPoint> m_vPreviousPoints;
102 std::vector<CPoint> m_vCurrentPoints;
103};
104
106{
107public:
108 CEditorActionEditQuadProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int QuadIndex, EQuadProp Prop, int Previous, int Current);
109
110 void Undo() override;
111 void Redo() override;
112
113private:
118
119 void Apply(int Value);
120};
121
123{
124public:
125 CEditorActionEditQuadPointProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int QuadIndex, int PointIndex, EQuadPointProp Prop, int Previous, int Current);
126
127 void Undo() override;
128 void Redo() override;
129
130private:
136
137 void Apply(int Value);
138};
139
140// -------------------------------------------------------------
141
143{
144public:
145 CEditorActionBulk(CEditor *pEditor, const std::vector<std::shared_ptr<IEditorAction>> &vpActions, const char *pDisplay = nullptr, bool Reverse = false);
146
147 void Undo() override;
148 void Redo() override;
149
150private:
151 std::vector<std::shared_ptr<IEditorAction>> m_vpActions;
152 std::string m_Display;
154};
155
156//
157
159{
160public:
161 CEditorActionTileChanges(CEditor *pEditor, int GroupIndex, int LayerIndex, const char *pAction, const EditorTileStateChangeHistory<STileStateChange> &Changes);
162
163 void Undo() override;
164 void Redo() override;
165
166private:
169
170 void ComputeInfos();
171 void Apply(bool Undo);
172};
173
174// -------------------------------------------------------------
175
177{
178public:
179 CEditorActionAddLayer(CEditor *pEditor, int GroupIndex, int LayerIndex, bool Duplicate = false);
180
181 void Undo() override;
182 void Redo() override;
183
184private:
186};
187
189{
190public:
191 CEditorActionDeleteLayer(CEditor *pEditor, int GroupIndex, int LayerIndex);
192
193 void Undo() override;
194 void Redo() override;
195};
196
198{
199public:
200 CEditorActionGroup(CEditor *pEditor, int GroupIndex, bool Delete);
201
202 void Undo() override;
203 void Redo() override;
204
205private:
208 std::shared_ptr<CLayerGroup> m_pGroup;
209};
210
212{
213public:
214 CEditorActionEditGroupProp(CEditor *pEditor, int GroupIndex, EGroupProp Prop, int Previous, int Current);
215
216 void Undo() override;
217 void Redo() override;
218
219private:
224
225 void Apply(int Value);
226};
227
228template<typename E>
230{
231public:
232 CEditorActionEditLayerPropBase(CEditor *pEditor, int GroupIndex, int LayerIndex, E Prop, int Previous, int Current);
233
234 virtual void Undo() override {}
235 virtual void Redo() override {}
236
237protected:
241};
242
244{
245public:
246 CEditorActionEditLayerProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ELayerProp Prop, int Previous, int Current);
247
248 void Undo() override;
249 void Redo() override;
250
251private:
252 void Apply(int Value);
253};
254
256{
257public:
258 CEditorActionEditLayerTilesProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ETilesProp Prop, int Previous, int Current);
259
260 void Undo() override;
261 void Redo() override;
262
263 void SetSavedLayers(const std::map<int, std::shared_ptr<CLayer>> &SavedLayers);
264
265private:
266 std::map<int, std::shared_ptr<CLayer>> m_SavedLayers;
267
268 void RestoreLayer(int Layer, const std::shared_ptr<CLayerTiles> &pLayerTiles);
269};
270
272{
273public:
274 CEditorActionEditLayerQuadsProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ELayerQuadsProp Prop, int Previous, int Current);
275
276 void Undo() override;
277 void Redo() override;
278
279private:
280 void Apply(int Value);
281};
282
284{
285public:
286 CEditorActionEditLayersGroupAndOrder(CEditor *pEditor, int GroupIndex, const std::vector<int> &LayerIndices, int NewGroupIndex, const std::vector<int> &NewLayerIndices);
287
288 void Undo() override;
289 void Redo() override;
290
291private:
293 std::vector<int> m_LayerIndices;
295 std::vector<int> m_NewLayerIndices;
296};
297
298// --------------
299
301{
302public:
304 {
309 };
310
311public:
312 CEditorActionAppendMap(CEditor *pEditor, const char *pMapName, const SPrevInfo &PrevInfo, std::vector<int> &vImageIndexMap);
313
314 void Undo() override;
315 void Redo() override;
316
317private:
320 std::vector<int> m_vImageIndexMap;
321};
322
323// --------------
324
326{
327public:
328 CEditorActionTileArt(CEditor *pEditor, int PreviousImageCount, const char *pTileArtFile, std::vector<int> &vImageIndexMap);
329
330 void Undo() override;
331 void Redo() override;
332
333private:
336 std::vector<int> m_vImageIndexMap;
337};
338
339// ----------------------
340
342{
343public:
344 enum class EType
345 {
346 DELETE,
347 ADD,
348 EDIT,
349 MOVE_UP,
350 MOVE_DOWN
351 };
352
353 CEditorCommandAction(CEditor *pEditor, EType Type, int *pSelectedCommandIndex, int CommandIndex, const char *pPreviousCommand = nullptr, const char *pCurrentCommand = nullptr);
354
355 void Undo() override;
356 void Redo() override;
357
358private:
362 std::string m_PreviousCommand;
363 std::string m_CurrentCommand;
364};
365
366// ------------------------------
367
369{
370public:
371 CEditorActionEnvelopeAdd(CEditor *pEditor, const std::shared_ptr<CEnvelope> &pEnv);
372
373 void Undo() override;
374 void Redo() override;
375
376private:
377 std::shared_ptr<CEnvelope> m_pEnv;
378};
379
381{
382public:
383 CEditorActionEveloppeDelete(CEditor *pEditor, int EnvelopeIndex);
384
385 void Undo() override;
386 void Redo() override;
387
388private:
390 std::shared_ptr<CEnvelope> m_pEnv;
391};
392
394{
395public:
396 enum class EEditType
397 {
398 SYNC,
399 ORDER
400 };
401
402 CEditorActionEnvelopeEdit(CEditor *pEditor, int EnvelopeIndex, EEditType EditType, int Previous, int Current);
403
404 void Undo() override;
405 void Redo() override;
406
407private:
412 std::shared_ptr<CEnvelope> m_pEnv;
413};
414
416{
417public:
418 enum class EEditType
419 {
420 TIME,
421 VALUE,
422 CURVE_TYPE,
423 HANDLE
424 };
425
426 CEditorActionEnvelopeEditPoint(CEditor *pEditor, int EnvelopeIndex, int PointIndex, int Channel, EEditType EditType, int Previous, int Current);
427
428 void Undo() override;
429 void Redo() override;
430
431private:
438 std::shared_ptr<CEnvelope> m_pEnv;
439
440 void Apply(int Value);
441};
442
444{
445public:
446 CEditorActionAddEnvelopePoint(CEditor *pEditor, int EnvIndex, int Time, ColorRGBA Channels);
447
448 void Undo() override;
449 void Redo() override;
450
451private:
455};
456
458{
459public:
460 CEditorActionDeleteEnvelopePoint(CEditor *pEditor, int EnvIndex, int PointIndex);
461
462 void Undo() override;
463 void Redo() override;
464
465private:
469};
470
472{
473public:
474 enum class EType
475 {
476 TANGENT_IN,
477 TANGENT_OUT,
478 POINT
479 };
480
481 CEditorActionEditEnvelopePointValue(CEditor *pEditor, int EnvIndex, int PointIndex, int Channel, EType Type, int OldTime, int OldValue, int NewTime, int NewValue);
482
483 void Undo() override;
484 void Redo() override;
485
486private:
495
496 void Apply(bool Undo);
497};
498
500{
501public:
502 CEditorActionResetEnvelopePointTangent(CEditor *pEditor, int EnvIndex, int PointIndex, int Channel, bool In);
503
504 void Undo() override;
505 void Redo() override;
506
507private:
511 bool m_In;
513};
514
516{
517public:
518 CEditorActionEditLayerSoundsProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ELayerSoundsProp Prop, int Previous, int Current);
519
520 void Undo() override;
521 void Redo() override;
522
523private:
524 void Apply(int Value);
525};
526
528{
529public:
530 CEditorActionDeleteSoundSource(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex);
531
532 void Undo() override;
533 void Redo() override;
534
535private:
538};
539
541{
542public:
543 enum class EEditType
544 {
545 SHAPE
546 };
547
548 CEditorActionEditSoundSource(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, EEditType Type, int Value);
550
551 void Undo() override;
552 void Redo() override;
553
554private:
558
559 std::vector<int> m_vOriginalValues;
561
562 void Save();
563};
564
566{
567public:
568 CEditorActionEditSoundSourceProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, ESoundProp Prop, int Previous, int Current);
569
570 void Undo() override;
571 void Redo() override;
572
573private:
575
576private:
577 void Apply(int Value);
578};
579
581{
582public:
583 CEditorActionEditRectSoundSourceShapeProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, ERectangleShapeProp Prop, int Previous, int Current);
584
585 void Undo() override;
586 void Redo() override;
587
588private:
590
591private:
592 void Apply(int Value);
593};
594
596{
597public:
598 CEditorActionEditCircleSoundSourceShapeProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, ECircleShapeProp Prop, int Previous, int Current);
599
600 void Undo() override;
601 void Redo() override;
602
603private:
605
606private:
607 void Apply(int Value);
608};
609
611{
612public:
613 CEditorActionNewEmptySound(CEditor *pEditor, int GroupIndex, int LayerIndex, int x, int y);
614
615 void Undo() override;
616 void Redo() override;
617
618private:
619 int m_X;
620 int m_Y;
621};
622
624{
625public:
626 CEditorActionNewEmptyQuad(CEditor *pEditor, int GroupIndex, int LayerIndex, int x, int y);
627
628 void Undo() override;
629 void Redo() override;
630
631private:
632 int m_X;
633 int m_Y;
634};
635
637{
638public:
639 CEditorActionNewQuad(CEditor *pEditor, int GroupIndex, int LayerIndex);
640
641 void Undo() override;
642 void Redo() override;
643
644private:
646};
647
649{
650public:
651 CEditorActionMoveSoundSource(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, CPoint OriginalPosition, CPoint CurrentPosition);
652
653 void Undo() override;
654 void Redo() override;
655
656private:
660};
661
662#endif
Definition: editor_actions.h:444
void Redo() override
Definition: editor_actions.cpp:1669
CEditorActionAddEnvelopePoint(CEditor *pEditor, int EnvIndex, int Time, ColorRGBA Channels)
Definition: editor_actions.cpp:1648
ColorRGBA m_Channels
Definition: editor_actions.h:454
void Undo() override
Definition: editor_actions.cpp:1654
int m_Time
Definition: editor_actions.h:453
int m_EnvIndex
Definition: editor_actions.h:452
Definition: editor_actions.h:177
CEditorActionAddLayer(CEditor *pEditor, int GroupIndex, int LayerIndex, bool Duplicate=false)
Definition: editor_actions.cpp:532
void Undo() override
Definition: editor_actions.cpp:538
void Redo() override
Definition: editor_actions.cpp:567
bool m_Duplicate
Definition: editor_actions.h:185
Definition: editor_actions.h:301
char m_aMapName[IO_MAX_PATH_LENGTH]
Definition: editor_actions.h:318
SPrevInfo m_PrevInfo
Definition: editor_actions.h:319
std::vector< int > m_vImageIndexMap
Definition: editor_actions.h:320
CEditorActionAppendMap(CEditor *pEditor, const char *pMapName, const SPrevInfo &PrevInfo, std::vector< int > &vImageIndexMap)
Definition: editor_actions.cpp:1154
void Redo() override
Definition: editor_actions.cpp:1221
void Undo() override
Definition: editor_actions.cpp:1161
Definition: editor_actions.h:143
std::string m_Display
Definition: editor_actions.h:152
bool m_Reverse
Definition: editor_actions.h:153
void Redo() override
Definition: editor_actions.cpp:469
std::vector< std::shared_ptr< IEditorAction > > m_vpActions
Definition: editor_actions.h:151
CEditorActionBulk(CEditor *pEditor, const std::vector< std::shared_ptr< IEditorAction > > &vpActions, const char *pDisplay=nullptr, bool Reverse=false)
Definition: editor_actions.cpp:432
void Undo() override
Definition: editor_actions.cpp:450
Definition: editor_actions.h:458
CEnvPoint_runtime m_Point
Definition: editor_actions.h:468
void Redo() override
Definition: editor_actions.cpp:1693
int m_PointIndex
Definition: editor_actions.h:467
void Undo() override
Definition: editor_actions.cpp:1685
int m_EnvIndex
Definition: editor_actions.h:466
CEditorActionDeleteEnvelopePoint(CEditor *pEditor, int EnvIndex, int PointIndex)
Definition: editor_actions.cpp:1679
Definition: editor_actions.h:189
void Undo() override
Definition: editor_actions.cpp:629
void Redo() override
Definition: editor_actions.cpp:600
CEditorActionDeleteLayer(CEditor *pEditor, int GroupIndex, int LayerIndex)
Definition: editor_actions.cpp:594
Definition: editor_actions.h:77
std::vector< CQuad > m_vDeletedQuads
Definition: editor_actions.h:86
void Redo() override
Definition: editor_actions.cpp:300
std::vector< int > m_vQuadsIndices
Definition: editor_actions.h:85
CEditorActionDeleteQuad(CEditor *pEditor, int GroupIndex, int LayerIndex, std::vector< int > const &vQuadsIndices, std::vector< CQuad > const &vDeletedQuads)
Definition: editor_actions.cpp:285
void Undo() override
Definition: editor_actions.cpp:291
Definition: editor_actions.h:528
CSoundSource m_Source
Definition: editor_actions.h:537
void Undo() override
Definition: editor_actions.cpp:1753
void Redo() override
Definition: editor_actions.cpp:1761
CEditorActionDeleteSoundSource(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex)
Definition: editor_actions.cpp:1744
int m_SourceIndex
Definition: editor_actions.h:536
Definition: editor_actions.h:596
void Undo() override
Definition: editor_actions.cpp:1998
void Redo() override
Definition: editor_actions.cpp:2003
int m_SourceIndex
Definition: editor_actions.h:604
CEditorActionEditCircleSoundSourceShapeProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, ECircleShapeProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:1990
void Apply(int Value)
Definition: editor_actions.cpp:2008
Definition: editor_actions.h:472
int m_PtIndex
Definition: editor_actions.h:488
EType
Definition: editor_actions.h:475
int m_NewTime
Definition: editor_actions.h:493
CEditorActionEditEnvelopePointValue(CEditor *pEditor, int EnvIndex, int PointIndex, int Channel, EType Type, int OldTime, int OldValue, int NewTime, int NewValue)
Definition: editor_actions.cpp:1537
int m_Channel
Definition: editor_actions.h:489
void Undo() override
Definition: editor_actions.cpp:1543
int m_OldValue
Definition: editor_actions.h:492
EType m_Type
Definition: editor_actions.h:490
int m_NewValue
Definition: editor_actions.h:494
void Redo() override
Definition: editor_actions.cpp:1548
int m_EnvIndex
Definition: editor_actions.h:487
int m_OldTime
Definition: editor_actions.h:491
void Apply(bool Undo)
Definition: editor_actions.cpp:1553
Definition: editor_actions.h:212
EGroupProp m_Prop
Definition: editor_actions.h:221
int m_Previous
Definition: editor_actions.h:222
void Redo() override
Definition: editor_actions.cpp:739
int m_Current
Definition: editor_actions.h:223
int m_GroupIndex
Definition: editor_actions.h:220
void Apply(int Value)
Definition: editor_actions.cpp:757
CEditorActionEditGroupProp(CEditor *pEditor, int GroupIndex, EGroupProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:703
void Undo() override
Definition: editor_actions.cpp:721
Definition: editor_actions.h:230
CEditorActionEditLayerPropBase(CEditor *pEditor, int GroupIndex, int LayerIndex, E Prop, int Previous, int Current)
Definition: editor_actions.cpp:784
int m_Current
Definition: editor_actions.h:240
E m_Prop
Definition: editor_actions.h:238
virtual void Redo() override
Definition: editor_actions.h:235
int m_Previous
Definition: editor_actions.h:239
virtual void Undo() override
Definition: editor_actions.h:234
Definition: editor_actions.h:244
CEditorActionEditLayerProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ELayerProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:789
void Apply(int Value)
Definition: editor_actions.cpp:824
void Undo() override
Definition: editor_actions.cpp:800
void Redo() override
Definition: editor_actions.cpp:812
Definition: editor_actions.h:272
void Apply(int Value)
Definition: editor_actions.cpp:1083
void Undo() override
Definition: editor_actions.cpp:1073
void Redo() override
Definition: editor_actions.cpp:1078
CEditorActionEditLayerQuadsProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ELayerQuadsProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:1065
Definition: editor_actions.h:516
void Redo() override
Definition: editor_actions.cpp:1723
void Undo() override
Definition: editor_actions.cpp:1718
CEditorActionEditLayerSoundsProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ELayerSoundsProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:1710
void Apply(int Value)
Definition: editor_actions.cpp:1728
Definition: editor_actions.h:256
std::map< int, std::shared_ptr< CLayer > > m_SavedLayers
Definition: editor_actions.h:266
void RestoreLayer(int Layer, const std::shared_ptr< CLayerTiles > &pLayerTiles)
Definition: editor_actions.cpp:1031
void SetSavedLayers(const std::map< int, std::shared_ptr< CLayer > > &SavedLayers)
Definition: editor_actions.cpp:864
void Undo() override
Definition: editor_actions.cpp:869
CEditorActionEditLayerTilesProp(CEditor *pEditor, int GroupIndex, int LayerIndex, ETilesProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:846
void Redo() override
Definition: editor_actions.cpp:951
Definition: editor_actions.h:284
int m_GroupIndex
Definition: editor_actions.h:292
void Redo() override
Definition: editor_actions.cpp:1130
std::vector< int > m_LayerIndices
Definition: editor_actions.h:293
std::vector< int > m_NewLayerIndices
Definition: editor_actions.h:295
void Undo() override
Definition: editor_actions.cpp:1108
CEditorActionEditLayersGroupAndOrder(CEditor *pEditor, int GroupIndex, const std::vector< int > &LayerIndices, int NewGroupIndex, const std::vector< int > &NewLayerIndices)
Definition: editor_actions.cpp:1099
int m_NewGroupIndex
Definition: editor_actions.h:294
Definition: editor_actions.h:123
int m_PointIndex
Definition: editor_actions.h:132
EQuadPointProp m_Prop
Definition: editor_actions.h:133
int m_QuadIndex
Definition: editor_actions.h:131
CEditorActionEditQuadPointProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int QuadIndex, int PointIndex, EQuadPointProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:380
void Redo() override
Definition: editor_actions.cpp:397
int m_Previous
Definition: editor_actions.h:134
void Apply(int Value)
Definition: editor_actions.cpp:402
int m_Current
Definition: editor_actions.h:135
void Undo() override
Definition: editor_actions.cpp:392
Definition: editor_actions.h:92
void Redo() override
Definition: editor_actions.cpp:334
void Undo() override
Definition: editor_actions.cpp:326
std::vector< CPoint > m_vPreviousPoints
Definition: editor_actions.h:101
CEditorActionEditQuadPoint(CEditor *pEditor, int GroupIndex, int LayerIndex, int QuadIndex, std::vector< CPoint > const &vPreviousPoints, std::vector< CPoint > const &vCurrentPoints)
Definition: editor_actions.cpp:320
std::vector< CPoint > m_vCurrentPoints
Definition: editor_actions.h:102
int m_QuadIndex
Definition: editor_actions.h:100
Definition: editor_actions.h:106
int m_QuadIndex
Definition: editor_actions.h:114
void Undo() override
Definition: editor_actions.cpp:356
EQuadProp m_Prop
Definition: editor_actions.h:115
int m_Current
Definition: editor_actions.h:117
int m_Previous
Definition: editor_actions.h:116
void Redo() override
Definition: editor_actions.cpp:361
CEditorActionEditQuadProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int QuadIndex, EQuadProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:342
void Apply(int Value)
Definition: editor_actions.cpp:366
Definition: editor_actions.h:581
CEditorActionEditRectSoundSourceShapeProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, ERectangleShapeProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:1954
void Undo() override
Definition: editor_actions.cpp:1963
void Apply(int Value)
Definition: editor_actions.cpp:1973
int m_SourceIndex
Definition: editor_actions.h:589
void Redo() override
Definition: editor_actions.cpp:1968
Definition: editor_actions.h:566
void Undo() override
Definition: editor_actions.cpp:1895
int m_SourceIndex
Definition: editor_actions.h:574
void Redo() override
Definition: editor_actions.cpp:1900
CEditorActionEditSoundSourceProp(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, ESoundProp Prop, int Previous, int Current)
Definition: editor_actions.cpp:1878
void Apply(int Value)
Definition: editor_actions.cpp:1905
Definition: editor_actions.h:541
void Save()
Definition: editor_actions.cpp:1838
void * m_pSavedObject
Definition: editor_actions.h:560
int m_CurrentValue
Definition: editor_actions.h:557
CEditorActionEditSoundSource(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, EEditType Type, int Value)
Definition: editor_actions.cpp:1771
EEditType
Definition: editor_actions.h:544
~CEditorActionEditSoundSource() override
Definition: editor_actions.cpp:1867
void Redo() override
Definition: editor_actions.cpp:1809
EEditType m_EditType
Definition: editor_actions.h:556
void Undo() override
Definition: editor_actions.cpp:1779
std::vector< int > m_vOriginalValues
Definition: editor_actions.h:559
int m_SourceIndex
Definition: editor_actions.h:555
Definition: editor_actions.h:369
void Undo() override
Definition: editor_actions.cpp:1405
std::shared_ptr< CEnvelope > m_pEnv
Definition: editor_actions.h:377
CEditorActionEnvelopeAdd(CEditor *pEditor, const std::shared_ptr< CEnvelope > &pEnv)
Definition: editor_actions.cpp:1399
void Redo() override
Definition: editor_actions.cpp:1412
Definition: editor_actions.h:416
int m_Channel
Definition: editor_actions.h:434
void Apply(int Value)
Definition: editor_actions.cpp:1507
EEditType
Definition: editor_actions.h:419
int m_PointIndex
Definition: editor_actions.h:433
int m_Current
Definition: editor_actions.h:437
std::shared_ptr< CEnvelope > m_pEnv
Definition: editor_actions.h:438
CEditorActionEnvelopeEditPoint(CEditor *pEditor, int EnvelopeIndex, int PointIndex, int Channel, EEditType EditType, int Previous, int Current)
Definition: editor_actions.cpp:1487
int m_EnvelopeIndex
Definition: editor_actions.h:432
void Redo() override
Definition: editor_actions.cpp:1502
void Undo() override
Definition: editor_actions.cpp:1497
int m_Previous
Definition: editor_actions.h:436
EEditType m_EditType
Definition: editor_actions.h:435
Definition: editor_actions.h:394
int m_Previous
Definition: editor_actions.h:410
int m_EnvelopeIndex
Definition: editor_actions.h:408
EEditType
Definition: editor_actions.h:397
std::shared_ptr< CEnvelope > m_pEnv
Definition: editor_actions.h:412
void Undo() override
Definition: editor_actions.cpp:1449
int m_Current
Definition: editor_actions.h:411
EEditType m_EditType
Definition: editor_actions.h:409
void Redo() override
Definition: editor_actions.cpp:1468
CEditorActionEnvelopeEdit(CEditor *pEditor, int EnvelopeIndex, EEditType EditType, int Previous, int Current)
Definition: editor_actions.cpp:1440
Definition: editor_actions.h:381
void Redo() override
Definition: editor_actions.cpp:1432
CEditorActionEveloppeDelete(CEditor *pEditor, int EnvelopeIndex)
Definition: editor_actions.cpp:1419
std::shared_ptr< CEnvelope > m_pEnv
Definition: editor_actions.h:390
void Undo() override
Definition: editor_actions.cpp:1425
int m_EnvelopeIndex
Definition: editor_actions.h:389
Definition: editor_actions.h:198
int m_GroupIndex
Definition: editor_actions.h:206
bool m_Delete
Definition: editor_actions.h:207
std::shared_ptr< CLayerGroup > m_pGroup
Definition: editor_actions.h:208
void Undo() override
Definition: editor_actions.cpp:666
void Redo() override
Definition: editor_actions.cpp:685
CEditorActionGroup(CEditor *pEditor, int GroupIndex, bool Delete)
Definition: editor_actions.cpp:656
Definition: editor_actions.h:8
int m_LayerIndex
Definition: editor_actions.h:17
int m_GroupIndex
Definition: editor_actions.h:16
virtual void Undo() override
Definition: editor_actions.h:12
std::shared_ptr< CLayer > m_pLayer
Definition: editor_actions.h:18
CEditorActionLayerBase(CEditor *pEditor, int GroupIndex, int LayerIndex)
Definition: editor_actions.cpp:524
virtual void Redo() override
Definition: editor_actions.h:13
Definition: editor_actions.h:649
void Undo() override
Definition: editor_actions.cpp:2111
void Redo() override
Definition: editor_actions.cpp:2117
CPoint m_OriginalPosition
Definition: editor_actions.h:658
CEditorActionMoveSoundSource(CEditor *pEditor, int GroupIndex, int LayerIndex, int SourceIndex, CPoint OriginalPosition, CPoint CurrentPosition)
Definition: editor_actions.cpp:2105
int m_SourceIndex
Definition: editor_actions.h:657
CPoint m_CurrentPosition
Definition: editor_actions.h:659
Definition: editor_actions.h:624
int m_Y
Definition: editor_actions.h:633
void Undo() override
Definition: editor_actions.cpp:2053
void Redo() override
Definition: editor_actions.cpp:2062
CEditorActionNewEmptyQuad(CEditor *pEditor, int GroupIndex, int LayerIndex, int x, int y)
Definition: editor_actions.cpp:2047
int m_X
Definition: editor_actions.h:632
Definition: editor_actions.h:611
void Undo() override
Definition: editor_actions.cpp:2029
int m_X
Definition: editor_actions.h:619
int m_Y
Definition: editor_actions.h:620
void Redo() override
Definition: editor_actions.cpp:2038
CEditorActionNewEmptySound(CEditor *pEditor, int GroupIndex, int LayerIndex, int x, int y)
Definition: editor_actions.cpp:2023
Definition: editor_actions.h:637
void Undo() override
Definition: editor_actions.cpp:2091
CQuad m_Quad
Definition: editor_actions.h:645
CEditorActionNewQuad(CEditor *pEditor, int GroupIndex, int LayerIndex)
Definition: editor_actions.cpp:2082
void Redo() override
Definition: editor_actions.cpp:2097
Definition: editor_actions.h:51
void Redo() override
Definition: editor_actions.cpp:250
std::vector< CQuad > m_vBrush
Definition: editor_actions.h:59
void Undo() override
Definition: editor_actions.cpp:242
CEditorActionQuadPlace(CEditor *pEditor, int GroupIndex, int LayerIndex, std::vector< CQuad > &vBrush)
Definition: editor_actions.cpp:236
Definition: editor_actions.h:500
int m_EnvIndex
Definition: editor_actions.h:508
void Redo() override
Definition: editor_actions.cpp:1630
CEditorActionResetEnvelopePointTangent(CEditor *pEditor, int EnvIndex, int PointIndex, int Channel, bool In)
Definition: editor_actions.cpp:1596
void Undo() override
Definition: editor_actions.cpp:1614
int m_Previous[2]
Definition: editor_actions.h:512
bool m_In
Definition: editor_actions.h:511
int m_Channel
Definition: editor_actions.h:510
int m_PointIndex
Definition: editor_actions.h:509
Definition: editor_actions.h:63
std::vector< CSoundSource > m_vBrush
Definition: editor_actions.h:71
void Undo() override
Definition: editor_actions.cpp:265
void Redo() override
Definition: editor_actions.cpp:274
CEditorActionSoundPlace(CEditor *pEditor, int GroupIndex, int LayerIndex, std::vector< CSoundSource > &vBrush)
Definition: editor_actions.cpp:259
Definition: editor_actions.h:326
CEditorActionTileArt(CEditor *pEditor, int PreviousImageCount, const char *pTileArtFile, std::vector< int > &vImageIndexMap)
Definition: editor_actions.cpp:1229
int m_PreviousImageCount
Definition: editor_actions.h:334
char m_aTileArtFile[IO_MAX_PATH_LENGTH]
Definition: editor_actions.h:335
void Redo() override
Definition: editor_actions.cpp:1276
std::vector< int > m_vImageIndexMap
Definition: editor_actions.h:336
void Undo() override
Definition: editor_actions.cpp:1236
Definition: editor_actions.h:159
void Apply(bool Undo)
Definition: editor_actions.cpp:496
void ComputeInfos()
Definition: editor_actions.cpp:515
CEditorActionTileChanges(CEditor *pEditor, int GroupIndex, int LayerIndex, const char *pAction, const EditorTileStateChangeHistory< STileStateChange > &Changes)
Definition: editor_actions.cpp:479
void Undo() override
Definition: editor_actions.cpp:486
void Redo() override
Definition: editor_actions.cpp:491
int m_TotalChanges
Definition: editor_actions.h:168
EditorTileStateChangeHistory< STileStateChange > m_Changes
Definition: editor_actions.h:167
Definition: editor_actions.h:22
void Undo() override
Definition: editor_actions.cpp:119
int m_TotalTilesDrawn
Definition: editor_actions.h:41
void Apply(bool Undo)
Definition: editor_actions.cpp:129
CEditorBrushDrawAction(CEditor *pEditor, int Group)
Definition: editor_actions.cpp:4
bool IsEmpty() override
Definition: editor_actions.cpp:114
EditorTileStateChangeHistory< STeleTileStateChange > m_TeleTileChanges
Definition: editor_actions.h:36
void SetInfos()
Definition: editor_actions.cpp:61
int m_Group
Definition: editor_actions.h:31
EditorTileStateChangeHistory< SSwitchTileStateChange > m_SwitchTileChanges
Definition: editor_actions.h:38
void Redo() override
Definition: editor_actions.cpp:124
int m_TotalLayers
Definition: editor_actions.h:42
std::vector< std::pair< int, EditorTileStateChangeHistory< STileStateChange > > > m_vTileChanges
Definition: editor_actions.h:35
EditorTileStateChangeHistory< STuneTileStateChange > m_TuneTileChanges
Definition: editor_actions.h:39
EditorTileStateChangeHistory< SSpeedupTileStateChange > m_SpeedupTileChanges
Definition: editor_actions.h:37
Definition: editor_actions.h:342
EType
Definition: editor_actions.h:345
void Redo() override
Definition: editor_actions.cpp:1359
std::string m_PreviousCommand
Definition: editor_actions.h:362
EType m_Type
Definition: editor_actions.h:359
std::string m_CurrentCommand
Definition: editor_actions.h:363
int m_CommandIndex
Definition: editor_actions.h:361
int * m_pSelectedCommandIndex
Definition: editor_actions.h:360
void Undo() override
Definition: editor_actions.cpp:1321
CEditorCommandAction(CEditor *pEditor, EType Type, int *pSelectedCommandIndex, int CommandIndex, const char *pPreviousCommand=nullptr, const char *pCurrentCommand=nullptr)
Definition: editor_actions.cpp:1290
Definition: editor.h:276
Definition: color.h:210
Definition: editor_action.h:9
ELayerQuadsProp
Definition: mapitems.h:112
EQuadProp
Definition: mapitems.h:5
EQuadPointProp
Definition: mapitems.h:18
ETilesProp
Definition: mapitems.h:69
ERectangleShapeProp
Definition: mapitems.h:45
ECircleShapeProp
Definition: mapitems.h:53
ELayerSoundsProp
Definition: mapitems.h:119
ELayerProp
Definition: mapitems.h:60
EGroupProp
Definition: mapitems.h:96
ESoundProp
Definition: mapitems.h:29
#define E(buf, str)
std::map< int, std::map< int, T > > EditorTileStateChangeHistory
Definition: layer_tiles.h:18
Definition: editor_actions.h:304
int m_Sounds
Definition: editor_actions.h:307
int m_Groups
Definition: editor_actions.h:305
int m_Envelopes
Definition: editor_actions.h:308
int m_Images
Definition: editor_actions.h:306
Definition: mapitems.h:413
Definition: mapitems.h:223
Definition: mapitems.h:483
@ IO_MAX_PATH_LENGTH
Definition: types.h:43