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,
97  OCF_CrewMember = 1<<19,
98  OCF_InLiquid = 1<<20,
99  OCF_InSolid = 1<<21,
100  OCF_InFree = 1<<22,
101  OCF_Available = 1<<23,
102  OCF_Container = 1<<24,
103  OCF_Alive = 1<<25;
104 
105 //================================== Contact / Attachment ==============================================
106 
107 const BYTE // Directional
111  CNAT_Top = 4,
114  // Additional flags
115  CNAT_MultiAttach = 32, // new attachment behaviour; see C4Shape::Attach
116  CNAT_NoCollision = 64, // turn off collision for this vertex
118 
119 const BYTE CNAT_Flags = CNAT_MultiAttach | CNAT_NoCollision | CNAT_PhaseHalfVehicle; // all attchment flags that can be combined with regular attachment
120 
121 //=================================== Control Commands ======================================================
122 
123 const BYTE
133 
134 //=================================== Owners ==============================================
135 
136 const int
137  NO_OWNER = -1,
138  ANY_OWNER = -2;
139 
140 //=================================== League (escape those damn circular includes =========
141 
143 {
147 };
148 
149 //=================================== Player (included by C4PlayerInfo and C4Player)
150 
152 {
154  C4PT_User = 1, // Normal player
155  C4PT_Script = 2 // AI players, etc.
156 };
157 
158 //=================================== AllowPictureStack (DefCore value)
159 
161 {
162  APS_Color = 1<<0,
163  APS_Graphics = 1<<1,
164  APS_Name = 1<<2,
165  APS_Overlay = 1<<3
166 };
167 
168 // Material constants
169 // Material Density Levels
170 const int32_t
171  C4M_Vehicle = 100,
172  C4M_Solid = 50,
176 
177 const int32_t MNone = -1;
178 
179 
180 // Object size
181 const int32_t FullCon = 100000;
182 
183 #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:128
const int32_t C4M_Vehicle
Definition: C4Constants.h:171
const uint32_t OCF_Alive
Definition: C4Constants.h:103
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:117
const uint32_t OCF_NotContained
Definition: C4Constants.h:96
const BYTE COM_MenuShowText
Definition: C4Constants.h:127
const uint32_t OCF_Container
Definition: C4Constants.h:102
const uint32_t OCF_InSolid
Definition: C4Constants.h:99
const uint32_t OCF_CrewMember
Definition: C4Constants.h:97
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:138
const BYTE CNAT_NoCollision
Definition: C4Constants.h:116
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
C4AllowPictureStack
Definition: C4Constants.h:160
const BYTE COM_MenuEnterAll
Definition: C4Constants.h:125
const BYTE COM_MenuEnter
Definition: C4Constants.h:124
const BYTE CNAT_Flags
Definition: C4Constants.h:119
const int C4MaxControlSet
Definition: C4Constants.h:32
const uint32_t OCF_FullCon
Definition: C4Constants.h:85
C4LeagueDisconnectReason
Definition: C4Constants.h:142
const int32_t FullCon
Definition: C4Constants.h:181
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:177
const BYTE CNAT_MultiAttach
Definition: C4Constants.h:115
const BYTE COM_MenuUp
Definition: C4Constants.h:130
const int C4M_MaxDefName
Definition: C4Constants.h:50
const int C4M_MaxTexIndex
Definition: C4Constants.h:51
const BYTE COM_MenuDown
Definition: C4Constants.h:131
const int NO_OWNER
Definition: C4Constants.h:137
const uint32_t OCF_InLiquid
Definition: C4Constants.h:98
const uint32_t OCF_Rotate
Definition: C4Constants.h:88
const int32_t C4M_Solid
Definition: C4Constants.h:172
C4PlayerType
Definition: C4Constants.h:151
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:108
const BYTE COM_MenuSelect
Definition: C4Constants.h:132
const BYTE CNAT_Top
Definition: C4Constants.h:111
const BYTE COM_MenuClose
Definition: C4Constants.h:126
const int C4SymbolSize
Definition: C4Constants.h:58
const uint32_t OCF_Grab
Definition: C4Constants.h:81
const BYTE COM_MenuRight
Definition: C4Constants.h:129
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:110
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:173
const uint32_t OCF_HitSpeed3
Definition: C4Constants.h:92
const uint32_t OCF_Available
Definition: C4Constants.h:101
const int32_t C4M_Liquid
Definition: C4Constants.h:174
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:109
const int32_t C4M_Background
Definition: C4Constants.h:175
const BYTE CNAT_Bottom
Definition: C4Constants.h:112
const uint32_t OCF_InFree
Definition: C4Constants.h:100
const int C4MaxControlRate
Definition: C4Constants.h:33
const BYTE CNAT_Center
Definition: C4Constants.h:113