// // Created by hugod on 27/11/2024. // #ifndef AFFICHAGE_H #define AFFICHAGE_H #include "convertion_JSON_MMD.h" #include "infoGraphe.h" #define COULEUR_PRIMAIRE al_map_rgb(41, 67, 79) #define COULEUR_VERT al_map_rgb(51, 159, 67) typedef struct { int x1, y1, x2, y2; } ButtonZone; cJSON * creerJson(char * nomJson); int interface_graphique(nom_fichier_extension * nomFichierExtension); void initAllegro(toutAllegro * toutAllegro1); void destroyAllegro(toutAllegro* toutAllegro1); ALLEGRO_COLOR hex_to_color(const char* hex); char* lire_fichier(const char* chemin); int couleurs_egales(ALLEGRO_COLOR c1, ALLEGRO_COLOR c2); void dessiner_texte_avec_retour(ALLEGRO_FONT* font, ALLEGRO_COLOR couleur, float x, float y, float largeur_max, const char* texte); void afficher_infos_noeud(toutAllegro * toutAllegro1, cJSON* node, ALLEGRO_COLOR couleur); void choisir_graphe(char* fichier_json, char* fichier_png); int pause(toutAllegro * toutAllegro1, ALLEGRO_BITMAP* fond); int affichage(toutAllegro * toutAllegro1, nom_fichier_extension * nomFichierExtension, cJSON * json, Graphe* graphe); #endif //AFFICHAGE_H