In Allegro 4 I have to use this speed_counter, in the Allegro5 is automatically replaced by the functions of timer?
I think you should look in the manual and at least make an attempt at a solution before getting people here to port your code for you section by section .
Me too... but the API reference from allegro 4... http://alleg.sourceforge.net/stabledocs/en/allegro.html/edit1: and I already try a solution
Edgar's link is to the Allegro 5 reference manual. You can also use docs.liballeg.org as an easy to remember address.
Thanks guys! I changed the 5 for 4 : http://www.allegro.cc/manual/4/ and work!
An Allegro 4 timer that only increments a variable can be done like this with Allegro 5:
ALLEGRO_TIMER *t = al_create_timer(1 / 60.0);
al_get_timer_count(t); // same as speed_counter
However, in most cases you'll just use al_register_event_source(queue, timer) and watch for timer events.