home *** CD-ROM | disk | FTP | other *** search
- // -------- shootout.h
-
- #ifndef SHOOTOUT_H
- #define SHOOTOUT_H
-
- // ---- entrance locations
- enum Location {
- nowhere,
- window1,
- window2,
- window3,
- window4,
- window5,
- housedoor,
- alley2,
- jaildoor,
- alley3,
- saloondoor,
- window6,
- window7,
- window8
- };
-
- #include <typeinfo.h>
- #include <theatrix.h>
- #include "sheriff.h"
- #include "doors.h"
- #include "digit.h"
- #include "menu.h"
-
- inline int on_the_street(Location loc)
- {
- return loc > window5 && loc < window6;
- }
-
- enum Building { nobldg, house, jail, saloon };
-
- // ---- defines entrances for bit players
- struct Portal {
- Building building;
- short int x1, y1, x2, y2;
- short int occupied;
- };
-
- #include "bitpart.h"
- #include "badguy.h"
-
- const int maxactors = 6;
- const int maxbldgs = 3;
- const int sidewalk = 150;
- const int fade = 2;
-
- class Shootout : public SceneDirector {
- Door *door1;
- Door *door2;
- Door *door3;
- short int screenshattered;
- short int certificate;
- Player *finalscreen;
- MusicHand *conductor;
- int rticks;
- int rinterval;
- void on_timer();
- void enteractor(BitPart *, Location);
- void distribute_players();
- BitPart *select_actor();
- Location select_location(BitPart *);
- int entrance_available(Location loc);
- static Portal portals[];
- static Location *entrances[];
- static int entrcounts[];
- BitPart *actors[maxactors];
- short int actorctr;
- short int badguysintown;
- void display();
- void hide();
- const Type_info& get_next_director()
- { return typeid(Menu); }
- public:
- Shootout();
- ~Shootout();
- void exitstage(BitPart *bp);
- Sheriff *sheriff;
- Digit *bullets;
- Digit *citizens;
- Digit *badguys;
- short int findactors(BitPart *actrs[], short int zone);
- short int findactors(BitPart *actrs[], short int zone1, short int zone2);
- short int isbadguy_shooting(BitPart*);
- short int parsonisdead()
- { return actors[2]->isdead(); }
- void shatterscreen()
- { screenshattered = 1; }
- void deathcertificate(short int certno)
- { certificate = certno; }
- };
-
- const int stepct = 20;
- const int maxticks = 45;
-
- #endif
-
-