Skip to content

Commit 8fd3b87

Browse files
committed
Remove macros inside of SCRIPT_EXPORT macro
1 parent 68da2f3 commit 8fd3b87

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

src/xrGame/alife_simulator_script.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,9 @@ SCRIPT_EXPORT(CALifeSimulator, (), {
348348
.def("actor", &get_actor)
349349
.def("has_info", &has_info)
350350
.def("dont_has_info", &dont_has_info)
351-
#ifndef LINUX // FIXME!!!
352-
.def("switch_distance", &CALifeSimulator::switch_distance)
353-
.def("set_switch_distance", &CALifeSimulator::set_switch_distance) //Alundaio: renamed to set_switch_distance from switch_distance
354-
#endif
351+
.def("switch_distance", (float (CALifeSimulator::*)())(&CALifeSimulator::switch_distance))
352+
.def("set_switch_distance", (void (CALifeSimulator::*)(float))
353+
(&CALifeSimulator::set_switch_distance)) //Alundaio: renamed to set_switch_distance from switch_distance
355354
//Alundaio: extend alife simulator exports
356355
.def("teleport_object", &teleport_object)
357356
//Alundaio: END

src/xrGame/level_script.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,7 @@ IC static void CLevel_Export(lua_State* luaState)
781781
];
782782

783783
module(luaState)[def("command_line", &command_line),
784-
#ifndef LINUX // FIXME!!!
785-
def("IsGameTypeSingle", &IsGameTypeSingle),
786-
#endif
784+
def("IsGameTypeSingle", (bool (*)())&IsGameTypeSingle),
787785
def("IsDynamicMusic", &IsDynamicMusic), def("render_get_dx_level", &render_get_dx_level),
788786
def("IsImportantSave", &IsImportantSave)];
789787

src/xrGame/login_manager_script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ SCRIPT_EXPORT(profile, (), {
3232
luaState)[class_<profile>("profile").def("unique_nick", &profile::unique_nick).def("online", &profile::online)];
3333
});
3434

35+
#ifndef LINUX // FIXME!!!
3536
SCRIPT_EXPORT(login_operation_cb, (), {
3637
module(luaState)[class_<gamespy_gp::login_operation_cb>("login_operation_cb")
3738
.def(constructor<>())
3839
.def(constructor<gamespy_gp::login_operation_cb::lua_object_type,
3940
gamespy_gp::login_operation_cb::lua_function_type>())
40-
#ifndef LINUX // FIXME!!!
4141
.def("bind", &gamespy_gp::login_operation_cb::bind)
42-
#endif
4342
.def("clear", &gamespy_gp::login_operation_cb::clear)];
4443
});
44+
#endif

src/xrGame/profile_data_types_script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ SCRIPT_EXPORT(profile_data_script_registrator, (), {
2020
.def_readonly("second", &all_best_scores_t::value_type::second)];
2121
});
2222

23+
#ifndef LINUX // FIXME!!!
2324
SCRIPT_EXPORT(store_operation_cb, (), {
2425
module(luaState)[class_<gamespy_profile::store_operation_cb>("store_operation_cb")
2526
.def(constructor<>())
2627
.def(constructor<gamespy_profile::store_operation_cb::lua_object_type,
2728
gamespy_profile::store_operation_cb::lua_function_type>())
28-
#ifndef LINUX // FIXME!!!
2929
.def("bind", &gamespy_profile::store_operation_cb::bind)
30-
#endif
3130
.def("clear", &gamespy_profile::store_operation_cb::clear)];
3231
});
32+
#endif

src/xrGame/ui/UIListBox_script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ SCRIPT_EXPORT(SServerFilters, (), {
6464
.def_readwrite("listen_servers", &SServerFilters::listen_servers)];
6565
});
6666

67+
#ifndef LINUX // FIXME!!!
6768
SCRIPT_EXPORT(connect_error_cb, (), {
6869
module(luaState)[class_<connect_error_cb>("connect_error_cb")
6970
.def(constructor<>())
7071
.def(constructor<connect_error_cb::lua_object_type, connect_error_cb::lua_function_type>())
71-
#ifndef LINUX // FIXME!!!
7272
.def("bind", &connect_error_cb::bind)
73-
#endif
7473
.def("clear", &connect_error_cb::clear)];
7574
});
75+
#endif
7676

7777
SCRIPT_EXPORT(CServerList, (CUIWindow), {
7878
module(luaState)[class_<CServerList, CUIWindow>("CServerList")

src/xrServerEntities/script_flags_script.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,16 @@ void one(T* self)
5353
self->assign(typename T::TYPE(-1));
5454
}
5555

56+
#ifndef LINUX // FIXME!!!
5657
SCRIPT_EXPORT(Flags8, (),
5758
{
5859
module(luaState)
5960
[
6061
class_<Flags8>("flags8")
6162
.def(constructor<>())
62-
#ifndef LINUX // FIXME!!!
6363
.def("get", &Flags8::get)
6464
.def("zero", &Flags8::zero)
6565
.def("one", &one<Flags8>)
66-
#endif
6766
.def("invert", (Flags8 & (Flags8::*)())(&Flags8::invert))
6867
.def("invert", (Flags8 & (Flags8::*)(const Flags8&))(&Flags8::invert))
6968
.def("invert", (Flags8 & (Flags8::*)(const Flags8::TYPE))(&Flags8::invert))
@@ -88,11 +87,9 @@ SCRIPT_EXPORT(Flags16, (),
8887
[
8988
class_<Flags16>("flags16")
9089
.def(constructor<>())
91-
#ifndef LINUX // FIXME!!!
9290
.def("get", &Flags16::get)
9391
.def("zero", &Flags16::zero)
9492
.def("one", &one<Flags16>)
95-
#endif
9693
.def("invert", (Flags16 & (Flags16::*)())(&Flags16::invert))
9794
.def("invert", (Flags16 & (Flags16::*)(const Flags16&))(&Flags16::invert))
9895
.def("invert", (Flags16 & (Flags16::*)(const Flags16::TYPE))(&Flags16::invert))
@@ -117,11 +114,9 @@ SCRIPT_EXPORT(Flags32, (),
117114
[
118115
class_<Flags32>("flags32")
119116
.def(constructor<>())
120-
#ifndef LINUX // FIXME!!!
121117
.def("get", &Flags32::get)
122118
.def("zero", &Flags32::zero)
123119
.def("one", &Flags32::one)
124-
#endif
125120
.def("invert", (Flags32 & (Flags32::*)())(&Flags32::invert))
126121
.def("invert", (Flags32 & (Flags32::*)(const Flags32&))(&Flags32::invert))
127122
.def("invert", (Flags32 & (Flags32::*)(const Flags32::TYPE))(&Flags32::invert))
@@ -139,3 +134,4 @@ SCRIPT_EXPORT(Flags32, (),
139134
.def("equal", (bool(*)(Flags32*, const Flags32&, const Flags32::TYPE))(&equal<Flags32>))
140135
];
141136
});
137+
#endif

0 commit comments

Comments
 (0)