From fc48579776b88e6aa223857c2547d8fe2596f8a5 Mon Sep 17 00:00:00 2001 From: Arkshine Date: Sat, 2 Aug 2014 18:30:53 +0200 Subject: [PATCH] Update AMXX SDK in all modules. --- dlls/cstrike/cstrike/sdk/amxxmodule.cpp | 6 ++++++ dlls/cstrike/cstrike/sdk/amxxmodule.h | 8 ++++++++ dlls/cstrike/csx/sdk/amxxmodule.cpp | 6 ++++++ dlls/cstrike/csx/sdk/amxxmodule.h | 8 ++++++++ dlls/dod/dodfun/sdk/amxxmodule.cpp | 6 ++++++ dlls/dod/dodfun/sdk/amxxmodule.h | 8 ++++++++ dlls/dod/dodx/sdk/amxxmodule.cpp | 6 ++++++ dlls/dod/dodx/sdk/amxxmodule.h | 8 ++++++++ dlls/engine/sdk/amxxmodule.cpp | 6 ++++++ dlls/engine/sdk/amxxmodule.h | 8 ++++++++ dlls/fakemeta/sdk/amxxmodule.cpp | 6 ++++++ dlls/fakemeta/sdk/amxxmodule.h | 8 ++++++++ dlls/fun/sdk/amxxmodule.cpp | 6 ++++++ dlls/fun/sdk/amxxmodule.h | 8 ++++++++ dlls/geoip/sdk/amxxmodule.cpp | 6 ++++++ dlls/geoip/sdk/amxxmodule.h | 8 ++++++++ dlls/hamsandwich/sdk/amxxmodule.cpp | 6 ++++++ dlls/hamsandwich/sdk/amxxmodule.h | 8 ++++++++ dlls/mysqlx/sdk/amxxmodule.cpp | 6 ++++++ dlls/mysqlx/sdk/amxxmodule.h | 8 ++++++++ dlls/ns/sdk/amxxmodule.cpp | 6 ++++++ dlls/ns/sdk/amxxmodule.h | 8 ++++++++ dlls/nvault/sdk/amxxmodule.cpp | 6 ++++++ dlls/nvault/sdk/amxxmodule.h | 8 ++++++++ dlls/regex/sdk/amxxmodule.cpp | 6 ++++++ dlls/regex/sdk/amxxmodule.h | 8 ++++++++ dlls/sockets/sdk/amxxmodule.cpp | 6 ++++++ dlls/sockets/sdk/amxxmodule.h | 8 ++++++++ dlls/sqlite/sdk/amxxmodule.cpp | 6 ++++++ dlls/sqlite/sdk/amxxmodule.h | 8 ++++++++ dlls/tfcx/sdk/amxxmodule.cpp | 6 ++++++ dlls/tfcx/sdk/amxxmodule.h | 8 ++++++++ dlls/ts/tsfun/sdk/amxxmodule.cpp | 6 ++++++ dlls/ts/tsfun/sdk/amxxmodule.h | 8 ++++++++ dlls/ts/tsx/sdk/amxxmodule.cpp | 6 ++++++ dlls/ts/tsx/sdk/amxxmodule.h | 8 ++++++++ 36 files changed, 252 insertions(+) diff --git a/dlls/cstrike/cstrike/sdk/amxxmodule.cpp b/dlls/cstrike/cstrike/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/cstrike/cstrike/sdk/amxxmodule.cpp +++ b/dlls/cstrike/cstrike/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/cstrike/cstrike/sdk/amxxmodule.h b/dlls/cstrike/cstrike/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/cstrike/cstrike/sdk/amxxmodule.h +++ b/dlls/cstrike/cstrike/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/cstrike/csx/sdk/amxxmodule.cpp b/dlls/cstrike/csx/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/cstrike/csx/sdk/amxxmodule.cpp +++ b/dlls/cstrike/csx/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/cstrike/csx/sdk/amxxmodule.h b/dlls/cstrike/csx/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/cstrike/csx/sdk/amxxmodule.h +++ b/dlls/cstrike/csx/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/dod/dodfun/sdk/amxxmodule.cpp b/dlls/dod/dodfun/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/dod/dodfun/sdk/amxxmodule.cpp +++ b/dlls/dod/dodfun/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/dod/dodfun/sdk/amxxmodule.h b/dlls/dod/dodfun/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/dod/dodfun/sdk/amxxmodule.h +++ b/dlls/dod/dodfun/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/dod/dodx/sdk/amxxmodule.cpp b/dlls/dod/dodx/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/dod/dodx/sdk/amxxmodule.cpp +++ b/dlls/dod/dodx/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/dod/dodx/sdk/amxxmodule.h b/dlls/dod/dodx/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/dod/dodx/sdk/amxxmodule.h +++ b/dlls/dod/dodx/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/engine/sdk/amxxmodule.cpp b/dlls/engine/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/engine/sdk/amxxmodule.cpp +++ b/dlls/engine/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/engine/sdk/amxxmodule.h b/dlls/engine/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/engine/sdk/amxxmodule.h +++ b/dlls/engine/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/fakemeta/sdk/amxxmodule.cpp b/dlls/fakemeta/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/fakemeta/sdk/amxxmodule.cpp +++ b/dlls/fakemeta/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/fakemeta/sdk/amxxmodule.h b/dlls/fakemeta/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/fakemeta/sdk/amxxmodule.h +++ b/dlls/fakemeta/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/fun/sdk/amxxmodule.cpp b/dlls/fun/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/fun/sdk/amxxmodule.cpp +++ b/dlls/fun/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/fun/sdk/amxxmodule.h b/dlls/fun/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/fun/sdk/amxxmodule.h +++ b/dlls/fun/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/geoip/sdk/amxxmodule.cpp b/dlls/geoip/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/geoip/sdk/amxxmodule.cpp +++ b/dlls/geoip/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/geoip/sdk/amxxmodule.h b/dlls/geoip/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/geoip/sdk/amxxmodule.h +++ b/dlls/geoip/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/hamsandwich/sdk/amxxmodule.cpp b/dlls/hamsandwich/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100644 --- a/dlls/hamsandwich/sdk/amxxmodule.cpp +++ b/dlls/hamsandwich/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/hamsandwich/sdk/amxxmodule.h b/dlls/hamsandwich/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100644 --- a/dlls/hamsandwich/sdk/amxxmodule.h +++ b/dlls/hamsandwich/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/mysqlx/sdk/amxxmodule.cpp b/dlls/mysqlx/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/mysqlx/sdk/amxxmodule.cpp +++ b/dlls/mysqlx/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/mysqlx/sdk/amxxmodule.h b/dlls/mysqlx/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/mysqlx/sdk/amxxmodule.h +++ b/dlls/mysqlx/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/ns/sdk/amxxmodule.cpp b/dlls/ns/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/ns/sdk/amxxmodule.cpp +++ b/dlls/ns/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/ns/sdk/amxxmodule.h b/dlls/ns/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/ns/sdk/amxxmodule.h +++ b/dlls/ns/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/nvault/sdk/amxxmodule.cpp b/dlls/nvault/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/nvault/sdk/amxxmodule.cpp +++ b/dlls/nvault/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/nvault/sdk/amxxmodule.h b/dlls/nvault/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/nvault/sdk/amxxmodule.h +++ b/dlls/nvault/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/regex/sdk/amxxmodule.cpp b/dlls/regex/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/regex/sdk/amxxmodule.cpp +++ b/dlls/regex/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/regex/sdk/amxxmodule.h b/dlls/regex/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/regex/sdk/amxxmodule.h +++ b/dlls/regex/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/sockets/sdk/amxxmodule.cpp b/dlls/sockets/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/sockets/sdk/amxxmodule.cpp +++ b/dlls/sockets/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/sockets/sdk/amxxmodule.h b/dlls/sockets/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/sockets/sdk/amxxmodule.h +++ b/dlls/sockets/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/sqlite/sdk/amxxmodule.cpp b/dlls/sqlite/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/sqlite/sdk/amxxmodule.cpp +++ b/dlls/sqlite/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/sqlite/sdk/amxxmodule.h b/dlls/sqlite/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/sqlite/sdk/amxxmodule.h +++ b/dlls/sqlite/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/tfcx/sdk/amxxmodule.cpp b/dlls/tfcx/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/tfcx/sdk/amxxmodule.cpp +++ b/dlls/tfcx/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/tfcx/sdk/amxxmodule.h b/dlls/tfcx/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/tfcx/sdk/amxxmodule.h +++ b/dlls/tfcx/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/ts/tsfun/sdk/amxxmodule.cpp b/dlls/ts/tsfun/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/ts/tsfun/sdk/amxxmodule.cpp +++ b/dlls/ts/tsfun/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/ts/tsfun/sdk/amxxmodule.h b/dlls/ts/tsfun/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/ts/tsfun/sdk/amxxmodule.h +++ b/dlls/ts/tsfun/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory diff --git a/dlls/ts/tsx/sdk/amxxmodule.cpp b/dlls/ts/tsx/sdk/amxxmodule.cpp index faf8f75c..efb933b3 100755 --- a/dlls/ts/tsx/sdk/amxxmodule.cpp +++ b/dlls/ts/tsx/sdk/amxxmodule.cpp @@ -2448,6 +2448,8 @@ PFN_GET_AMXSCRIPT g_fn_GetAmxScript; PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; PFN_SET_AMXSTRING g_fn_SetAmxString; +PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; PFN_GET_AMXSTRING g_fn_GetAmxString; PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2587,6 +2589,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) // String / mem in amx scripts support REQFUNC("SetAmxString", g_fn_SetAmxString, PFN_SET_AMXSTRING); + REQFUNC("SetAmxStringUTF8Char", g_fn_SetAmxStringUTF8Char, PFN_SET_AMXSTRING_UTF8_CHAR); + REQFUNC("SetAmxStringUTF8Cell", g_fn_SetAmxStringUTF8Cell, PFN_SET_AMXSTRING_UTF8_CELL); REQFUNC("GetAmxString", g_fn_GetAmxString, PFN_GET_AMXSTRING); REQFUNC("GetAmxStringLen", g_fn_GetAmxStringLen, PFN_GET_AMXSTRINGLEN); REQFUNC("FormatAmxString", g_fn_FormatAmxString, PFN_FORMAT_AMXSTRING); @@ -2739,6 +2743,8 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindScriptByAmx(NULL); MF_FindScriptByName("str"); MF_SetAmxString(NULL, 0, "str", 0); + MF_SetAmxStringUTF8Char(NULL, 0, "str", 0, 0); + MF_SetAmxStringUTF8Cell(NULL, 0, "str", 0, 0); MF_GetAmxString(NULL, 0, 0, 0); MF_GetAmxStringLen(NULL); MF_CopyAmxMemory(NULL, NULL, 0); diff --git a/dlls/ts/tsx/sdk/amxxmodule.h b/dlls/ts/tsx/sdk/amxxmodule.h index bdf464cd..3ca8c7b6 100755 --- a/dlls/ts/tsx/sdk/amxxmodule.h +++ b/dlls/ts/tsx/sdk/amxxmodule.h @@ -2128,6 +2128,8 @@ typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2217,6 +2219,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2296,6 +2300,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2368,6 +2374,8 @@ void * MF_MessageBlock (int mode, int msg, int *opt) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory