2010-09-01 10:37:10 +00:00
|
|
|
#ifndef EntityClass_h
|
|
|
|
#define EntityClass_h
|
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
2010-09-09 11:46:38 +00:00
|
|
|
|
|
|
|
#include "QF/mathlib.h"
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
typedef enum {esize_model, esize_fixed} esize_t;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
#define MAX_FLAGS 8
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
@interface EntityClass: NSObject
|
2010-09-11 16:41:18 +00:00
|
|
|
{
|
2010-09-29 20:09:11 +00:00
|
|
|
char *name;
|
2010-09-11 10:06:04 +00:00
|
|
|
esize_t esize;
|
|
|
|
vec3_t mins, maxs;
|
|
|
|
vec3_t color;
|
2010-09-29 20:09:11 +00:00
|
|
|
char *comments;
|
|
|
|
char *flagnames[MAX_FLAGS];
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) initFromText: (const char *)text source: (const char *)filename;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (const char *) classname;
|
|
|
|
- (esize_t) esize;
|
|
|
|
- (float *) mins; // only for esize_fixed
|
|
|
|
- (float *) maxs; // only for esize_fixed
|
|
|
|
- (float *) drawColor;
|
|
|
|
- (const char *) comments;
|
|
|
|
- (const char *) flagName: (unsigned)flagnum;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
@end extern id entity_classes_i;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
@interface EntityClassList: NSMutableArray
|
2003-03-18 19:48:24 +00:00
|
|
|
{
|
2010-09-29 20:09:11 +00:00
|
|
|
NSMutableArray *array;
|
|
|
|
id nullclass;
|
|
|
|
char *source_path;
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) initForSourceDirectory: (const char *)path;
|
|
|
|
- (id) classForName: (const char *)name;
|
|
|
|
- (void) scanDirectory;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
@end
|
2010-09-11 10:06:04 +00:00
|
|
|
#endif // EntityClass_h
|