View Single Post
Re: code to get the illumination at any point on the map
Old
  (#45)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: code to get the illumination at any point on the map - 24-03-2012

Quote:
Originally Posted by Immortal_BLG View Post
BTW at the expense of function "GetModuleHandle". Once again I was wrong in my last post, because if there is no listen servers for LINUX, then the function "GetModuleHandle" for LINUX does not need, in addition, ".DLL" extension on LINUX, it does not exist, there ".SO".

So you should use: (without GetModuleHandle for LINUX)
Code:
inline const bool IsSoftwareDrawingMode (void)
{
    #ifdef _LINUX
        return true;    // Always software rendering mode....
    #else    // ifdef _LINUX
        static const bool isSoftwareDrawingMode (IS_DEDICATED_SERVER () || GetModuleHandle ("sw.dll") != NULL);

        return isSoftwareDrawingMode;
    #endif    // ifndef _LINUX
}
Actually I don't understand at all how this can work. I mean how the function IsSoftwareDrawingMode (void) can get a call for it-self inside it - isSoftwareDrawingMode (IS_DEDICATED_SERVER () || GetModuleHandle ("sw.dll") != NULL) - to give the right result. Can You re-write it to the way I'm used (I mean - first the declaration, then the usage - without recursion)?
  
Reply With Quote