Mail Archives: djgpp/1998/12/30/18:25:17
Anyone ever tried to let the timer of allegro point to a object method? I
have a small snippet that compiles, but crashes when i start it.
class Oallegro
{
public:
Oallegro(int width, int height, int bitdepth);
~Oallegro();
void breathe();
void unbreathe();
void messagepump();
};
void Oallegro::breathe()
{
install_int_ex(Oallegro::messagepump, MSEC_TO_TIMER(20));
}
void Oallegro::unbreathe()
{
remove_int(Oallegro::messagepump);
}
void Oallegro::messagepump()
{
handlemouse();
}
Everything goes wrong when messagepump() is called. When i put a simple
printf into the method, there's no problem at all. But when i do something
with variables or call one of my other (virtual) classes, the program
crashes.
Please help!
Floris
- Raw text -