Added MF_Prepare*ArrayA functions
The MF_Prepare*ArrayA functions have a third "bool copyBack" parameter which defaults to false and specifies whether the array should be copied from plugin space to module space after function execution (=whether the original array should be updated) The MF_Prepare*Array are equivalent to MF_Prepare*ArrayA(ptr, size, false);
This commit is contained in:
parent
47eb690a89
commit
5527afc91e
|
@ -2445,6 +2445,8 @@ PFN_REGISTER_FORWARD g_fn_RegisterForward;
|
|||
PFN_EXECUTE_FORWARD g_fn_ExecuteForward;
|
||||
PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray;
|
||||
PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray;
|
||||
PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA;
|
||||
PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA;
|
||||
PFN_IS_PLAYER_VALID g_fn_IsPlayerValid;
|
||||
PFN_GET_PLAYER_NAME g_fn_GetPlayerName;
|
||||
PFN_GET_PLAYER_IP g_fn_GetPlayerIP;
|
||||
|
@ -2563,7 +2565,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
|
|||
REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD);
|
||||
REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY);
|
||||
REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY);
|
||||
|
||||
REQFUNC("PrepareCellArrayA", g_fn_PrepareCellArrayA, PFN_PREPARE_CELLARRAY_A);
|
||||
REQFUNC("PrepareCharArrayA", g_fn_PrepareCharArrayA, PFN_PREPARE_CHARARRAY_A);
|
||||
// Player
|
||||
REQFUNC("IsPlayerValid", g_fn_IsPlayerValid, PFN_IS_PLAYER_VALID);
|
||||
REQFUNC("GetPlayerName", g_fn_GetPlayerName, PFN_GET_PLAYER_NAME);
|
||||
|
@ -2658,6 +2661,8 @@ void ValidateMacros_DontCallThis_Smiley()
|
|||
MF_ExecuteForward(0, 0, 0);
|
||||
MF_PrepareCellArray(NULL, 0);
|
||||
MF_PrepareCharArray(NULL, 0);
|
||||
MF_PrepareCellArrayA(NULL, 0, true);
|
||||
MF_PrepareCharArrayA(NULL, 0, true);
|
||||
MF_IsPlayerValid(0);
|
||||
MF_GetPlayerName(0);
|
||||
MF_GetPlayerIP(0);
|
||||
|
|
|
@ -1925,6 +1925,8 @@ typedef int (*PFN_REGISTER_FORWARD) (const char * /*funcname*/, ForwardExec
|
|||
typedef int (*PFN_EXECUTE_FORWARD) (int /*id*/, ... /*params*/);
|
||||
typedef cell (*PFN_PREPARE_CELLARRAY) (cell * /*ptr*/, unsigned int /*size*/);
|
||||
typedef cell (*PFN_PREPARE_CHARARRAY) (char * /*ptr*/, unsigned int /*size*/);
|
||||
typedef cell (*PFN_PREPARE_CELLARRAY_A) (cell * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/);
|
||||
typedef cell (*PFN_PREPARE_CHARARRAY_A) (char * /*ptr*/, unsigned int /*size*/, bool /*copyBack*/);
|
||||
typedef int (*PFN_IS_PLAYER_VALID) (int /*id*/);
|
||||
typedef const char * (*PFN_GET_PLAYER_NAME) (int /*id*/);
|
||||
typedef const char * (*PFN_GET_PLAYER_IP) (int /*id*/);
|
||||
|
@ -1994,6 +1996,8 @@ extern PFN_REGISTER_FORWARD g_fn_RegisterForward;
|
|||
extern PFN_EXECUTE_FORWARD g_fn_ExecuteForward;
|
||||
extern PFN_PREPARE_CELLARRAY g_fn_PrepareCellArray;
|
||||
extern PFN_PREPARE_CHARARRAY g_fn_PrepareCharArray;
|
||||
extern PFN_PREPARE_CELLARRAY_A g_fn_PrepareCellArrayA;
|
||||
extern PFN_PREPARE_CHARARRAY_A g_fn_PrepareCharArrayA;
|
||||
extern PFN_IS_PLAYER_VALID g_fn_IsPlayerValid;
|
||||
extern PFN_GET_PLAYER_NAME g_fn_GetPlayerName;
|
||||
extern PFN_GET_PLAYER_IP g_fn_GetPlayerIP;
|
||||
|
@ -2055,6 +2059,8 @@ int MF_RegisterForward (const char * funcname, ForwardExecType exectype, ..
|
|||
int MF_ExecuteForward (int id, ...) { }
|
||||
cell MF_PrepareCellArray (cell * ptr, unsigned int size) { }
|
||||
cell MF_PrepareCharArray (char * ptr, unsigned int size) { }
|
||||
cell MF_PrepareCellArrayA (cell * ptr, unsigned int size, bool copyBack) { }
|
||||
cell MF_PrepareCharArrayA (char * ptr, unsigned int size, bool copyBack) { }
|
||||
int MF_IsPlayerValid (int id) { }
|
||||
const char * MF_GetPlayerName (int id) { }
|
||||
const char * MF_GetPlayerIP (int id) { }
|
||||
|
@ -2106,6 +2112,8 @@ void MF_Log(const char *fmt, ...);
|
|||
#define MF_ExecuteForward g_fn_ExecuteForward
|
||||
#define MF_PrepareCellArray g_fn_PrepareCellArray
|
||||
#define MF_PrepareCharArray g_fn_PrepareCharArray
|
||||
#define MF_PrepareCellArrayA g_fn_PrepareCellArrayA
|
||||
#define MF_PrepareCharArrayA g_fn_PrepareCharArrayA
|
||||
#define MF_IsPlayerValid g_fn_IsPlayerValid
|
||||
#define MF_GetPlayerName g_fn_GetPlayerName
|
||||
#define MF_GetPlayerIP g_fn_GetPlayerIP
|
||||
|
|
Loading…
Reference in New Issue
Block a user