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