LuaSFMLSystem.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 **
00004 ** Copyright (C) 2009-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 LUASFMLSYSTEM_HH_
00018 # define LUASFMLSYSTEM_HH_
00019 
00020 # include <SFML/System/Clock.hpp>
00021 # include <SFML/System/Randomizer.hpp>
00022 # include "Lua.hh"
00023 
00024 namespace luasf {
00025 
00026 class Clock
00027 {
00028 public:
00029   Clock(lua_State* l) {}
00030   int GetElapsedTime(lua_State* l);
00031   int Reset(lua_State* l);
00032   
00033   // required by Luna
00034   static const char className[];
00035   static Luna<Clock>::RegType methods[];
00036 
00037 private:
00038   sf::Clock clock_;
00039 };
00040 
00041 class Randomizer
00042 {
00043 public:
00044   Randomizer(lua_State* l) {}
00045   int Seed(lua_State* l);
00046   int Random(lua_State* l);
00047   
00048   // required by Luna
00049   static const char className[];
00050   static Luna<Randomizer>::RegType methods[];
00051 
00052 private:
00053   sf::Randomizer rand_;
00054 };
00055 
00056 
00057 }
00058 
00059 #endif // LUASFMLSYSTEM_HH_
Generated on Mon Apr 5 21:17:12 2010 for Stechec/TBT by  doxygen 1.6.3