--- deliantra/Deliantra-Client/Client.xs 2008/12/21 21:30:47 1.286 +++ deliantra/Deliantra-Client/Client.xs 2009/11/04 14:40:51 1.290 @@ -83,7 +83,7 @@ #define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, object replacement character */ -#define FOW_DARKNESS 32 +#define FOW_DARKNESS 64 #define MAP_EXTEND_X 32 #define MAP_EXTEND_Y 512 @@ -2018,7 +2018,7 @@ pl_tex.name = 0; - // thats current max. sorry. + // that's current max. sorry. if (sw > 255) sw = 255; if (sh > 255) sh = 255; @@ -2176,13 +2176,12 @@ rc_key_t key_ov = key; maptex tex = self->tex [TEXID_SPEECH]; rc_array_t *arr; + int px = x * T + T * 2 / 32; + int py = y * T - T * 6 / 32; key_ov.texname = tex.name; arr = rc_array (rc_ov, &key_ov); - int px = x * T + T * 2 / 32; - int py = y * T - T * 6 / 32; - rc_t2f_v3f (arr, 0 , 0 , px , py , 0); rc_t2f_v3f (arr, 0 , tex.t, px , py + T, 0); rc_t2f_v3f (arr, tex.s, tex.t, px + T, py + T, 0); @@ -2369,7 +2368,13 @@ int x, y; glEnable (GL_TEXTURE_2D); - glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + /* GL_REPLACE would be correct, as we don't need to modulate alpha, + * but the nvidia driver (185.18.14) mishandles alpha textures + * ansd takes the colour from god knows where instead of using + * Cp. MODULATE results in the same colour, but slightly different + * alpha, but atcually gives us the correct colour with nvidia. + */ + glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBegin (GL_QUADS); @@ -2386,7 +2391,7 @@ float tx1 = m & 0x40 ? 0.5 : 0.; float tx2 = tx1 + 0.5; - glColor4f (c[0], c[1], c[2], 0.75); + glColor4f (c[0], c[1], c[2], 1); glTexCoord2f (tx1, 0.); glVertex2i (x , y ); glTexCoord2f (tx1, 1.); glVertex2i (x , y + 1); glTexCoord2f (tx2, 1.); glVertex2i (x + 1, y + 1);