home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / demos / mfighter / build / rfighter.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  1.2 KB  |  62 lines

  1. #include <fastgraf.h>
  2. #include "rfighter.h"
  3. #include "game.h"
  4. #include "match.h"
  5.  
  6.  
  7. void RemoteFighter::configure(int s)
  8.   {
  9.   request_netpack_cue(PUNCHKEY,(callback)&RemoteFighter::on_punch);
  10.   request_netpack_cue(KICKKEY,(callback)&RemoteFighter::on_kick);
  11.   request_netpack_cue(LEFTKEY,(callback)&RemoteFighter::on_left);
  12.   request_netpack_cue(RIGHTKEY,(callback)&RemoteFighter::on_right);
  13.   request_netpack_cue(BLOCKKEY,(callback)&RemoteFighter::on_block);
  14.  
  15.   request_netpack_cue(GOT_PUNCHED,(callback)&RemoteFighter::on_gotpunched);
  16.   request_netpack_cue(GOT_KICKED,(callback)&RemoteFighter::on_gotkicked);
  17.   request_netpack_cue(ATTACK_BLOCKED,(callback)&RemoteFighter::on_gotblocked);
  18.  
  19.   set_side(s);
  20.   Fighter::initialize();
  21.   }
  22.  
  23. void RemoteFighter::on_punch(int)
  24.   {
  25.   punch();
  26.   }
  27.  
  28. void RemoteFighter::on_kick(int)
  29.   {
  30.   kick();
  31.   }
  32.  
  33. void RemoteFighter::on_left(int)
  34.   {
  35.   left();
  36.   }
  37.  
  38. void RemoteFighter::on_right(int)
  39.   {
  40.   right();
  41.   }
  42.  
  43. void RemoteFighter::on_block(int)
  44.   {
  45.   block();
  46.   }
  47.  
  48. void RemoteFighter::on_gotpunched(int)
  49.   {
  50.   got_punched();
  51.   }
  52.  
  53. void RemoteFighter::on_gotkicked(int)
  54.   {
  55.   got_kicked();
  56.   }
  57.  
  58. void RemoteFighter::on_gotblocked(int)
  59.   {
  60.   got_blocked();
  61.   }
  62.