Skip to content

Commit b94f18c

Browse files
author
nitrocaster
committed
Switch to luabind-deboostified.
1 parent 4fb2060 commit b94f18c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+396
-395
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "src/Externals/luabind"]
22
path = src/Externals/luabind
3-
url = [email protected]:OpenXRay/luabind.git
3+
url = [email protected]:OpenXRay/luabind-deboostified.git
44
[submodule "src/Externals/luajit"]
55
path = src/Externals/luajit
66
url = [email protected]:OpenXRay/LuaJIT.git

src/Externals/luabind

Submodule luabind updated 210 files

src/Layers/xrRender/ResourceManager_Scripting.cpp

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "luabind/return_reference_to_policy.hpp"
1111

1212
using namespace luabind;
13+
using namespace luabind::policy;
1314

1415
#ifdef DEBUG
1516
#define MDB Memory.dbg_check()
@@ -83,39 +84,39 @@ void CResourceManager::LS_Load ()
8384
[
8485
class_<adopt_sampler>("_sampler")
8586
.def( constructor<const adopt_sampler&>())
86-
.def("texture", &adopt_sampler::_texture ,return_reference_to(_1))
87-
.def("project", &adopt_sampler::_projective ,return_reference_to(_1))
88-
.def("clamp", &adopt_sampler::_clamp ,return_reference_to(_1))
89-
.def("wrap", &adopt_sampler::_wrap ,return_reference_to(_1))
90-
.def("mirror", &adopt_sampler::_mirror ,return_reference_to(_1))
91-
.def("f_anisotropic", &adopt_sampler::_f_anisotropic ,return_reference_to(_1))
92-
.def("f_trilinear", &adopt_sampler::_f_trilinear ,return_reference_to(_1))
93-
.def("f_bilinear", &adopt_sampler::_f_bilinear ,return_reference_to(_1))
94-
.def("f_linear", &adopt_sampler::_f_linear ,return_reference_to(_1))
95-
.def("f_none", &adopt_sampler::_f_none ,return_reference_to(_1))
96-
.def("fmin_none", &adopt_sampler::_fmin_none ,return_reference_to(_1))
97-
.def("fmin_point", &adopt_sampler::_fmin_point ,return_reference_to(_1))
98-
.def("fmin_linear", &adopt_sampler::_fmin_linear ,return_reference_to(_1))
99-
.def("fmin_aniso", &adopt_sampler::_fmin_aniso ,return_reference_to(_1))
100-
.def("fmip_none", &adopt_sampler::_fmip_none ,return_reference_to(_1))
101-
.def("fmip_point", &adopt_sampler::_fmip_point ,return_reference_to(_1))
102-
.def("fmip_linear", &adopt_sampler::_fmip_linear ,return_reference_to(_1))
103-
.def("fmag_none", &adopt_sampler::_fmag_none ,return_reference_to(_1))
104-
.def("fmag_point", &adopt_sampler::_fmag_point ,return_reference_to(_1))
105-
.def("fmag_linear", &adopt_sampler::_fmag_linear ,return_reference_to(_1)),
87+
.def("texture", &adopt_sampler::_texture ,return_reference_to<1>())
88+
.def("project", &adopt_sampler::_projective ,return_reference_to<1>())
89+
.def("clamp", &adopt_sampler::_clamp ,return_reference_to<1>())
90+
.def("wrap", &adopt_sampler::_wrap ,return_reference_to<1>())
91+
.def("mirror", &adopt_sampler::_mirror ,return_reference_to<1>())
92+
.def("f_anisotropic", &adopt_sampler::_f_anisotropic ,return_reference_to<1>())
93+
.def("f_trilinear", &adopt_sampler::_f_trilinear ,return_reference_to<1>())
94+
.def("f_bilinear", &adopt_sampler::_f_bilinear ,return_reference_to<1>())
95+
.def("f_linear", &adopt_sampler::_f_linear ,return_reference_to<1>())
96+
.def("f_none", &adopt_sampler::_f_none ,return_reference_to<1>())
97+
.def("fmin_none", &adopt_sampler::_fmin_none ,return_reference_to<1>())
98+
.def("fmin_point", &adopt_sampler::_fmin_point ,return_reference_to<1>())
99+
.def("fmin_linear", &adopt_sampler::_fmin_linear ,return_reference_to<1>())
100+
.def("fmin_aniso", &adopt_sampler::_fmin_aniso ,return_reference_to<1>())
101+
.def("fmip_none", &adopt_sampler::_fmip_none ,return_reference_to<1>())
102+
.def("fmip_point", &adopt_sampler::_fmip_point ,return_reference_to<1>())
103+
.def("fmip_linear", &adopt_sampler::_fmip_linear ,return_reference_to<1>())
104+
.def("fmag_none", &adopt_sampler::_fmag_none ,return_reference_to<1>())
105+
.def("fmag_point", &adopt_sampler::_fmag_point ,return_reference_to<1>())
106+
.def("fmag_linear", &adopt_sampler::_fmag_linear ,return_reference_to<1>()),
106107

107108
class_<adopt_compiler>("_compiler")
108109
.def( constructor<const adopt_compiler&>())
109-
.def("begin", &adopt_compiler::_pass ,return_reference_to(_1))
110-
.def("sorting", &adopt_compiler::_options ,return_reference_to(_1))
111-
.def("emissive", &adopt_compiler::_o_emissive ,return_reference_to(_1))
112-
.def("distort", &adopt_compiler::_o_distort ,return_reference_to(_1))
113-
.def("wmark", &adopt_compiler::_o_wmark ,return_reference_to(_1))
114-
.def("fog", &adopt_compiler::_fog ,return_reference_to(_1))
115-
.def("zb", &adopt_compiler::_ZB ,return_reference_to(_1))
116-
.def("blend", &adopt_compiler::_blend ,return_reference_to(_1))
117-
.def("aref", &adopt_compiler::_aref ,return_reference_to(_1))
118-
.def("color_write_enable", &adopt_compiler::_color_write_enable,return_reference_to(_1))
110+
.def("begin", &adopt_compiler::_pass ,return_reference_to<1>())
111+
.def("sorting", &adopt_compiler::_options ,return_reference_to<1>())
112+
.def("emissive", &adopt_compiler::_o_emissive ,return_reference_to<1>())
113+
.def("distort", &adopt_compiler::_o_distort ,return_reference_to<1>())
114+
.def("wmark", &adopt_compiler::_o_wmark ,return_reference_to<1>())
115+
.def("fog", &adopt_compiler::_fog ,return_reference_to<1>())
116+
.def("zb", &adopt_compiler::_ZB ,return_reference_to<1>())
117+
.def("blend", &adopt_compiler::_blend ,return_reference_to<1>())
118+
.def("aref", &adopt_compiler::_aref ,return_reference_to<1>())
119+
.def("color_write_enable", &adopt_compiler::_color_write_enable,return_reference_to<1>())
119120
.def("sampler", &adopt_compiler::_sampler ), // returns sampler-object
120121

121122
class_<adopt_blend>("blend")

src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "luabind/return_reference_to_policy.hpp"
1212

1313
using namespace luabind;
14+
using namespace luabind::policy;
1415

1516
#ifdef DEBUG
1617
#define MDB Memory.dbg_check()
@@ -132,48 +133,48 @@ void CResourceManager::LS_Load ()
132133

133134

134135
class_<adopt_dx10sampler>("_dx10sampler")
135-
//.def("texture", &adopt_sampler::_texture ,return_reference_to(_1))
136-
//.def("project", &adopt_sampler::_projective ,return_reference_to(_1))
137-
//.def("clamp", &adopt_sampler::_clamp ,return_reference_to(_1))
138-
//.def("wrap", &adopt_sampler::_wrap ,return_reference_to(_1))
139-
//.def("mirror", &adopt_sampler::_mirror ,return_reference_to(_1))
140-
//.def("f_anisotropic", &adopt_sampler::_f_anisotropic ,return_reference_to(_1))
141-
//.def("f_trilinear", &adopt_sampler::_f_trilinear ,return_reference_to(_1))
142-
//.def("f_bilinear", &adopt_sampler::_f_bilinear ,return_reference_to(_1))
143-
//.def("f_linear", &adopt_sampler::_f_linear ,return_reference_to(_1))
144-
//.def("f_none", &adopt_sampler::_f_none ,return_reference_to(_1))
145-
//.def("fmin_none", &adopt_sampler::_fmin_none ,return_reference_to(_1))
146-
//.def("fmin_point", &adopt_sampler::_fmin_point ,return_reference_to(_1))
147-
//.def("fmin_linear", &adopt_sampler::_fmin_linear ,return_reference_to(_1))
148-
//.def("fmin_aniso", &adopt_sampler::_fmin_aniso ,return_reference_to(_1))
149-
//.def("fmip_none", &adopt_sampler::_fmip_none ,return_reference_to(_1))
150-
//.def("fmip_point", &adopt_sampler::_fmip_point ,return_reference_to(_1))
151-
//.def("fmip_linear", &adopt_sampler::_fmip_linear ,return_reference_to(_1))
152-
//.def("fmag_none", &adopt_sampler::_fmag_none ,return_reference_to(_1))
153-
//.def("fmag_point", &adopt_sampler::_fmag_point ,return_reference_to(_1))
154-
//.def("fmag_linear", &adopt_sampler::_fmag_linear ,return_reference_to(_1))
136+
//.def("texture", &adopt_sampler::_texture ,return_reference_to<1>())
137+
//.def("project", &adopt_sampler::_projective ,return_reference_to<1>())
138+
//.def("clamp", &adopt_sampler::_clamp ,return_reference_to<1>())
139+
//.def("wrap", &adopt_sampler::_wrap ,return_reference_to<1>())
140+
//.def("mirror", &adopt_sampler::_mirror ,return_reference_to<1>())
141+
//.def("f_anisotropic", &adopt_sampler::_f_anisotropic ,return_reference_to<1>())
142+
//.def("f_trilinear", &adopt_sampler::_f_trilinear ,return_reference_to<1>())
143+
//.def("f_bilinear", &adopt_sampler::_f_bilinear ,return_reference_to<1>())
144+
//.def("f_linear", &adopt_sampler::_f_linear ,return_reference_to<1>())
145+
//.def("f_none", &adopt_sampler::_f_none ,return_reference_to<1>())
146+
//.def("fmin_none", &adopt_sampler::_fmin_none ,return_reference_to<1>())
147+
//.def("fmin_point", &adopt_sampler::_fmin_point ,return_reference_to<1>())
148+
//.def("fmin_linear", &adopt_sampler::_fmin_linear ,return_reference_to<1>())
149+
//.def("fmin_aniso", &adopt_sampler::_fmin_aniso ,return_reference_to<1>())
150+
//.def("fmip_none", &adopt_sampler::_fmip_none ,return_reference_to<1>())
151+
//.def("fmip_point", &adopt_sampler::_fmip_point ,return_reference_to<1>())
152+
//.def("fmip_linear", &adopt_sampler::_fmip_linear ,return_reference_to<1>())
153+
//.def("fmag_none", &adopt_sampler::_fmag_none ,return_reference_to<1>())
154+
//.def("fmag_point", &adopt_sampler::_fmag_point ,return_reference_to<1>())
155+
//.def("fmag_linear", &adopt_sampler::_fmag_linear ,return_reference_to<1>())
155156
,
156157

157158
class_<adopt_compiler>("_compiler")
158159
.def( constructor<const adopt_compiler&>())
159-
.def("begin", &adopt_compiler::_pass ,return_reference_to(_1))
160-
.def("begin", &adopt_compiler::_passgs ,return_reference_to(_1))
161-
.def("sorting", &adopt_compiler::_options ,return_reference_to(_1))
162-
.def("emissive", &adopt_compiler::_o_emissive ,return_reference_to(_1))
163-
.def("distort", &adopt_compiler::_o_distort ,return_reference_to(_1))
164-
.def("wmark", &adopt_compiler::_o_wmark ,return_reference_to(_1))
165-
.def("fog", &adopt_compiler::_fog ,return_reference_to(_1))
166-
.def("zb", &adopt_compiler::_ZB ,return_reference_to(_1))
167-
.def("blend", &adopt_compiler::_blend ,return_reference_to(_1))
168-
.def("aref", &adopt_compiler::_aref ,return_reference_to(_1))
160+
.def("begin", &adopt_compiler::_pass ,return_reference_to<1>())
161+
.def("begin", &adopt_compiler::_passgs ,return_reference_to<1>())
162+
.def("sorting", &adopt_compiler::_options ,return_reference_to<1>())
163+
.def("emissive", &adopt_compiler::_o_emissive ,return_reference_to<1>())
164+
.def("distort", &adopt_compiler::_o_distort ,return_reference_to<1>())
165+
.def("wmark", &adopt_compiler::_o_wmark ,return_reference_to<1>())
166+
.def("fog", &adopt_compiler::_fog ,return_reference_to<1>())
167+
.def("zb", &adopt_compiler::_ZB ,return_reference_to<1>())
168+
.def("blend", &adopt_compiler::_blend ,return_reference_to<1>())
169+
.def("aref", &adopt_compiler::_aref ,return_reference_to<1>())
169170
// For compatibility only
170-
.def("dx10color_write_enable", &adopt_compiler::_dx10color_write_enable,return_reference_to(_1))
171-
.def("color_write_enable", &adopt_compiler::_dx10color_write_enable,return_reference_to(_1))
172-
.def("dx10texture", &adopt_compiler::_dx10texture ,return_reference_to(_1))
173-
.def("dx10stencil", &adopt_compiler::_dx10Stencil ,return_reference_to(_1))
174-
.def("dx10stencil_ref", &adopt_compiler::_dx10StencilRef,return_reference_to(_1))
175-
.def("dx10atoc", &adopt_compiler::_dx10ATOC ,return_reference_to(_1))
176-
.def("dx10zfunc", &adopt_compiler::_dx10ZFunc ,return_reference_to(_1))
171+
.def("dx10color_write_enable", &adopt_compiler::_dx10color_write_enable,return_reference_to<1>())
172+
.def("color_write_enable", &adopt_compiler::_dx10color_write_enable,return_reference_to<1>())
173+
.def("dx10texture", &adopt_compiler::_dx10texture ,return_reference_to<1>())
174+
.def("dx10stencil", &adopt_compiler::_dx10Stencil ,return_reference_to<1>())
175+
.def("dx10stencil_ref", &adopt_compiler::_dx10StencilRef,return_reference_to<1>())
176+
.def("dx10atoc", &adopt_compiler::_dx10ATOC ,return_reference_to<1>())
177+
.def("dx10zfunc", &adopt_compiler::_dx10ZFunc ,return_reference_to<1>())
177178

178179
.def("dx10sampler", &adopt_compiler::_dx10sampler ) // returns sampler-object
179180
.def("dx10Options", &adopt_compiler::_dx10Options ), // returns options-object

src/engine.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
3-
VisualStudioVersion = 14.0.24627.0
3+
VisualStudioVersion = 14.0.24720.0
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{89F6A7EE-3BBE-45D3-A8A8-5D9366CD987B}"
66
EndProject
@@ -1110,14 +1110,14 @@ Global
11101110
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Debug|Win32.Build.0 = Debug|Win32
11111111
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Debug|x64.ActiveCfg = Debug|x64
11121112
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Debug|x64.Build.0 = Debug|x64
1113-
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|Win32.ActiveCfg = Release|Win32
1114-
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|Win32.Build.0 = Release|Win32
1115-
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|x64.ActiveCfg = Release|x64
1116-
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|x64.Build.0 = Release|x64
1113+
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|Win32.ActiveCfg = Mixed|Win32
1114+
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|Win32.Build.0 = Mixed|Win32
1115+
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|x64.ActiveCfg = Mixed|x64
1116+
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed_Dedicated|x64.Build.0 = Mixed|x64
11171117
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed|Win32.ActiveCfg = Mixed|Win32
11181118
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed|Win32.Build.0 = Mixed|Win32
1119-
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed|x64.ActiveCfg = Release|x64
1120-
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed|x64.Build.0 = Release|x64
1119+
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed|x64.ActiveCfg = Mixed|x64
1120+
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Mixed|x64.Build.0 = Mixed|x64
11211121
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Release_Dedicated|Win32.ActiveCfg = Release|Win32
11221122
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Release_Dedicated|Win32.Build.0 = Release|Win32
11231123
{CCD4AFAE-AA10-42C6-A452-FDEE497CCDF1}.Release_Dedicated|x64.ActiveCfg = Release|x64

src/xrGame/account_manager_script.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "xrScriptEngine/ScriptExporter.hpp"
44

55
using namespace luabind;
6+
using namespace luabind::policy;
67
using namespace gamespy_gp;
78

89
SCRIPT_EXPORT(account_manager, (),
@@ -13,15 +14,15 @@ SCRIPT_EXPORT(account_manager, (),
1314
.def("suggest_unique_nicks", &account_manager::suggest_unique_nicks)
1415
.def("stop_suggest_unique_nicks", &account_manager::stop_suggest_unique_nicks)
1516

16-
.def("get_suggested_unicks", &account_manager::get_suggested_unicks, return_stl_iterator)
17+
.def("get_suggested_unicks", &account_manager::get_suggested_unicks, return_stl_iterator())
1718
.def("create_profile", &account_manager::create_profile)
1819
.def("delete_profile", &account_manager::delete_profile)
1920

2021
.def("is_get_account_profiles_active", &account_manager::is_get_account_profiles_active)
2122
.def("get_account_profiles", &account_manager::get_account_profiles)
2223
.def("stop_fetching_account_profiles", &account_manager::stop_fetching_account_profiles)
2324

24-
.def("get_found_profiles", &account_manager::get_found_profiles, return_stl_iterator)
25+
.def("get_found_profiles", &account_manager::get_found_profiles, return_stl_iterator())
2526
.def("verify_unique_nick", &account_manager::verify_unique_nick)
2627
.def("verify_email", &account_manager::verify_email)
2728
.def("verify_password", &account_manager::verify_password)

src/xrGame/action_base_script.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ IC static void CScriptActionBase_Export(lua_State *luaState)
1717
{
1818
module(luaState)
1919
[
20-
class_<CScriptActionBase,CScriptActionWrapper>("action_base")
20+
class_<CScriptActionBase, no_bases, default_holder, CScriptActionWrapper>("action_base")
2121
.def_readonly("object", &CScriptActionBase::m_object)
2222
.def_readonly("storage", &CScriptActionBase::m_storage)
2323
.def( constructor<>())

src/xrGame/action_planner_action_script.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ IC static void CScriptActionPlannerAction_Export(lua_State *luaState)
1717
{
1818
module(luaState)
1919
[
20-
class_<CScriptActionPlannerAction,CScriptActionPlannerActionWrapper,bases<CScriptActionPlanner,CScriptActionBase> >("planner_action")
20+
class_<CScriptActionPlannerAction, bases<CScriptActionPlanner, CScriptActionBase>,
21+
default_holder, CScriptActionPlannerActionWrapper>("planner_action")
2122
.def( constructor<>())
2223
.def( constructor<CScriptGameObject*>())
2324
.def( constructor<CScriptGameObject*,LPCSTR>())

src/xrGame/action_planner_script.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "xrScriptEngine/ScriptExporter.hpp"
1414

1515
using namespace luabind;
16+
using namespace luabind::policy;
1617

1718
void set_goal_world_state(CScriptActionPlanner *action_planner, CScriptActionPlanner::CState *world_state)
1819
{
@@ -33,17 +34,17 @@ IC static void CScriptActionPlanner_Export(lua_State *luaState)
3334
{
3435
module(luaState)
3536
[
36-
class_<CScriptActionPlanner,CScriptActionPlannerWrapper>("action_planner")
37+
class_<CScriptActionPlanner, no_bases, default_holder, CScriptActionPlannerWrapper>("action_planner")
3738
.def_readonly("object", &CScriptActionPlanner::m_object)
3839
.def_readonly("storage", &CScriptActionPlanner::m_storage)
3940
.def( constructor<>())
4041
.def("actual", &get_actual)
4142
.def("setup", &CScriptActionPlanner::setup, &CScriptActionPlannerWrapper::setup_static)
4243
.def("update", &CScriptActionPlanner::update, &CScriptActionPlannerWrapper::update_static)
43-
.def("add_action", &CScriptActionPlanner::add_operator,adopt(_3))
44+
.def("add_action", &CScriptActionPlanner::add_operator, adopt<3>())
4445
.def("remove_action", (void (CScriptActionPlanner::*)(const CScriptActionPlanner::_edge_type &))(&CScriptActionPlanner::remove_operator))
4546
.def("action", &CScriptActionPlanner::action)
46-
.def("add_evaluator", &CScriptActionPlanner::add_evaluator,adopt(_3))
47+
.def("add_evaluator", &CScriptActionPlanner::add_evaluator, adopt<3>())
4748
.def("remove_evaluator", (void (CScriptActionPlanner::*)(const CScriptActionPlanner::_condition_type &))(&CScriptActionPlanner::remove_evaluator))
4849
.def("evaluator", &CScriptActionPlanner::evaluator)
4950
.def("current_action_id", &CScriptActionPlanner::current_action_id)

0 commit comments

Comments
 (0)