#include #include "functions.h" typedef union { struct { char b; char g; char r; char grey; }; int color; } Color; Color new_Color(); Color new_Color_RGB(char r, char g, char b); Color new_Color_Gray(char g); Color RGB2Color(char r, char g, char b); typedef struct { Color color; int k; double x; double y; } MandelPoint; MandelPoint new_MandelPoint(Color color, int k, double x, double y); #define CURSOR_WIDTH 12 #define CURSOR_HEIGHT 12 static Color cr[CURSOR_HEIGHT][CURSOR_WIDTH]; static char cr_old[CURSOR_HEIGHT][CURSOR_WIDTH] = { {0,3,2,15,15,15,15,15,15,15,15,15}, {0,12,14,3,2,3,15,15,15,15,15,15}, {0,7,14,14,14,14,2,3,15,15,15,15}, {15,0,12,14,14,14,14,14,2,2,3,15}, {15,0,7,12,14,14,14,14,14,14,3,3}, {15,0,8,12,12,14,14,3,3,2,15,15}, {15,15,0,7,12,12,0,15,15,15,15,15}, {15,15,0,7,7,0,15,15,15,15,15,15}, {15,15,15,0,7,0,15,15,15,15,15,15}, {15,15,15,0,8,0,15,15,15,15,15,15}, {15,15,15,0,0,15,15,15,15,15,15,15}, {15,15,15,15,0,15,15,15,15,15,15,15} }; static Color **pointeur_tab; static MandelPoint **screen_tab; inline void setPixel(int x, int y, Color c); inline Color getPixel(int x, int y); void clrscr(void); void line(int x1, int y1, int x2, int y2, Color color); void malloc_screen_tab(void); void free_screen_tab(void); void fill_screen_tab(MandelPoint point); void invalidate_screen_tab(void); void copyto_screen_tab(unsigned x1, unsigned y1, unsigned x2, unsigned y2); void apply_screen_tab(unsigned x, unsigned y, int origin, MandelPoint new_point); /* origin 0 = screen origin, origin 1 = screen_tab origin */ void init_pointeur(void); void fill_pointer_tab(unsigned x, unsigned y); void apply_pointer_tab(unsigned x, unsigned y); void pointeur(int x, int y); void mandel(double xmin, double xmax, double ymin, double ymax, int iter, double zx, double zy, int mode);