-
Notifications
You must be signed in to change notification settings - Fork 0
/
StatePlander.h
60 lines (54 loc) · 1.44 KB
/
StatePlander.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef STATEPLANDER_H
#define STATEPLANDER_H
#include "mgBaseState.h"
#include "PenjinStates.h"
#include "RocketEscape/Rocket.h"
#include "RocketEscape/LandingPad.h"
#include "RocketEscape/Collectible.h"
#include "ParticleMirror.h"
#include "Music.h"
#include "Rectangle.h"
class StatePlander : public mgBaseState
{
public:
StatePlander();
virtual ~StatePlander();
virtual void init();
#ifdef PENJIN_SDL
virtual void render(SDL_Surface* screen);
virtual void pauseScreen(SDL_Surface* screen);
#else
virtual void render();
virtual void pauseScreen();
#endif
virtual void update();
virtual void userInput();
private:
enum
{
numStars = 15,
numBackStars = 40
};
Music ambient;
Rocket rocket;
ParticleMirror floor;
// Twinkly Stars
AnimatedSprite star;
Sprite planet;
Sprite ground;
Pixel backStar;
Vector2di starPos[numStars];
Vector2di backStarPos[numBackStars];
LandingPad pad;
Collectible collect;
Rectangle fuelMeter[2];
void initStars();
#ifdef PENJIN_SDL
void renderFuelMeter(SDL_Surface* screen);
void renderStars(SDL_Surface* screen);
#else
void renderFuelMeter();
void renderStars();
#endif
};
#endif // STATEPLANDER_H