00001 #ifndef __SFCAVE_GAME_H 00002 #define __SFCAVE_GAME_H 00003 00004 #include <SDL/SDL.h> 00005 00006 #include "rect.h" 00007 00008 #include "sfcave.h" 00009 #include "terrain.h" 00010 #include "player.h" 00011 #include "game.h" 00012 00013 class SFCaveGame : public Game 00014 { 00015 public: 00016 SFCaveGame( SFCave *p, int w, int h, int diff ); 00017 ~SFCaveGame(); 00018 00019 void init(); 00020 void update( int state ); 00021 void draw( SDL_Surface *screen ); 00022 00023 private: 00024 00025 int blockDistance; 00026 int blockHeight; 00027 int blockWidth; 00028 int blockUpdateRate; 00029 00030 Rect blocks[BLOCKSIZE]; 00031 00032 void addBlock(); 00033 void moveBlocks( int amountToMove ); 00034 void drawBlocks( SDL_Surface *screen ); 00035 bool checkCollisions(); 00036 00037 }; 00038 00039 #endif
1.4.2