X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=libs%2Fshaderlib.h;h=b73d5963406a2d7d56a8181d814c68c61bbabd11;hb=510c8c16498bc1784bc38d0c33184c0174e71e81;hp=1d9f5e0a7983216b7660f698ae2e28980b829701;hpb=036f3f653150dc10d8dd998567f1d6d9a1ce57ee;p=xonotic%2Fnetradiant.git diff --git a/libs/shaderlib.h b/libs/shaderlib.h index 1d9f5e0a..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,25 +51,6 @@ bool operator()( const CopiedString& shader, const CopiedString& other ) const { } }; -static inline bool shader_is_diffuse( const char *shader ){ - return - /* Quetoo */ - !string_equal_suffix( shader, "_h" ) - && !string_equal_suffix( shader, "_local" ) - && !string_equal_suffix( shader, "_nm" ) - && !string_equal_suffix( shader, "_s" ) - /* DarkPlaces */ - && !string_equal_suffix( shader, "_bump" ) - && !string_equal_suffix( shader, "_glow" ) - && !string_equal_suffix( shader, "_gloss" ) - && !string_equal_suffix( shader, "_luma" ) - && !string_equal_suffix( shader, "_norm" ) - && !string_equal_suffix( shader, "_pants" ) - && !string_equal_suffix( shader, "_shirt" ) - && !string_equal_suffix( shader, "_reflect" ) - ; -} - inline bool shader_valid( const char* shader ){ return string_is_ascii( shader ) && strchr( shader, ' ' ) == 0 @@ -76,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(){ @@ -97,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