fix to sw character drawing (should speed SW up)

gl_blend2d (hackish cvar to get 2d blending, should work?)
fixes to pluginless compile
few other small changes


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1202 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-08-06 07:18:29 +00:00
parent a3c6317802
commit c30d79eb31
10 changed files with 49 additions and 70 deletions

View file

@ -652,9 +652,15 @@ void SWDraw_Character (int x, int y, unsigned int num)
}
}
/*
#define FindPalette(r,g,b) pal555to8[((r&0xF8)>>3)|((g&0xF8)<<2)|((b&0xF8)<<7)]
#define colourmask(p,r,g,b) FindPalette(host_basepal[p*3]*r, host_basepal[p*3+1]*g, host_basepal[p*3+2]*b)
#define draw(p) colourmask(p, (int)consolecolours[colour].r, (int)consolecolours[colour].g, (int)consolecolours[colour].b)
*/
#define drawpal(r,g,b) pal555to8[(r|(g<<5)|(b<<10)) & consolecolours[colour].rgbmask]
#define draw(p) drawpal(host_basepal[p*3]>>3,host_basepal[p*3+1]>>3,host_basepal[p*3+2]>>3)
void SWDraw_ColouredCharacter (int x, int y, unsigned int num)
{
qbyte *source;
@ -677,7 +683,7 @@ int colour;
return;
}
if (colour == 0) //0 is white anyway (speedup)
if (colour == COLOR_WHITE)
{
Draw_Character(x, y, num);
return;
@ -697,7 +703,6 @@ int colour;
else
drawline = 8;
if (r_pixbytes == 1)
{
qbyte *dest;

View file

@ -164,61 +164,7 @@ void SWSCR_UpdateScreen (void)
D_EnableBackBufferAccess (); // of all overlay stuff if drawing directly
#if 1
SCR_DrawTwoDimensional(uimenu, nohud);
#else
if (scr_drawloading)
{
SCR_DrawLoading ();
#ifdef PLUGINS
Plug_SBar ();
#endif
SCR_ShowPics_Draw();
}
else if (scr_drawdialog)
{
#ifdef PLUGINS
Plug_SBar ();
#endif
SCR_ShowPics_Draw();
Draw_FadeScreen ();
SCR_DrawNotifyString ();
scr_copyeverything = true;
}
else if (cl.intermission == 1 && key_dest == key_game)
{
Sbar_IntermissionOverlay ();
}
else if (cl.intermission == 2 && key_dest == key_game)
{
Sbar_FinaleOverlay ();
SCR_CheckDrawCenterString ();
}
else
{
Draw_Crosshair();
SCR_DrawRam ();
SCR_DrawNet ();
SCR_DrawTurtle ();
SCR_DrawPause ();
SCR_DrawFPS ();
SCR_DrawUPS ();
SCR_DrawClock();
#ifdef PLUGINS
Plug_SBar ();
#endif
SCR_ShowPics_Draw();
SCR_CheckDrawCenterString ();
#ifdef TEXTEDITOR
if (editoractive)
Editor_Draw();
#endif
SCR_DrawConsole (false);
M_Draw (uimenu);
}
#endif
D_DisableBackBufferAccess (); // for adapters that can't stay mapped in
// for linear writes all the time