native _YSI_RE_NATIVE
#if defined _ALS_CallRemoteFunction
#if defined BAD_CallRemoteFunction
#define CallRemoteFunction( FIXES_CallRemoteFunction(
#endif
#endif
#if defined _YSI_MINI_MODE
#if defined _ALS_CallRemoteFunction
#undef CallRemoteFunction
#else
#define _ALS_CallRemoteFunction
#endif
#define CallRemoteFunction _MMD(CallRemoteFunction)
#if defined _ALS_CallLocalFunction
#undef CallLocalFunction
#else
#define _ALS_CallLocalFunction
#endif
#define CallLocalFunction _MMD(CallLocalFunction)
#endif
#if defined _ALS_SetTimerEx
#if defined CST_SetTimerEx
#undef SetTimerEx
#else
#error Unknown redefinition of SetTimerEx.
#endif
#endif
native _YSI_RE_NATIVE
#if defined _ALS_SetTimerEx
#if defined BAD_SetTimerEx
#define SetTimerEx( CST_SetTimerEx(
#endif
#endif
native _YSI_RE_NATIVE
stock X@(GLOBAL_TAG_TYPES:n)
{
P:4("X@ called: %i", n);
setproperty(8, YSIM_RETURN, n);
}
stock Y@()
{
P:4("Y@ called");
// Already returns the previous value.
return setproperty(8, YSIM_CALLER, _@);
}
stock Z@(GLOBAL_TAG_TYPES:v = -1)
{
P:4("Z@ called");
return
setproperty(8, YSIM_CALLER, v),
getproperty(8, YSIM_RETURN);
}
new Q@[YSI_MAX_STRING];
stock S@(GLOBAL_TAG_TYPES:v = -1)
{
P:4("S@ called");
return
getproperty(8, "", YSIM_STRING, Q@),
strunpack(Q@, Q@),
setproperty(8, YSIM_CALLER, v);
//return Q@;
}
stock R@(buffer[])
{
P:4("R@ called: \"%s\"", buffer);
return setproperty(8, "", YSIM_STRING, buffer);
}
stock H@(GLOBAL_TAG_TYPES:...)
{
// Just a dead-end for spare parameters.
return 0;
}
#define _UNUSED(%0) H@(_:_H@0:_H@1:%0)
#define _H@0:_H@1:%0&%1) _H@0:_H@1:%0%1)
#define _H@1:%0[%9]%1) _H@1:%0%1)
stock G@(GLOBAL_TAG_TYPES:...)
{
// Just a dead-end for spare parameters which returns a string.
return Q@;
}
stock F@()
{
P:4("F@ called");
return
getproperty(8, "", YSIM_STRING, Q@),
//P:4("2"),
//P:4("3"),
strunpack(Q@, Q@);
//return Q@;
}
// Consume trailing spaces. Despite being a common letter, this is unlkely to
// ever be matched due to the unusual series of operators after it. If anyone
// else tries to define "x" however they may have a slight problem (they can't).
//#define x,), x),
// Changed as x,): was also needed (for ?:).
#define x:##),) #))
//#define x,) )
#define q:##),ALS_RS_none:) #))
// This is for getting excess parameters on non-strings. Now safely recursive.
#define _:%0,) _:%0)
#if defined YSI_LOCK_MODE
#include "..\YSI_Internal\y_unique"
forward UNIQUE_FUNCTION<@yH_OnScriptInit@...>();
public UNIQUE_FUNCTION<@yH_OnScriptInit@...>()
{
new
find = strfind(YSI_gLockData[5], YSI_gLockData[1]) + 6;
find = strfind(YSI_gLockData[5], YSI_gLockData[1], _, find - 5) + 6;
new
found = strfind(YSI_gLockData[5], YSI_gLockData[1], _, find - 5) + 6;
if (strval(YSI_gLockData[found]) ^ UNIQUE_SYMBOL != _LOCK_IP_3 ^ UNIQUE_SYMBOL || strval(YSI_gLockData[find]) - _LOCK_IP_3 != _LOCK_IP_2 - _LOCK_IP_3)
{
y_lock 1;
}
}
#endif