OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4MassMover.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 1998-2000, Matthes Bender
5  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
7  *
8  * Distributed under the terms of the ISC license; see accompanying file
9  * "COPYING" for details.
10  *
11  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
12  * See accompanying file "TRADEMARK" for details.
13  *
14  * To redistribute this file separately, substitute the full license texts
15  * for the above references.
16  */
17 
18 /* Move liquids in the landscape using individual transport spots */
19 
20 #ifndef INC_C4MassMover
21 #define INC_C4MassMover
22 
23 const int32_t C4MassMoverChunk = 10000;
24 
26 {
27  friend class C4MassMoverSet;
28 protected:
29  int32_t Mat,x,y;
30 protected:
31  void Cease();
32  bool Execute();
33  bool Init(int32_t tx, int32_t ty);
34  bool Corrosion(int32_t dx, int32_t dy);
35 };
36 
38 {
39 public:
42 public:
43  int32_t Count;
44  int32_t CreatePtr;
45 protected:
47 public:
48  void Copy(C4MassMoverSet &rSet);
49  void Synchronize();
50  void Default();
51  void Clear();
52  void Draw();
53  void Execute();
54  bool Create(int32_t x, int32_t y, bool fExecute=false);
55  bool Load(C4Group &hGroup);
56  bool Save(C4Group &hGroup);
57 protected:
58  void Consolidate();
59 };
60 
62 
63 #endif
void Copy(C4MassMoverSet &rSet)
int32_t y
Definition: C4MassMover.h:29
bool Init(int32_t tx, int32_t ty)
const int32_t C4MassMoverChunk
Definition: C4MassMover.h:23
C4MassMoverSet MassMover
bool Create(int32_t x, int32_t y, bool fExecute=false)
Definition: C4MassMover.cpp:70
C4MassMover Set[C4MassMoverChunk]
Definition: C4MassMover.h:46
bool Save(C4Group &hGroup)
bool Execute()
bool Corrosion(int32_t dx, int32_t dy)
int32_t x
Definition: C4MassMover.h:29
bool Load(C4Group &hGroup)
int32_t Mat
Definition: C4MassMover.h:29
int32_t Count
Definition: C4MassMover.h:43
int32_t CreatePtr
Definition: C4MassMover.h:44