home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / source / theatrix / keyfold.cpp < prev    next >
C/C++ Source or Header  |  1995-04-25  |  336b  |  17 lines

  1. #include "keyfold.h"
  2.  
  3. void KeystrokeFolder::reset()
  4.   {
  5.   for (int i=0;i<NUMKEYS;i++)
  6.     key[i].reset();
  7.   }
  8.  
  9. void KeystrokeFolder::dispatch(int ascii, int aux, int)
  10.   {
  11.     int code=(aux<<8)+ascii; 
  12.     if (aux)
  13.       key[aux+AUX_OFFSET].execute_callbacks(code);
  14.     else
  15.       key[ascii].execute_callbacks(code);
  16.   }
  17.