X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=gl_draw.c;h=88431d9a83e206deeb34ae1cc6d1467889d4e317;hp=17213e566db0be1d09e6ca02d42d9e59f1cf59f2;hb=9fd6cbf066ebd9b39d3396acc7d3e1aa963a1604;hpb=d6f8468a651dc24bae9974b0b37e4d1fb04cacda diff --git a/gl_draw.c b/gl_draw.c index 17213e56..88431d9a 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -446,7 +446,7 @@ reload: // show up the right size in the menu even if they were replaced with // higher or lower resolution versions dpsnprintf(lmpname, sizeof(lmpname), "%s.lmp", pic->name); - if (!strncmp(pic->name, "gfx/", 4) && (lmpdata = FS_LoadFile(lmpname, tempmempool, false, &lmpsize))) + if ((!strncmp(pic->name, "gfx/", 4) || (gamemode == GAME_BLOODOMNICIDE && !strncmp(pic->name, "locale/", 6))) && (lmpdata = FS_LoadFile(lmpname, tempmempool, false, &lmpsize))) { if (developer_loading.integer) Con_Printf("loading lump \"%s\"\n", pic->name); @@ -1387,7 +1387,8 @@ float DrawQ_TextWidth_UntilWidth_TrackColors_Scale(const char *text, size_t *max else width_of = fnt->width_of; - for (i = 0;((bytes_left = *maxlen - (text - text_start)) > 0) && *text;) + i = 0; + while (((bytes_left = *maxlen - (text - text_start)) > 0) && *text) { size_t i0 = i; nextch = ch = u8_getnchar(text, &text, bytes_left); @@ -1616,7 +1617,7 @@ float DrawQ_String_Scale(float startx, float starty, const char *text, size_t ma y += r_textshadow.value * vid.height / vid_conheight.value; } */ - for (i = 0;((bytes_left = maxlen - (text - text_start)) > 0) && *text;) + while (((bytes_left = maxlen - (text - text_start)) > 0) && *text) { nextch = ch = u8_getnchar(text, &text, bytes_left); i = text - text_start; @@ -2061,14 +2062,8 @@ void DrawQ_Line (float width, float x1, float y1, float x2, float y2, float r, f } } -void DrawQ_Lines (float width, int numlines, const float *vertex3f, const float *color4f, int flags) +void DrawQ_Lines (float width, int numlines, int flags, qboolean hasalpha) { - int i; - qboolean hasalpha = false; - for (i = 0;i < numlines*2;i++) - if (color4f[i*4+3] < 1.0f) - hasalpha = true; - _DrawQ_SetupAndProcessDrawFlag(flags, NULL, hasalpha ? 0.5f : 1.0f); if(!r_draw2d.integer && !r_draw2d_force) @@ -2086,7 +2081,6 @@ void DrawQ_Lines (float width, int numlines, const float *vertex3f, const float //qglLineWidth(width);CHECKGLERROR CHECKGLERROR - R_Mesh_PrepareVertices_Generic_Arrays(numlines*2, vertex3f, color4f, NULL); qglDrawArrays(GL_LINES, 0, numlines*2); CHECKGLERROR break;