mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-01 16:52:25 +00:00
add Tag_Compare()
This commit is contained in:
parent
ab2619d538
commit
bfd48c4c83
2 changed files with 15 additions and 0 deletions
|
@ -6,3 +6,17 @@ void Tag_Add (taglist_t* list, const UINT16 tag)
|
|||
list->tags = Z_Realloc(list->tags, (list->count + 1) * sizeof(list->tags), PU_LEVEL, NULL);
|
||||
list->tags[list->count++] = tag;
|
||||
}
|
||||
|
||||
boolean Tag_Compare (const taglist_t* list1, const taglist_t* list2)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (list1->count != list2->count)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < list1->count; i++)
|
||||
if (list1->tags[i] != list2->tags[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -11,4 +11,5 @@ typedef struct
|
|||
} taglist_t;
|
||||
|
||||
void Tag_Add (taglist_t* list, const UINT16 tag);
|
||||
boolean Tag_Compare (const taglist_t* list1, const taglist_t* list2);
|
||||
#endif //__R_TAGLIST__
|
||||
|
|
Loading…
Reference in a new issue