mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
OS X: Fix build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5094 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0805a0ed45
commit
598011d59a
3 changed files with 27 additions and 7 deletions
|
@ -20,17 +20,17 @@
|
|||
self = [super init];
|
||||
if (self) {
|
||||
struct grpfile *p;
|
||||
int i;
|
||||
|
||||
|
||||
list = [[NSMutableArray alloc] init];
|
||||
|
||||
|
||||
for (p = foundgrps; p; p=p->next) {
|
||||
for (i=0; i<NUMGRPFILES; i++) if (p->crcval == internalgrpfiles[i].crcval) break;
|
||||
if (i == NUMGRPFILES) continue;
|
||||
[list addObject:[[GrpFile alloc] initWithGrpfile:p andName:[NSString stringWithCString:internalgrpfiles[i].name encoding:NSUTF8StringEncoding]]];
|
||||
struct grpfile const * const group = GetInternalGroup(p->crcval);
|
||||
if (group == NULL)
|
||||
continue;
|
||||
[list addObject:[[GrpFile alloc] initWithGrpfile:p andName:[NSString stringWithCString:group->name encoding:NSUTF8StringEncoding]]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,16 @@ struct grpfile internalgrpfiles[] =
|
|||
{ "NAPALM", NAPALM_CRC, 44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM, 0, NULL, NULL, NULL, NULL },
|
||||
{ "WWII GI", WW2GI_CRC, 77939508, GAMEFLAG_WW2GI|GAMEFLAG_NAM, 0, NULL, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
struct grpfile const * GetInternalGroup(int32_t crcval)
|
||||
{
|
||||
for (size_t i = 0; i < ARRAY_SIZE(internalgrpfiles); i++)
|
||||
if (crcval == internalgrpfiles[i].crcval)
|
||||
return &internalgrpfiles[i];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct grpfile *foundgrps = NULL;
|
||||
struct grpfile *listgrps = NULL;
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#ifndef grpscan_h_
|
||||
#define grpscan_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAXLISTNAMELEN 32
|
||||
|
||||
// List of internally-known GRP files
|
||||
|
@ -71,8 +75,14 @@ extern struct grpfile internalgrpfiles[];
|
|||
extern struct grpfile *foundgrps;
|
||||
extern struct grpfile *listgrps;
|
||||
|
||||
extern struct grpfile const * GetInternalGroup(int32_t crcval);
|
||||
|
||||
extern struct grpfile * FindGroup(int32_t crcval);
|
||||
int32_t ScanGroups(void);
|
||||
void FreeGroups(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue