Parcourir la source

* Updated libcaca and cacaview after the API changes.

tags/v0.99.beta14
Sam Hocevar sam il y a 17 ans
Parent
révision
3624787754
2 fichiers modifiés avec 21 ajouts et 19 suppressions
  1. +2
    -2
      caca/caca0.c
  2. +19
    -17
      src/cacaview.c

+ 2
- 2
caca/caca0.c Voir le fichier

@@ -187,7 +187,7 @@ void __caca0_set_feature(int feature)
case 0x31: case 0x32: case 0x33: case 0x34: case 0x35:
dithering = feature;
for(i = 0; i < nbitmaps; i++)
cucul_set_dither_mode(bitmaps[i], features[feature]);
cucul_set_dither_algorithm(bitmaps[i], features[feature]);
break;
}
}
@@ -239,7 +239,7 @@ cucul_dither_t *__caca0_create_bitmap(unsigned int bpp, unsigned int w,

cucul_set_dither_color(d, features[background]);
cucul_set_dither_antialias(d, features[antialiasing]);
cucul_set_dither_mode(d, features[dithering]);
cucul_set_dither_algorithm(d, features[dithering]);

/* Store bitmap in our list */
nbitmaps++;


+ 19
- 17
src/cacaview.c Voir le fichier

@@ -64,8 +64,8 @@ int zoom = 0, g = 0, fullscreen = 0, mode, ww, wh;

int main(int argc, char **argv)
{
char const * const * dithers = cucul_get_dither_mode_list(NULL);
int dither_mode = 0;
char const * const * algos = cucul_get_dither_algorithm_list(NULL);
int dither_algorithm = 0;

int quit = 0, update = 1, help = 0, status = 0;
int reload = 0;
@@ -206,19 +206,21 @@ int main(int argc, char **argv)
break;
#endif
case 'd':
dither_mode++;
if(dithers[dither_mode * 2] == NULL)
dither_mode = 0;
cucul_set_dither_mode(im->dither, dithers[dither_mode * 2]);
dither_algorithm++;
if(algos[dither_algorithm * 2] == NULL)
dither_algorithm = 0;
cucul_set_dither_algorithm(im->dither,
algos[dither_algorithm * 2]);
new_status = STATUS_DITHERING;
update = 1;
break;
case 'D':
dither_mode--;
if(dither_mode < 0)
while(dithers[dither_mode * 2 + 2] != NULL)
dither_mode++;
cucul_set_dither_mode(im->dither, dithers[dither_mode * 2]);
dither_algorithm--;
if(dither_algorithm < 0)
while(algos[dither_algorithm * 2 + 2] != NULL)
dither_algorithm++;
cucul_set_dither_algorithm(im->dither,
algos[dither_algorithm * 2]);
new_status = STATUS_DITHERING;
update = 1;
break;
@@ -385,24 +387,24 @@ int main(int argc, char **argv)
{
print_status();

#if 0 /* FIXME */
cucul_set_color_ansi(cv, CUCUL_LIGHTGRAY, CUCUL_BLACK);
switch(status)
{
case STATUS_DITHERING:
cucul_printf(cv, 0, wh - 1, "Dithering: %s",
cucul_get_dither_algorithm(im->dither));
break;
#if 0 /* FIXME */
case STATUS_ANTIALIASING:
cucul_printf(cv, 0, wh - 1, "Antialiasing: %s",
cucul_get_feature_name(cucul_get_feature(cv, CUCUL_ANTIALIASING)));
break;
case STATUS_DITHERING:
cucul_printf(cv, 0, wh - 1, "Dithering: %s",
cucul_get_feature_name(cucul_get_feature(cv, CUCUL_DITHERING)));
break;
case STATUS_BACKGROUND:
cucul_printf(cv, 0, wh - 1, "Background: %s",
cucul_get_feature_name(cucul_get_feature(cv, CUCUL_BACKGROUND)));
break;
}
#endif
}
}

if(help)


Chargement…
Annuler
Enregistrer