mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-03 09:32:31 +00:00
ec0c37ee82
Start "modernizing" the code base; old code is based heavily in the Smalltalk style, where everything that doesn't return a different object returns self. This can be useful, but it isn't what is usually done these days. Also, add type information (which didn't exist in "the old days" -- an object was an "id", not a "Foo *") to help with debugging.
46 lines
910 B
Objective-C
46 lines
910 B
Objective-C
#ifndef Entity_h
|
|
#define Entity_h
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
#include "QF/mathlib.h"
|
|
|
|
typedef struct epair_s {
|
|
struct epair_s *next;
|
|
char *key;
|
|
char *value;
|
|
} epair_t;
|
|
|
|
// an Entity is a list of brush objects, with additional key / value info
|
|
|
|
@interface Entity:NSMutableArray
|
|
{
|
|
NSMutableArray *array;
|
|
epair_t *epairs;
|
|
BOOL modifiable;
|
|
}
|
|
|
|
- (Entity *) initClass:(const char *) classname;
|
|
- (Entity *) initFromScript: (struct script_s *) script;
|
|
|
|
- (oneway void) dealloc;
|
|
|
|
-(BOOL) modifiable;
|
|
- (void) setModifiable:(BOOL) m;
|
|
|
|
-(const char *) targetname;
|
|
|
|
- (void) writeToFILE:(FILE *)f region:(BOOL) reg;
|
|
|
|
-(const char *) valueForQKey:(const char *) k;
|
|
- (void) getVector:(vec3_t)v forKey:(const char *) k;
|
|
|
|
- (void) setKey:(const char *)k
|
|
toValue:(const char *)v;
|
|
|
|
-(int) numPairs;
|
|
-(epair_t *) epairs;
|
|
- (void) removeKeyPair:(const char *) key;
|
|
|
|
@end
|
|
#endif // Entity_h
|