home *** CD-ROM | disk | FTP | other *** search
- // ------- sheriff.h
-
- #ifndef SHERIFF_H
- #define SHERIFF_H
-
- #include "shootout.h"
-
- class BitPart;
-
- class Sheriff : public Player {
- short int frame;
- short int incr;
- short int of;
- short int offset;
- short int steps;
- short int forward;
- short int bullets;
- static short int walkincr[];
- static short int shoot[4][5];
- enum Mode {
- front, // don't change the order or
- rear, // values of front through left
- right,
- left,
- walk,
- reload,
- dying,
- falling,
- dead,
- resurrecting,
- resurrected
- };
- Mode mode;
- short int resurrections;
- short int shootseq;
- short int deadx;
- void Shoot(Mode md);
- BitPart *findtarget();
- void targetzone(short int& zone1, short int& zone2);
- void fire();
- void Walk();
- void OnShoot(int);
- void OnChangeDirection(int);
- void OnReload(int);
- void Reload();
- void OnResurrection(int=0);
- protected:
- DECLARE_CUELIST
- public:
- Sheriff();
- virtual ~Sheriff() { }
- void initialize_sheriff();
- void update_position();
- short int zone();
- void getshot();
- int isdead()
- { return mode == dead || mode == dying || mode == falling; }
- };
-
- #endif
-
-