1 
2 #ifndef _XBOSS_H
3 #define _XBOSS_H
4 #include "../../object.h"
5 #include "../../stageboss.h"
6 
7 enum XBDir
8 {
9   UL,
10   UR,
11   LL,
12   LR
13 };
14 
15 class XBoss : public StageBoss
16 {
17 public:
18   void OnMapEntry();
19   void OnMapExit();
20   void Run();
21   void RunAftermove();
22 
23 private:
24   void run_tread(int index);
25   void run_body(int index);
26   void run_door(int index);
27   void run_target(int index);
28   void run_fishy_spawner(int index);
29   void run_internals();
30 
31   bool AllTargetsDestroyed();
32   void Init();
33   Object *CreateTread(int x, int y, int sprite);
34   Object *CreatePiece(int x, int y, int type);
35 
36   void SetStates(Object *objects[], int nobjects, int state);
37   void SetDirs(Object *objects[], int nobjects, int dir);
38 
39   void DeleteMonster();
40 
41   Object *mainobject;
42   Object *body[4];
43   Object *treads[4];
44   Object *internals;
45   Object *doors[2];
46   Object *targets[4];
47   Object *fishspawners[4];
48 
49   Object *piecelist[24];
50   int npieces;
51 
52   struct
53   {
54     bool initilized;
55   } X;
56 };
57 
58 void ondeath_x_mainobject(Object *internals);
59 void ondeath_x_target(Object *o);
60 void ai_x_fishy_missile(Object *o);
61 void ai_x_defeated(Object *o);
62 
63 #endif
64