
//MakeJMP is required but I think it's in the source too.
//This is the typedef, I named it sub_588A10 as that's the function's name:
typedef void (__cdecl *sub_588A10)(int var1, int var2, float alpha);
sub_588A10 origional_sub_588A10 = NULL;
//This is the function we will hook to,
void __cdecl DrawNames(int var1, int var2, float alphaVal)
{
if(AreNameTagsDrawn) origional_sub_588A10(var1, var2, 1.0f);
else origional_sub_588A10(var1, var2, alphaVal);
}
//Now in DllMain, or a Wrapper, we apply the hook which is 6 Bytes Long.
//This is with DetourFunction:
origional_sub_588A10= ( sub_588A10 ) DetourFunction( ( PBYTE )0x00588A10, ( PBYTE ) &DrawNames, 6);
now if we use MakeJMP, we'll need the __declspec.
__declspec (naked) void DoNameTags()
Now Im to tired to type this. Just Use DetourFunction.