Original Post
Is it acceptable to create a large hierarchy of global-like functions using namespaces? I'm trying to find a way to limit my game world objects (characters, items, etc) to just an interface, and no class or structure types. I have 'map' and 'world' objects, and I don't want characters and items to have any access to them. But these functions require them and other higher-level objects to operate. In other words, I'm going to have a lot of functions. Would this be the way to go, or is there a better way? Looking for opinions. Thanks.
namespace GM
{
namespace Collision
{
VOID CheckMovingSphere(..);
VOID GetHeight(..);
VOID GetGrounding(..);
};
namespace Intersect
{
namespace Editor
{
Object* Triggers(..);
Object* Features(..);
Object* Objects(..);
Object* All(..);
};
Object* Triggers(..);
Object* Features(..);
Object* Objects(..);
Object* All(..);
};
namespace Magnets
{
VOID Attach(..);
VOID Detach(..);
BOOL IsGridValid();
const Vector& GetGridSpan();
const Vector& GetGridOffset();
};
};