www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/31/20:21:32

Message-ID: <3A4FD879.1AF8F454@nycap.rr.com>
From: Kaeru the Frog <kaeruthefrog AT nycap DOT rr DOT com>
X-Mailer: Mozilla 4.72 [en] (Win98; I)
X-Accept-Language: en,ja
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: allegro timer callbacks in a class
Lines: 27
Date: Mon, 01 Jan 2001 01:05:01 GMT
NNTP-Posting-Host: 24.25.140.173
X-Complaints-To: abuse AT nycap DOT rr DOT com
X-Trace: typhoon.nyroc.rr.com 978311101 24.25.140.173 (Sun, 31 Dec 2000 20:05:01 EST)
NNTP-Posting-Date: Sun, 31 Dec 2000 20:05:01 EST
Organization: Time Warner Road Runner - Albany NY
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

i want a class that when created, install a timer interupt using
allegro. below is a simplified version
of what i tried and doesn't work.


class foo
{
public:
  foo();
  void callback();

private:
  int counter;
};

foo::foo()
{
  LOCK_FUNCTION (callback);
  LOCK_VARIABLE (counter);
  install_int (callback, 100);
}

void foo::callback()
{
  counter++;
}
END_OF_FUNCTION (callback);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019