SDLWindow.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 **
00004 ** Copyright (C) 2006 The TBT Team.
00005 **
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 **
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 **
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
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 /* !SDLWINDOW_HH_ */

Generated on Sat Jun 23 16:07:24 2007 for Stechec/TBT by  doxygen 1.4.7