author | andyq <andyq> | 2003-01-20 23:11:56 (UTC) |
---|---|---|
committer | andyq <andyq> | 2003-01-20 23:11:56 (UTC) |
commit | 92419b025aa5d82bb7592281af5505ff931c2e58 (patch) (unidiff) | |
tree | 374ee9ca86ef716ce388c8a28e38261f6a04ce7a /noncore/games/sfcave-sdl/terrain.h | |
parent | 02090d2e63ad8398c0a8a9f1fb895a9c6e42514b (diff) | |
download | opie-92419b025aa5d82bb7592281af5505ff931c2e58.zip opie-92419b025aa5d82bb7592281af5505ff931c2e58.tar.gz opie-92419b025aa5d82bb7592281af5505ff931c2e58.tar.bz2 |
Initial Revision
Diffstat (limited to 'noncore/games/sfcave-sdl/terrain.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/terrain.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/noncore/games/sfcave-sdl/terrain.h b/noncore/games/sfcave-sdl/terrain.h new file mode 100644 index 0000000..4070318 --- a/dev/null +++ b/noncore/games/sfcave-sdl/terrain.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef __TERRAIN_H | ||
2 | #define __TERRAIN_H | ||
3 | |||
4 | #include <SDL.h> | ||
5 | |||
6 | class StarField; | ||
7 | class Terrain | ||
8 | { | ||
9 | public: | ||
10 | Terrain( int w, int h, bool drawTop = true, bool drawBottom = true ); | ||
11 | virtual ~Terrain(); | ||
12 | |||
13 | virtual void initTerrain(); | ||
14 | virtual void moveTerrain( int amountToMove ); | ||
15 | virtual bool checkCollision( int x, int y, int h ); | ||
16 | virtual void drawTerrain( SDL_Surface *screen ); | ||
17 | |||
18 | int getMapTop( int pos ) { return mapTop[pos]; } | ||
19 | int getMapBottom( int pos ) { return mapBottom[pos]; } | ||
20 | int getMaxHeight() { return maxHeight; } | ||
21 | void increaseMaxHeight( int amount ); | ||
22 | |||
23 | int offset; | ||
24 | protected: | ||
25 | |||
26 | int sWidth; | ||
27 | int sHeight; | ||
28 | |||
29 | int drawTop; | ||
30 | int drawBottom; | ||
31 | |||
32 | int mapTop[MAPSIZE]; | ||
33 | int mapBottom[MAPSIZE]; | ||
34 | int maxTop; | ||
35 | int maxBottom; | ||
36 | |||
37 | int maxHeight; | ||
38 | int dir; | ||
39 | int speed; | ||
40 | int segSize; | ||
41 | |||
42 | SDL_Surface *terrainSurface; | ||
43 | StarField *stars; | ||
44 | |||
45 | void setPoint( int point ); | ||
46 | }; | ||
47 | |||
48 | |||
49 | #endif | ||
50 | |||