]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Added showbrand cvar, possible values 1-8. Draws the image gfx/brand on an edge or...
authorsajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Aug 2005 21:09:21 +0000 (21:09 +0000)
committersajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Aug 2005 21:09:21 +0000 (21:09 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5644 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
todo

index 3bfaa3e1a41dadc589c0644814c2a7122bff8c1a..c3d42edbccf78212e4ba1eee1dbf178e2838757a 100644 (file)
@@ -14,6 +14,7 @@ cvar_t scr_centertime = {0, "scr_centertime","2"};
 cvar_t scr_showram = {CVAR_SAVE, "showram","1"};
 cvar_t scr_showturtle = {CVAR_SAVE, "showturtle","0"};
 cvar_t scr_showpause = {CVAR_SAVE, "showpause","1"};
+cvar_t scr_showbrand = {0, "showbrand","0"};
 cvar_t scr_printspeed = {0, "scr_printspeed","8"};
 cvar_t vid_conwidth = {CVAR_SAVE, "vid_conwidth", "640"};
 cvar_t vid_conheight = {CVAR_SAVE, "vid_conheight", "480"};
@@ -330,9 +331,61 @@ void SCR_DrawPause (void)
        DrawQ_Pic ((vid_conwidth.integer - pic->width)/2, (vid_conheight.integer - pic->height)/2, "gfx/pause", 0, 0, 1, 1, 1, 1, 0);
 }
 
+/*
+==============
+SCR_DrawBrand
+==============
+*/
+void SCR_DrawBrand (void)
+{
+       cachepic_t      *pic;
+       float           x, y;
+
+       if (!scr_showbrand.value)
+               return;
 
+       pic = Draw_CachePic ("gfx/brand", true);
 
+       switch ((int)scr_showbrand.value)
+       {
+       case 1: // bottom left
+               x = 0;
+               y = vid_conheight.integer - pic->height;
+               break;
+       case 2: // bottom centre
+               x = (vid_conwidth.integer - pic->width) / 2;
+               y = vid_conheight.integer - pic->height;
+               break;
+       case 3: // bottom right
+               x = vid_conwidth.integer - pic->width;
+               y = vid_conheight.integer - pic->height;
+               break;
+       case 4: // centre right
+               x = vid_conwidth.integer - pic->width;
+               y = (vid_conheight.integer - pic->height) / 2;
+               break;
+       case 5: // top right
+               x = vid_conwidth.integer - pic->width;
+               y = 0;
+               break;
+       case 6: // top centre
+               x = (vid_conwidth.integer - pic->width) / 2;
+               y = 0;
+               break;
+       case 7: // top left
+               x = 0;
+               y = 0;
+               break;
+       case 8: // centre left
+               x = 0;
+               y = (vid_conheight.integer - pic->height) / 2;
+               break;
+       default:
+               return;
+       }
 
+       DrawQ_Pic (x, y, "gfx/brand", 0, 0, 1, 1, 1, 1, 0);
+}
 
 //=============================================================================
 
@@ -569,6 +622,7 @@ void CL_Screen_Init(void)
        Cvar_RegisterVariable (&scr_showram);
        Cvar_RegisterVariable (&scr_showturtle);
        Cvar_RegisterVariable (&scr_showpause);
+       Cvar_RegisterVariable (&scr_showbrand);
        Cvar_RegisterVariable (&scr_centertime);
        Cvar_RegisterVariable (&scr_printspeed);
        Cvar_RegisterVariable (&vid_conwidth);
@@ -1410,6 +1464,8 @@ void CL_UpdateScreen(void)
 
        SCR_DrawConsole();
 
+       SCR_DrawBrand();
+
        SCR_UpdateScreen();
 }
 
diff --git a/todo b/todo
index 7868a846235e206087c7cb699fa6a7fcb15efa51..284ca66761b523c02f95462da5f4b5887923b4db 100644 (file)
--- a/todo
+++ b/todo
@@ -11,6 +11,7 @@ d feature darkplaces client: v_deathtilt cvar (Sajt, MauveBib)
 -d (Speedy) feature darkplaces init: add -demolooponly option which makes escape key quit, and disables all other keys (Speedy)
 -d (Spike) bug darkplaces console: inserting characters in the commandline is not adding a nul terminator to the commandline, resulting in lots of trash from older commandlines suddenly showing up (Spike)
 -d (Spike) feature darkplaces server: add filename/line number reporting to progs stack and opcode printouts (Spike)
+-d (Spirit_of_85) feature darkplaces client: add scr_showbrand cvar which would show gfx/brand.tga in the left/right top/bottom corner (depending on value of scr_showbrand) all the time, this would be useful for screenshots (Spirit_of_85)
 -d (Supa) bug darkplaces server: add TE_FLAMEJET builtin and add extension (Supajoe)
 -d (Toddd) bug darkplaces client: fix gl_flashblend, it's still drawing rtdlights even when gl_flashblend is on (Toddd)
 -d (Vermeulen) feature darkplaces playerphysics: add sv_maxairspeed cvar and use it in sv_user.c, default 30 to match quake player physics (Vermeulen)
@@ -122,7 +123,6 @@ d feature darkplaces client: v_deathtilt cvar (Sajt, MauveBib)
 0 change darkplaces server: make dedicated server not load images (maybe all fail?)
 0 cleanup darkplaces memory: add Mem_AllocNoClear function, and use it where possible, if developer is on it should clear with random garbage
 0 feature darkplaces client: add cvars to control lighting quality to allow performance tradeoffs; r_shadow_ options for use of dot3 shading, etc
-0 feature darkplaces client: add scr_showbrand cvar which would show gfx/brand.tga in the left/right top/bottom corner (depending on value of scr_showbrand) all the time, this would be useful for screenshots (Spirit_of_85)
 0 feature darkplaces client: cvar for console text size (Vermeulen)
 0 feature darkplaces client: interpolate scale and alpha changes (Cheapy)
 0 feature darkplaces client: variable width font support using a character width file (FrikaC)