summaryrefslogtreecommitdiff
path: root/noncore/games/sfcave-sdl/sfcave_game.h
blob: 6dddf5e945b24bd24e54bdabb2612edbde1a2031 (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
#ifndef __SFCAVE_GAME_H
#define __SFCAVE_GAME_H

#include <SDL/SDL.h>

#include "rect.h"

#include "sfcave.h"
#include "terrain.h"
#include "player.h"
#include "game.h"

class SFCaveGame : public Game
{
public:
	SFCaveGame( SFCave *p, int w, int h, int diff );
	~SFCaveGame();

	void init();
	void update( int state );
	void draw( SDL_Surface *screen );

private:

	int blockDistance;
	int blockHeight;
	int blockWidth;
	int blockUpdateRate;

	Rect blocks[BLOCKSIZE];

	void addBlock();
	void moveBlocks( int amountToMove );
	void drawBlocks( SDL_Surface *screen );
	bool checkCollisions();

};

#endif