mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 11:21:52 +00:00
Fix link issues
This commit is contained in:
parent
339c9da8a8
commit
4f68f0e9f1
6 changed files with 95 additions and 95 deletions
|
@ -29,10 +29,10 @@ image_t *draw_chars; // 8*8 graphic characters
|
|||
|
||||
/*
|
||||
================
|
||||
Draw_FindPic
|
||||
RE_Draw_FindPic
|
||||
================
|
||||
*/
|
||||
image_t *Draw_FindPic (char *name)
|
||||
image_t *RE_Draw_FindPic (char *name)
|
||||
{
|
||||
image_t *image;
|
||||
|
||||
|
@ -58,7 +58,7 @@ Draw_InitLocal
|
|||
*/
|
||||
void Draw_InitLocal (void)
|
||||
{
|
||||
draw_chars = Draw_FindPic ("conchars");
|
||||
draw_chars = RE_Draw_FindPic ("conchars");
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,7 +72,7 @@ It can be clipped to the top of the screen to allow the console to be
|
|||
smoothly scrolled off.
|
||||
================
|
||||
*/
|
||||
void Draw_CharScaled(int x, int y, int num, float scale)
|
||||
void RE_Draw_CharScaled(int x, int y, int num, float scale)
|
||||
{
|
||||
pixel_t *dest;
|
||||
byte *source;
|
||||
|
@ -128,14 +128,14 @@ void Draw_CharScaled(int x, int y, int num, float scale)
|
|||
|
||||
/*
|
||||
=============
|
||||
Draw_GetPicSize
|
||||
RE_Draw_GetPicSize
|
||||
=============
|
||||
*/
|
||||
void Draw_GetPicSize (int *w, int *h, char *pic)
|
||||
void RE_Draw_GetPicSize (int *w, int *h, char *pic)
|
||||
{
|
||||
image_t *gl;
|
||||
|
||||
gl = Draw_FindPic (pic);
|
||||
gl = RE_Draw_FindPic (pic);
|
||||
if (!gl)
|
||||
{
|
||||
*w = *h = -1;
|
||||
|
@ -147,10 +147,10 @@ void Draw_GetPicSize (int *w, int *h, char *pic)
|
|||
|
||||
/*
|
||||
=============
|
||||
Draw_StretchPicImplementation
|
||||
RE_Draw_StretchPicImplementation
|
||||
=============
|
||||
*/
|
||||
void Draw_StretchPicImplementation (int x, int y, int w, int h, image_t *pic)
|
||||
void RE_Draw_StretchPicImplementation (int x, int y, int w, int h, image_t *pic)
|
||||
{
|
||||
pixel_t *dest;
|
||||
byte *source;
|
||||
|
@ -199,35 +199,35 @@ void Draw_StretchPicImplementation (int x, int y, int w, int h, image_t *pic)
|
|||
|
||||
/*
|
||||
=============
|
||||
Draw_StretchPic
|
||||
RE_Draw_StretchPic
|
||||
=============
|
||||
*/
|
||||
void Draw_StretchPic (int x, int y, int w, int h, char *name)
|
||||
void RE_Draw_StretchPic (int x, int y, int w, int h, char *name)
|
||||
{
|
||||
image_t *pic;
|
||||
|
||||
pic = Draw_FindPic (name);
|
||||
pic = RE_Draw_FindPic (name);
|
||||
if (!pic)
|
||||
{
|
||||
R_Printf(PRINT_ALL, "Can't find pic: %s\n", name);
|
||||
return;
|
||||
}
|
||||
Draw_StretchPicImplementation (x, y, w, h, pic);
|
||||
RE_Draw_StretchPicImplementation (x, y, w, h, pic);
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
Draw_StretchRaw
|
||||
RE_Draw_StretchRaw
|
||||
=============
|
||||
*/
|
||||
void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data)
|
||||
void RE_Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data)
|
||||
{
|
||||
image_t pic;
|
||||
|
||||
pic.pixels[0] = data;
|
||||
pic.width = cols;
|
||||
pic.height = rows;
|
||||
Draw_StretchPicImplementation (x, y, w, h, &pic);
|
||||
RE_Draw_StretchPicImplementation (x, y, w, h, &pic);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -235,7 +235,7 @@ void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data
|
|||
Draw_Pic
|
||||
=============
|
||||
*/
|
||||
void Draw_PicScaled(int x, int y, char *name, float scale)
|
||||
void RE_Draw_PicScaled(int x, int y, char *name, float scale)
|
||||
{
|
||||
image_t *pic;
|
||||
pixel_t *dest;
|
||||
|
@ -244,7 +244,7 @@ void Draw_PicScaled(int x, int y, char *name, float scale)
|
|||
int height;
|
||||
|
||||
iscale = (int)scale;
|
||||
pic = Draw_FindPic (name);
|
||||
pic = RE_Draw_FindPic (name);
|
||||
if (!pic)
|
||||
{
|
||||
R_Printf(PRINT_ALL, "Can't find pic: %s\n", name);
|
||||
|
@ -311,13 +311,13 @@ void Draw_PicScaled(int x, int y, char *name, float scale)
|
|||
|
||||
/*
|
||||
=============
|
||||
Draw_TileClear
|
||||
RE_Draw_TileClear
|
||||
|
||||
This repeats a 64*64 tile graphic to fill the screen around a sized down
|
||||
refresh window.
|
||||
=============
|
||||
*/
|
||||
void Draw_TileClear (int x, int y, int w, int h, char *name)
|
||||
void RE_Draw_TileClear (int x, int y, int w, int h, char *name)
|
||||
{
|
||||
int i, j;
|
||||
byte *psrc;
|
||||
|
@ -342,7 +342,7 @@ void Draw_TileClear (int x, int y, int w, int h, char *name)
|
|||
if (w <= 0 || h <= 0)
|
||||
return;
|
||||
|
||||
pic = Draw_FindPic (name);
|
||||
pic = RE_Draw_FindPic (name);
|
||||
if (!pic)
|
||||
{
|
||||
R_Printf(PRINT_ALL, "Can't find pic: %s\n", name);
|
||||
|
@ -361,12 +361,12 @@ void Draw_TileClear (int x, int y, int w, int h, char *name)
|
|||
|
||||
/*
|
||||
=============
|
||||
Draw_Fill
|
||||
RE_Draw_Fill
|
||||
|
||||
Fills a box of pixels with a single color
|
||||
=============
|
||||
*/
|
||||
void Draw_Fill (int x, int y, int w, int h, int c)
|
||||
void RE_Draw_Fill (int x, int y, int w, int h, int c)
|
||||
{
|
||||
pixel_t *dest;
|
||||
int u, v;
|
||||
|
@ -399,11 +399,11 @@ void Draw_Fill (int x, int y, int w, int h, int c)
|
|||
|
||||
/*
|
||||
================
|
||||
Draw_FadeScreen
|
||||
RE_Draw_FadeScreen
|
||||
|
||||
================
|
||||
*/
|
||||
void Draw_FadeScreen (void)
|
||||
void RE_Draw_FadeScreen (void)
|
||||
{
|
||||
int x,y;
|
||||
|
||||
|
|
|
@ -243,10 +243,10 @@ image_t *R_FindImage (char *name, imagetype_t type)
|
|||
|
||||
/*
|
||||
===============
|
||||
R_RegisterSkin
|
||||
RE_RegisterSkin
|
||||
===============
|
||||
*/
|
||||
struct image_s *R_RegisterSkin (char *name)
|
||||
struct image_s *RE_RegisterSkin (char *name)
|
||||
{
|
||||
return R_FindImage (name, it_skin);
|
||||
}
|
||||
|
|
|
@ -668,34 +668,34 @@ void R_NewMap (void);
|
|||
void R_Register (void);
|
||||
void R_UnRegister (void);
|
||||
void Draw_InitLocal(void);
|
||||
qboolean R_Init(void);
|
||||
void R_Shutdown(void);
|
||||
qboolean RE_Init(void);
|
||||
void RE_Shutdown(void);
|
||||
void R_InitCaches(void);
|
||||
void D_FlushCaches(void);
|
||||
|
||||
void R_ScreenShot_f( void );
|
||||
void R_BeginRegistration (char *map);
|
||||
struct model_s *R_RegisterModel (char *name);
|
||||
void R_EndRegistration (void);
|
||||
void RE_BeginRegistration (char *map);
|
||||
struct model_s *RE_RegisterModel (char *name);
|
||||
void RE_EndRegistration (void);
|
||||
|
||||
void R_RenderFrame (refdef_t *fd);
|
||||
void RE_RenderFrame (refdef_t *fd);
|
||||
|
||||
struct image_s *Draw_FindPic (char *name);
|
||||
struct image_s *RE_Draw_FindPic (char *name);
|
||||
|
||||
void Draw_GetPicSize (int *w, int *h, char *name);
|
||||
void Draw_PicScaled (int x, int y, char *name, float factor);
|
||||
void Draw_StretchPic (int x, int y, int w, int h, char *name);
|
||||
void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data);
|
||||
void Draw_CharScaled (int x, int y, int c, float scale);
|
||||
void Draw_TileClear (int x, int y, int w, int h, char *name);
|
||||
void Draw_Fill (int x, int y, int w, int h, int c);
|
||||
void Draw_FadeScreen (void);
|
||||
void RE_Draw_GetPicSize (int *w, int *h, char *name);
|
||||
void RE_Draw_PicScaled (int x, int y, char *name, float factor);
|
||||
void RE_Draw_StretchPic (int x, int y, int w, int h, char *name);
|
||||
void RE_Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data);
|
||||
void RE_Draw_CharScaled (int x, int y, int c, float scale);
|
||||
void RE_Draw_TileClear (int x, int y, int w, int h, char *name);
|
||||
void RE_Draw_Fill (int x, int y, int w, int h, int c);
|
||||
void RE_Draw_FadeScreen (void);
|
||||
|
||||
void Draw_GetPalette (void);
|
||||
|
||||
void R_BeginFrame( float camera_separation );
|
||||
void RE_BeginFrame( float camera_separation );
|
||||
|
||||
void R_SetPalette( const unsigned char *palette );
|
||||
void RE_SetPalette( const unsigned char *palette );
|
||||
|
||||
extern unsigned d_8to24table[256]; // base
|
||||
|
||||
|
@ -746,9 +746,9 @@ IMPLEMENTATION FUNCTIONS
|
|||
====================================================================
|
||||
*/
|
||||
void SWimp_BeginFrame(float camera_separation);
|
||||
void SWimp_EndFrame(void);
|
||||
void RE_EndFrame(void);
|
||||
int SWimp_Init(void);
|
||||
void SWimp_SetPalette(const unsigned char *palette);
|
||||
void RE_SetPalette(const unsigned char *palette);
|
||||
void SWimp_Shutdown(void );
|
||||
rserr_t SWimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen);
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ void R_UnRegister (void)
|
|||
R_Init
|
||||
===============
|
||||
*/
|
||||
qboolean R_Init(void)
|
||||
qboolean RE_Init(void)
|
||||
{
|
||||
R_InitImages ();
|
||||
Mod_Init ();
|
||||
|
@ -338,7 +338,7 @@ qboolean R_Init(void)
|
|||
return false;
|
||||
|
||||
// create the window
|
||||
R_BeginFrame( 0 );
|
||||
RE_BeginFrame( 0 );
|
||||
|
||||
R_Printf(PRINT_ALL, "ref_soft version: "REF_VERSION"\n");
|
||||
|
||||
|
@ -347,10 +347,10 @@ qboolean R_Init(void)
|
|||
|
||||
/*
|
||||
===============
|
||||
R_Shutdown
|
||||
RE_Shutdown
|
||||
===============
|
||||
*/
|
||||
void R_Shutdown (void)
|
||||
void RE_Shutdown (void)
|
||||
{
|
||||
// free z buffer
|
||||
if (d_pzbuffer)
|
||||
|
@ -976,11 +976,11 @@ void R_SetLightLevel (void)
|
|||
|
||||
/*
|
||||
================
|
||||
R_RenderFrame
|
||||
RE_RenderFrame
|
||||
|
||||
================
|
||||
*/
|
||||
void R_RenderFrame (refdef_t *fd)
|
||||
void RE_RenderFrame (refdef_t *fd)
|
||||
{
|
||||
r_newrefdef = *fd;
|
||||
|
||||
|
@ -1082,9 +1082,9 @@ void R_InitGraphics( int width, int height )
|
|||
}
|
||||
|
||||
/*
|
||||
** R_BeginFrame
|
||||
** RE_BeginFrame
|
||||
*/
|
||||
void R_BeginFrame( float camera_separation )
|
||||
void RE_BeginFrame( float camera_separation )
|
||||
{
|
||||
extern void Draw_BuildGammaTable( void );
|
||||
|
||||
|
@ -1121,19 +1121,19 @@ void R_BeginFrame( float camera_separation )
|
|||
if ( err == rserr_invalid_mode )
|
||||
{
|
||||
ri.Cvar_SetValue( "sw_mode", sw_state.prev_mode );
|
||||
R_Printf( PRINT_ALL, "ref_soft::R_BeginFrame() - could not set mode\n" );
|
||||
R_Printf( PRINT_ALL, "ref_soft::RE_BeginFrame() - could not set mode\n" );
|
||||
}
|
||||
else if ( err == rserr_invalid_fullscreen )
|
||||
{
|
||||
R_InitGraphics( vid.width, vid.height );
|
||||
|
||||
ri.Cvar_SetValue( "vid_fullscreen", 0);
|
||||
R_Printf( PRINT_ALL, "ref_soft::R_BeginFrame() - fullscreen unavailable in this mode\n" );
|
||||
R_Printf( PRINT_ALL, "ref_soft::RE_BeginFrame() - fullscreen unavailable in this mode\n" );
|
||||
sw_state.prev_mode = sw_mode->value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ri.Sys_Error( ERR_FATAL, "ref_soft::R_BeginFrame() - catastrophic mode change failure\n" );
|
||||
ri.Sys_Error( ERR_FATAL, "ref_soft::RE_BeginFrame() - catastrophic mode change failure\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1155,9 +1155,9 @@ void R_GammaCorrectAndSetPalette( const unsigned char *palette )
|
|||
}
|
||||
|
||||
/*
|
||||
** R_SetPalette
|
||||
** RE_SetPalette
|
||||
*/
|
||||
void R_SetPalette(const unsigned char *palette)
|
||||
void RE_SetPalette(const unsigned char *palette)
|
||||
{
|
||||
byte palette32[1024];
|
||||
int i;
|
||||
|
@ -1166,7 +1166,7 @@ void R_SetPalette(const unsigned char *palette)
|
|||
memset(vid_buffer, 0, vid.height * vid.width * sizeof(pixel_t));
|
||||
|
||||
// flush it to the screen
|
||||
SWimp_EndFrame ();
|
||||
RE_EndFrame ();
|
||||
|
||||
if (palette)
|
||||
{
|
||||
|
@ -1292,14 +1292,14 @@ void R_DrawBeam( entity_t *e )
|
|||
|
||||
/*
|
||||
============
|
||||
R_SetSky
|
||||
RE_SetSky
|
||||
============
|
||||
*/
|
||||
// 3dstudio environment map names
|
||||
char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
|
||||
int r_skysideimage[6] = {5, 2, 4, 1, 0, 3};
|
||||
extern mtexinfo_t r_skytexinfo[6];
|
||||
void R_SetSky (char *name, float rotate, vec3_t axis)
|
||||
void RE_SetSky (char *name, float rotate, vec3_t axis)
|
||||
{
|
||||
int i;
|
||||
char pathname[MAX_QPATH];
|
||||
|
@ -1349,7 +1349,7 @@ void Draw_GetPalette (void)
|
|||
free (pal);
|
||||
}
|
||||
|
||||
struct image_s *R_RegisterSkin (char *name);
|
||||
struct image_s *RE_RegisterSkin (char *name);
|
||||
|
||||
void R_Printf(int level, const char* msg, ...)
|
||||
{
|
||||
|
@ -1359,7 +1359,7 @@ void R_Printf(int level, const char* msg, ...)
|
|||
va_end(argptr);
|
||||
}
|
||||
|
||||
qboolean SWimp_IsVsyncActive(void)
|
||||
qboolean RE_IsVsyncActive(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -1379,33 +1379,33 @@ GetRefAPI(refimport_t imp)
|
|||
|
||||
re.api_version = API_VERSION;
|
||||
|
||||
re.BeginRegistration = R_BeginRegistration;
|
||||
re.RegisterModel = R_RegisterModel;
|
||||
re.RegisterSkin = R_RegisterSkin;
|
||||
re.DrawFindPic = Draw_FindPic;
|
||||
re.SetSky = R_SetSky;
|
||||
re.EndRegistration = R_EndRegistration;
|
||||
re.BeginRegistration = RE_BeginRegistration;
|
||||
re.RegisterModel = RE_RegisterModel;
|
||||
re.RegisterSkin = RE_RegisterSkin;
|
||||
re.DrawFindPic = RE_Draw_FindPic;
|
||||
re.SetSky = RE_SetSky;
|
||||
re.EndRegistration = RE_EndRegistration;
|
||||
|
||||
re.RenderFrame = R_RenderFrame;
|
||||
re.RenderFrame = RE_RenderFrame;
|
||||
|
||||
re.DrawGetPicSize = Draw_GetPicSize;
|
||||
re.DrawGetPicSize = RE_Draw_GetPicSize;
|
||||
|
||||
re.DrawPicScaled = Draw_PicScaled;
|
||||
re.DrawStretchPic = Draw_StretchPic;
|
||||
re.DrawCharScaled = Draw_CharScaled;
|
||||
re.DrawTileClear = Draw_TileClear;
|
||||
re.DrawFill = Draw_Fill;
|
||||
re.DrawFadeScreen= Draw_FadeScreen;
|
||||
re.DrawPicScaled = RE_Draw_PicScaled;
|
||||
re.DrawStretchPic = RE_Draw_StretchPic;
|
||||
re.DrawCharScaled = RE_Draw_CharScaled;
|
||||
re.DrawTileClear = RE_Draw_TileClear;
|
||||
re.DrawFill = RE_Draw_Fill;
|
||||
re.DrawFadeScreen = RE_Draw_FadeScreen;
|
||||
|
||||
re.DrawStretchRaw = Draw_StretchRaw;
|
||||
re.DrawStretchRaw = RE_Draw_StretchRaw;
|
||||
|
||||
re.Init = R_Init;
|
||||
re.IsVSyncActive = SWimp_IsVsyncActive;
|
||||
re.Shutdown = R_Shutdown;
|
||||
re.Init = RE_Init;
|
||||
re.IsVSyncActive = RE_IsVsyncActive;
|
||||
re.Shutdown = RE_Shutdown;
|
||||
|
||||
re.SetPalette = R_SetPalette;
|
||||
re.BeginFrame = R_BeginFrame;
|
||||
re.EndFrame = SWimp_EndFrame;
|
||||
re.SetPalette = RE_SetPalette;
|
||||
re.BeginFrame = RE_BeginFrame;
|
||||
re.EndFrame = RE_EndFrame;
|
||||
|
||||
Swap_Init ();
|
||||
|
||||
|
@ -1901,14 +1901,14 @@ static qboolean SWimp_InitGraphics(qboolean fullscreen, int *pwidth, int *pheigh
|
|||
}
|
||||
|
||||
/*
|
||||
** SWimp_EndFrame
|
||||
** RE_EndFrame
|
||||
**
|
||||
** This does an implementation specific copy from the backbuffer to the
|
||||
** front buffer. In the Win32 case it uses BitBlt or BltFast depending
|
||||
** on whether we're using DIB sections/GDI or DDRAW.
|
||||
*/
|
||||
|
||||
void SWimp_EndFrame (void)
|
||||
void RE_EndFrame (void)
|
||||
{
|
||||
int y,x, i;
|
||||
const unsigned char *pallete = sw_state.currentpalette;
|
||||
|
|
|
@ -89,7 +89,7 @@ void D_ViewChanged (void)
|
|||
if ( r_newrefdef.rdflags & RDF_NOWORLDMODEL )
|
||||
{
|
||||
memset( d_pzbuffer, 0xff, vid.width * vid.height * sizeof(zvalue_t) );
|
||||
Draw_Fill( r_newrefdef.x, r_newrefdef.y, r_newrefdef.width, r_newrefdef.height,( int ) sw_clearcolor->value & 0xff );
|
||||
RE_Draw_Fill( r_newrefdef.x, r_newrefdef.y, r_newrefdef.width, r_newrefdef.height,( int ) sw_clearcolor->value & 0xff );
|
||||
}
|
||||
|
||||
alias_colormap = vid_colormap;
|
||||
|
|
|
@ -1134,12 +1134,12 @@ void Mod_LoadSpriteModel (model_t *mod, void *buffer)
|
|||
|
||||
/*
|
||||
@@@@@@@@@@@@@@@@@@@@@
|
||||
R_BeginRegistration
|
||||
RE_BeginRegistration
|
||||
|
||||
Specifies the model that will be used as the world
|
||||
@@@@@@@@@@@@@@@@@@@@@
|
||||
*/
|
||||
void R_BeginRegistration (char *model)
|
||||
void RE_BeginRegistration (char *model)
|
||||
{
|
||||
char fullname[MAX_QPATH];
|
||||
cvar_t *flushmap;
|
||||
|
@ -1154,18 +1154,18 @@ void R_BeginRegistration (char *model)
|
|||
flushmap = ri.Cvar_Get ("flushmap", "0", 0);
|
||||
if ( strcmp(mod_known[0].name, fullname) || flushmap->value)
|
||||
Mod_Free (&mod_known[0]);
|
||||
r_worldmodel = R_RegisterModel (fullname);
|
||||
r_worldmodel = RE_RegisterModel (fullname);
|
||||
R_NewMap ();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@@@@@@@@@@@@@@@@@@@@
|
||||
R_RegisterModel
|
||||
RE_RegisterModel
|
||||
|
||||
@@@@@@@@@@@@@@@@@@@@@
|
||||
*/
|
||||
struct model_s *R_RegisterModel (char *name)
|
||||
struct model_s *RE_RegisterModel (char *name)
|
||||
{
|
||||
model_t *mod;
|
||||
|
||||
|
@ -1207,11 +1207,11 @@ struct model_s *R_RegisterModel (char *name)
|
|||
|
||||
/*
|
||||
@@@@@@@@@@@@@@@@@@@@@
|
||||
R_EndRegistration
|
||||
RE_EndRegistration
|
||||
|
||||
@@@@@@@@@@@@@@@@@@@@@
|
||||
*/
|
||||
void R_EndRegistration (void)
|
||||
void RE_EndRegistration (void)
|
||||
{
|
||||
int i;
|
||||
model_t *mod;
|
||||
|
|
Loading…
Reference in a new issue