diff --git a/OpenAL32.dll b/OpenAL32.dll
new file mode 100644
index 00000000..3d99c5ac
Binary files /dev/null and b/OpenAL32.dll differ
diff --git a/neo/engine/_DoomDLL.props b/neo/engine/_DoomDLL.props
index d494bac7..ea341c24 100644
--- a/neo/engine/_DoomDLL.props
+++ b/neo/engine/_DoomDLL.props
@@ -13,7 +13,7 @@
Level3
- dbghelp.lib;dinput8.lib;dsound.lib;dxguid.lib;eaxguid.lib;glu32.lib;iphlpapi.lib;odbc32.lib;odbccp32.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies)
+ dbghelp.lib;dinput8.lib;dxguid.lib;glu32.lib;iphlpapi.lib;odbc32.lib;odbccp32.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies)
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64;openal\lib;sys\win32\dongle;%(AdditionalLibraryDirectories)
$(OutDir)DOOM3.exe
%(AdditionalManifestDependencies)
@@ -23,4 +23,4 @@
true
-
\ No newline at end of file
+
diff --git a/neo/engine/framework/BuildDefines.h b/neo/engine/framework/BuildDefines.h
index 0552c1d2..3cfaa4ef 100644
--- a/neo/engine/framework/BuildDefines.h
+++ b/neo/engine/framework/BuildDefines.h
@@ -117,14 +117,6 @@ If you have questions concerning this license or the applicable additional terms
# endif
#endif
-#ifndef ID_OPENAL
-# if ( defined(_WIN32) || defined(MACOS_X) ) && !defined( ID_DEDICATED )
-# define ID_OPENAL 1
-# else
-# define ID_OPENAL 0
-# endif
-#endif
-
#ifndef ID_ALLOW_D3XP
# if defined( MACOS_X )
# define ID_ALLOW_D3XP 0
@@ -137,4 +129,4 @@ If you have questions concerning this license or the applicable additional terms
#ifdef PREY
#define DEATHWALK_AUTOLOAD 1 // Append deathwalk map to all maps loaded
#endif
-// jmarshall end
\ No newline at end of file
+// jmarshall end
diff --git a/neo/engine/framework/Common.cpp b/neo/engine/framework/Common.cpp
index c9cb1bdd..04705d67 100644
--- a/neo/engine/framework/Common.cpp
+++ b/neo/engine/framework/Common.cpp
@@ -2892,6 +2892,254 @@ void Com_FinishBuild_f( const idCmdArgs &args ) {
globalImages->FinishBuild( ( args.Argc() > 1 ) );
}
+#ifdef ID_ALLOW_TOOLS
+/*
+=================
+Com_RemoveBloodDecalBrushes_f
+=================
+*/
+static bool Com_IsMapBlockBloodDecal( const char *blockStart, const char *blockEnd ) {
+ const char *scan = blockStart;
+
+ while ( scan < blockEnd ) {
+ int materialOffset = idStr::FindText( scan, "\"textures/decals/", false );
+ if ( materialOffset < 0 ) {
+ break;
+ }
+ const char *materialStart = scan + materialOffset;
+ if ( materialStart >= blockEnd ) {
+ break;
+ }
+
+ const char *materialEnd = strchr( materialStart + 1, '"' );
+ if ( !materialEnd || materialEnd > blockEnd ) {
+ break;
+ }
+
+ idStr materialName( materialStart + 1, 0, materialEnd - materialStart - 1 );
+ const idMaterial *material = declManager->FindMaterial( materialName, false );
+ if ( material && ( material->GetContentFlags() & CONTENTS_BLOOD ) ) {
+ return true;
+ }
+
+ if ( idStr::FindText( materialName, "blood", false ) >= 0 ) {
+ return true;
+ }
+
+ scan = materialEnd + 1;
+ }
+
+ return false;
+}
+
+static const char *Com_FindMapBlockEnd( const char *blockStart ) {
+ bool inString = false;
+ bool inLineComment = false;
+ bool inBlockComment = false;
+ int depth = 0;
+
+ for ( const char *scan = blockStart; *scan; scan++ ) {
+ if ( inLineComment ) {
+ if ( *scan == '\n' ) {
+ inLineComment = false;
+ }
+ continue;
+ }
+
+ if ( inBlockComment ) {
+ if ( scan[0] == '*' && scan[1] == '/' ) {
+ inBlockComment = false;
+ scan++;
+ }
+ continue;
+ }
+
+ if ( inString ) {
+ if ( *scan == '\\' && scan[1] ) {
+ scan++;
+ } else if ( *scan == '"' ) {
+ inString = false;
+ }
+ continue;
+ }
+
+ if ( scan[0] == '/' && scan[1] == '/' ) {
+ inLineComment = true;
+ scan++;
+ continue;
+ }
+
+ if ( scan[0] == '/' && scan[1] == '*' ) {
+ inBlockComment = true;
+ scan++;
+ continue;
+ }
+
+ if ( *scan == '"' ) {
+ inString = true;
+ continue;
+ }
+
+ if ( *scan == '{' ) {
+ depth++;
+ } else if ( *scan == '}' ) {
+ depth--;
+ if ( depth == 0 ) {
+ return scan + 1;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+static bool Com_IsMapWhitespace( char c ) {
+ return c == ' ' || c == '\t' || c == '\r' || c == '\n';
+}
+
+static const char *Com_FindPrimitiveCommentStart( const char *bufferStart, const char *blockStart ) {
+ const char *lineStart = blockStart;
+
+ while ( lineStart > bufferStart && lineStart[-1] != '\n' && lineStart[-1] != '\r' ) {
+ lineStart--;
+ }
+
+ while ( lineStart > bufferStart ) {
+ const char *prevLineEnd = lineStart;
+ while ( prevLineEnd > bufferStart && ( prevLineEnd[-1] == '\n' || prevLineEnd[-1] == '\r' ) ) {
+ prevLineEnd--;
+ }
+
+ const char *prevLineStart = prevLineEnd;
+ while ( prevLineStart > bufferStart && prevLineStart[-1] != '\n' && prevLineStart[-1] != '\r' ) {
+ prevLineStart--;
+ }
+
+ const char *trimmedLineStart = prevLineStart;
+ while ( trimmedLineStart < prevLineEnd && Com_IsMapWhitespace( *trimmedLineStart ) ) {
+ trimmedLineStart++;
+ }
+
+ const char *trimmedLineEnd = prevLineEnd;
+ while ( trimmedLineEnd > trimmedLineStart && Com_IsMapWhitespace( trimmedLineEnd[-1] ) ) {
+ trimmedLineEnd--;
+ }
+
+ if ( idStr::Icmpn( trimmedLineStart, "// primitive", 12 ) == 0 ) {
+ return prevLineStart;
+ }
+
+ if ( trimmedLineStart != trimmedLineEnd ) {
+ break;
+ }
+
+ lineStart = prevLineStart;
+ }
+
+ return blockStart;
+}
+
+void Com_RemoveBloodDecalBrushes_f( const idCmdArgs &args ) {
+ if ( args.Argc() < 2 || args.Argc() > 3 ) {
+ common->Printf( "Usage: removeBloodDecalBrushes