How you clear the screen with Allegro?
Hotshot2007

Hiya all,

I have made pong game in allegro but I have one problem....clear the screen

I know in Basic used "cls" but for allegro? they dont even have cls or clear the screen for image!

does anyone know please?

one more questions....is there a tutorial for Typedef in allegro because I would like to more about Allegro.

cheers

Richard Phipps

Please look in the manual. :)

Tomoso

You shouldn't be clearing the screen, instead if your using double buffering, clear the bitmap your drawing to before you draw to the screen.

// Create Buffer Bitmap
BITMAP* buffer = create_bitmap(screen_w, screen_h);

// Logic

// Draw
clear_bitmap(buffer);

// Draw Everying to the buffer here

// And finally draw the buffer to the screen
blit(buffer, screen, 0, 0, 0, 0, screen_w, screen_h);

Onewing
Quote:

is there a tutorial for Typedef in allegro because I would like to more about Allegro.

typedef is a C keyword, it has nothing to do with allegro.

As per the rest of your question, do as RP suggests and read the online manual.

Hotshot2007

May I ask...where is the manual ?

thank you

cheers

Audric

google allegro manual

Hotshot2007

thank you everyone and I will try post the pong allegro as it is my first attempt coding.

cheers

Jonatan Hedborg

uargh. For all that is good and holy RTFM. If not in your allegro distribution, on the main-page of this site. Under "manual".

I swear to god, it's like WoW has closed down and all the noobs there came here wanting to make a new one.
(no not so much offense to OP)

Maybe we should put the FAQ the top of every page, in bold font, with a warning? (failure to read FAQ will result in public ridicule and possibly removal of thread)

Hotshot2007

excuse me....I am deaf person who are first timer on here and I agree that you should have all the newbie who should read FAQ FIRST before posting the topic.

cheers

Neil Walker

Perhaps then you need to really learn C before delving into the complexities of third party libraries?

Audric
Hotshot2007 said:

I have made pong game

- want to make -, then. It's ok, pong is the classic "first game" to attempt, everybody would give this hint.

You'll see the allegro examples (in the source distribution) are a great help : you can change a parameter in them, recompile, and run to see the result.

Thread #589623. Printed from Allegro.cc