/* NAME = extb.h */
/*****************************************************/
/*    extb.h: Variables externes pour anyflo         */
/*        Version du 01-08-2001 (6.1) (Michel BRET)  */
/*****************************************************/

#include "exta.h"
#include "defb.h"

/* Interface OpenGL */
/* ---------------- */
extern long GL_Dimx_Max, GL_Dimy_Max, GL_Dimx, GL_Dimy;
extern long X0, Y0;

/* Menus */
extern long Sem_menu;
extern Menus Menus0[NB_MENU];
extern Table_Menus Table_Menus0[NB_MENU];
extern long Nb_menu;

/* Table des [oui non] */
extern long *Sem1;

/* Type d'affichage: 0 (off), 1 (image), -1 (memoire) */
extern long Sem_graph, Sem_aff, Sem_ecr;
/* Affichage image: 1 (on) -1 (off) */
extern long Sem_image;
/* Motion blur */
extern long *P_mb, Nb_mb;
extern float Coe_mb;

/* Dimension de l'image */
extern long Dimx, Dimy, Dim_image;
/* Cadres */
extern long X_interac, Y_interac, Dx_interac, Dy_interac;

/* Coefficients multiplicateurs */
extern float Kx, Ky, Coex, Coey, Coe_hautedef, Coe_gra;

/* Dimensions et centre de la fenetre */
extern long Minz, Maxz;
extern float Minz_ecr, Maxz_ecr;

/* Parametres de window */
extern long XW, YW;
extern long Dim_videox, Dim_videoy;
extern int Fenetre[];

/* Souris */
/* ------ */
extern Souris0 Souris;

/* Parametres de clip */
extern long Clipx1, Clipy1, Clipx2, Clipy2, Dim_clipx, Dim_clipy;

/* Nombre de bits d'une composante R V B */
extern long Nb_bit;

/* Valeur maximum d'une composante R V B*/
extern long Max_cou;

/* Ligne de pixels R V B */
extern long Dim_ligne;
extern unsigned char *Ligne_r, *Ligne_v, *Ligne_b, *Ligne_t;

/* Buffer de col */
extern float *Pile_col;

/* Facette standard de 4 sommets */
extern long *P_fac, *P_poi, *P_norm_fac, *P_norm_som;

/* Z_buf: 0 (off), 1(16 bits), 2 (32 bits), n octets */
extern long Z_buf;
extern short *Pz_16, *Fz_16;
extern float *Pz_32, *Fz_32;
extern long Dim_zbufx, Dim_zbufy, Dim_zbuf;

/* Oeil et perspective */
extern float *Oeil;
extern float *M_abs_oeil, *M_oeil_pers, *M_pers_ecr;
extern float *M_abs_pers, *M_oeil_abs, *M_pers_abs;
extern struct Objet *P_oeil, *P_fui, *P_foc, *P_roul;
extern struct Objet *P_abs_oeil, *P_oeil_pers, *P_pers_ecr;
extern struct Objet *P_ecr_pers, *P_pers_oeil, *P_oeil_abs;
extern struct Objet *P_locale_vue;
extern struct Objet *P_fonc_vue;
extern struct Objet *P_vue;
extern long *P_loi_pers;
extern long Type_Pers;

/* Peripheriques: OBSOLETE */
extern long Sem_tablette;
extern long Sem_magn;

/* Memoire partagee */
/* ---------------- */
extern Shm Shm0[];
extern long Nb_Shm;

/* Tableau des aleatoires */
extern long Alea_anc;
extern long Dim_alea;
extern long Ind_alea;
extern float *Pile_alea;

/* Semaphore d'objets */
extern long Sem_vol, Sem_traj, Sem_cin;

/* Numero du volume affiche */
extern long Numero_vol, Numero_fac, Numero_som;

/* Objet courant */
extern struct Objet *P_obj_courant;

/* Fonction (interaction palette) */
extern struct Objet *P_fonc0, *P_fonc1, *P_fonc2, *P_fonc3;

/* Ombres */
extern long *Pile_intersection;

/* Ancrage */
extern long Sem_anc;
extern long Nb_anc;

/* Parametres d'animation */
extern long Dim_animer, Num_animer, Ni;
extern struct Objet *P_dessus, *P_devant, *P_derriere;

/* stocker objet */
extern long *P_stocker;
extern long Sem_interaction, Sem_memoire;

/* Pointeurs speciaux */
/* ------------------ */
extern struct Objet *P_wind;    /* Window courante */
extern struct Objet *P_champ;    /* Racine des champs */
extern struct Objet *P_lum;    /* Racine des lumiwres */
extern float *Pf_cou;
extern float *Pf_tsv;
extern float *Pf_col;
extern float *Pf_ambiance;
extern float *Pf_axe;
extern float *Pf_fond;
extern float *Pf_centre;
extern float *Pf_rayon;

extern float *Pf_poi;
extern float *Pf_move;
extern float *Pf_pers;
extern float *Pf_normale;
extern float *Pf_vitesse;
extern float *Pf_acc;
extern float *Pf_ang;
extern float *Pf_coe;
extern float *Pf_force;
extern float *Pf_dynamique;

extern float *Pf_oeil;
extern float *Pf_fui;
extern float *Pf_foc;
extern float Coe_foc;
extern float *Pf_roul;

extern float *Pf_clip;    /* -> clip window courante */
extern float *Pf_coupe;
extern float *Pf_fen;    /* -> fen window courante */

extern float *Pf_audio;
extern float *Pf_echelle;
extern float *Pf_souris;
extern long *P_souris;
extern long *P_memoire;

/* cou mappe */
extern float *Pr_mappe, *Pv_mappe, *Pb_mappe;

/* Haute_definition: (x0,y0,cx,cy) */
extern long *P_valider;

/* Marge du pave de couleurs R V B K */
extern long D_cou;

/* Nombre de parametres */
extern long Nb_coe, Nb_col, Nb_cou, Nb_normale, Nb_treil, Nb_mappe;

/* Interaction en temps reel */
extern struct Graph P_graph_deb[];
extern char Buf_key[];
extern long I_key, Sem_key;
extern long Interaction_Pas;

/* Table de cos */
extern double *TabCos;

/* Couleurs */
extern float Blanc[];
extern float Noir[];
extern float Rouge[];
extern float Vert[];
extern float Bleu[];
extern float Cyan[];
extern float Jaune[];
extern float Violet[];
extern float Col[];

/* Image */
/* ----- */
extern struct Objet *P_image0;
extern unsigned char *P_rvb, *P_rvba;

/* Coupe */
/* ----- */
extern long Nb_coupe;
extern struct Contour *P_contour;

/* 1: ON, 0: OFF */
/* ------------- */
extern long P_exec[];
extern long P_menu[];

/* Play */
/* ---- */
/*???
extern long Sortie, *Pd_0, *Pd_eg_0, *Suite_0, *Fin_0;
???*/

/* Derniere commande */
/* ----------------- */
extern long Com0;
extern long *Pd_0, *Pd_eg_0, *Suite_0, *Fin_0;

/* Fonte */
/* ----- */
extern void *Fonte;

/* END */
