2016-07-26 03:22:47 +03:00
|
|
|
#include "precompiled.h"
|
2016-07-04 09:07:29 +03:00
|
|
|
|
2016-07-26 15:18:32 +03:00
|
|
|
//! Holds engine functionality callbacks
|
2017-05-09 18:34:55 +03:00
|
|
|
enginefuncs_t g_engfuncs;
|
2016-07-26 15:18:32 +03:00
|
|
|
globalvars_t* gpGlobals;
|
|
|
|
engine_t g_engine;
|
2016-07-04 09:07:29 +03:00
|
|
|
|
|
|
|
// 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().
|
2017-05-09 19:31:09 +03:00
|
|
|
void WINAPI GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t* pGlobals)
|
2016-07-04 09:07:29 +03:00
|
|
|
{
|
|
|
|
gpGlobals = pGlobals;
|
2016-07-26 15:18:32 +03:00
|
|
|
g_engine.funcs = &g_engfuncs;
|
|
|
|
g_engine.globals = pGlobals;
|
2016-07-26 03:22:47 +03:00
|
|
|
|
2017-05-09 18:34:55 +03:00
|
|
|
g_engfuncs = *pengfuncsFromEngine;
|
|
|
|
flush_ALERT_buffer();
|
2016-07-26 15:18:32 +03:00
|
|
|
// NOTE! Have to call logging function _after_ initialising g_engfuncs, so
|
2016-07-04 09:07:29 +03:00
|
|
|
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
|
|
|
|
META_DEV("called: GiveFnptrsToDll");
|
2016-07-26 15:18:32 +03:00
|
|
|
|
2016-07-04 09:07:29 +03:00
|
|
|
// Load plugins, load game dll.
|
2016-07-26 15:18:32 +03:00
|
|
|
metamod_startup();
|
|
|
|
}
|