• Create Account

### #ActualParil101

Posted 26 December 2012 - 09:07 AM

Hey there.

Another simple question I figure I'd place in another thread.

I have some scripts which interface highly out to C++. Now, I added a lot of types which the scripts need to use - however, the code is littered with the global namespace accessor. For instance:

namespace Default
{
class DefaultRenderer : ::IBlockRenderer
{
void Render(::Block block, ::Point3i position)
{
::renderer.Draw(::Box().SetAll(::Point2i(0, 0), ::Colorb(255, 0, 255, 255)));
}
}
}

Is there any way I can get rid of these? I know it's because these are in a namespace, but, I use them to keep scripts separate and enforce that they be in their own namespace. With them it can't seem to resolve the global scope automatically.

-P

### #1Paril101

Posted 26 December 2012 - 09:06 AM

Hey there.

Another simple question I figure I'd place in another thread.

I have some scripts which interface highly out to C++. Now, I added a lot of types which the scripts need to use - however, the code is littered with the global namespace accessor. For instance:

namespace Default
{
class DefaultRenderer : ::IBlockRenderer
{
void Render(::Block block, ::Point3i position)
{
::renderer.Draw(::Box().SetAll(::Point2i(0, 0), ::Colorb(255, 0, 255, 255)));
}
}
}

Is there any way I can get rid of these? I know it's because these are in a namespace, but, I use them to keep scripts separate and enforce that they be in their own namespace. Without them it can't seem to resolve in the global scope.