mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: remove R_DrawTileClear from RefAPI
This commit is contained in:
@@ -55,6 +55,7 @@ GNU General Public License for more details.
|
|||||||
// Move hulls rendering back to engine
|
// Move hulls rendering back to engine
|
||||||
// Removed lightstyle, dynamic and entity light functions. Renderer is supposed to get them through PARM_GET_*_PTR.
|
// Removed lightstyle, dynamic and entity light functions. Renderer is supposed to get them through PARM_GET_*_PTR.
|
||||||
// CL_RunLightStyles now accepts lightstyles array.
|
// CL_RunLightStyles now accepts lightstyles array.
|
||||||
|
// Removed R_DrawTileClear.
|
||||||
#define REF_API_VERSION 9
|
#define REF_API_VERSION 9
|
||||||
|
|
||||||
#define TF_SKY (TF_SKYSIDE|TF_NOMIPMAP|TF_ALLOW_NEAREST)
|
#define TF_SKY (TF_SKYSIDE|TF_NOMIPMAP|TF_ALLOW_NEAREST)
|
||||||
@@ -515,7 +516,6 @@ typedef struct ref_interface_s
|
|||||||
void (*R_Set2DMode)( qboolean enable );
|
void (*R_Set2DMode)( qboolean enable );
|
||||||
void (*R_DrawStretchRaw)( float x, float y, float w, float h, int cols, int rows, const byte *data, qboolean dirty );
|
void (*R_DrawStretchRaw)( float x, float y, float w, float h, int cols, int rows, const byte *data, qboolean dirty );
|
||||||
void (*R_DrawStretchPic)( float x, float y, float w, float h, float s1, float t1, float s2, float t2, int texnum );
|
void (*R_DrawStretchPic)( float x, float y, float w, float h, float s1, float t1, float s2, float t2, int texnum );
|
||||||
void (*R_DrawTileClear)( int texnum, int x, int y, int w, int h );
|
|
||||||
void (*FillRGBA)( float x, float y, float w, float h, int r, int g, int b, int a ); // in screen space
|
void (*FillRGBA)( float x, float y, float w, float h, int r, int g, int b, int a ); // in screen space
|
||||||
void (*FillRGBABlend)( float x, float y, float w, float h, int r, int g, int b, int a ); // in screen space
|
void (*FillRGBABlend)( float x, float y, float w, float h, int r, int g, int b, int a ); // in screen space
|
||||||
int (*WorldToScreen)( const vec3_t world, vec3_t screen ); // Returns 1 if it's z clipped
|
int (*WorldToScreen)( const vec3_t world, vec3_t screen ); // Returns 1 if it's z clipped
|
||||||
|
|||||||
@@ -471,7 +471,6 @@ static const ref_interface_t gReffuncs =
|
|||||||
R_Set2DMode,
|
R_Set2DMode,
|
||||||
R_DrawStretchRaw,
|
R_DrawStretchRaw,
|
||||||
R_DrawStretchPic,
|
R_DrawStretchPic,
|
||||||
R_DrawTileClear,
|
|
||||||
CL_FillRGBA,
|
CL_FillRGBA,
|
||||||
CL_FillRGBABlend,
|
CL_FillRGBABlend,
|
||||||
R_WorldToScreen,
|
R_WorldToScreen,
|
||||||
|
|||||||
@@ -81,39 +81,6 @@ void R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, f
|
|||||||
pglEnd();
|
pglEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
=============
|
|
||||||
Draw_TileClear
|
|
||||||
|
|
||||||
This repeats a 64*64 tile graphic to fill the screen around a sized down
|
|
||||||
refresh window.
|
|
||||||
=============
|
|
||||||
*/
|
|
||||||
void R_DrawTileClear( int texnum, int x, int y, int w, int h )
|
|
||||||
{
|
|
||||||
float tw, th;
|
|
||||||
gl_texture_t *glt;
|
|
||||||
|
|
||||||
GL_SetRenderMode( kRenderNormal );
|
|
||||||
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
|
||||||
GL_Bind( XASH_TEXTURE0, texnum );
|
|
||||||
|
|
||||||
glt = R_GetTexture( texnum );
|
|
||||||
tw = glt->srcWidth;
|
|
||||||
th = glt->srcHeight;
|
|
||||||
|
|
||||||
pglBegin( GL_QUADS );
|
|
||||||
pglTexCoord2f( x / tw, y / th );
|
|
||||||
pglVertex2f( x, y );
|
|
||||||
pglTexCoord2f((x + w) / tw, y / th );
|
|
||||||
pglVertex2f( x + w, y );
|
|
||||||
pglTexCoord2f((x + w) / tw, (y + h) / th );
|
|
||||||
pglVertex2f( x + w, y + h );
|
|
||||||
pglTexCoord2f( x / tw, (y + h) / th );
|
|
||||||
pglVertex2f( x, y + h );
|
|
||||||
pglEnd ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
R_DrawStretchRaw
|
R_DrawStretchRaw
|
||||||
|
|||||||
@@ -346,7 +346,6 @@ void R_ClearDecals( void );
|
|||||||
// gl_draw.c
|
// gl_draw.c
|
||||||
//
|
//
|
||||||
void R_Set2DMode( qboolean enable );
|
void R_Set2DMode( qboolean enable );
|
||||||
void R_DrawTileClear( int texnum, int x, int y, int w, int h );
|
|
||||||
void R_UploadStretchRaw( int texture, int cols, int rows, int width, int height, const byte *data );
|
void R_UploadStretchRaw( int texture, int cols, int rows, int width, int height, const byte *data );
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -115,11 +115,6 @@ static void R_DrawStretchPic( float x, float y, float w, float h, float s1, floa
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void R_DrawTileClear( int texnum, int x, int y, int w, int h )
|
|
||||||
{
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void FillRGBA( float x, float y, float w, float h, int r, int g, int b, int a )
|
static void FillRGBA( float x, float y, float w, float h, int r, int g, int b, int a )
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
@@ -485,7 +480,6 @@ static const ref_interface_t gReffuncs =
|
|||||||
.R_Set2DMode = R_SimpleStubBool,
|
.R_Set2DMode = R_SimpleStubBool,
|
||||||
.R_DrawStretchRaw = R_DrawStretchRaw,
|
.R_DrawStretchRaw = R_DrawStretchRaw,
|
||||||
.R_DrawStretchPic = R_DrawStretchPic,
|
.R_DrawStretchPic = R_DrawStretchPic,
|
||||||
.R_DrawTileClear = R_DrawTileClear,
|
|
||||||
.FillRGBA = FillRGBA,
|
.FillRGBA = FillRGBA,
|
||||||
.FillRGBABlend = FillRGBA,
|
.FillRGBABlend = FillRGBA,
|
||||||
.WorldToScreen = WorldToScreen,
|
.WorldToScreen = WorldToScreen,
|
||||||
|
|||||||
@@ -466,7 +466,6 @@ static const ref_interface_t gReffuncs =
|
|||||||
R_Set2DMode,
|
R_Set2DMode,
|
||||||
R_DrawStretchRaw,
|
R_DrawStretchRaw,
|
||||||
R_DrawStretchPic,
|
R_DrawStretchPic,
|
||||||
R_DrawTileClear,
|
|
||||||
CL_FillRGBA,
|
CL_FillRGBA,
|
||||||
CL_FillRGBABlend,
|
CL_FillRGBABlend,
|
||||||
R_WorldToScreen,
|
R_WorldToScreen,
|
||||||
|
|||||||
@@ -244,55 +244,6 @@ void Draw_Fill (int x, int y, int w, int h)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
=============
|
|
||||||
Draw_TileClear
|
|
||||||
|
|
||||||
This repeats a 64*64 tile graphic to fill the screen around a sized down
|
|
||||||
refresh window.
|
|
||||||
=============
|
|
||||||
*/
|
|
||||||
void GAME_EXPORT R_DrawTileClear( int texnum, int x, int y, int w, int h )
|
|
||||||
{
|
|
||||||
int tw, th, x2, i, j;
|
|
||||||
image_t *pic;
|
|
||||||
pixel_t *psrc, *pdest;
|
|
||||||
|
|
||||||
GL_SetRenderMode( kRenderNormal );
|
|
||||||
_TriColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
|
||||||
GL_Bind( XASH_TEXTURE0, texnum );
|
|
||||||
|
|
||||||
pic = R_GetTexture( texnum );
|
|
||||||
|
|
||||||
tw = pic->width;
|
|
||||||
th = pic->height;
|
|
||||||
if (x < 0)
|
|
||||||
{
|
|
||||||
w += x;
|
|
||||||
x = 0;
|
|
||||||
}
|
|
||||||
if (y < 0)
|
|
||||||
{
|
|
||||||
h += y;
|
|
||||||
y = 0;
|
|
||||||
}
|
|
||||||
if (x + w > vid.width)
|
|
||||||
w = vid.width - x;
|
|
||||||
if (y + h > vid.height)
|
|
||||||
h = vid.height - y;
|
|
||||||
if (w <= 0 || h <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
x2 = x + w;
|
|
||||||
pdest = vid.buffer + y*vid.rowbytes;
|
|
||||||
for (i=0 ; i<h ; i++, pdest += vid.rowbytes)
|
|
||||||
{
|
|
||||||
psrc = pic->pixels[0] + tw * ((i+y)&63);
|
|
||||||
for (j=x ; j<x2 ; j++)
|
|
||||||
pdest[j] = psrc[j&63];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
R_DrawStretchRaw
|
R_DrawStretchRaw
|
||||||
|
|||||||
@@ -423,7 +423,6 @@ void GL_Bind( int tmu, unsigned int texnum );
|
|||||||
// gl_draw.c
|
// gl_draw.c
|
||||||
//
|
//
|
||||||
void R_Set2DMode( qboolean enable );
|
void R_Set2DMode( qboolean enable );
|
||||||
void R_DrawTileClear( int texnum, int x, int y, int w, int h );
|
|
||||||
void R_UploadStretchRaw( int texture, int cols, int rows, int width, int height, const byte *data );//
|
void R_UploadStretchRaw( int texture, int cols, int rows, int width, int height, const byte *data );//
|
||||||
|
|
||||||
// gl_image.c
|
// gl_image.c
|
||||||
|
|||||||
Reference in New Issue
Block a user