The templated function is already placed in .h (bot_globals.h):
Code:
namespace Light
{
//extern const mplane_t *lightplane (NULL);
//extern Vector lightspot;
extern Color g_pointColor;
template <typename nodeType, typename surfaceType> extern const bool RecursiveLightPoint (const nodeType *const node, const Vector &start, const Vector &end);
inline const bool IsSoftwareDrawingMode (void)
{
static const bool isSoftwareDrawingMode (IS_DEDICATED_SERVER () || GetModuleHandle ("sw.dll") != NULL);
return isSoftwareDrawingMode;
}
inline const bool ActualRecursiveLightPoint (const Vector &start, const Vector &end)
{
return IsSoftwareDrawingMode () ?
RecursiveLightPoint <mnode_t, msurface_t> (sv_worldmodel->nodes, start, end) :
RecursiveLightPoint <GL_mnode_t, GL_msurface_t> (reinterpret_cast <GL_mnode_t *> (sv_worldmodel->nodes), start, end);
}
inline const unsigned char R_LightPoint (const Vector &p)
{
// Reliability check.
if (sv_worldmodel == NULL)
return 0u;
if (sv_worldmodel->lightdata == NULL)
return 255u;
Vector end (p);
end.z -= 2048.0f;
return ActualRecursiveLightPoint (p, end) == false ? 0u : static_cast <unsigned char> (g_pointColor.GetAvg ());
}
}
I don't understand the hack. Rather I would like to understand somehow the problem (why mingw doesn't see the function) and solve it the way mingw can see it (without workarounds). Can You help again?
[EDIT]
The cygwin file - even if it's compiled - it is not loading on my mandriva 2011 linux test server.
The problem reported by MinGW has to be definitely somehow resolved.