blob: b44336ae858ba42f0b3bf77f14ee397b2db58c0b (
plain)
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
|
#ifndef __GATES_GAME_H
#define __GATES_GAME_H
#include <SDL/SDL.h>
#include "rect.h"
#include "sfcave.h"
#include "terrain.h"
#include "player.h"
#include "game.h"
class GatesGame : public Game
{
public:
GatesGame( SFCave *p, int w, int h, int diff );
~GatesGame();
void init();
void update( int state );
void draw( SDL_Surface *screen );
private:
int gapHeight;
int gateDistance;
int nextGate;
int lastGateBottomY;
int blockDistance;
int blockHeight;
int blockWidth;
int blockUpdateRate;
Rect blocks[BLOCKSIZE];
void addGate();
void moveBlocks( int amountToMove );
void drawBlocks( SDL_Surface *screen );
bool checkCollisions();
};
#endif
|