Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java: timers and graphics

Name: dickhole mcbumson 2011-11-08 2:27

I need a window that draws a circle with a random color every 5 seconds. How do?

Name: Anonymous 2011-11-08 2:53

#include <stdlib.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
#include <assert.h>

int
main (int argc, char **argv)
{
  ALLEGRO_DISPLAY *disp;
  bool status;

  al_init ();

  status = al_init_primitives_addon ();
  assert (status);

  disp = al_create_display (640, 480);
  assert (disp);

  al_set_target_backbuffer (disp);

  assert ((1>>24) <= RAND_MAX);

  while (1)
    {
      int r;
     
      r = rand ();

      al_draw_circle (320, 240, 100,
              al_map_rgb ((r >> 16) & 255,
                  (r >> 8) & 255,
                  (r >> 0) & 255),
              1);

      al_flip_display ();
      al_rest (5);
    }

  return EXIT_SUCCESS;
}

Name: Anonymous 2011-11-08 4:46

Is Allegro still in use in this day and age?

Name: Anonymous 2011-11-08 6:35

>>3
Xarn uses Allegro.

Name: Anonymous 2011-11-08 6:42

Lisp is shit.

Name: Anonymous 2011-11-08 7:01

There's already a new version of Java, it's called C#.

Name: Anonymous 2011-11-08 8:00

>>6
Please remove Bill Gate's cock out of your ass and go away

Name: Anonymous 2011-11-08 8:08

>>7
Why do the javadumbs' butts hurt every time I remind them about Java disabilities?

Name: Anonymous 2011-11-08 8:10

>>8
I only use brainfuck and create art, not just a software

Name: Microsoft Team 2011-11-08 8:17

>>9
So I guess you just informed us you weren't a javadumb, but your butt exploded. Thanks, your opinion is very important to us.

Name: Anonymous 2011-11-08 8:24

>>10
At least my butt has no proprietary cocks in it

Name: Anonymous 2011-11-08 8:52

>>11
Indeed. I also think that a community of free (as in beer) dicks is better.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List