void Brush_Construct(EBrushType type) { if(type == eBrushTypeQuake3) { g_showAlternativeTextureProjectionOption = true; GlobalPreferenceSystem().registerPreference( "AlternativeTextureProjection", BoolImportStringCaller(g_useAlternativeTextureProjection.m_latched), BoolExportStringCaller(g_useAlternativeTextureProjection.m_latched) ); g_useAlternativeTextureProjection.useLatched(); if(g_useAlternativeTextureProjection.m_value) { type = eBrushTypeQuake3BP; } // d1223m GlobalPreferenceSystem().registerPreference( "BrushAlwaysCaulk", BoolImportStringCaller(g_brush_always_caulk), BoolExportStringCaller(g_brush_always_caulk)); } Brush_registerCommands(); Brush_registerPreferencesPage(); BrushFilters_construct(); BrushClipPlane::constructStatic(); BrushInstance::constructStatic(); Brush::constructStatic(type); Brush::m_maxWorldCoord = g_MaxWorldCoord; BrushInstance::m_counter = &g_brushCount; g_texdef_default_scale = 0.5f; const char* value = g_pGameDescription->getKeyValue("default_scale"); if(!string_empty(value)) { float scale = static_cast<float>(atof(value)); if(scale != 0) { g_texdef_default_scale = scale; } else { globalErrorStream() << "error parsing \"default_scale\" attribute\n"; } } GlobalPreferenceSystem().registerPreference("TextureLock", BoolImportStringCaller(g_brush_texturelock_enabled), BoolExportStringCaller(g_brush_texturelock_enabled)); GlobalPreferenceSystem().registerPreference("BrushSnapPlanes", makeBoolStringImportCallback(FaceImportSnapPlanesCaller()), makeBoolStringExportCallback(FaceExportSnapPlanesCaller())); GlobalPreferenceSystem().registerPreference("TexdefDefaultScale", FloatImportStringCaller(g_texdef_default_scale), FloatExportStringCaller(g_texdef_default_scale)); GridStatus_getTextureLockEnabled = getTextureLockEnabled; g_texture_lock_status_changed = FreeCaller<GridStatus_onTextureLockEnabledChanged>(); }
void BrushModuleClass::construct() { Brush_registerCommands(); BrushClipPlane::constructStatic(); BrushNode::constructStatic(); Brush::constructStatic(); Brush::m_maxWorldCoord = GlobalRegistry().getFloat("game/defaults/maxWorldCoord"); }
void BrushModuleClass::construct() { Brush_registerCommands(); Brush::m_maxWorldCoord = registry::getValue<float>("game/defaults/maxWorldCoord"); }