X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=gl_draw.c;h=bad2c8c711cfe2db24a1a25a11e985f59a88b4c3;hb=2275e4d0cab079f4a0849ba55b8f92023d6f3eab;hp=781af9f6a0929f98c25e8583ce7970a9ba06296a;hpb=a4107d729cd599a854f238a79c038094127fad20;p=xonotic%2Fdarkplaces.git diff --git a/gl_draw.c b/gl_draw.c index 781af9f6..bad2c8c7 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define GL_COLOR_INDEX8_EXT 0x80E5 -extern unsigned char d_15to8table[65536]; - cvar_t qsg_version = {"qsg_version", "1"}; cvar_t scr_conalpha = {"scr_conalpha", "1"}; @@ -54,6 +52,7 @@ int conbacktexnum; ============================================================================= */ +/* #define MAX_SCRAPS 2 #define BLOCK_WIDTH 256 #define BLOCK_HEIGHT 256 @@ -117,6 +116,7 @@ void Scrap_Upload (void) scraptexnum[texnum] = GL_LoadTexture (va("scrapslot%d", texnum), BLOCK_WIDTH, BLOCK_HEIGHT, scrap_texels[texnum], false, true, 1); scrap_dirty = false; } +*/ //============================================================================= /* Support Routines */ @@ -137,7 +137,7 @@ byte menuplyr_pixels[4096]; int pic_texels; int pic_count; -int GL_LoadPicTexture (qpic_t *pic); +extern int GL_LoadPicTexture (qpic_t *pic); qpic_t *Draw_PicFromWad (char *name) { @@ -148,6 +148,7 @@ qpic_t *Draw_PicFromWad (char *name) gl = (glpic_t *)p->data; // load little ones into the scrap + /* if (p->width < 64 && p->height < 64) { int x, y; @@ -173,12 +174,13 @@ qpic_t *Draw_PicFromWad (char *name) } else { + */ gl->texnum = GL_LoadPicTexture (p); gl->sl = 0; gl->sh = 1; gl->tl = 0; gl->th = 1; - } + //} return p; } @@ -235,8 +237,6 @@ qpic_t *Draw_CachePic (char *path) extern void LoadSky_f(void); -extern char *QSG_EXTENSIONS; - /* =============== Draw_Init @@ -263,7 +263,7 @@ void gl_draw_start() conbacktexnum = loadtextureimage("gfx/conback", 0, 0, false, false); - memset(scraptexnum, 0, sizeof(scraptexnum)); +// memset(scraptexnum, 0, sizeof(scraptexnum)); // get the other pics we need draw_disc = Draw_PicFromWad ("disc"); @@ -285,22 +285,12 @@ void GL_Draw_Init (void) Cmd_AddCommand ("loadsky", &LoadSky_f); -#ifdef NEHAHRA -#if defined(__linux__) - sprintf (engineversion, "DPNehahra Linux GL %.2f build %3i", (float) VERSION, buildnumber); -#elif defined(WIN32) - sprintf (engineversion, "DPNehahra Windows GL %.2f build %3i", (float) VERSION, buildnumber); -#else - sprintf (engineversion, "DPNehahra Unknown GL %.2f build %3i", (float) VERSION, buildnumber); -#endif -#else #if defined(__linux__) sprintf (engineversion, "DarkPlaces Linux GL %.2f build %3i", (float) VERSION, buildnumber); #elif defined(WIN32) sprintf (engineversion, "DarkPlaces Windows GL %.2f build %3i", (float) VERSION, buildnumber); #else sprintf (engineversion, "DarkPlaces Unknown GL %.2f build %3i", (float) VERSION, buildnumber); -#endif #endif for (i = 0;i < 40 && engineversion[i];i++) engineversion[i] += 0x80; // shift to orange @@ -344,7 +334,7 @@ void Draw_Character (int x, int y, int num) return; glBindTexture(GL_TEXTURE_2D, char_texture); // LordHavoc: NEAREST mode on text if not scaling up - if ((int) vid.width < glwidth) + if (glwidth < (int) vid.width) { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -388,7 +378,7 @@ void Draw_String (int x, int y, char *str, int maxlen) glBindTexture(GL_TEXTURE_2D, char_texture); // LordHavoc: NEAREST mode on text if not scaling up - if ((int) vid.width < glwidth) + if (glwidth < (int) vid.width) { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -439,8 +429,8 @@ void Draw_AlphaPic (int x, int y, qpic_t *pic, float alpha) { glpic_t *gl; - if (scrap_dirty) - Scrap_Upload (); +// if (scrap_dirty) +// Scrap_Upload (); gl = (glpic_t *)pic->data; if (!r_render.value) return; @@ -464,8 +454,8 @@ void Draw_Pic (int x, int y, qpic_t *pic) { glpic_t *gl; - if (scrap_dirty) - Scrap_Upload (); +// if (scrap_dirty) +// Scrap_Upload (); gl = (glpic_t *)pic->data; if (!r_render.value) return;