03-02-2005, 08:57 AM
I'm trying to copy the method of using a timer for Allegro that is in C++. The problem is I don't know how to convert some things from C++ to FB:
I don't know how to do the volatile variables and the macros. How would I make those?
Code:
volatile long speed_counter = 0; //what would I use for volatiles?
void increment_speed_counter() //a function
{
speed_counter++; //easy: speed_counter = speed_counter + 1
}
END_OF_FUNCTION(increment_speed_counter); //that is a macro,
//how would I use?
//more macros...
LOCK_VARIABLE(speed_counter);
LOCK_FUNCTION(increment_speed_counter);
I don't know how to do the volatile variables and the macros. How would I make those?