I wonder what these changes do.

Oh yeah, spell check api stuff.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3182 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2009-04-19 01:46:52 +00:00
parent 57c102a6b6
commit ed78c773e5
2 changed files with 33 additions and 0 deletions

View file

@ -215,6 +215,13 @@ BUILTINR(int, Net_Send, (qhandle_t socket, void *buffer, int len));
BUILTIN(void, Net_Close, (qhandle_t socket)); BUILTIN(void, Net_Close, (qhandle_t socket));
#undef ARGNAMES #undef ARGNAMES
#define ARGNAMES ,inputbuffer,buffersize
BUILTINR(int, ReadInputBuffer, (void *inputbuffer, int buffersize));
#undef ARGNAMES
#define ARGNAMES ,inputbuffer,bytes
BUILTINR(int, UpdateInputBuffer, (void *inputbuffer, int bytes));
#undef ARGNAMES
#ifdef Q3_VM #ifdef Q3_VM
#define ARGNAMES ,out,in,len #define ARGNAMES ,out,in,len
BUILTIN(void, memcpy, (void *out, void *in, int len)); BUILTIN(void, memcpy, (void *out, void *in, int len));
@ -232,6 +239,7 @@ BUILTINR(float, cos, (float f));
#undef ARGNAMES #undef ARGNAMES
#endif #endif
char *va(char *format, ...) //Identical in function to the one in Quake, though I can assure you that I wrote it... char *va(char *format, ...) //Identical in function to the one in Quake, though I can assure you that I wrote it...
{ //It's not exactly hard, just easy to use, so gets duplicated lots. { //It's not exactly hard, just easy to use, so gets duplicated lots.
va_list argptr; va_list argptr;
@ -280,6 +288,9 @@ void Plug_InitStandardBuiltins(void)
CHECKBUILTIN(Plug_ExportToEngine); CHECKBUILTIN(Plug_ExportToEngine);
CHECKBUILTIN(Sys_Error); CHECKBUILTIN(Sys_Error);
CHECKBUILTIN(ReadInputBuffer);
CHECKBUILTIN(UpdateInputBuffer);
#ifdef Q3_VM #ifdef Q3_VM
CHECKBUILTIN(memcpy); CHECKBUILTIN(memcpy);
CHECKBUILTIN(memmove); CHECKBUILTIN(memmove);

View file

@ -133,6 +133,7 @@ EBUILTIN(void, GetPluginName, (int plugnum, char *buffer, int bufsize));
EBUILTIN(void, LocalSound, (char *soundname)); EBUILTIN(void, LocalSound, (char *soundname));
EBUILTIN(void, CL_GetStats, (int pnum, unsigned int *stats, int maxstats)); EBUILTIN(void, CL_GetStats, (int pnum, unsigned int *stats, int maxstats));
EBUILTIN(int, GetPlayerInfo, (int pnum, plugclientinfo_t *info)); EBUILTIN(int, GetPlayerInfo, (int pnum, plugclientinfo_t *info));
EBUILTIN(int, LocalPlayerNumber, (void)); EBUILTIN(int, LocalPlayerNumber, (void));
EBUILTIN(void, GetServerInfo, (char *info, int infolen)); EBUILTIN(void, GetServerInfo, (char *info, int infolen));
EBUILTIN(void, SetUserInfo, (char *key, char *value)); EBUILTIN(void, SetUserInfo, (char *key, char *value));
@ -154,6 +155,9 @@ EBUILTIN(void, Draw_Colour3f, (float r, float g, float b));
EBUILTIN(void, Draw_Colour4f, (float r, float g, float b, float a)); EBUILTIN(void, Draw_Colour4f, (float r, float g, float b, float a));
EBUILTIN(void, SCR_CenterPrint, (char *s)); EBUILTIN(void, SCR_CenterPrint, (char *s));
EBUILTIN(int, ReadInputBuffer, (void *inputbuffer, int buffersize));
EBUILTIN(int, UpdateInputBuffer, (void *inputbuffer, int bytes));
EBUILTIN(int, FS_Open, (char *name, qhandle_t *handle, int mode)); EBUILTIN(int, FS_Open, (char *name, qhandle_t *handle, int mode));
EBUILTIN(void, FS_Close, (qhandle_t handle)); EBUILTIN(void, FS_Close, (qhandle_t handle));
EBUILTIN(int, FS_Write, (qhandle_t handle, void *data, int len)); EBUILTIN(int, FS_Write, (qhandle_t handle, void *data, int len));
@ -170,6 +174,9 @@ EBUILTIN(void, Net_Close, (qhandle_t socket));
#define NET_SERVERPORT -2 #define NET_SERVERPORT -2
#if defined(_WIN32) || defined(Q3_VM)
int vsnprintf(char *buffer, int maxlen, char *format, va_list vargs);
#endif
#ifdef Q3_VM #ifdef Q3_VM
EBUILTIN(void, memcpy, (void *, void *, int len)); EBUILTIN(void, memcpy, (void *, void *, int len));
@ -189,6 +196,21 @@ void Sys_Errorf(char *format, ...);
typedef unsigned char qbyte; typedef unsigned char qbyte;
void Q_strncpyz(char *d, const char *s, int n); void Q_strncpyz(char *d, const char *s, int n);
#define PLUG_SHARED_BEGIN(t,p,b) \
{ \
t *p; \
char inputbuffer[8192]; \
*(b) = ReadInputBuffer(inputbuffer, sizeof(inputbuffer)); \
if (*(b)) \
p = (t*)inputbuffer; \
else \
p = NULL;
#define PLUG_SHARED_END(p,b) UpdateInputBuffer(inputbuffer, b);}
// //
// qvm_api.c // qvm_api.c
// //