mirror of
https://github.com/yquake2/ref_vk.git
synced 2024-11-10 06:41:45 +00:00
support custom separator inside filter
This commit is contained in:
parent
28ed516c34
commit
495a40dffd
3 changed files with 8 additions and 8 deletions
|
@ -42,6 +42,6 @@ float FloatNoSwap(float f);
|
|||
/*
|
||||
* TODO: Sync with yquake
|
||||
*/
|
||||
qboolean File_Filtered(const char *name, const char *filter);
|
||||
qboolean File_Filtered(const char *name, const char *filter, char sepator);
|
||||
|
||||
#endif // COMMON_SHARED_SAFE_H
|
||||
|
|
|
@ -1484,10 +1484,10 @@ File_Filtered_Line(const char *name, const char *filter)
|
|||
|
||||
/*
|
||||
* name: file name
|
||||
* filter: file names separated by space, and '!' for skip file
|
||||
* filter: file names separated by sepator, and '!' for skip file
|
||||
*/
|
||||
qboolean
|
||||
File_Filtered(const char *name, const char *filter)
|
||||
File_Filtered(const char *name, const char *filter, char sepator)
|
||||
{
|
||||
const char *current_filter = filter;
|
||||
|
||||
|
@ -1496,7 +1496,7 @@ File_Filtered(const char *name, const char *filter)
|
|||
char line_filter[MAX_QPATH];
|
||||
const char *str_end;
|
||||
|
||||
str_end = strchr(current_filter, ' ');
|
||||
str_end = strchr(current_filter, sepator);
|
||||
// its end of filter
|
||||
if (!str_end)
|
||||
{
|
||||
|
|
|
@ -693,9 +693,9 @@ void Vk_TextureMode( char *string )
|
|||
if (unfiltered2D && image->type == it_pic)
|
||||
{
|
||||
// exception to that exception: stuff on the r_lerp_list
|
||||
nolerp = (lerplist == NULL) || File_Filtered(image->name, lerplist);
|
||||
nolerp = (lerplist == NULL) || File_Filtered(image->name, lerplist, ' ');
|
||||
}
|
||||
else if (nolerplist != NULL && File_Filtered(image->name, nolerplist))
|
||||
else if (nolerplist != NULL && File_Filtered(image->name, nolerplist, ' '))
|
||||
{
|
||||
nolerp = true;
|
||||
}
|
||||
|
@ -1106,11 +1106,11 @@ Vk_LoadPic(const char *name, byte *pic, int width, int realwidth,
|
|||
{
|
||||
// if r_2D_unfiltered is true(ish), nolerp should usually be true,
|
||||
// *unless* the texture is on the r_lerp_list
|
||||
nolerp = (lerplist == NULL) || File_Filtered(name, lerplist);
|
||||
nolerp = (lerplist == NULL) || File_Filtered(name, lerplist, ' ');
|
||||
}
|
||||
else if (nolerplist != NULL)
|
||||
{
|
||||
nolerp = File_Filtered(name, nolerplist);
|
||||
nolerp = File_Filtered(name, nolerplist, ' ');
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue