SDLWindow.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 **
00004 ** Copyright (C) 2006-2010 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 
00060 class SDLWindow
00061 {
00062 public:
00063   SDLWindow();
00064   ~SDLWindow();
00065 
00068   Input&                getInput();
00070   VirtualSurface&       getScreen();
00071 
00074   bool isFullScreen() const;
00075 
00078   void setFullScreen(bool enable);
00079 
00082   int getFps() const;
00083 
00085   bool isInitialized();
00086 
00090   void init(void *conf);
00091 
00093   void clearScreen();
00094 
00099   bool processOneFrame(bool events_only = false);
00100 
00101 private:
00102   Input                 input_;
00103   ResourceCenter        resource_;
00104   VirtualSurface        screen_;
00105 
00106   bool                  is_fullscreen_;
00107   unsigned              frame_drawed_;
00108   unsigned              frame_tick_fps_;
00109   unsigned              frame_previous_tick_;
00110   int                   fps_;
00111 };
00112 
00113 #endif /* !SDLWINDOW_HH_ */
Generated on Mon Apr 5 21:17:13 2010 for Stechec/TBT by  doxygen 1.6.3