Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2008, 9:47:12 PM (16 years ago)
Author:
bknecht
Message:

tolua++ works now. A level will now be sent through lua, before getting loaded by tinyxml.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/script/src/orxonox/script/Script.h

    r956 r996  
    11/**
    22 @file  script.h
    3  @brief Representation of a lua script
     3 @brief Representation of an interface to lua
    44 @author Benjamin Knecht <beni_at_orxonox.net>
    55 */
     
    1515#include <string>
    1616
    17 namespace orxonox
    18 {
     17namespace orxonox // tolua_export
     18{ // tolua_export
    1919
    20   class Script
    21   {
    22     Script();
     20  class Script // tolua_export
     21  { // tolua_export
     22    public:
     23    Script(); // tolua_export
    2324    ~Script();
    2425
    25     void loadFile(std::string filename);
    26     void xmlToLua();
     26    static void loadFile(std::string filename, bool luaTags);
     27    static void init(lua_State *state_);
     28    //void xmlToLua();
     29    static void run();
     30    void luaPrint(std::string str); // tolua_export
    2731
    28     inline lua_State* getLuaState() { return state_; };
     32    inline static lua_State* getLuaState() { return luaState_; };
     33    inline static std::string* getFileString() { return &fileString_; };
     34
     35    static unsigned int getNextQuote(const std::string& text, unsigned int start);
     36    static std::string replaceLuaTags(const std::string& text);
    2937
    3038    private:
     
    3240      //std::list<std::string>& getLevelFileLines();
    3341
    34       std::list<std::string> fileLines_;
    35       lua_State* state_;
     42      static std::string fileString_;
     43      static lua_State* luaState_;
    3644
    37   };
    38 }
     45  }; // tolua_export
     46} // tolua_export
    3947#endif /* _Script_H__ */
Note: See TracChangeset for help on using the changeset viewer.