View Single Post
Re: I'm STEAMed up !!!
Old
  (#7)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: I'm STEAMed up !!! - 30-12-2003

Pierre:
Code:
// Pierre-Marie Baty -- STEAM/NOSTEAM auto-adaptative fix -- START
extern mBOOL is_steam;
if (is_steam)
	memcpy(&g_plugin_engfuncs, Engine.funcs, sizeof(g_plugin_engfuncs));
else
	 memcpy(&g_plugin_engfuncs, Engine.funcs, 144 * sizeof(unsigned
__int32));
// Pierre-Marie Baty -- STEAM/NOSTEAM auto-adaptative fix -- END
i thought __int32 was not compatible in Linux? Perhaps you should add a check for win32 then:

Code:
extern mBOOL is_steam;
    if (is_steam)
        memcpy(&g_plugin_engfuncs, Engine.funcs, sizeof(g_plugin_engfuncs));
    else
    {
        // Keep it WIN32/Linux compatible - STEFAN
        #ifdef _WIN32
            memcpy(&g_plugin_engfuncs, Engine.funcs, 144 * sizeof(unsigned __int32));
        #elif defined(linux)
            memcpy(&g_plugin_engfuncs, Engine.funcs, 144 * sizeof(int));
        #endif
    }
I assume (int) is here 32 bits for Linux. Perhaps there is a neater way to make sure it is always 32 bits. Btw, i figured in metamod there is no __int32 used anywhere at all besides in this patch


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote