VisuApp.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 **
00004 ** Copyright (C) 2008-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 VISUAPP_HH_
00018 # define VISUAPP_HH_
00019 
00020 # include "tools.hh"
00021 # include "InputTextSurface.hh"
00022 # include "SDLWindow.hh"
00023 # include "Sprite.hh"
00024 # include "Surface.hh"
00025 # include "TextSurface.hh"
00026 # include "VirtualSurface.hh"
00027 # include "Lua.hh"
00028 # include "app/App.hh"
00029 
00030 BEGIN_NS(sdlvisu);
00031 
00032 class Game;
00033 
00038 class VisuApp
00039 {
00040 public:
00041   VisuApp(lua_State *l);
00042   ~VisuApp();
00043 
00045   int init(lua_State* l);
00046 
00048   int run(lua_State* l);
00049 
00050   // Luna data
00051   static const char className[];
00052   static Luna<VisuApp>::RegType methods[];
00053   
00054 private:
00055   void loadResources();
00056   void unloadResources();
00057 
00058   int menuStep();
00059 
00061   int scanTeamDir();
00062 
00065   int loadTeamInfo();
00066 
00067   void displayTeamInfo();
00068   
00069   App* app_;
00070   SDLWindow win_;
00071   VirtualSurface* screen_;
00072   Surface bg_;
00073   Surface bg_hi_;
00074   Game* g_;
00075 
00076   TextSurface create_;
00077   TextSurface create_port_;
00078   TextSurface create_port_form_;
00079 
00080   TextSurface join_;
00081   TextSurface join_host_;
00082   TextSurface join_port_;
00083   InputTextSurface join_host_form_;
00084   InputTextSurface join_port_form_;
00085 
00086   TextSurface team_title_surf_;
00087   Surface team_emblem_surf_;
00088   Surface team_back_surf_;
00089   Surface team_forth_surf_;
00090   TextSurface team_name_surf_;
00091   TextSurface coached_by_surf_;
00092   TextSurface coach_name_surf_;
00093 
00094   std::string coach_name_;
00095   std::string team_name_;
00096   std::string team_emblem_path_;;
00097 
00098   std::vector<std::string> team_file_names_;
00099   std::vector<std::string>::const_iterator tfn_iter_;
00100 
00101   bool emblem_has_focus_;
00102 };
00103 
00104 END_NS(sdlvisu);
00105 
00106 #endif /* !VISUAPP_HH_ */
Generated on Mon Apr 5 21:17:14 2010 for Stechec/TBT by  doxygen 1.6.3