add Draw_FillRGB, allow con_selectioncolour to use R/G/B

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2078 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-03-11 00:51:00 +00:00
parent 973d2830a0
commit 05ace9bdcb
4 changed files with 15 additions and 1 deletions

View file

@ -385,6 +385,9 @@ void Con_ExecuteLine(console_t *con, char *line)
// may take some time // may take some time
} }
int scmodified;
vec3_t sccolor;
void Key_ConsoleDrawSelectionBox(void) void Key_ConsoleDrawSelectionBox(void)
{ {
extern cvar_t vid_conwidth, vid_conheight; extern cvar_t vid_conwidth, vid_conheight;
@ -424,7 +427,10 @@ void Key_ConsoleDrawSelectionBox(void)
} }
ypos++; ypos++;
Draw_Fill(xpos2*8, ypos2*8, (xpos - xpos2)*8, (ypos - ypos2)*8, con_selectioncolour.value); if (scmodified != con_selectioncolour.modified)
SCR_StringToRGB(con_selectioncolour.string, sccolor, 1);
Draw_FillRGB(xpos2*8, ypos2*8, (xpos - xpos2)*8, (ypos - ypos2)*8, sccolor[0], sccolor[1], sccolor[2]);
} }
void Key_ConsoleRelease(int key) void Key_ConsoleRelease(int key)

View file

@ -34,6 +34,7 @@ extern void (*Draw_ConsoleBackground) (int lines);
extern void (*Draw_EditorBackground) (int lines); extern void (*Draw_EditorBackground) (int lines);
extern void (*Draw_TileClear) (int x, int y, int w, int h); extern void (*Draw_TileClear) (int x, int y, int w, int h);
extern void (*Draw_Fill) (int x, int y, int w, int h, int c); extern void (*Draw_Fill) (int x, int y, int w, int h, int c);
extern void (*Draw_FillRGB) (int x, int y, int w, int h, float r, float g, float b);
extern void (*Draw_FadeScreen) (void); extern void (*Draw_FadeScreen) (void);
extern void (*Draw_BeginDisc) (void); extern void (*Draw_BeginDisc) (void);
extern void (*Draw_EndDisc) (void); extern void (*Draw_EndDisc) (void);
@ -141,6 +142,7 @@ typedef struct {
void (*Draw_EditorBackground) (int lines); void (*Draw_EditorBackground) (int lines);
void (*Draw_TileClear) (int x, int y, int w, int h); void (*Draw_TileClear) (int x, int y, int w, int h);
void (*Draw_Fill) (int x, int y, int w, int h, int c); void (*Draw_Fill) (int x, int y, int w, int h, int c);
void (*Draw_FillRGB) (int x, int y, int w, int h, float r, float g, float b);
void (*Draw_FadeScreen) (void); void (*Draw_FadeScreen) (void);
void (*Draw_BeginDisc) (void); void (*Draw_BeginDisc) (void);
void (*Draw_EndDisc) (void); void (*Draw_EndDisc) (void);

View file

@ -592,6 +592,7 @@ void (*Draw_ConsoleBackground) (int lines);
void (*Draw_EditorBackground) (int lines); void (*Draw_EditorBackground) (int lines);
void (*Draw_TileClear) (int x, int y, int w, int h); void (*Draw_TileClear) (int x, int y, int w, int h);
void (*Draw_Fill) (int x, int y, int w, int h, int c); void (*Draw_Fill) (int x, int y, int w, int h, int c);
void (*Draw_FillRGB) (int x, int y, int w, int h, float r, float g, float b);
void (*Draw_FadeScreen) (void); void (*Draw_FadeScreen) (void);
void (*Draw_BeginDisc) (void); void (*Draw_BeginDisc) (void);
void (*Draw_EndDisc) (void); void (*Draw_EndDisc) (void);
@ -685,6 +686,7 @@ rendererinfo_t dedicatedrendererinfo = {
NULL, //Draw_EditorBackground; NULL, //Draw_EditorBackground;
NULL, //Draw_TileClear; NULL, //Draw_TileClear;
NULL, //Draw_Fill; NULL, //Draw_Fill;
NULL, //Draw_FillRGB;
NULL, //Draw_FadeScreen; NULL, //Draw_FadeScreen;
NULL, //Draw_BeginDisc; NULL, //Draw_BeginDisc;
NULL, //Draw_EndDisc; NULL, //Draw_EndDisc;
@ -793,6 +795,7 @@ rendererinfo_t softwarerendererinfo = {
SWDraw_EditorBackground, SWDraw_EditorBackground,
SWDraw_TileClear, SWDraw_TileClear,
SWDraw_Fill, SWDraw_Fill,
SWDraw_FillRGB,
SWDraw_FadeScreen, SWDraw_FadeScreen,
SWDraw_BeginDisc, SWDraw_BeginDisc,
SWDraw_EndDisc, SWDraw_EndDisc,
@ -886,6 +889,7 @@ rendererinfo_t openglrendererinfo = {
GLDraw_EditorBackground, GLDraw_EditorBackground,
GLDraw_TileClear, GLDraw_TileClear,
GLDraw_Fill, GLDraw_Fill,
GLDraw_FillRGB,
GLDraw_FadeScreen, GLDraw_FadeScreen,
GLDraw_BeginDisc, GLDraw_BeginDisc,
GLDraw_EndDisc, GLDraw_EndDisc,
@ -1369,6 +1373,7 @@ void R_SetRenderer(int wanted)
Draw_EditorBackground = ri->Draw_EditorBackground; Draw_EditorBackground = ri->Draw_EditorBackground;
Draw_TileClear = ri->Draw_TileClear; Draw_TileClear = ri->Draw_TileClear;
Draw_Fill = ri->Draw_Fill; Draw_Fill = ri->Draw_Fill;
Draw_FillRGB = ri->Draw_FillRGB;
Draw_FadeScreen = ri->Draw_FadeScreen; Draw_FadeScreen = ri->Draw_FadeScreen;
Draw_BeginDisc = ri->Draw_BeginDisc; Draw_BeginDisc = ri->Draw_BeginDisc;
Draw_EndDisc = ri->Draw_EndDisc; Draw_EndDisc = ri->Draw_EndDisc;

View file

@ -4098,6 +4098,7 @@ rendererinfo_t d3drendererinfo = {
GLDraw_EditorBackground, GLDraw_EditorBackground,
GLDraw_TileClear, GLDraw_TileClear,
GLDraw_Fill, GLDraw_Fill,
GLDraw_FillRGB,
GLDraw_FadeScreen, GLDraw_FadeScreen,
GLDraw_BeginDisc, GLDraw_BeginDisc,
GLDraw_EndDisc, GLDraw_EndDisc,