| 1 | |
| 2 | /** |
| 3 | * |
| 4 | * @file jj1guardians.h |
| 5 | * |
| 6 | * Part of the OpenJazz project |
| 7 | * |
| 8 | * @par History: |
| 9 | * - 23rd August 2005: Created OpenJazz.h |
| 10 | * - 31st January 2006: Created level.h from parts of OpenJazz.h |
| 11 | * - 4th February 2009: Created events.h from parts of level.h |
| 12 | * - 19th July 2009: Renamed events.h to event.h |
| 13 | * - 2nd March 2010: Created guardians.h from parts of event.h |
| 14 | * - 1st August 2012: Renamed guardians.h to jj1guardians.h |
| 15 | * |
| 16 | * @par Licence: |
| 17 | * Copyright (c) 2005-2012 AJ Thomson |
| 18 | * |
| 19 | * OpenJazz is distributed under the terms of |
| 20 | * the GNU General Public License, version 2.0 |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | |
| 25 | #ifndef _GUARDIANS_H |
| 26 | #define _GUARDIANS_H |
| 27 | |
| 28 | |
| 29 | #include "jj1event.h" |
| 30 | |
| 31 | |
| 32 | // Class |
| 33 | |
| 34 | /// Guardian event base class |
| 35 | class Guardian : public JJ1Event { |
| 36 | |
| 37 | protected: |
| 38 | int stage; |
| 39 | |
| 40 | Guardian (unsigned char gX, unsigned char gY); |
| 41 | |
| 42 | }; |
| 43 | |
| 44 | /// Episode B guardian |
| 45 | class DeckGuardian : public Guardian { |
| 46 | |
| 47 | public: |
| 48 | DeckGuardian (unsigned char gX, unsigned char gY); |
| 49 | |
| 50 | bool overlap (fixed left, fixed top, fixed width, fixed height); |
| 51 | JJ1Event* step (unsigned int ticks) override; |
| 52 | void draw (unsigned int ticks, int change) override; |
| 53 | |
| 54 | }; |
| 55 | |
| 56 | /// Episode 1 guardian |
| 57 | class MedGuardian : public Guardian { |
| 58 | |
| 59 | private: |
| 60 | unsigned char direction; |
| 61 | bool shoot; |
| 62 | |
| 63 | public: |
| 64 | MedGuardian (unsigned char gX, unsigned char gY); |
| 65 | |
| 66 | //bool overlap (fixed left, fixed top, fixed width, fixed height); |
| 67 | JJ1Event* step (unsigned int ticks) override; |
| 68 | void draw (unsigned int ticks, int change) override; |
| 69 | |
| 70 | }; |
| 71 | |
| 72 | |
| 73 | #endif |
| 74 |