00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SCREEN_H
00030 #define SCREEN_H
00031
00032 #include <iostream>
00033 #include <stdio.h>
00034 #include <stdlib.h>
00035 #include <string>
00036 #include "SDL.h"
00037 #include "SDL_image.h"
00038 #include "misc.h"
00039 #include "font/coolfont.h"
00040 #include "font/Sfont.h"
00041 using std::string;
00042 using namespace std;
00043
00044
00045 class Screen : public Coolfont{
00046 friend class Coolfont;
00047 private:
00048 int height, width, depth;
00049 SFont_Font* YFont;
00050 SFont_Font* BFont;
00051 public:
00052 SDL_Surface *screen;
00053 Screen();
00054 ~Screen();
00055 int get_height ();
00056 int get_width ();
00057 int get_depth ();
00058 int configure (int width, int height, int depth);
00059 void update_screen ();
00060 void update_rect (SDL_Rect dest);
00061 SDL_Surface* get_screen ();
00062 int draw (SDL_Surface* s, SDL_Rect src, SDL_Rect dest);
00063 int blankblit (SDL_Surface *s, SDL_Rect src);
00064 int blank (SDL_Rect src);
00065 int blit (SDL_Surface* s,SDL_Rect dest);
00066 int textwidth (char *string);
00067 int textwidthsy (char *string);
00068 int textwidthsb (char *string);
00069 void write (char *string, int x, int y, int color, int scale);
00070 void writesy (char *string, int x, int y);
00071 void writesb (char *string, int x, int y);
00072 void operator= (Screen &source);
00073 };
00074
00075 #endif
00076
00077
00078