| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
#ifndef _JJ2EVENT_H |
| 24 |
#define _JJ2EVENT_H |
| 25 |
|
| 26 |
|
| 27 |
#include "level/movable.h" |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
class Anim; |
| 33 |
|
| 34 |
|
| 35 |
class JJ2Event : public Movable { |
| 36 |
|
| 37 |
private: |
| 38 |
JJ2Event* next; |
| 39 |
|
| 40 |
protected: |
| 41 |
unsigned char type; |
| 42 |
int properties; |
| 43 |
unsigned int endTime; |
| 44 |
bool flipped; |
| 45 |
|
| 46 |
JJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, int newProperties); |
| 47 |
|
| 48 |
void destroy (unsigned int ticks); |
| 49 |
bool prepareStep (unsigned int ticks, int msps); |
| 50 |
bool prepareDraw (unsigned int ticks, int change); |
| 51 |
JJ2Event* remove (); |
| 52 |
|
| 53 |
public: |
| 54 |
virtual ~JJ2Event (); |
| 55 |
|
| 56 |
unsigned char getType (); |
| 57 |
|
| 58 |
virtual JJ2Event* step (unsigned int ticks, int msps) = 0; |
| 59 |
virtual void draw (unsigned int ticks, int change) = 0; |
| 60 |
|
| 61 |
}; |
| 62 |
|
| 63 |
|
| 64 |
class PickupJJ2Event : public JJ2Event { |
| 65 |
|
| 66 |
private: |
| 67 |
bool floating; |
| 68 |
|
| 69 |
protected: |
| 70 |
unsigned char animSet; |
| 71 |
|
| 72 |
PickupJJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, bool TSF, int newProperties); |
| 73 |
virtual ~PickupJJ2Event (); |
| 74 |
|
| 75 |
JJ2Event* step (unsigned int ticks, int msps); |
| 76 |
|
| 77 |
}; |
| 78 |
|
| 79 |
|
| 80 |
class AmmoJJ2Event : public PickupJJ2Event { |
| 81 |
|
| 82 |
public: |
| 83 |
AmmoJJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, bool TSF); |
| 84 |
~AmmoJJ2Event (); |
| 85 |
|
| 86 |
void draw (unsigned int ticks, int change); |
| 87 |
|
| 88 |
}; |
| 89 |
|
| 90 |
|
| 91 |
class CoinGemJJ2Event : public PickupJJ2Event { |
| 92 |
|
| 93 |
private: |
| 94 |
void mapPalette (Anim* anim, int start); |
| 95 |
|
| 96 |
public: |
| 97 |
CoinGemJJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, bool TSF); |
| 98 |
~CoinGemJJ2Event (); |
| 99 |
|
| 100 |
void draw (unsigned int ticks, int change); |
| 101 |
|
| 102 |
}; |
| 103 |
|
| 104 |
|
| 105 |
class FoodJJ2Event : public PickupJJ2Event { |
| 106 |
|
| 107 |
public: |
| 108 |
FoodJJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, bool TSF); |
| 109 |
~FoodJJ2Event (); |
| 110 |
|
| 111 |
void draw (unsigned int ticks, int change); |
| 112 |
|
| 113 |
}; |
| 114 |
|
| 115 |
|
| 116 |
class SpringJJ2Event : public JJ2Event { |
| 117 |
|
| 118 |
private: |
| 119 |
unsigned char animSet; |
| 120 |
|
| 121 |
public: |
| 122 |
SpringJJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, bool TSF, int newProperties); |
| 123 |
~SpringJJ2Event (); |
| 124 |
|
| 125 |
JJ2Event* step (unsigned int ticks, int msps); |
| 126 |
void draw (unsigned int ticks, int change); |
| 127 |
|
| 128 |
}; |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
class OtherJJ2Event : public JJ2Event { |
| 133 |
|
| 134 |
private: |
| 135 |
unsigned char animSet; |
| 136 |
|
| 137 |
public: |
| 138 |
OtherJJ2Event (JJ2Event* newNext, int gridX, int gridY, unsigned char newType, bool TSF, int newProperties); |
| 139 |
~OtherJJ2Event (); |
| 140 |
|
| 141 |
JJ2Event* step (unsigned int ticks, int msps); |
| 142 |
void draw (unsigned int ticks, int change); |
| 143 |
|
| 144 |
}; |
| 145 |
|
| 146 |
#endif |
| 147 |
|