}
void Brush_unlatchPreferences()
+{
+ Brush_toggleFormat(0);
+}
+
+void Brush_toggleFormat(int i)
{
if(g_showAlternativeTextureProjectionOption)
{
- g_useAlternativeTextureProjection.useLatched();
- globalErrorStream() << "Unlatched g_useAlternativeTextureProjection (" << g_useAlternativeTextureProjection.m_value << ")\n";
+ g_useAlternativeTextureProjection.m_value = g_useAlternativeTextureProjection.m_latched ^ i;
Brush::destroyStatic();
Brush::constructStatic(g_useAlternativeTextureProjection.m_value ? eBrushTypeQuake3BP : eBrushTypeQuake3);
}
}
-void Brush_toggleProjection()
+int Brush_toggleFormatCount()
{
if(g_showAlternativeTextureProjectionOption)
- {
- g_useAlternativeTextureProjection.m_value = !g_useAlternativeTextureProjection.m_value;
- globalErrorStream() << "Toggled g_useAlternativeTextureProjection (" << g_useAlternativeTextureProjection.m_value << ")\n";
- Brush::destroyStatic();
- Brush::constructStatic(g_useAlternativeTextureProjection.m_value ? eBrushTypeQuake3BP : eBrushTypeQuake3);
- }
+ return 2;
+ return 1;
}
void Brush_Construct(EBrushType type)
{
g_showAlternativeTextureProjectionOption = true;
+ const char *value = g_pGameDescription->getKeyValue("brush_primit");
+ if(!string_empty(value))
+ g_useAlternativeTextureProjection.m_latched = atoi(value);
+
GlobalPreferenceSystem().registerPreference(
"AlternativeTextureProjection",
BoolImportStringCaller(g_useAlternativeTextureProjection.m_latched),