Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

terrain.h

Go to the documentation of this file.
00001 #ifndef __TERRAIN_H
00002 #define __TERRAIN_H
00003 
00004 #include <SDL/SDL.h>
00005 
00006 class StarField;
00007 class Terrain
00008 {
00009 public:
00010         Terrain( int w, int h, bool drawTop = true, bool drawBottom = true );
00011         virtual ~Terrain();
00012 
00013         virtual void initTerrain();
00014         virtual void moveTerrain( int amountToMove );
00015         virtual bool checkCollision( int x, int y, int h );
00016         virtual void drawTerrain( SDL_Surface *screen );
00017 
00018         int getMapTop( int pos ) { return mapTop[pos]; }
00019         int getMapBottom( int pos ) { return mapBottom[pos]; }
00020         int getMaxHeight() { return maxHeight; }
00021         void increaseMaxHeight( int amount );
00022 
00023         int offset;
00024 protected:
00025 
00026         int sWidth;
00027         int sHeight;
00028 
00029         int drawTop;
00030         int drawBottom;
00031 
00032         int mapTop[MAPSIZE];
00033         int mapBottom[MAPSIZE];
00034         int maxTop;
00035         int maxBottom;
00036 
00037         int maxHeight;
00038         int dir;
00039         int speed;
00040         int segSize;
00041 
00042         SDL_Surface *terrainSurface;
00043         StarField *stars;
00044 
00045         void setPoint( int point );
00046 };
00047 
00048 
00049 #endif
00050 

Generated on Sat Nov 5 16:17:25 2005 for OPIE by  doxygen 1.4.2