X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fshaderlib.h;h=b73d5963406a2d7d56a8181d814c68c61bbabd11;hb=1399463524b339b3b59e5e159449fdd643d61a71;hp=c4e5ba3b2f20309c5e83c847ebcfcfba1f2318a8;hpb=5a29db47f6598cd72b08b3e0cbb1af49f9bca29a;p=xonotic%2Fnetradiant.git diff --git a/libs/shaderlib.h b/libs/shaderlib.h index c4e5ba3b..b73d5963 100644 --- a/libs/shaderlib.h +++ b/libs/shaderlib.h @@ -22,6 +22,7 @@ #if !defined ( INCLUDED_SHADERLIB_H ) #define INCLUDED_SHADERLIB_H +#include "defaults.h" #include "string/string.h" #include "character.h" #include "ishaders.h" @@ -50,16 +51,6 @@ bool operator()( const CopiedString& shader, const CopiedString& other ) const { } }; -static inline bool shader_is_diffuse( const char *shader ){ - return !string_equal_suffix( shader, "_bump" ) - && !string_equal_suffix( shader, "_glow" ) - && !string_equal_suffix( shader, "_h" ) - && !string_equal_suffix( shader, "_local" ) - && !string_equal_suffix( shader, "_luma" ) - && !string_equal_suffix( shader, "_nm" ) - && !string_equal_suffix( shader, "_s" ); -} - inline bool shader_valid( const char* shader ){ return string_is_ascii( shader ) && strchr( shader, ' ' ) == 0 @@ -67,8 +58,7 @@ inline bool shader_valid( const char* shader ){ && strchr( shader, '\r' ) == 0 && strchr( shader, '\t' ) == 0 && strchr( shader, '\v' ) == 0 - && strchr( shader, '\\' ) == 0 - && shader_is_diffuse( shader ); + && strchr( shader, '\\' ) == 0; } inline const char* GlobalTexturePrefix_get(){ @@ -88,8 +78,8 @@ inline bool texdef_name_valid( const char* name ){ } inline const char* texdef_name_default(){ - return GlobalTexturePrefix_get(); + const char* notex = DEFAULT_NOTEX_NAME; + return notex; } - #endif