un peu de clarifications
This commit is contained in:
parent
86515d49d5
commit
d0a520ea56
10
bubulles.c
10
bubulles.c
@ -112,14 +112,14 @@ return ( &where->bbs[idx] );
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
int print_bublist_desc(BBList *bbl, int flags)
|
||||
int print_bublist_desc(BBList *bbl, int opts)
|
||||
{
|
||||
|
||||
printf("------- bblist at %p\n", bbl);
|
||||
printf("\tname \t'%s'\n", bbl->name);
|
||||
|
||||
printf("\tsize\t%6d\n\tfidx\t%6d\n", bbl->size, bbl->fidx);
|
||||
if (flags & 0x01) {
|
||||
if (opts & 0x01) {
|
||||
printf("\txyz\t%f %f %f\n",
|
||||
bbl->position.x, bbl->position.y, bbl->position.z);
|
||||
}
|
||||
@ -207,7 +207,7 @@ return 0;
|
||||
* 0x0001 print diameter
|
||||
* 0x0002 print graylevel
|
||||
*/
|
||||
int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int flags)
|
||||
int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int opts)
|
||||
{
|
||||
int idx;
|
||||
Bubulle *ar;
|
||||
@ -230,8 +230,8 @@ for (idx=0; idx<bbl->fidx; idx++) {
|
||||
fprintf(fp, "%12.6f %12.6f %12.6f",
|
||||
ar[idx].p.x, ar[idx].p.y, ar[idx].p.z);
|
||||
|
||||
if (flags & 0x01) fprintf(fp, " %12.6f", ar[idx].d);
|
||||
if (flags & 0x02) fprintf(fp, " %6d", ar[idx].gray);
|
||||
if (opts & 0x01) fprintf(fp, " %12.6f", ar[idx].d);
|
||||
if (opts & 0x02) fprintf(fp, " %6d", ar[idx].gray);
|
||||
|
||||
fputs("\n", fp);
|
||||
}
|
||||
|
12
bubulles.h
12
bubulles.h
@ -20,6 +20,10 @@ typedef struct {
|
||||
unsigned long reserved;
|
||||
} RGBA;
|
||||
|
||||
/*
|
||||
this is our main entity : the bubulle.
|
||||
'bubulle' is a slang french word for 'friendly bubble'.
|
||||
*/
|
||||
typedef struct {
|
||||
XYZ p; /* position */
|
||||
double d; /* diameter */
|
||||
@ -29,15 +33,19 @@ typedef struct {
|
||||
double kvalue; /* wtf ? */
|
||||
} Bubulle;
|
||||
|
||||
/*
|
||||
this is the bubulles list descriptor.
|
||||
*/
|
||||
typedef struct {
|
||||
char name[SZ_BUBULLE_TEXT+1];
|
||||
int size; /* max number of bubulles */
|
||||
int fidx; /* next free slot */
|
||||
XYZ position;
|
||||
XYZ position; /* global position */
|
||||
unsigned long flags;
|
||||
Bubulle *bbs;
|
||||
Bubulle *bbs; /* ptr to a movable array */
|
||||
} BBList;
|
||||
|
||||
|
||||
BBList * alloc_bubulles(char *name, int nbre, int k);
|
||||
int free_bubulles(BBList *bbl, int k);
|
||||
int print_bublist_desc(BBList *bbl, int k);
|
||||
|
Loading…
Reference in New Issue
Block a user