wdmisc_plugin/h_export.cpp
author darope
Tue Feb 12 19:01:13 2013 +0000 (2013-02-12)
branchB-work
changeset 230 bdf8171073e8
parent 0 d15304fcb7a7
child 280 622b9760d7ae
permissions -rw-r--r--
Edited DSO lookup: replace everything after the last '_', not just
_i386.so.
     1 // vi: set ts=4 sw=4 :
     2 // vim: set tw=75 :
     3 
     4 // h_export.cpp - main exported DLL functionality
     5 
     6 // From SDK dlls/h_export.cpp:
     7 
     8 /***
     9 *
    10 *	Copyright (c) 1999, 2000 Valve LLC. All rights reserved.
    11 *	
    12 *	This product contains software technology licensed from Id 
    13 *	Software, Inc. ("Id Technology").  Id Technology (c) 1996 Id Software, Inc. 
    14 *	All Rights Reserved.
    15 *
    16 *   Use, distribution, and modification of this source code and/or resulting
    17 *   object code is restricted to non-commercial enhancements to products from
    18 *   Valve LLC.  All other use, distribution, or modification is prohibited
    19 *   without written permission from Valve LLC.
    20 *
    21 ****/
    22 /*
    23 
    24 ===== h_export.cpp ========================================================
    25 
    26   Entity classes exported by Halflife.
    27 
    28 */
    29 
    30 #include <extdll.h>
    31 
    32 #include <h_export.h>
    33 #include <meta_api.h>
    34 
    35 //! Holds engine functionality callbacks
    36 enginefuncs_t g_engfuncs;
    37 globalvars_t  *gpGlobals;
    38 
    39 // Receive engine function table from engine.
    40 // This appears to be the _first_ DLL routine called by the engine, so we
    41 // do some setup operations here.
    42 void WINAPI GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
    43 {
    44 	memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t));
    45 	gpGlobals = pGlobals;
    46 	// NOTE!  Have to call logging function _after_ copying into g_engfuncs, so
    47 	// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
    48 	UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
    49 }