replace Draw_Fill/Draw_FillRGB -> Draw_FillBlock
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3758 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e4e2399c69
commit
15498207a7
9 changed files with 87 additions and 51 deletions
|
@ -1480,13 +1480,17 @@ void SCR_DrawLoading (void)
|
|||
sizex = current_loading_size * 192 / total_loading_size;
|
||||
if (loading_stage == LS_SERVER)
|
||||
{
|
||||
Draw_FillRGB(x, y, sizex, 16, 1.0, 0.0, 0.0);
|
||||
Draw_FillRGB(x+sizex, y, 192-sizex, 16, 0.0, 0.0, 0.0);
|
||||
Draw_ImageColours(1.0, 0.0, 0.0, 1.0);
|
||||
Draw_FillBlock(x, y, sizex, 16);
|
||||
Draw_ImageColours(0.0, 0.0, 0.0, 1.0);
|
||||
Draw_FillBlock(x+sizex, y, 192-sizex, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
Draw_FillRGB(x, y, sizex, 16, 1.0, 1.0, 0.0);
|
||||
Draw_FillRGB(x+sizex, y, 192-sizex, 16, 1.0, 0.0, 0.0);
|
||||
Draw_ImageColours(1.0, 1.0, 0.0, 1.0);
|
||||
Draw_FillBlock(x, y, sizex, 16);
|
||||
Draw_ImageColours(1.0, 0.0, 0.0, 1.0);
|
||||
Draw_FillBlock(x+sizex, y, 192-sizex, 16);
|
||||
}
|
||||
|
||||
Draw_FunString(x+8, y+4, va("Loading %s... %i%%",
|
||||
|
@ -1522,18 +1526,22 @@ void SCR_DrawLoading (void)
|
|||
else
|
||||
count = 106;
|
||||
|
||||
Draw_Fill (offset+42, 87, count, 1, 136);
|
||||
Draw_Fill (offset+42, 87+1, count, 4, 138);
|
||||
Draw_Fill (offset+42, 87+5, count, 1, 136);
|
||||
Draw_ImagePaletteColour (136, 1.0);
|
||||
Draw_FillBlock (offset+42, 87, count, 1);
|
||||
Draw_FillBlock (offset+42, 87+5, count, 1);
|
||||
Draw_ImagePaletteColour (138, 1.0);
|
||||
Draw_FillBlock (offset+42, 87+1, count, 4);
|
||||
|
||||
if (loading_stage == LS_SERVER)
|
||||
count = size;
|
||||
else
|
||||
count = 0;
|
||||
|
||||
Draw_Fill (offset+42, 97, count, 1, 168);
|
||||
Draw_Fill (offset+42, 97+1, count, 4, 170);
|
||||
Draw_Fill (offset+42, 97+5, count, 1, 168);
|
||||
Draw_ImagePaletteColour(168, 1.0);
|
||||
Draw_FillBlock (offset+42, 97, count, 1);
|
||||
Draw_FillBlock (offset+42, 97+5, count, 1);
|
||||
Draw_ImagePaletteColour(170, 1.0);
|
||||
Draw_FillBlock (offset+42, 97+1, count, 4);
|
||||
|
||||
y = 104;
|
||||
}
|
||||
|
|
|
@ -282,9 +282,7 @@ static vm_t *uivm;
|
|||
static char *scr_centerstring;
|
||||
|
||||
void GLDraw_Image(float x, float y, float w, float h, float s1, float t1, float s2, float t2, qpic_t *pic);
|
||||
void SWDraw_Image (float xp, float yp, float wp, float hp, float s1, float t1, float s2, float t2, qpic_t *pic);
|
||||
char *Get_Q2ConfigString(int i);
|
||||
void SWDraw_ImageColours (float r, float g, float b, float a);
|
||||
|
||||
|
||||
#define MAX_PINGREQUESTS 16
|
||||
|
|
|
@ -1378,8 +1378,9 @@ void Con_DrawConsole (int lines, qboolean noback)
|
|||
else
|
||||
selstartoffset = 0;
|
||||
}
|
||||
|
||||
Draw_Fill((sstart*vid.width)/vid.rotpixelwidth, (y*vid.height)/vid.rotpixelheight, ((send - sstart)*vid.width)/vid.rotpixelwidth, (Font_CharHeight()*vid.height)/vid.rotpixelheight, 0);
|
||||
Draw_ImagePaletteColour(0, 1.0);
|
||||
Draw_FillBlock((sstart*vid.width)/vid.rotpixelwidth, (y*vid.height)/vid.rotpixelheight, ((send - sstart)*vid.width)/vid.rotpixelwidth, (Font_CharHeight()*vid.height)/vid.rotpixelheight);
|
||||
Draw_ImageColours(1.0, 1.0, 1.0, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,9 @@ void Draw_TextBox (int x, int y, int width, int lines)
|
|||
|
||||
if (!p) //assume none exist
|
||||
{
|
||||
Draw_FillRGB(x, y, width + 16, 8 * (2 + lines), 0.0, 0.0, 0.0);
|
||||
Draw_ImageColours(0.0, 0.0, 0.0, 1.0);
|
||||
Draw_FillBlock(x, y, width + 16, 8 * (2 + lines));
|
||||
Draw_ImageColours(1.0, 1.0, 1.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -237,8 +237,11 @@ void M_DrawOneServer (int inity)
|
|||
{
|
||||
if (y>=miny)
|
||||
{
|
||||
Draw_Fill (12, y, 28, 4, Sbar_ColorForMap(selectedserver.detail->players[i].topc));
|
||||
Draw_Fill (12, y+4, 28, 4, Sbar_ColorForMap(selectedserver.detail->players[i].botc));
|
||||
Draw_ImagePaletteColour(Sbar_ColorForMap(selectedserver.detail->players[i].topc), 1.0);
|
||||
Draw_FillBlock (12, y, 28, 4);
|
||||
Draw_ImagePaletteColour(Sbar_ColorForMap(selectedserver.detail->players[i].botc), 1.0);
|
||||
Draw_FillBlock (12, y+4, 28, 4);
|
||||
Draw_ImageColours(1.0, 1.0, 1.0, 1.0);
|
||||
NM_PrintWhite (12, y, va("%3i", selectedserver.detail->players[i].frags));
|
||||
NM_Print (12+8*4, y, selectedserver.detail->players[i].name);
|
||||
}
|
||||
|
@ -413,7 +416,10 @@ void M_DrawServerList(void)
|
|||
|
||||
// make sure we have a highlighted background
|
||||
if (highlight >= 0)
|
||||
Draw_FillRGB(8, y, vid.width-16, 8, consolecolours[highlight].fr, consolecolours[highlight].fg, consolecolours[highlight].fb);
|
||||
{
|
||||
Draw_ImageColours(consolecolours[highlight].fr, consolecolours[highlight].fg, consolecolours[highlight].fb, 1.0);
|
||||
Draw_FillBlock(8, y, vid.width-16, 8);
|
||||
}
|
||||
|
||||
if (sb_showtimelimit.value)
|
||||
x = M_AddColumn(x, y, va("%i", server->tl), 3, colour, highlight); //time limit
|
||||
|
@ -909,7 +915,8 @@ void SL_DrawColumnTitle (int *x, int y, int xlen, int mx, char *str, qboolean re
|
|||
if (mx >= xmin && !(*filldraw))
|
||||
{
|
||||
*filldraw = true;
|
||||
Draw_FillRGB(xmin, y, xlen, 8, (sin(realtime*4.4)*0.25)+0.5, (sin(realtime*4.4)*0.25)+0.5, 0.08);
|
||||
Draw_ImageColours((sin(realtime*4.4)*0.25)+0.5, (sin(realtime*4.4)*0.25)+0.5, 0.08, 1.0);
|
||||
Draw_FillBlock(xmin, y, xlen, 8);
|
||||
}
|
||||
Draw_FunStringWidth(xmin, y, str, xlen);
|
||||
|
||||
|
@ -1055,24 +1062,25 @@ void SL_ServerDraw (int x, int y, menucustom_t *ths, menu_t *menu)
|
|||
stype = flagstoservertype(si->special);
|
||||
if (thisone == info->selectedpos)
|
||||
{
|
||||
Draw_FillRGB(0, y, ths->common.width, 8,
|
||||
Draw_ImageColours(
|
||||
serverhighlight[(int)stype][0],
|
||||
serverhighlight[(int)stype][1],
|
||||
serverhighlight[(int)stype][2]);
|
||||
serverhighlight[(int)stype][2],
|
||||
1.0);
|
||||
}
|
||||
else if (thisone == info->scrollpos + (mousecursor_y-16)/8 && mousecursor_x < x)
|
||||
Draw_FillRGB(0, y, ths->common.width, 8, (sin(realtime*4.4)*0.25)+0.5, (sin(realtime*4.4)*0.25)+0.5, 0.08);
|
||||
Draw_ImageColours((sin(realtime*4.4)*0.25)+0.5, (sin(realtime*4.4)*0.25)+0.5, 0.08, 1.0);
|
||||
else if (selectedserver.inuse && NET_CompareAdr(si->adr, selectedserver.adr))
|
||||
{
|
||||
Draw_FillRGB(0, y, ths->common.width, 8, ((sin(realtime*4.4)*0.25)+0.5) * 0.5, ((sin(realtime*4.4)*0.25)+0.5)*0.5, 0.08*0.5);
|
||||
}
|
||||
Draw_ImageColours(((sin(realtime*4.4)*0.25)+0.5) * 0.5, ((sin(realtime*4.4)*0.25)+0.5)*0.5, 0.08*0.5, 1.0);
|
||||
else
|
||||
{
|
||||
Draw_FillRGB(0, y, ths->common.width, 8,
|
||||
Draw_ImageColours(
|
||||
serverbackcolor[(int)stype * 2 + (thisone & 1)][0],
|
||||
serverbackcolor[(int)stype * 2 + (thisone & 1)][1],
|
||||
serverbackcolor[(int)stype * 2 + (thisone & 1)][2]);
|
||||
serverbackcolor[(int)stype * 2 + (thisone & 1)][2],
|
||||
1.0);
|
||||
}
|
||||
Draw_FillBlock(0, y, ths->common.width, 8);
|
||||
|
||||
if (sb_showtimelimit.value) {Draw_FunStringWidth((x-3*8), y, va("%i", si->tl), 3*8); x-=4*8;}
|
||||
if (sb_showfraglimit.value) {Draw_FunStringWidth((x-3*8), y, va("%i", si->fl), 3*8); x-=4*8;}
|
||||
|
@ -1238,8 +1246,10 @@ void SL_ServerPlayer (int x, int y, menucustom_t *ths, menu_t *menu)
|
|||
if ((int)ths->data < selectedserver.detail->numplayers)
|
||||
{
|
||||
int i = (int)ths->data;
|
||||
Draw_Fill (x, y, 28, 4, Sbar_ColorForMap(selectedserver.detail->players[i].topc));
|
||||
Draw_Fill (x, y+4, 28, 4, Sbar_ColorForMap(selectedserver.detail->players[i].botc));
|
||||
Draw_ImagePaletteColour (Sbar_ColorForMap(selectedserver.detail->players[i].topc), 1.0);
|
||||
Draw_FillBlock (x, y, 28, 4);
|
||||
Draw_ImagePaletteColour (Sbar_ColorForMap(selectedserver.detail->players[i].botc), 1.0);
|
||||
Draw_FillBlock (x, y+4, 28, 4);
|
||||
NM_PrintWhite (x, y, va("%3i", selectedserver.detail->players[i].frags));
|
||||
|
||||
Draw_FunStringWidth (x+28, y, selectedserver.detail->players[i].name, 12*8);
|
||||
|
@ -1273,12 +1283,13 @@ void SL_SliderDraw (int x, int y, menucustom_t *ths, menu_t *menu)
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
Draw_FillRGB(x, y, ths->common.width, ths->common.height, 0.1, 0.1, 0.2);
|
||||
Draw_ImageColours(0.1, 0.1, 0.2, 1.0);
|
||||
Draw_FillBlock(x, y, ths->common.width, ths->common.height);
|
||||
|
||||
y += ((info->scrollpos) / ((float)info->numslots - info->visibleslots)) * (ths->common.height-8);
|
||||
|
||||
Draw_FillRGB(x, y, 8, 8, 0.35, 0.35, 0.55);
|
||||
Draw_ImageColours(0.35, 0.35, 0.55, 1.0);
|
||||
Draw_FillBlock(x, y, 8, 8);
|
||||
}
|
||||
|
||||
if (info->sliderpressed)
|
||||
|
|
|
@ -78,6 +78,8 @@ extern void (*Draw_Image) (float x, float y, float w, float h, float s1, f
|
|||
extern void (*Draw_ImageColours) (float r, float g, float b, float a);
|
||||
void R2D_FillBlock(int x, int y, int w, int h);
|
||||
#define Draw_FillBlock R2D_FillBlock
|
||||
void R2D_ImagePaletteColour(unsigned int i, float a);
|
||||
#define Draw_ImagePaletteColour R2D_ImagePaletteColour
|
||||
|
||||
extern void (*R_Init) (void);
|
||||
extern void (*R_DeInit) (void);
|
||||
|
|
|
@ -229,9 +229,9 @@ void R2D_ImageColours(float r, float g, float b, float a)
|
|||
}
|
||||
void R2D_ImagePaletteColour(unsigned int i, float a)
|
||||
{
|
||||
draw_mesh_colors[0][0] = host_basepal[i*3+0]/255;
|
||||
draw_mesh_colors[0][1] = host_basepal[i*3+1]/255;
|
||||
draw_mesh_colors[0][2] = host_basepal[i*3+2]/255;
|
||||
draw_mesh_colors[0][0] = host_basepal[i*3+0]/255.0;
|
||||
draw_mesh_colors[0][1] = host_basepal[i*3+1]/255.0;
|
||||
draw_mesh_colors[0][2] = host_basepal[i*3+2]/255.0;
|
||||
draw_mesh_colors[0][3] = a;
|
||||
Vector4Copy(draw_mesh_colors[0], draw_mesh_colors[1]);
|
||||
Vector4Copy(draw_mesh_colors[0], draw_mesh_colors[2]);
|
||||
|
|
|
@ -1038,24 +1038,26 @@ void Sbar_FillPC (int x, int y, int w, int h, unsigned int pcolour)
|
|||
{
|
||||
if (pcolour >= 16)
|
||||
{
|
||||
Draw_FillRGB (x, y, w, h, ((pcolour&0xff0000)>>16)/255.0f, ((pcolour&0xff00)>>8)/255.0f, (pcolour&0xff)/255.0f);
|
||||
Draw_ImageColours (((pcolour&0xff0000)>>16)/255.0f, ((pcolour&0xff00)>>8)/255.0f, (pcolour&0xff)/255.0f, 1.0);
|
||||
Draw_FillBlock (x, y, w, h);
|
||||
}
|
||||
else
|
||||
{
|
||||
pcolour = Sbar_ColorForMap(pcolour);
|
||||
Draw_Fill (x, y, w, h, pcolour);
|
||||
Draw_ImagePaletteColour(Sbar_ColorForMap(pcolour), 1.0);
|
||||
Draw_FillBlock (x, y, w, h);
|
||||
}
|
||||
}
|
||||
static void Sbar_FillPCDark (int x, int y, int w, int h, unsigned int pcolour)
|
||||
{
|
||||
if (pcolour >= 16)
|
||||
{
|
||||
Draw_FillRGB (x, y, w, h, (pcolour&0xff)/1024.0f, ((pcolour&0xff00)>>8)/1024.0f, ((pcolour&0xff0000)>>17)/1024.0f);
|
||||
Draw_ImageColours (((pcolour&0xff0000)>>16)/1024.0f, ((pcolour&0xff00)>>8)/1024.0f, (pcolour&0xff)/1024.0f, 1.0);
|
||||
Draw_FillBlock (x, y, w, h);
|
||||
}
|
||||
else
|
||||
{
|
||||
pcolour = Sbar_ColorForMap(pcolour)-1;
|
||||
Draw_Fill (x, y, w, h, pcolour);
|
||||
Draw_ImagePaletteColour(Sbar_ColorForMap(pcolour)-1, 1.0);
|
||||
Draw_FillBlock (x, y, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1667,6 +1669,7 @@ void Sbar_DrawFrags (void)
|
|||
}
|
||||
x+=4;
|
||||
}
|
||||
Draw_ImageColours(1.0, 1.0, 1.0, 1.0);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -2829,10 +2832,12 @@ void Sbar_DeathmatchOverlay (int start)
|
|||
if (scr_scoreboard_newstyle.ival)
|
||||
{
|
||||
// Electro's scoreboard eyecandy: Draw top border
|
||||
Draw_Fill(startx - 3, y - 1, rank_width - 1, 1, 0);
|
||||
Draw_ImagePaletteColour (0, 1.0);
|
||||
Draw_FillBlock(startx - 3, y - 1, rank_width - 1, 1);
|
||||
|
||||
// Electro's scoreboard eyecandy: Draw the title row background
|
||||
Draw_Fill(startx - 2, y, rank_width - 3, 9, 1);
|
||||
Draw_ImagePaletteColour (1, 1.0);
|
||||
Draw_FillBlock(startx - 2, y, rank_width - 3, 9);
|
||||
}
|
||||
|
||||
x = startx;
|
||||
|
@ -2863,13 +2868,14 @@ if (showcolumns & (1<<COLUMN##title)) \
|
|||
if (scr_scoreboard_newstyle.ival)
|
||||
{
|
||||
// Electro's scoreboard eyecandy: Draw top border (under header)
|
||||
Draw_Fill (startx - 3, y + 1, rank_width - 1, 1, 0);
|
||||
Draw_ImagePaletteColour (0, 1.0);
|
||||
Draw_FillBlock (startx - 3, y + 1, rank_width - 1, 1);
|
||||
// Electro's scoreboard eyecandy: Don't go over the black border, move the rest down
|
||||
y += 2;
|
||||
// Electro's scoreboard eyecandy: Draw left border
|
||||
Draw_Fill (startx - 3, y - 10, 1, 9, 0);
|
||||
Draw_FillBlock (startx - 3, y - 10, 1, 9);
|
||||
// Electro's scoreboard eyecandy: Draw right border
|
||||
Draw_Fill (startx - 3 + rank_width - 2, y - 10, 1, 9, 0);
|
||||
Draw_FillBlock (startx - 3 + rank_width - 2, y - 10, 1, 9);
|
||||
}
|
||||
|
||||
y -= skip;
|
||||
|
@ -2917,10 +2923,14 @@ if (showcolumns & (1<<COLUMN##title)) \
|
|||
else if (S_Voip_Speaking(k))
|
||||
Sbar_FillPCDark (startx - 2, y, rank_width - 3, skip, 0x00ff00);
|
||||
else
|
||||
Draw_Fill (startx - 2, y, rank_width - 3, skip, 2);
|
||||
{
|
||||
Draw_ImagePaletteColour (2, 1.0);
|
||||
Draw_FillBlock (startx - 2, y, rank_width - 3, skip);
|
||||
}
|
||||
|
||||
Draw_Fill (startx - 3, y, 1, skip, 0); // Electro - Border - Left
|
||||
Draw_Fill (startx - 3 + rank_width - 2, y, 1, skip, 0); // Electro - Border - Right
|
||||
Draw_ImagePaletteColour (0, 1.0);
|
||||
Draw_FillBlock (startx - 3, y, 1, skip); // Electro - Border - Left
|
||||
Draw_FillBlock (startx - 3 + rank_width - 2, y, 1, skip); // Electro - Border - Right
|
||||
}
|
||||
|
||||
x = startx;
|
||||
|
@ -2935,10 +2945,15 @@ if (showcolumns & (1<<COLUMN##title)) \
|
|||
}
|
||||
|
||||
if (scr_scoreboard_newstyle.ival)
|
||||
Draw_Fill (startx - 3, y + skip, rank_width - 1, 1, 0); // Electro - Border - Bottom
|
||||
{
|
||||
Draw_ImagePaletteColour (0, 1.0);
|
||||
Draw_FillBlock (startx - 3, y + skip, rank_width - 1, 1); // Electro - Border - Bottom
|
||||
}
|
||||
|
||||
if (y >= vid.height-10) // we ran over the screen size, squish
|
||||
largegame = true;
|
||||
|
||||
Draw_ImageColours(1.0, 1.0, 1.0, 1.0);
|
||||
}
|
||||
|
||||
void Sbar_ChatModeOverlay(void)
|
||||
|
|
|
@ -32,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
//#define GL_USE8BITTEX
|
||||
|
||||
void GLDraw_ImageColours(float r, float g, float b, float a);
|
||||
static void GL_Upload32 (char *name, unsigned *data, int width, int height, unsigned int flags);
|
||||
static void GL_Upload32_BGRA (char *name, unsigned *data, int width, int height, unsigned int flags);
|
||||
static void GL_Upload24BGR_Flip (char *name, qbyte *framedata, int inwidth, int inheight, unsigned int flags);
|
||||
|
|
Loading…
Reference in a new issue