darope@0: // vi: set ts=4 sw=4 : darope@0: // vim: set tw=75 : darope@0: darope@0: // From SDK dlls/h_export.cpp: darope@0: darope@0: /*** darope@0: * darope@0: * Copyright (c) 1999, 2000 Valve LLC. All rights reserved. darope@0: * darope@0: * This product contains software technology licensed from Id darope@0: * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. darope@0: * All Rights Reserved. darope@0: * darope@0: * Use, distribution, and modification of this source code and/or resulting darope@0: * object code is restricted to non-commercial enhancements to products from darope@0: * Valve LLC. All other use, distribution, or modification is prohibited darope@0: * without written permission from Valve LLC. darope@0: * darope@0: ****/ darope@0: /* darope@0: darope@0: ===== h_export.cpp ======================================================== darope@0: darope@0: Entity classes exported by Halflife. darope@0: darope@0: */ darope@0: darope@0: #include darope@0: darope@0: #include darope@0: darope@0: // From SDK dlls/h_export.cpp: darope@0: darope@0: //! Holds engine functionality callbacks darope@0: enginefuncs_t g_engfuncs; darope@0: globalvars_t *gpGlobals; darope@0: darope@0: // Receive engine function table from engine. darope@0: // This appears to be the _first_ DLL routine called by the engine, so we darope@0: // do some setup operations here. darope@0: void WINAPI GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) darope@0: { darope@0: memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); darope@0: gpGlobals = pGlobals; ds@282: } ds@280: ds@280: // Avoid linking to libstdc++ ds@280: #if defined(linux) ds@280: extern "C" void __cxa_pure_virtual(void) ds@280: { darope@0: } ds@280: ds@280: void *operator new(size_t size) ds@280: { ds@280: return malloc(size); ds@280: } ds@280: ds@280: void *operator new[](size_t size) ds@280: { ds@280: return malloc(size); ds@280: } ds@280: ds@280: void operator delete(void *ptr) ds@280: { ds@280: free(ptr); ds@280: } ds@280: ds@280: void operator delete[](void * ptr) ds@280: { ds@280: free(ptr); ds@280: } ds@280: #endif}