add a "decals" texture filter option (textures/decals/)
authorRudolf Polzer <rpolzer@grawp.div0.qc.to>
Sat, 6 Feb 2010 21:24:14 +0000 (22:24 +0100)
committerRudolf Polzer <rpolzer@grawp.div0.qc.to>
Sat, 6 Feb 2010 21:24:14 +0000 (22:24 +0100)
include/ifilter.h
radiant/brushmanip.cpp
radiant/filters.cpp

index 9061967..3da2f1d 100644 (file)
@@ -46,6 +46,7 @@ enum
    EXCLUDE_STRUCTURAL       = 0x00020000,
    EXCLUDE_BOTCLIP          = 0x00040000,
    EXCLUDE_VISPORTALS       = 0x00080000,
+   EXCLUDE_DECALS                  = 0x00100000,
 };
 
 class Filter
index 0b70460..ca36710 100644 (file)
@@ -1128,6 +1128,9 @@ filter_brush_all_faces g_filter_brush_translucent(&g_filter_face_translucent);
 filter_face_contents g_filter_face_detail(BRUSH_DETAIL_MASK);
 filter_brush_all_faces g_filter_brush_detail(&g_filter_face_detail);
 
+filter_face_shader_prefix g_filter_face_decals("textures/decals/");
+filter_brush_any_face g_filter_brush_decals(&g_filter_face_decals);
+
 
 void BrushFilters_construct()
 {
@@ -1152,6 +1155,7 @@ void BrushFilters_construct()
   add_brush_filter(g_filter_brush_detail, EXCLUDE_DETAILS);
   add_brush_filter(g_filter_brush_detail, EXCLUDE_STRUCTURAL, true);
   add_brush_filter(g_filter_brush_lightgrid, EXCLUDE_LIGHTGRID);
+  add_brush_filter(g_filter_brush_decals, EXCLUDE_DECALS);
 }
 
 #if 0
index 74e7774..235e291 100644 (file)
@@ -227,6 +227,7 @@ void Filters_constructMenu(GtkMenu* menu_in_menu)
   if(g_pGameDescription->mGameType != "doom3")
   {
     create_check_menu_item_with_mnemonic(menu_in_menu, "Botclips", "FilterBotClips");
+       create_check_menu_item_with_mnemonic(menu_in_menu, "Decals", "FilterDecals");
   }
   // filter manipulation
   menu_separator(menu_in_menu);
@@ -278,6 +279,7 @@ void ConstructFilters()
   if(g_pGameDescription->mGameType != "doom3")
   {
     add_filter_command(EXCLUDE_BOTCLIP, "FilterBotClips", Accelerator('M', (GdkModifierType)GDK_MOD1_MASK));
+       add_filter_command(EXCLUDE_DECALS, "FilterDecals", Accelerator('D', (GdkModifierType)GDK_SHIFT_MASK));
   }
 
   PerformFiltering();