mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Merge pull request #146 from AntonioND/an/same-name
Prohibit sections from having the same name
This commit is contained in:
@@ -216,6 +216,23 @@ FindLargestSection(enum eSectionType type, bool bankFixed)
|
||||
return r;
|
||||
}
|
||||
|
||||
int
|
||||
IsSectionNameInUse(const char *name)
|
||||
{
|
||||
struct sSection *pSection;
|
||||
|
||||
pSection = pSections;
|
||||
while (pSection) {
|
||||
if (strcmp(pSection->pzName, name) == 0)
|
||||
return 1;
|
||||
|
||||
pSection = pSection->pNext;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
IsSectionSameTypeBankAndFloating(const char *name, enum eSectionType type, int bank)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user