added DLL Post Functions calling

This commit is contained in:
Pavol Marko 2004-05-03 19:47:36 +00:00
parent be5276dde6
commit d7a8292419

View File

@ -65,7 +65,7 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
@ -109,7 +109,7 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
@ -147,7 +147,7 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
if (mres == MRES_SUPERCEDE) \ if (mres == MRES_SUPERCEDE) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has set meta result in \"%s\" to supercede", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has set meta result in \"%s\" to supercede", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
@ -195,10 +195,10 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
if (mres == MRES_SUPERCEDE) \ if (mres == MRES_SUPERCEDE) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has set meta result in \"%s\" to supercede", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has set meta result in \"%s\" to supercede", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
@ -238,7 +238,7 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
@ -282,7 +282,7 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
@ -312,7 +312,7 @@ void FakeError()
prev_mres = mres; \ prev_mres = mres; \
if (mres == MRES_UNSET) \ if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \ AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \ (*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
@ -338,31 +338,33 @@ void FakeError()
{ \ { \
if ((*iter).GetStatus() == PL_RUNNING && (*iter).GetDllFuncTable_Post().pfn##pfnName) \ if ((*iter).GetStatus() == PL_RUNNING && (*iter).GetDllFuncTable_Post().pfn##pfnName) \
{ \ { \
/* Initialize meta globals */ \
gpMetaGlobals->mres = MRES_UNSET; \
gpMetaGlobals->prev_mres = prev_mres; \
gpMetaGlobals->status = status; \
/* Actual call */ \
curRet = (*iter).GetDllFuncTable_Post().pfn##pfnName pfnArgs; \
/* Process return value */ \
if (mres >= MRES_OVERRIDE && mayOverride) \
{ \
mayOverride = false; \
returnValue = curRet; \
} \
mres = gpMetaGlobals->mres; \
if (mres > status) \
status = mres; \
prev_mres = mres; \
if (mres == MRES_UNSET) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
if (mres == MRES_SUPERCEDE) \
AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has set meta result in \"%s\" to supercede", \
(*iter).GetInfo()->name, (*iter).GetPath(), #pfnName); \
} \ } \
} \ } \
/* Set meta result to the highest value */ \ /* Set meta result to the highest value */ \
RETURN_META_VALUE(status, returnValue); RETURN_META_VALUE(status, returnValue);
// /* Initialize meta globals */ \
// gpMetaGlobals->mres = MRES_UNSET; \
// gpMetaGlobals->prev_mres = prev_mres; \
// gpMetaGlobals->status = status; \
// /* Actual call */ \
// curRet = (*iter).GetDllFuncTable_Post().pfn##pfnName pfnArgs; \
// /* Process return value */ \
// if (mres >= MRES_OVERRIDE && mayOverride) \
// { \
// mayOverride = false; \
// returnValue = curRet; \
// } \
// mres = gpMetaGlobals->mres; \
// if (mres > status) \
// status = mres; \
// prev_mres = mres; \
// if (mres == MRES_UNSET) \
// AMXXLOG_Log("[AMXX] Module \"%s\" (\"%s\") has not set meta result in \"%s\"", \
// (*iter).GetInfo()->name, (*iter).GetPath(), #pfnArgs); \
// New Dll normal // New Dll normal
#define FAKEMETA_NEWDLL_HANDLE_void(pfnName, pfnArgs) \ #define FAKEMETA_NEWDLL_HANDLE_void(pfnName, pfnArgs) \
META_RES mres = MRES_IGNORED, status = MRES_IGNORED, prev_mres = MRES_UNSET; \ META_RES mres = MRES_IGNORED, status = MRES_IGNORED, prev_mres = MRES_UNSET; \