Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 20, 2008, 5:54:18 PM (16 years ago)
Author:
adrfried
Message:

ceguilua reverted to 0.6.1

Location:
code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CEGUILua.cpp

    r1810 r1982  
    2828 *   OTHER DEALINGS IN THE SOFTWARE.
    2929 ***************************************************************************/
     30#ifdef HAVE_CONFIG_H
     31#   include "config.h"
     32#endif
    3033
    3134#include "CEGUI.h"
     
    3740
    3841// include Lua libs and tolua++
    39 #include "lua/lua.hpp"
    40 #include "tolua/tolua++.h"
     42extern "C" {
     43#include "lua.h"
     44#include "lualib.h"
     45#include "lauxlib.h"
     46}
     47
     48#include "tolua++.h"
    4149
    4250// prototype for bindings initialisation function
     
    5361LuaScriptModule::LuaScriptModule()
    5462{
    55     static const luaL_Reg lualibs[] = {
    56         {"", luaopen_base},
    57         {LUA_LOADLIBNAME, luaopen_package},
    58         {LUA_TABLIBNAME, luaopen_table},
    59         {LUA_IOLIBNAME, luaopen_io},
    60         {LUA_OSLIBNAME, luaopen_os},
    61         {LUA_STRLIBNAME, luaopen_string},
    62         {LUA_MATHLIBNAME, luaopen_math},
    63     #if defined(DEBUG) || defined (_DEBUG)
    64         {LUA_DBLIBNAME, luaopen_debug},
    65     #endif
    66         {0, 0}
    67     };
     63    #if CEGUI_LUA_VER >= 51
     64        static const luaL_Reg lualibs[] = {
     65            {"", luaopen_base},
     66            {LUA_LOADLIBNAME, luaopen_package},
     67            {LUA_TABLIBNAME, luaopen_table},
     68            {LUA_IOLIBNAME, luaopen_io},
     69            {LUA_OSLIBNAME, luaopen_os},
     70            {LUA_STRLIBNAME, luaopen_string},
     71            {LUA_MATHLIBNAME, luaopen_math},
     72        #if defined(DEBUG) || defined (_DEBUG)
     73                {LUA_DBLIBNAME, luaopen_debug},
     74        #endif
     75            {0, 0}
     76        };
     77    #endif /* CEGUI_LUA_VER >= 51 */
    6878
    6979    // create a lua state
     
    7282
    7383    // init all standard libraries
    74     const luaL_Reg *lib = lualibs;
    75     for (; lib->func; lib++)
    76     {
    77         lua_pushcfunction(d_state, lib->func);
    78         lua_pushstring(d_state, lib->name);
    79         lua_call(d_state, 1, 0);
    80     }
     84    #if CEGUI_LUA_VER >= 51
     85            const luaL_Reg *lib = lualibs;
     86            for (; lib->func; lib++)
     87            {
     88                lua_pushcfunction(d_state, lib->func);
     89                lua_pushstring(d_state, lib->name);
     90                lua_call(d_state, 1, 0);
     91            }
     92    #else /* CEGUI_LUA_VER >= 51 */
     93        luaopen_base(d_state);
     94        luaopen_io(d_state);
     95        luaopen_string(d_state);
     96        luaopen_table(d_state);
     97        luaopen_math(d_state);
     98        #if defined(DEBUG) || defined (_DEBUG)
     99            luaopen_debug(d_state);
     100        #endif
     101    #endif /* CEGUI_LUA_VER >= 51 */
    81102
    82103    setModuleIdentifierString();
  • code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CEGUILua.h

    r1848 r1982  
    3131#define _CEGUILua_h_
    3232
    33 /*** CHANGES BY ORXONOX TEAM FOR MINGW32 ***/
     33
    3434/*************************************************************************
    3535        Import / Export control macros
     
    3939#       define CEGUILUA_API __declspec(dllexport)
    4040#   else
    41 #      if defined( __MINGW32__ )
    42 #          define CEGUILUA_API
    43 #      else
    44 #          define CEGUILUA_API __declspec(dllimport)
    45 #      endif
     41#       define CEGUILUA_API __declspec(dllimport)
    4642#   endif
    4743#else
  • code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CEGUILuaFunctor.cpp

    r1810 r1982  
    3434
    3535// include Lua libs and tolua++
    36 #include "lua/lua.hpp"
    37 #include "tolua/tolua++.h"
     36extern "C" {
     37#include "lua.h"
     38#include "lualib.h"
     39#include "lauxlib.h"
     40}
     41
     42#include "tolua++.h"
    3843
    3944// Start of CEGUI namespace section
  • code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/lua_CEGUI.cpp

    r1810 r1982  
    99#include "string.h"
    1010
    11 #include "tolua/tolua++.h"
     11#include "tolua++.h"
    1212
    1313/* Exported function */
Note: See TracChangeset for help on using the changeset viewer.