NXEngine v1.0.0.6
[NXEngine.git] / stageboss.h
blob365a0193c10929f55526124a1fc9166c574d4c60
2 #ifndef _STAGEBOSS_H
3 #define _STAGEBOSS_H
5 // Stage Bosses are "big" boss enemies used in some stages.
6 //
7 // The stage boss class runs at a conceptual level "above"
8 // normal AI routines, more like at the level of the game loop.
9 //
10 // This gives these complex bosses a good way to control more
11 // things than just a single object (some bosses for example have
12 // multiple parts which need to be coordinated, such as Omega).
14 // A pointer to the "main" object of a stage boss is stored by
15 // the derived class at game.stageboss.object.
17 // The script command <BSL0000 refers to opening a boss bar
18 // against game.stageboss.object.
20 enum BossType
22 BOSS_NONE = 0x00,
24 BOSS_OMEGA,
25 BOSS_BALFROG,
26 BOSS_MONSTER_X,
27 BOSS_CORE,
28 BOSS_IRONH,
29 BOSS_SISTERS,
30 BOSS_UNDEAD_CORE,
31 BOSS_HEAVY_PRESS,
32 BOSS_BALLOS
36 class StageBoss
38 public:
39 virtual void OnMapEntry() { }
40 virtual void OnMapExit() { }
42 // called every tick (for logic only, please don't draw from here)
43 virtual void Run() { }
44 virtual void RunAftermove() { }
46 virtual void SetState(int newstate);
50 class StageBossManager
52 public:
53 StageBossManager();
55 bool SetType(int newtype);
56 int Type();
58 // safe interface to the current StageBoss instance
59 // (they safely do nothing if called in a stage without a stage boss)
60 void OnMapEntry();
61 void OnMapExit();
62 void Run();
63 void RunAftermove();
65 void SetState(int newstate);
67 // pointer to the "main object" of a stage boss
68 // (the one to show the boss bar for)
69 // this is set by the derived class, and is cleared in OnMapExit
70 // of the derived class and on a SetType().
71 Object *object;
73 private:
74 StageBoss *fBoss;
75 int fBossType;
81 #endif