void WINAPI GiveFnptrsToDll(enginefuncs_t *pengfuncsFromEngine, globalvars_t *pGlobals) { gpGlobals = pGlobals; Engine.funcs = &g_engfuncs; Engine.globals = pGlobals; Engine.info.initialise(pengfuncsFromEngine); g_engfuncs.initialise_interface(pengfuncsFromEngine); // NOTE! Have to call logging function _after_ initialising g_engfuncs, so // that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :) META_DEV("called: GiveFnptrsToDll"); // Load plugins, load game dll. metamod_startup(); return; }
// Receive engine function table from engine. // // This appears to be the _first_ DLL routine called by the engine, so this // is where we hook to load all the other DLLs (game, plugins, etc), which // is actually all done in meta_startup(). C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pengfuncsFromEngine, globalvars_t *pGlobals) { #ifdef linux metamod_handle = get_module_handle_of_memptr((void*)&g_engfuncs); #endif gpGlobals = pGlobals; Engine.funcs = &g_engfuncs; Engine.globals = pGlobals; Engine.info.initialise(pengfuncsFromEngine); g_engfuncs.initialise_interface(pengfuncsFromEngine); // NOTE! Have to call logging function _after_ initialising g_engfuncs, so // that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :) META_DEV("called: GiveFnptrsToDll"); // Load plugins, load game dll. if(!metamod_startup()) { metamod_not_loaded = 1; } return; }