home *** CD-ROM | disk | FTP | other *** search
- #include <fastgraf.h>
- #include "hfighter.h"
- #include "game.h"
- #include "match.h"
-
-
- void HumanFighter::configure(int s)
- {
- request_hotkey_cue(PUNCHKEY,(callback)&HumanFighter::on_punch);
- request_hotkey_cue(KICKKEY,(callback)&HumanFighter::on_kick);
- request_hotkey_cue(LEFTKEY,(callback)&HumanFighter::on_left);
- request_hotkey_cue(RIGHTKEY,(callback)&HumanFighter::on_right);
- request_hotkey_cue(BLOCKKEY,(callback)&HumanFighter::on_block);
-
- set_side(s);
- Fighter::initialize();
- }
-
- void HumanFighter::on_punch(int)
- {
- if (punch() && usepacks)
- post_netpack(PUNCHKEY);
- }
-
- void HumanFighter::on_kick(int)
- {
- if (kick() && usepacks)
- post_netpack(KICKKEY);
- }
-
- void HumanFighter::on_left(int)
- {
- if (left() && usepacks)
- post_netpack(LEFTKEY);
- }
-
- void HumanFighter::on_right(int)
- {
- if (right() && usepacks)
- post_netpack(RIGHTKEY);
- }
-
- void HumanFighter::on_block(int)
- {
- if (block() && usepacks)
- post_netpack(BLOCKKEY);
- }
-