Adding an ObjectType
by Will Sanders · in Torque Game Engine · 11/03/2002 (8:12 am) · 0 replies
I want to make new mTypeMask, but when I go to ObjectTypes.h, this message is shown at the top:
//-------------------------------------------------
// Types used for SimObject type masks (SimObject::mTypeMask)
//
/* NB! If a new object type is added, don't forget to add it to the
* consoleInit function in simBase.cc
*/
enum SimObjectTypes
{
#define bit(x) (1 << (x))
// Types used by the SceneObject class
DefaultObjectType = 0,
StaticObjectType = bit(0),
//... ect
//-------------------------------------------------
Okay, so I go to the consoleInit function in simBase.cc and it looks like this:
//-------------------------------------------------
void SimObject::consoleInit()
{
}
//-------------------------------------------------
What do I add? "enum SimObjectTypes MyObjectType = bit(25)";?
//-------------------------------------------------
// Types used for SimObject type masks (SimObject::mTypeMask)
//
/* NB! If a new object type is added, don't forget to add it to the
* consoleInit function in simBase.cc
*/
enum SimObjectTypes
{
#define bit(x) (1 << (x))
// Types used by the SceneObject class
DefaultObjectType = 0,
StaticObjectType = bit(0),
//... ect
//-------------------------------------------------
Okay, so I go to the consoleInit function in simBase.cc and it looks like this:
//-------------------------------------------------
void SimObject::consoleInit()
{
}
//-------------------------------------------------
What do I add? "enum SimObjectTypes MyObjectType = bit(25)";?