00001 #ifndef SCREEN_H 00002 #define SCREEN_H 00003 00004 #include "SDL.h" 00005 #include "glfuncs.h" 00006 00007 #include <string> 00008 00009 class Object; 00010 00011 class Screen 00012 { 00013 public: 00014 static Screen* instance(); 00015 void drawLevel(int texture, GLfloat texCoords[4], SDL_Rect quad); 00016 void drawScreen(int texture, GLfloat texCoords[4], SDL_Rect quad); 00017 00018 void drawCutScene(std::string cutSceneText); 00019 void drawText(std::string text, int x, int y); 00020 00021 void move(int x, int y); 00022 00023 void update(); 00024 00025 static int height() {return HEIGHT;} 00026 static int width() {return WIDTH;} 00027 00028 void registerFollowObj(Object * o); 00029 Object* getFollowObj(){ return _followMe; }; 00030 00031 SDL_Rect getScreenRect() {return _screen;} 00032 00033 static const int FRAMERATE = 60; 00034 00035 private: 00036 static Screen* _instance; 00037 SDL_Rect _screen; 00038 SDL_Rect _center; 00039 Screen(); 00040 00041 Object * _followMe; 00042 00043 // fraction of the screen for the black bars 00044 static const int CSFRAC = 5; 00045 00046 static const int HEIGHT ;//=800; 00047 static const int WIDTH ;//= 300; 00048 }; 00049 00050 #endif
1.4.6-NO