OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Constants.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 /* Lots of constants */
19 
20 #ifndef INC_C4Constants
21 #define INC_C4Constants
22 
23 //============================= Main =====================================================
24 
25 const size_t C4MaxTitle = 512;
26 const int
28  C4MaxMessage = 256,
30  C4MaxKey = 12,
32  C4MaxControlSet = C4MaxKeyboardSet+4, // keyboard sets+gamepads
36 
37 // gamma ramp indices
38 #define C4GRI_SCENARIO 0
39 #define C4GRI_SEASON 1
40 #define C4GRI_RESERVED1 2
41 #define C4GRI_DAYTIME 3
42 #define C4GRI_RESERVED2 4
43 #define C4GRI_LIGHTNING 5
44 #define C4GRI_MAGIC 6
45 #define C4GRI_RESERVED3 7
46 #define C4GRI_USER 8
47 
48 const int
51  C4M_MaxTexIndex = 255; // last texture map index is reserved for diff
52 
53 const int C4S_MaxPlayer = 4;
54 
55 const int C4D_MaxVertex = 30;
56 
57 const int
62 
63 const int C4P_MaxPosition = 4;
64 
65 const int C4ViewportScrollBorder = 40; // scrolling past landscape allowed at range of this border
66 
67 //============================= Engine Return Values ======================================
68 
69 const int
73 
74 //============================= Object Character Flags ====================================
75 
76 const uint32_t
77  OCF_None = 0,
80  OCF_Construct = 1<<1,
81  OCF_Grab = 1<<2,
82  OCF_Carryable = 1<<3,
83  OCF_OnFire = 1<<4,
84  OCF_HitSpeed1 = 1<<5,
85  OCF_FullCon = 1<<6,
87 
88  OCF_Rotate = 1<<9,
89  OCF_Exclusive = 1<<10,
90  OCF_Entrance = 1<<11,
91  OCF_HitSpeed2 = 1<<12,
92  OCF_HitSpeed3 = 1<<13,
93  OCF_Collection = 1<<14,
94 
95  OCF_HitSpeed4 = 1<<16,
98  OCF_CrewMember = 1<<19,
99  OCF_InLiquid = 1<<20,
100  OCF_InSolid = 1<<21,
101  OCF_InFree = 1<<22,
102  OCF_Available = 1<<23,
103  OCF_Container = 1<<24,
104  OCF_Alive = 1<<25;
105 
106 //================================== Contact / Attachment ==============================================
107 
108 const BYTE // Directional
112  CNAT_Top = 4,
115  // Additional flags
116  CNAT_MultiAttach = 32, // new attachment behaviour; see C4Shape::Attach
117  CNAT_NoCollision = 64, // turn off collision for this vertex
119 
120 const BYTE CNAT_Flags = CNAT_MultiAttach | CNAT_NoCollision | CNAT_PhaseHalfVehicle; // all attchment flags that can be combined with regular attachment
121 
122 //=================================== Control Commands ======================================================
123 
124 const BYTE
134 
135 //=================================== Owners ==============================================
136 
137 const int
138  NO_OWNER = -1,
139  ANY_OWNER = -2;
140 
141 //=================================== League (escape those damn circular includes =========
142 
144 {
148 };
149 
150 //=================================== Player (included by C4PlayerInfo and C4Player)
151 
153 {
155  C4PT_User = 1, // Normal player
156  C4PT_Script = 2 // AI players, etc.
157 };
158 
159 //=================================== AllowPictureStack (DefCore value)
160 
162 {
163  APS_Color = 1<<0,
164  APS_Graphics = 1<<1,
165  APS_Name = 1<<2,
166  APS_Overlay = 1<<3
167 };
168 
169 // Material constants
170 // Material Density Levels
171 const int32_t
172  C4M_Vehicle = 100,
173  C4M_Solid = 50,
177 
178 const int32_t MNone = -1;
179 
180 
181 // Object size
182 const int32_t FullCon = 100000;
183 
184 #endif // INC_C4Constants
const int C4RetireDelay
Definition: C4Constants.h:29
const int C4MaxGammaUserRamps
Definition: C4Constants.h:34
const uint32_t OCF_HitSpeed1
Definition: C4Constants.h:84
const BYTE COM_MenuLeft
Definition: C4Constants.h:129
const int32_t C4M_Vehicle
Definition: C4Constants.h:172
const uint32_t OCF_Alive
Definition: C4Constants.h:104
const uint32_t OCF_Entrance
Definition: C4Constants.h:90
const size_t C4MaxTitle
Definition: C4Constants.h:25
const uint32_t OCF_Collection
Definition: C4Constants.h:93
const BYTE CNAT_PhaseHalfVehicle
Definition: C4Constants.h:118
const uint32_t OCF_NotContained
Definition: C4Constants.h:97
const BYTE COM_MenuShowText
Definition: C4Constants.h:128
const uint32_t OCF_Container
Definition: C4Constants.h:103
const uint32_t OCF_InSolid
Definition: C4Constants.h:100
const uint32_t OCF_CrewMember
Definition: C4Constants.h:98
const int C4MaxGammaRamps
Definition: C4Constants.h:35
const uint32_t OCF_Normal
Definition: C4Constants.h:79
uint8_t BYTE
const int ANY_OWNER
Definition: C4Constants.h:139
const BYTE CNAT_NoCollision
Definition: C4Constants.h:117
const int C4S_MaxPlayer
Definition: C4Constants.h:53
const int C4ViewportScrollBorder
Definition: C4Constants.h:65
const int C4MaxDefString
Definition: C4Constants.h:27
const int C4UpperBoardHeight
Definition: C4Constants.h:59
const uint32_t OCF_AttractLightning
Definition: C4Constants.h:96
C4AllowPictureStack
Definition: C4Constants.h:161
const BYTE COM_MenuEnterAll
Definition: C4Constants.h:126
const BYTE COM_MenuEnter
Definition: C4Constants.h:125
const BYTE CNAT_Flags
Definition: C4Constants.h:120
const int C4MaxControlSet
Definition: C4Constants.h:32
const uint32_t OCF_FullCon
Definition: C4Constants.h:85
C4LeagueDisconnectReason
Definition: C4Constants.h:143
const int32_t FullCon
Definition: C4Constants.h:182
const int C4M_MaxName
Definition: C4Constants.h:49
const uint32_t OCF_Inflammable
Definition: C4Constants.h:86
const uint32_t OCF_HitSpeed2
Definition: C4Constants.h:91
const int32_t MNone
Definition: C4Constants.h:178
const BYTE CNAT_MultiAttach
Definition: C4Constants.h:116
const BYTE COM_MenuUp
Definition: C4Constants.h:131
const int C4M_MaxDefName
Definition: C4Constants.h:50
const int C4M_MaxTexIndex
Definition: C4Constants.h:51
const BYTE COM_MenuDown
Definition: C4Constants.h:132
const int NO_OWNER
Definition: C4Constants.h:138
const uint32_t OCF_InLiquid
Definition: C4Constants.h:99
const uint32_t OCF_Rotate
Definition: C4Constants.h:88
const int32_t C4M_Solid
Definition: C4Constants.h:173
C4PlayerType
Definition: C4Constants.h:152
const int C4MaxBigIconSize
Definition: C4Constants.h:61
const uint32_t OCF_Exclusive
Definition: C4Constants.h:89
const int C4MaxKeyboardSet
Definition: C4Constants.h:31
const int C4XRV_Failure
Definition: C4Constants.h:71
const int C4D_MaxVertex
Definition: C4Constants.h:55
const int C4XRV_Aborted
Definition: C4Constants.h:72
const int C4PictureSize
Definition: C4Constants.h:60
const BYTE CNAT_None
Definition: C4Constants.h:109
const BYTE COM_MenuSelect
Definition: C4Constants.h:133
const BYTE CNAT_Top
Definition: C4Constants.h:112
const BYTE COM_MenuClose
Definition: C4Constants.h:127
const int C4SymbolSize
Definition: C4Constants.h:58
const uint32_t OCF_Grab
Definition: C4Constants.h:81
const BYTE COM_MenuRight
Definition: C4Constants.h:130
const uint32_t OCF_OnFire
Definition: C4Constants.h:83
const int C4MaxKey
Definition: C4Constants.h:30
const uint32_t OCF_All
Definition: C4Constants.h:78
const BYTE CNAT_Right
Definition: C4Constants.h:111
const uint32_t OCF_Carryable
Definition: C4Constants.h:82
const uint32_t OCF_Construct
Definition: C4Constants.h:80
const int C4P_MaxPosition
Definition: C4Constants.h:63
const int32_t C4M_SemiSolid
Definition: C4Constants.h:174
const uint32_t OCF_HitSpeed3
Definition: C4Constants.h:92
const uint32_t OCF_Available
Definition: C4Constants.h:102
const int32_t C4M_Liquid
Definition: C4Constants.h:175
const int C4XRV_Completed
Definition: C4Constants.h:70
const uint32_t OCF_HitSpeed4
Definition: C4Constants.h:95
const int C4MaxMessage
Definition: C4Constants.h:28
const uint32_t OCF_None
Definition: C4Constants.h:77
const BYTE CNAT_Left
Definition: C4Constants.h:110
const int32_t C4M_Background
Definition: C4Constants.h:176
const BYTE CNAT_Bottom
Definition: C4Constants.h:113
const uint32_t OCF_InFree
Definition: C4Constants.h:101
const int C4MaxControlRate
Definition: C4Constants.h:33
const BYTE CNAT_Center
Definition: C4Constants.h:114