OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Action.cpp
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) 2013-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 /* The C4Action class is merely a simple data structure */
19 
20 #include "C4Include.h"
21 #include "object/C4Object.h"
22 
24 {
25  Default();
26 }
27 
29 {
30 
31 }
32 
34 {
35  Dir=DIR_None;
36  DrawDir=Dir;
38  Time=0;
39  Data=0;
40  Target=Target2=nullptr;
41  Phase=PhaseDelay=0;
42  Facet.Default();
43  FacetX=FacetY=0;
45  Animation = nullptr;
46 }
47 
49 {
50  // Note: Compiled directly into "Object"-categories, so beware of name clashes (see C4Object::CompileFunc)
51  pComp->Value(mkNamingAdapt( Dir, "Dir", DIR_None ));
52  pComp->Value(mkNamingAdapt( ComDir, "ComDir", COMD_Stop ));
53  pComp->Value(mkNamingAdapt( Time, "ActionTime", 0 ));
54  pComp->Value(mkNamingAdapt( Data, "ActionData", 0 ));
55  pComp->Value(mkNamingAdapt( Phase, "Phase", 0 ));
56  pComp->Value(mkNamingAdapt( PhaseDelay, "PhaseDelay", 0 ));
57 }
58 
int32_t Time
Definition: C4Object.h:83
#define DIR_None
Definition: C4Object.h:40
C4ObjectPtr Target2
Definition: C4Object.h:87
StdMeshInstanceAnimationNode * Animation
Definition: C4Object.h:90
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:93
C4Action()
Definition: C4Action.cpp:23
int32_t t_attach
Definition: C4Object.h:86
void Default()
Definition: C4Facet.cpp:31
int32_t PhaseDelay
Definition: C4Object.h:85
void Default()
Definition: C4Action.cpp:33
~C4Action()
Definition: C4Action.cpp:28
void Value(const T &rStruct)
Definition: StdCompiler.h:171
#define COMD_Stop
Definition: C4Object.h:50
C4ObjectPtr Target
Definition: C4Object.h:87
const BYTE CNAT_None
Definition: C4Constants.h:109
int32_t Data
Definition: C4Object.h:84
int32_t Phase
Definition: C4Object.h:85
C4Facet Facet
Definition: C4Object.h:88
void CompileFunc(StdCompiler *pComp)
Definition: C4Action.cpp:48
int32_t Dir
Definition: C4Object.h:80
int32_t FacetY
Definition: C4Object.h:89
int32_t DrawDir
Definition: C4Object.h:81
int32_t FacetX
Definition: C4Object.h:89
int32_t ComDir
Definition: C4Object.h:82