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 
28 C4Action::~C4Action() = default;
29 
31 {
32  Dir=DIR_None;
33  DrawDir=Dir;
35  Time=0;
36  Data=0;
37  Target=Target2=nullptr;
38  Phase=PhaseDelay=0;
39  Facet.Default();
40  FacetX=FacetY=0;
42  Animation = nullptr;
43 }
44 
46 {
47  // Note: Compiled directly into "Object"-categories, so beware of name clashes (see C4Object::CompileFunc)
48  pComp->Value(mkNamingAdapt( Dir, "Dir", DIR_None ));
49  pComp->Value(mkNamingAdapt( ComDir, "ComDir", COMD_Stop ));
50  pComp->Value(mkNamingAdapt( Time, "ActionTime", 0 ));
51  pComp->Value(mkNamingAdapt( Data, "ActionData", 0 ));
52  pComp->Value(mkNamingAdapt( Phase, "Phase", 0 ));
53  pComp->Value(mkNamingAdapt( PhaseDelay, "PhaseDelay", 0 ));
54 }
55 
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:92
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:30
void Value(const T &rStruct)
Definition: StdCompiler.h:161
#define COMD_Stop
Definition: C4Object.h:50
C4ObjectPtr Target
Definition: C4Object.h:87
const BYTE CNAT_None
Definition: C4Constants.h:108
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:45
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