Browse Source

* Fixed warnings under GCC 4.x

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 19 years ago
parent
commit
c331fe42d5
2 changed files with 7 additions and 6 deletions
  1. +3
    -2
      src/bitmap.c
  2. +4
    -4
      src/graphics.c

+ 3
- 2
src/bitmap.c View File

@@ -571,7 +571,8 @@ void caca_draw_bitmap(int x1, int y1, int x2, int y2,
{
unsigned int i;
int ch = 0, distmin;
int r, g, b, a, fg_r = 0, fg_g = 0, fg_b = 0, bg_r, bg_g, bg_b;
unsigned int r, g, b, a;
int fg_r = 0, fg_g = 0, fg_b = 0, bg_r, bg_g, bg_b;
int fromx, fromy, tox, toy, myx, myy, dots, dist;
int error[3];

@@ -710,7 +711,7 @@ void caca_draw_bitmap(int x1, int y1, int x2, int y2,
}
else
{
int lum = r; if(g > lum) lum = g; if(b > lum) lum = b;
unsigned int lum = r; if(g > lum) lum = g; if(b > lum) lum = b;
outfg = outbg;
outbg = CACA_COLOR_BLACK;



+ 4
- 4
src/graphics.c View File

@@ -502,8 +502,8 @@ void caca_putchar(int x, int y, char c)
*/
void caca_putstr(int x, int y, char const *s)
{
char *charbuf;
char *attrbuf;
unsigned char *charbuf;
unsigned char *attrbuf;
char const *t;
unsigned int len;

@@ -1022,7 +1022,7 @@ int _caca_init_graphics(void)

for(i = 0; i < 94; i++)
{
glGenTextures(1, &id[i]);
glGenTextures(1, (GLuint*)&id[i]);
glBindTexture(GL_TEXTURE_2D, id[i]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -1402,7 +1402,7 @@ void caca_refresh(void)
XSetForeground(x11_dpy, x11_gc, x11_colors[attr[0] & 0xf]);
XDrawString(x11_dpy, x11_pixmap, x11_gc, x * x11_font_width,
(y + 1) * x11_font_height - x11_font_offset,
cache_char + x + y * _caca_width, len);
(char*)(cache_char + x + y * _caca_width), len);
}
}



Loading…
Cancel
Save