#include BITMAP *bufor_ekranu = NULL ; void init(); void deinit(); void rysujwykres(); void rysuj(double tablica[],int rozmiar,int sekund, double timed) ; void zerowanie(double tablica[],int rozmiar) { int cos=1 ; for(int i=0;i> d ; }*/ init(); int tab[]={ 51,75, 51,SCREEN_H-50, SCREEN_W-75,SCREEN_H-50, SCREEN_W-75,75 }; int sekund = 10 ; clear(bufor_ekranu) ; rysuj(tablica,rozmiar,sekund,timed); deinit(); return 0; } END_OF_MAIN() void init() { int depth, res; allegro_init(); depth = desktop_color_depth(); if (depth == 0) depth = 32; set_color_depth(depth); res = set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); if (res != 0) { allegro_message(allegro_error); exit(-1); } if(!(bufor_ekranu = create_bitmap(640,480))) { set_gfx_mode(GFX_TEXT,0,0,0,0); allegro_message("Zamalo pamieci potrzebnej do stworzenia bufora ekranu !\n"); allegro_exit(); } install_timer(); install_keyboard(); install_mouse(); /* add other initializations here */ } void deinit() { clear_keybuf(); /* add other deinitializations here */ } void rysujwykres() { //clear_bitmap(screen); int color=makecol(0, 153, 219); //16581375; textprintf_ex(bufor_ekranu, font, 280, 20, color, -1, "II Prawo Ficka"); textprintf_ex(bufor_ekranu, font, 20, 125, color, -1, "1"); textprintf_ex(bufor_ekranu, font, SCREEN_W-95, SCREEN_H-35, color, -1, "100"); fastline(bufor_ekranu, 50, 50, 50, SCREEN_H-50, color); triangle(bufor_ekranu, 50, 50, 50-3, 50+20, 50+3, 50+20, color); fastline(bufor_ekranu, 50, SCREEN_H-50, SCREEN_W-50, SCREEN_H-50, color); triangle(bufor_ekranu, SCREEN_W-50, SCREEN_H-50, SCREEN_W-70, SCREEN_H-50-3,SCREEN_W-70, SCREEN_H-50+3, color); for(int i=1;i<=100;i=i+5) fastline(bufor_ekranu, 50+5*i, SCREEN_H-50+2, 50+5*i, SCREEN_H-50-2, color) ; for(int i=1;i<=100;i=i+5) fastline(bufor_ekranu, 50-2, SCREEN_H-50-3*i, 50+2, SCREEN_H-50-3*i, color) ; } void rysuj(double tablica[],int rozmiar,int sekund, double timed) { double de = 1.0e-5 ; float deltax=0.2 / 100.0 ; float deltat=0.01 ; float ab, bb ; int color= 16581375 ; int color2= 16431375 ; int a, b; for(double i=1;i