]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/entity/entity.cpp
Revert partially (auto) "reformat code! now the code is only ugly on the *inside*"
[xonotic/netradiant.git] / plugins / entity / entity.cpp
index 745fad07119dffc7572a71a0ecd0b646a97c5813..dfd2a6408c4aa878cf062e357976b9aa8bd71fda 100644 (file)
@@ -78,7 +78,7 @@ inline scene::Node& entity_for_eclass( EntityClass* eclass ){
 void Entity_setName( Entity& entity, const char* name ){
        entity.setKeyValue( "name", name );
 }
-typedef ReferenceCaller1<Entity, const char*, Entity_setName> EntitySetNameCaller;
+typedef ReferenceCaller<Entity, void(const char*), Entity_setName> EntitySetNameCaller;
 
 inline Namespaced* Node_getNamespaced( scene::Node& node ){
        return NodeTypeCast<Namespaced>::cast( node );
@@ -138,7 +138,7 @@ void connect( const char* name ){
        m_e1->setKeyValue( keyname(), name );
        m_e2->setKeyValue( "targetname", name );
 }
-typedef MemberCaller1<ConnectEntities, const char*, &ConnectEntities::connect> ConnectCaller;
+typedef MemberCaller<ConnectEntities, void(const char*), &ConnectEntities::connect> ConnectCaller;
 };
 
 inline Entity* ScenePath_getEntity( const scene::Path& path ){
@@ -229,7 +229,7 @@ void connectEntities( const scene::Path& path, const scene::Path& targetPath, in
 void setLightRadii( bool lightRadii ){
        g_lightRadii = lightRadii;
 }
-bool getLightRadii(){
+bool getLightRadii() const {
        return g_lightRadii;
 }
 void setShowNames( bool showNames ){
@@ -330,10 +330,10 @@ void Entity_Construct( EGameType gameType ){
                Static<KeyIsName>::instance().m_nameKey = "targetname";
        }
 
-       GlobalPreferenceSystem().registerPreference( "SI_ShowNames", BoolImportStringCaller( g_showNames ), BoolExportStringCaller( g_showNames ) );
-       GlobalPreferenceSystem().registerPreference( "SI_ShowAngles", BoolImportStringCaller( g_showAngles ), BoolExportStringCaller( g_showAngles ) );
-       GlobalPreferenceSystem().registerPreference( "NewLightStyle", BoolImportStringCaller( g_newLightDraw ), BoolExportStringCaller( g_newLightDraw ) );
-       GlobalPreferenceSystem().registerPreference( "LightRadiuses", BoolImportStringCaller( g_lightRadii ), BoolExportStringCaller( g_lightRadii ) );
+       GlobalPreferenceSystem().registerPreference( "SI_ShowNames", make_property_string( g_showNames ) );
+       GlobalPreferenceSystem().registerPreference( "SI_ShowAngles", make_property_string( g_showAngles ) );
+       GlobalPreferenceSystem().registerPreference( "NewLightStyle", make_property_string( g_newLightDraw ) );
+       GlobalPreferenceSystem().registerPreference( "LightRadiuses", make_property_string( g_lightRadii ) );
 
        Entity_InitFilters();
        LightType lightType = LIGHTTYPE_DEFAULT;