#include "winding.h"
#include "brush_primit.h"
-#define CONTENTS_DETAIL 0x8000000
-
+const unsigned int BRUSH_DETAIL_FLAG = 27;
+const unsigned int BRUSH_DETAIL_MASK = (1 << BRUSH_DETAIL_FLAG);
enum EBrushType
{
inline void ContentsFlagsValue_assignMasked(ContentsFlagsValue& flags, const ContentsFlagsValue& other)
{
- bool detail = bitfield_enabled(flags.m_contentFlags, CONTENTS_DETAIL);
+ bool detail = bitfield_enabled(flags.m_contentFlags, BRUSH_DETAIL_MASK);
flags = other;
if(detail)
{
- flags.m_contentFlags = bitfield_enable(flags.m_contentFlags, CONTENTS_DETAIL);
+ flags.m_contentFlags = bitfield_enable(flags.m_contentFlags, BRUSH_DETAIL_MASK);
}
else
{
- flags.m_contentFlags = bitfield_disable(flags.m_contentFlags, CONTENTS_DETAIL);
+ flags.m_contentFlags = bitfield_disable(flags.m_contentFlags, BRUSH_DETAIL_MASK);
}
}
bool isDetail() const
{
- return (m_shader.m_flags.m_contentFlags & CONTENTS_DETAIL) != 0;
+ return (m_shader.m_flags.m_contentFlags & BRUSH_DETAIL_MASK) != 0;
}
void setDetail(bool detail)
{
undoSave();
if(detail && !isDetail())
{
- m_shader.m_flags.m_contentFlags |= CONTENTS_DETAIL;
+ m_shader.m_flags.m_contentFlags |= BRUSH_DETAIL_MASK;
}
else if(!detail && isDetail())
{
- m_shader.m_flags.m_contentFlags &= ~CONTENTS_DETAIL;
+ m_shader.m_flags.m_contentFlags &= ~BRUSH_DETAIL_MASK;
}
m_observer->shaderChanged();
}
filter_face_flags g_filter_face_translucent(QER_TRANS);
filter_brush_all_faces g_filter_brush_translucent(&g_filter_face_translucent);
-filter_face_contents g_filter_face_detail(CONTENTS_DETAIL);
+filter_face_contents g_filter_face_detail(BRUSH_DETAIL_MASK);
filter_brush_all_faces g_filter_brush_detail(&g_filter_face_detail);