Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <allegro.h>
- int main()
- {
- allegro_init();
- set_color_depth(32);
- set_gfx_mode(GFX_AUTODETECT_WINDOWED,800,600,0,0);
- set_window_title("Nazov okna");
- install_keyboard();
- int farba=makecol(255,255,255);
- int black=makecol(0,0,0);
- circlefill(screen,100,100,15,farba);
- line(screen,80,115,180,215,farba);
- line(screen,180,215,280,115,farba);
- int x=100;
- int y=100;
- do
- {
- circlefill(screen,x,y,15,farba);
- rest(10);
- circlefill(screen,x,y,15,black);
- x++;
- y++;
- }
- while(x<=200,y<=180);
- circlefill(screen,182,180,15,farba);
- do
- {
- circlefill(screen,x,y,15,farba);
- rest(10);
- circlefill(screen,x,y,15,black);
- x++;
- y--;
- }
- while(x<=280,y>=90);
- circlefill(screen,275,90,15,farba);
- readkey();
- return 0;
- }
- END_OF_MAIN()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement