Code:
procedure draw();
begin
//clearing buffer
al_clear_to_color(buffer,al_makeacol_depth(al_desktop_color_depth,0,0,0,0));
//drawing text
al_textout_centre_ex(buffer,al_font,'Witaj w Allegro!',400,25,al_makeacol_depth(al_desktop_color_depth,255,0,0,255),al_makeacol_depth(al_desktop_color_depth,0,0,0,255));
al_textout_centre_ex(buffer,al_font,'Nacisnij Q aby wyjsc',400,45,al_makeacol_depth(al_desktop_color_depth,255,0,0,255),al_makeacol_depth(al_desktop_color_depth,0,0,0,255));
//drawing cats
Kotek1.Draw(buffer);
Kotek2.Draw(buffer);
//drawing perlin noise
al_masked_stretch_blit(perlin,buffer,0,0,300,200,100,100,200,200); //<=== here it is, but why does it happen?
//showing collision indicator
if Kotek1.IsColliding(Kotek2) then al_rectfill(buffer,0,0,64,32,al_makecol(0,255,0));
//if pause, put indicator of it
if pause then al_textout_centre_ex(buffer,al_font,'Pauza',400,580,al_makeacol_depth(al_desktop_color_depth,255,0,0,255),al_makeacol_depth(al_desktop_color_depth,0,0,0,255));
al_blit(buffer,al_screen,0,0,0,0,800,600);
end;
Bookmarks