diff --git a/plugins/plugin.c b/plugins/plugin.c index 651280765..ea549e470 100644 --- a/plugins/plugin.c +++ b/plugins/plugin.c @@ -116,6 +116,9 @@ BUILTINR(qhandle_t, Draw_LoadImage, (char *name, qboolean iswadimage)); //wad im #define ARGNAMES ,PASSFLOAT(x),PASSFLOAT(y),PASSFLOAT(w),PASSFLOAT(h),PASSFLOAT(s1),PASSFLOAT(t1),PASSFLOAT(s2),PASSFLOAT(t2),image BUILTIN(void, Draw_Image, (float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t image)); #undef ARGNAMES +#define ARGNAMES ,PASSFLOAT(x1),PASSFLOAT(y1),PASSFLOAT(x2),PASSFLOAT(y2) +BUILTIN(void, Draw_Line, (float x1, float y1, float x2, float y2)); +#undef ARGNAMES #define ARGNAMES ,PASSFLOAT(x),PASSFLOAT(y),PASSFLOAT(w),PASSFLOAT(h) BUILTIN(void, Draw_Fill, (int x, int y, int w, int h)); #undef ARGNAMES @@ -193,6 +196,8 @@ BUILTIN(void, memmove, (void *out, void *in, int len)); #undef ARGNAMES #define ARGNAMES ,PASSFLOAT(f) BUILTINR(float, sqrt, (float f)); +BUILTINR(float, sin, (float f)); +BUILTINR(float, cos, (float f)); #undef ARGNAMES #endif @@ -249,6 +254,8 @@ void Plug_InitStandardBuiltins(void) CHECKBUILTIN(memmove); CHECKBUILTIN(memset); CHECKBUILTIN(sqrt); + CHECKBUILTIN(sin); + CHECKBUILTIN(cos); #endif CHECKBUILTIN(Sys_Milliseconds); @@ -291,6 +298,7 @@ void Plug_InitStandardBuiltins(void) //drawing routines CHECKBUILTIN(Draw_LoadImage); CHECKBUILTIN(Draw_Image); + CHECKBUILTIN(Draw_Line); CHECKBUILTIN(Draw_Fill); CHECKBUILTIN(Draw_Character); CHECKBUILTIN(Draw_Colourp); diff --git a/plugins/plugin.h b/plugins/plugin.h index 99ff0a8f7..9bb97962a 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -117,6 +117,7 @@ EBUILTIN(void, Media_ShowFrameRGBA_32, (void *src, int srcwidth, int srcheight, EBUILTIN(qhandle_t, Draw_LoadImage, (char *name, qboolean iswadimage)); //wad image is ONLY for loading out of q1 gfx.wad EBUILTIN(void, Draw_Image, (float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t image)); EBUILTIN(void, Draw_Fill, (int x, int y, int w, int h)); +EBUILTIN(void, Draw_Line, (float x1, float y1, float x2, float y2)); EBUILTIN(void, Draw_Character, (int x, int y, unsigned int characture)); EBUILTIN(void, Draw_Colourp, (int palcol)); EBUILTIN(void, Draw_Colour3f, (float r, float g, float b)); @@ -145,6 +146,8 @@ EBUILTIN(void, memcpy, (void *, void *, int len)); EBUILTIN(void, memmove, (void *, void *, int len)); EBUILTIN(void, memset, (void *, int, int len)); EBUILTIN(float, sqrt, (float f)); +EBUILTIN(float, cos, (float f)); +EBUILTIN(float, sin, (float f)); #endif typedef int (*export_t) (int *args);