00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SDLWINDOW_HH_
00018 # define SDLWINDOW_HH_
00019
00020 # include "tools.hh"
00021
00022 # include "ResourceCenter.hh"
00023 # include "Input.hh"
00024 # include "VirtualSurface.hh"
00025
00026 namespace xml { class XMLConfig; }
00027
00062 class SDLWindow
00063 {
00064 public:
00065 SDLWindow();
00066 ~SDLWindow();
00067
00070 Input& getInput();
00072 VirtualSurface& getScreen();
00073
00076 bool isFullScreen() const;
00077
00080 void setFullScreen(bool enable);
00081
00084 int getFps() const;
00085
00087 bool isInitialized();
00088
00092 void init(xml::XMLConfig* xml);
00093
00095 void clearScreen();
00096
00100 bool processOneFrame();
00101
00102 private:
00103 xml::XMLConfig* xml_;
00104
00105 Input input_;
00106 ResourceCenter resource_;
00107 VirtualSurface screen_;
00108
00109 bool is_fullscreen_;
00110 unsigned frame_drawed_;
00111 unsigned frame_tick_fps_;
00112 unsigned frame_previous_tick_;
00113 int fps_;
00114 };
00115
00116 #endif