]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
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 90619673528ce14809d276a69292c7386e20cdf6..3da2f1d6c56c9c363f3d4cb5338a17d6167d2fbc 100644 (file)
@@ -46,6 +46,7 @@ enum
    EXCLUDE_STRUCTURAL       = 0x00020000,
    EXCLUDE_BOTCLIP          = 0x00040000,
    EXCLUDE_VISPORTALS       = 0x00080000,
+   EXCLUDE_DECALS                  = 0x00100000,
 };
 
 class Filter
index 0b704604056c74da221e4a962dd38f33da38ac77..ca367100fb848653b793814c76e7387c35d86c24 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 74e7774a704d85ea4d9bda46fad3942d60e66052..235e2910416ba079df48dfb93960569301e1fa37 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();