// $Id: getreadydisplay.h,v 1.7 2006/08/26 19:40:49 matthew Exp $ // Fish Supper // Copyright (C) 2006 Matthew Clarke // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. #ifndef _GETREADYDISPLAY_H_ #define _GETREADYDISPLAY_H_ #include "SDL.h" #include "Font.hpp" // C++ wrapper for SFont #include "enums.h" namespace FS { class GetReadyDisplay { private: static const int SECONDS_TO_WAIT = 10; SDL_Surface * screen; // from GameManager SDL_Surface * background; enum { LOWER_LIMIT, MIDDLE, UPPER_LIMIT }; SDL_Surface * arrows[3]; SDL_Rect dest_rect; SDL_Rect erase_rect; // Store reference to SFont got via FontRepository. const SFont & my_font; int start_time; int current_start_level; public: GetReadyDisplay(SDL_Surface * s); ~GetReadyDisplay(); void start_draw(int gt, int lev); // Returns true if ready to start game, otherwise false. bool redraw(int gt, KeyboardEvent * events, int n); void start_draw_level_select(int furthest_lev); // Returns chosen level if selected, else 0. int redraw_level_select(KeyboardEvent * events, int n, int furthest_lev); }; // class GetReadyDisplay } // namespace FS #endif