amxmodx/dlls/arrayx/ListNatives.cpp
Twilight Suzuka 5c88803942 New update! 3.1 is liiiive!
Error handling:
Array now has sufficiently advanced error handling to remove most, if not all, disable_checks.

Extention:
With the metaprogramming techniques, new types can be added easily.

Speed:
With the new changes I've made to Judy, the Array module has far exceeded the speed of any traditional datatype
2006-03-14 02:54:24 +00:00

43 lines
891 B
C++

#include "CBaseList.h"
#include "CArray.h"
#include "ComboArray.h"
#define KEY_TYPE cell
#define DYNAMIC_UNIT_TYPE CBaseList
#define STORAGE_TYPE Capsule
#define MASTER_NAME MasterList
#define EXPORT_NAME list_exports
#define SEARCH_ERROR_OFFSET 0
#define GET_KEY(params, num) params[num]
#define SET_KEY(stuff, parameter) stuff
#include "ListNativeFunctions.h"
#include "NativeIncludes.h"
static cell AMX_NATIVE_CALL array_create(AMX *amx,cell *params)
{
DTYPE* Unit;
M_ITYPE Index = params[1];
JUDY_CREATE_INDEX(MNAME,Unit,Array,Index);
return Index;
}
static cell AMX_NATIVE_CALL comboarray_create(AMX *amx,cell *params)
{
DTYPE* Unit;
M_ITYPE Index = params[1];
JUDY_CREATE_INDEX(MNAME,Unit,ComboArray,Index);
return Index;
}
AMX_NATIVE_INFO list_creation_exports[] =
{
{ "array_create", array_create },
{ "comboarray_create", comboarray_create },
{ NULL, NULL }
};