cosmetic
This commit is contained in:
parent
b264cffb02
commit
b367f42b9e
@ -18,8 +18,7 @@
|
||||
* Les colors maps sont censees etre compatible avec celles
|
||||
* de FRACTINT, mais il faudrait verifier.
|
||||
*/
|
||||
int
|
||||
Image_save_color_Map(char *file, char *name, RGB_map *map)
|
||||
int Image_save_color_Map(char *file, char *name, RGB_map *map)
|
||||
{
|
||||
int foo;
|
||||
FILE *fp;
|
||||
@ -77,15 +76,16 @@ return OLL_KORRECT;
|
||||
* What is the 'right thing' to do when we get more than
|
||||
* 256 lines of data ? return an error ?
|
||||
*/
|
||||
int
|
||||
Image_load_color_Map(char *file, char *name, RGB_map *where)
|
||||
int Image_load_color_Map(char *file, char *name, RGB_map *where)
|
||||
{
|
||||
FILE *fp;
|
||||
int nbre, r, g, b, foo, errcode;
|
||||
char buffer[256];
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( '%s' '%s' %p )\n", __func__,
|
||||
file, name, where);
|
||||
#endif
|
||||
|
||||
if ( name != NULL ) {
|
||||
if (strlen(name)>IMG_OBJNAME_LEN) return STRING_TOO_LONG;
|
||||
@ -94,8 +94,8 @@ if ( name != NULL ) {
|
||||
else strcpy(where->name, "<noname>");
|
||||
|
||||
/*
|
||||
* patch du 11 Décembre 2001: on utilise une fonction qui recherche le
|
||||
* fichier dans differents endroits. Cf 'mustopen.c' pour + de détails.
|
||||
* patch du 11 Decembre 2001: on utilise une fonction qui recherche le
|
||||
* fichier dans differents endroits. Cf 'mustopen.c' pour + de details.
|
||||
*/
|
||||
if ((fp=Image_must_fopen(file, "r", 0)) == NULL) {
|
||||
/* safety poke */
|
||||
@ -134,13 +134,12 @@ return errcode;
|
||||
*
|
||||
* XXX voir aussi indexcol.x XXX
|
||||
*/
|
||||
int
|
||||
Image_attach_Map(Image_Desc *im, char *nom_map, int flags)
|
||||
int Image_attach_Map(Image_Desc *im, char *nom_map, int flags)
|
||||
{
|
||||
RGB_map map;
|
||||
int foo;
|
||||
|
||||
fprintf(stderr, "Image attach Map: cette fonction n'est pas finie\n");
|
||||
fprintf(stderr, "%s: cette fonction n'est pas finie\n", __func__);
|
||||
foo = Image_load_color_Map(nom_map, "", &map);
|
||||
if (foo == 0) {
|
||||
fprintf(stderr, "Attach Map: foo is zero ?\n");
|
||||
@ -151,8 +150,7 @@ return FUNC_NOT_FINISH;
|
||||
/*::------------------------------------------------------------------::*/
|
||||
/* new 31 Juillet 2000 */
|
||||
|
||||
int
|
||||
Image_make_random_Map(char *nom, RGB_map *map, int nbre)
|
||||
int Image_make_random_Map(char *nom, RGB_map *map, int nbre)
|
||||
{
|
||||
int foo;
|
||||
|
||||
@ -176,8 +174,7 @@ return OLL_KORRECT;
|
||||
/* 21 Sept 2000
|
||||
Make a 2x2x2 color palette.
|
||||
*/
|
||||
int
|
||||
Image_make_222_Map(char *nom, RGB_map *map, int noise)
|
||||
int Image_make_222_Map(char *nom, RGB_map *map, int noise)
|
||||
{
|
||||
int foo, r, g, b;
|
||||
|
||||
@ -206,13 +203,12 @@ return OLL_KORRECT;
|
||||
/*::------------------------------------------------------------------::*/
|
||||
/* 15 Mai 2001
|
||||
* A big classic: the three-sinus color map.
|
||||
* paramètres:
|
||||
* parametres:
|
||||
* 0,1,2 R,G,B period
|
||||
* 3,4,5 R,G,B phase
|
||||
* 6,7 reserved
|
||||
*/
|
||||
int
|
||||
Image_palette_3sinus(char *nom, RGB_map *ou, double pars[8])
|
||||
int Image_palette_3sinus(char *nom, RGB_map *ou, double pars[8])
|
||||
{
|
||||
int foo;
|
||||
double dfoo, dra, dga, dba;
|
||||
@ -241,8 +237,7 @@ return FUNC_IS_BETA;
|
||||
/*::------------------------------------------------------------------::*/
|
||||
/* new 18 Dec 2001
|
||||
*/
|
||||
int
|
||||
Image_mix_palettes(RGB_map *p1, RGB_map *p2, RGB_map *d, char *txt, int k)
|
||||
int Image_mix_palettes(RGB_map *p1, RGB_map *p2, RGB_map *d, char *txt, int k)
|
||||
{
|
||||
int idx, k2;
|
||||
int r1, g1, b1, r2, g2, b2;
|
||||
@ -254,8 +249,7 @@ fprintf(stderr, "Image mix palette: work in progress...\n");
|
||||
k2 = 10000 - k;
|
||||
|
||||
for (idx=0; idx<256; idx++) {
|
||||
if (idx < p1->nbre)
|
||||
{
|
||||
if (idx < p1->nbre) {
|
||||
r1 = p1->red[idx];
|
||||
g1 = p1->green[idx];
|
||||
b1 = p1->blue[idx];
|
||||
@ -290,7 +284,7 @@ return FUNC_IS_BETA;
|
||||
/*::------------------------------------------------------------------::*/
|
||||
/* new 01 aout 2008 */
|
||||
|
||||
/* XXX HACK XXX */
|
||||
/* XXX HACK XXX */ /* please explain ! */
|
||||
double round(double);
|
||||
/* XXX HACK XXX */
|
||||
|
||||
@ -400,6 +394,6 @@ for (foo=0; foo<p->nbre; foo++) {
|
||||
|
||||
fclose(fp);
|
||||
|
||||
return FULL_NUCKED;
|
||||
return FUNC_IS_BETA;
|
||||
}
|
||||
/*::------------------------------------------------------------------::*/
|
||||
|
Loading…
Reference in New Issue
Block a user