#ifndef SCREEN_H
#define SCREEN_H

#include "SDL.h"
#include "glfuncs.h"

#include <string>

class Object;

class Screen
{
public:
	static Screen* instance();
	void drawLevel(int texture, GLfloat texCoords[4], SDL_Rect quad);
	void drawScreen(int texture, GLfloat texCoords[4], SDL_Rect quad);

	void drawText(std::string text, int x, int y);
	
	static void drawScramble();
	static void drawPause();
	static void drawLoading();

	void drawCutScene(std::string cutSceneText);

	void move(int x, int y);

	void update();

	void registerFollowObj(Object * o);
	Object* getFollowObj(){ return _followMe; };

	SDL_Rect getScreenRect() {return _screen;}

	void recenter();

	static int height() {return HEIGHT;}
	static int width() {return WIDTH;}

	static const int FRAMERATE = 60;

private:
	static Screen* _instance;
	SDL_Rect _screen;
	SDL_Rect _center;
	Screen();

	int _scram;
	GLfloat _scramCoords[4];

	int _pause;
	GLfloat _pauseCoords[4];

	int _loading;
	GLfloat _loadingCoords[4];

	Object * _followMe;

	// fraction of the screen for the black bars
	static const int CSFRAC = 5;

	static int HEIGHT ;//= 760;
	static int WIDTH ;//= 1024;
};

#endif