Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1980


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

using ceguilua-0.5.0

Location:
code/branches/buildsystem/src
Files:
2 added
1 edited
8 moved

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/src/CMakeLists.txt

    r1979 r1980  
    5353ELSE (WIN32)
    5454    IF (${CEGUI_VERSION} LESS 0.6.0)
    55         ADD_SUBDIRECTORY(ceguilua-0.5.0b/ceguilua)
    56         INCLUDE_DIRECTORIES(ceguilua-0.5.0b)
     55        ADD_SUBDIRECTORY(ceguilua-0.5.0/ceguilua)
     56        INCLUDE_DIRECTORIES(ceguilua-0.5.0)
    5757    ELSE (${CEGUI_VERSION} LESS 0.6.0)
    5858        ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua)
  • code/branches/buildsystem/src/ceguilua-0.5.0/ceguilua/CEGUILua.cpp

    r1979 r1980  
    3535
    3636// include Lua libs and tolua++
    37 #include "lua.hpp"
     37extern "C" {
     38#include "lua.h"
     39#include "lualib.h"
     40#include "lauxlib.h"
     41}
     42
    3843#include "tolua++.h"
    3944
     
    5156LuaScriptModule::LuaScriptModule()
    5257{
    53     static const luaL_Reg lualibs[] = {
    54         {"", luaopen_base},
    55         {LUA_LOADLIBNAME, luaopen_package},
    56         {LUA_TABLIBNAME, luaopen_table},
    57         {LUA_IOLIBNAME, luaopen_io},
    58         {LUA_OSLIBNAME, luaopen_os},
    59         {LUA_STRLIBNAME, luaopen_string},
    60         {LUA_MATHLIBNAME, luaopen_math},
    61     #if defined(DEBUG) || defined (_DEBUG)
    62         {LUA_DBLIBNAME, luaopen_debug},
    63     #endif
    64         {0, 0}
    65     };
    66 
    67     // create a lua state
    68     d_ownsState = true;
    69     d_state = lua_open();
    70 
    71     // init all standard libraries
    72     const luaL_Reg *lib = lualibs;
    73     for (; lib->func; lib++)
    74     {
    75         lua_pushcfunction(d_state, lib->func);
    76         lua_pushstring(d_state, lib->name);
    77         lua_call(d_state, 1, 0);
    78     }
    79 
    80     setModuleIdentifierString();
     58        // create a lua state
     59        d_ownsState = true;
     60        d_state = lua_open();
     61
     62        // init all standard libraries
     63        luaopen_base(d_state);
     64        luaopen_io(d_state);
     65        luaopen_string(d_state);
     66        luaopen_table(d_state);
     67        luaopen_math(d_state);
     68#if defined(DEBUG) || defined (_DEBUG)
     69        luaopen_debug(d_state);
     70#endif
     71
     72        setModuleIdentifierString();
    8173}
    8274
  • code/branches/buildsystem/src/ceguilua-0.5.0/ceguilua/CEGUILua.h

    r1979 r1980  
    3232
    3333
    34 /*** CHANGES BY ORXONOX TEAM FOR MINGW32 ***/
    3534/*************************************************************************
    3635        Import / Export control macros
    3736*************************************************************************/
    38 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
     37#if defined( __WIN32__ ) || defined( _WIN32 )
    3938#   ifdef CEGUILUA_EXPORTS
    4039#       define CEGUILUA_API __declspec(dllexport)
    4140#   else
    42 #      if defined( __MINGW32__ )
    43 #          define CEGUILUA_API
    44 #      else
    45 #          define CEGUILUA_API __declspec(dllimport)
    46 #      endif
     41#       define CEGUILUA_API __declspec(dllimport)
    4742#   endif
    4843#else
  • code/branches/buildsystem/src/ceguilua-0.5.0/ceguilua/CEGUILuaFunctor.cpp

    r1979 r1980  
    3434
    3535// include Lua libs and tolua++
    36 #include "lua.hpp"
     36extern "C" {
     37#include "lua.h"
     38#include "lualib.h"
     39#include "lauxlib.h"
     40}
     41
    3742#include "tolua++.h"
    3843
  • code/branches/buildsystem/src/ceguilua-0.5.0/ceguilua/lua_CEGUI.cpp

    r1979 r1980  
    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.