Changed license in sourcehook_hookmangen_x86.h (agreed to by BAILOPAN and faluco)
Updated MSVC7 proj file
2 ;; (C)2005-2007 AlliedModders LLC
3 ;; By the Metamod:Source Development Team
4 ;; This software is licensed under the zlib/libpng free software license.
6 ;; This assembly file is a short thunk wrapper to let us load as a VSP and exit quietly,
7 ;; without any overhead of the rest of the interface, and also to prevent linking against
12 ;; void GetBaseDir(char *buffer, maxlength);
13 ;; void *GetThisPointer();
15 ;; void LoadFunction();
19 global GetThisPointer, GetGameDir, ServerCommand
20 global _GetThisPointer, _GetGameDir, _ServerCommand
21 global _GetICvar, GetICvar
31 mov eax, GLOBAL_POINTER
39 mov ecx, [engine] ;get this pointer
40 mov edx, [ecx] ;get the vtable
41 push dword [ebp+12] ;push maxlenth
42 push dword [ebp+8] ;push buffer
44 push ecx ;push this pointer
46 call dword [edx+216] ;call IVEngineServer::GetGameDir
48 add esp, 12 ;correct stack
59 mov ecx, [engine] ;get this pointer
60 mov edx, [ecx] ;get the vtable
61 push dword [ebp+8] ;push string
63 push ecx ;push this pointer
65 call dword [edx+144] ;call IVEngineServer::ServerCommand
67 add esp, 8 ;correct stack
87 push dword VENGINESERVER ;iface name
88 call edi ;call factory
89 add esp, 8 ;correct stack
91 test eax, eax ;do we have a valid pointer?
94 mov [engine], eax ;store the engine pointer
97 push dword VENGINECVAR ;iface name
98 call edi ;call factory
99 add esp, 8 ;correct stack
101 test eax, eax ;do we have a valid pointer?
102 jz .end ;no, bail out
104 mov [icvar], eax ;store the icvar pointer
109 ;We never load, never ever ever!
125 INTERFACE_NAME DB "ISERVERPLUGINCALLBACKS001", 0
126 VENGINESERVER DB "VEngineServer021", 0
127 VENGINECVAR DB "VEngineCvar003", 0
129 VIRTUAL_TABLE DD thisLoadFunction
130 DD thisUnloadFunction
131 ;We don't need any more of the vtable here
133 GLOBAL_POINTER DD VIRTUAL_TABLE