home *** CD-ROM | disk | FTP | other *** search
- #include <fastgraf.h>
- #include "rfighter.h"
- #include "game.h"
- #include "match.h"
-
-
- void RemoteFighter::configure(int s)
- {
- request_netpack_cue(PUNCHKEY,(callback)&RemoteFighter::on_punch);
- request_netpack_cue(KICKKEY,(callback)&RemoteFighter::on_kick);
- request_netpack_cue(LEFTKEY,(callback)&RemoteFighter::on_left);
- request_netpack_cue(RIGHTKEY,(callback)&RemoteFighter::on_right);
- request_netpack_cue(BLOCKKEY,(callback)&RemoteFighter::on_block);
-
- request_netpack_cue(GOT_PUNCHED,(callback)&RemoteFighter::on_gotpunched);
- request_netpack_cue(GOT_KICKED,(callback)&RemoteFighter::on_gotkicked);
- request_netpack_cue(ATTACK_BLOCKED,(callback)&RemoteFighter::on_gotblocked);
-
- set_side(s);
- Fighter::initialize();
- }
-
- void RemoteFighter::on_punch(int)
- {
- punch();
- }
-
- void RemoteFighter::on_kick(int)
- {
- kick();
- }
-
- void RemoteFighter::on_left(int)
- {
- left();
- }
-
- void RemoteFighter::on_right(int)
- {
- right();
- }
-
- void RemoteFighter::on_block(int)
- {
- block();
- }
-
- void RemoteFighter::on_gotpunched(int)
- {
- got_punched();
- }
-
- void RemoteFighter::on_gotkicked(int)
- {
- got_kicked();
- }
-
- void RemoteFighter::on_gotblocked(int)
- {
- got_blocked();
- }
-