introduce a constant for no category

stable-6.1
Maikel de Vries 2015-03-02 20:42:34 +01:00
parent 2db2992f85
commit ee0bc7b7ff
5 changed files with 44 additions and 17 deletions

View File

@ -15,6 +15,11 @@
<col>Description</col>
<col>Default plane</col>
</rowh>
<row>
<col>C4D_None</col>
<col>No category.</col>
<col></col>
</row>
<row>
<col>C4D_StaticBack</col>
<col>Immovable object.</col>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<const>
<title>C4D_None</title>
<category>Objects</category>
<subcat>Category</subcat>
<version>6.0 OC</version>
<syntax><rtype>int </rtype></syntax>
<desc>No category, can be used for GUI and HUD objects. Only set this category for an object if you are aware of the consequences.</desc>
<related>
<funclink>GetCategory</funclink>
<funclink>SetCategory</funclink>
</related>
</const>
<author>Maikel</author><date>2015</date>
</funcs>

View File

@ -197,6 +197,7 @@ void C4Def::CompileFunc(StdCompiler *pComp)
const StdBitfieldEntry<int32_t> Categories[] =
{
{ "C4D_None", C4D_None },
{ "C4D_StaticBack", C4D_StaticBack },
{ "C4D_Structure", C4D_Structure },
{ "C4D_Vehicle", C4D_Vehicle },

View File

@ -38,6 +38,7 @@
#include <set>
const int32_t
C4D_None = 0,
C4D_All = ~0,
C4D_StaticBack = 1<<0,
C4D_Structure = 1<<1,

View File

@ -2343,6 +2343,7 @@ static bool FnCreateParticleAtBone(C4Object* Obj, C4String* szName, C4String* sz
C4ScriptConstDef C4ScriptObjectConstMap[]=
{
{ "C4D_None" ,C4V_Int, C4D_None},
{ "C4D_All" ,C4V_Int, C4D_All},
{ "C4D_StaticBack" ,C4V_Int, C4D_StaticBack},
{ "C4D_Structure" ,C4V_Int, C4D_Structure},