mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 22:35:37 +03:00
Fixed large return values (Vectors) in MSVC.
This commit is contained in:
parent
9b0ed67c9c
commit
d38d2f56e1
@ -128,6 +128,7 @@ extern bool gDoForwards;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Hook_Void_Void(Hook *hook, void *pthis)
|
void Hook_Void_Void(Hook *hook, void *pthis)
|
||||||
{
|
{
|
||||||
PUSH_VOID()
|
PUSH_VOID()
|
||||||
@ -652,8 +653,11 @@ void *Hook_Cbase_Void(Hook *hook, void *pthis)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
void Hook_Vector_Void(Hook *hook, void *pthis, Vector *out)
|
||||||
|
#elif defined __linux__
|
||||||
void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis)
|
void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Vector ret;
|
Vector ret;
|
||||||
Vector origret;
|
Vector origret;
|
||||||
@ -683,8 +687,11 @@ void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis)
|
|||||||
memcpy(out, &ret, sizeof(Vector));
|
memcpy(out, &ret, sizeof(Vector));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
|
void Hook_Vector_pVector(Hook *hook, void *pthis, Vector *out, Vector *v1)
|
||||||
|
#elif defined __linux__
|
||||||
void Hook_Vector_pVector(Hook *hook, Vector *out, void *pthis, Vector *v1)
|
void Hook_Vector_pVector(Hook *hook, Vector *out, void *pthis, Vector *v1)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Vector ret;
|
Vector ret;
|
||||||
Vector origret;
|
Vector origret;
|
||||||
|
@ -89,13 +89,23 @@ const bool RT_Cbase_Void = false;
|
|||||||
const int PC_Cbase_Void = 0;
|
const int PC_Cbase_Void = 0;
|
||||||
void *Hook_Cbase_Void(Hook *hook, void *pthis);
|
void *Hook_Cbase_Void(Hook *hook, void *pthis);
|
||||||
|
|
||||||
const bool RT_Vector_Void = true;
|
// HACK: I'm too lazy to fix up trampoline generator to deal with
|
||||||
|
// special return values. this is so much easier.
|
||||||
|
const bool RT_Vector_Void = false;
|
||||||
const int PC_Vector_Void = 1;
|
const int PC_Vector_Void = 1;
|
||||||
|
#ifdef _WIN32
|
||||||
|
void Hook_Vector_Void(Hook *hook, void *pthis, Vector *out);
|
||||||
|
#elif defined __linux__
|
||||||
void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis);
|
void Hook_Vector_Void(Hook *hook, Vector *out, void *pthis);
|
||||||
|
#endif
|
||||||
|
|
||||||
const bool RT_Vector_pVector = true;
|
const bool RT_Vector_pVector = true;
|
||||||
const int PC_Vector_pVector = 2;
|
const int PC_Vector_pVector = 2;
|
||||||
|
#ifdef _WIN32
|
||||||
|
void Hook_Vector_pVector(Hook *hook, void *pthis, Vector *out, Vector *v1);
|
||||||
|
#elif defined __linux__
|
||||||
void Hook_Vector_pVector(Hook *hook, Vector *out, void *pthis, Vector *v1);
|
void Hook_Vector_pVector(Hook *hook, Vector *out, void *pthis, Vector *v1);
|
||||||
|
#endif
|
||||||
|
|
||||||
const bool RT_Int_pVector = false;
|
const bool RT_Int_pVector = false;
|
||||||
const int PC_Int_pVector = 1;
|
const int PC_Int_pVector = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user