2005-05-27 23:39:30 +02:00
|
|
|
// TESTBAIL
|
|
|
|
// Different compilation unit
|
|
|
|
|
2005-12-23 12:58:11 +01:00
|
|
|
#include "sourcehook.h"
|
|
|
|
#include "sourcehook_test.h"
|
2005-05-27 23:39:30 +02:00
|
|
|
#include "testbail.h"
|
|
|
|
|
2005-12-23 12:58:11 +01:00
|
|
|
|
2005-12-24 00:00:55 +01:00
|
|
|
int EatYams_Handler2(int a)
|
2005-05-27 23:39:30 +02:00
|
|
|
{
|
2005-12-24 00:00:55 +01:00
|
|
|
ADD_STATE(State_EatYams_Handler2_Called(a));
|
|
|
|
RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, 6, &IGaben::EatYams, (0xBEEF));
|
|
|
|
}
|
|
|
|
|
|
|
|
int EatYams_Handler3(int a)
|
|
|
|
{
|
|
|
|
ADD_STATE(State_EatYams_Handler3_Called(a));
|
|
|
|
RETURN_META_VALUE(MRES_IGNORED, 0);
|
|
|
|
}
|
2005-05-27 23:39:30 +02:00
|
|
|
|
2005-12-24 00:00:55 +01:00
|
|
|
namespace N_TestBail
|
|
|
|
{
|
|
|
|
bool TestBail2(std::string &error)
|
|
|
|
{
|
|
|
|
g_PLID = 2;
|
|
|
|
|
|
|
|
SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams_Handler2, false);
|
|
|
|
SH_ADD_HOOK_STATICFUNC(IGaben, EatYams, g_Gabgab, EatYams_Handler3, false);
|
2005-05-27 23:39:30 +02:00
|
|
|
|
2005-12-24 00:00:55 +01:00
|
|
|
int ret = g_Gabgab->EatYams(0xDEAD);
|
2005-05-27 23:39:30 +02:00
|
|
|
|
2005-12-24 00:00:55 +01:00
|
|
|
CHECK_COND(ret == 6, "Part 2.1");
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2005-09-23 22:14:10 +02:00
|
|
|
}
|
2005-12-24 00:00:55 +01:00
|
|
|
|