2010-09-01 10:37:10 +00:00
|
|
|
#ifndef Map_h
|
|
|
|
#define Map_h
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
|
|
|
|
#include "QF/mathlib.h"
|
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
// Map is a list of Entity objects
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
extern id map_i;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
@interface Map: NSMutableArray
|
2010-09-11 23:14:08 +00:00
|
|
|
{
|
2010-09-29 20:09:11 +00:00
|
|
|
NSMutableArray *array;
|
|
|
|
id currentEntity;
|
|
|
|
id oldselection; // temp when loading a new map
|
|
|
|
float minz, maxz;
|
2011-04-09 09:32:29 +00:00
|
|
|
struct hashtab_s *targets;
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) newMap;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) writeStats;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-12-26 13:33:04 +00:00
|
|
|
- (id) readMapFile: (NSString *)fname;
|
2010-12-27 03:11:07 +00:00
|
|
|
- (id) writeMapFile: (NSString *)fname useRegion: (BOOL)reg;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) entityConnect: (vec3_t)p1: (vec3_t)p2;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) selectRay: (vec3_t)p1: (vec3_t)p2: (BOOL)ef;
|
|
|
|
- (id) grabRay: (vec3_t)p1: (vec3_t)p2;
|
|
|
|
- (id) setTextureRay: (vec3_t)p1: (vec3_t)p2: (BOOL)allsides;
|
|
|
|
- (id) getTextureRay: (vec3_t)p1: (vec3_t)p2;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) currentEntity;
|
|
|
|
- (id) setCurrentEntity: ent;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2011-04-09 09:32:29 +00:00
|
|
|
- (id) addTarget: (id) targ;
|
|
|
|
- (id) removeTarget: (id) targ;
|
|
|
|
- (void) addEntity: (id) ent;
|
|
|
|
- (void) removeEntity: (id) ent;
|
|
|
|
- (void) removeEntityAtIndex: (NSUInteger) index;
|
|
|
|
- (NSArray *) targetsForTargetName: (const char *) targetname;
|
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (float) currentMinZ;
|
|
|
|
- (id) setCurrentMinZ: (float)m;
|
|
|
|
- (float) currentMaxZ;
|
|
|
|
- (id) setCurrentMaxZ: (float)m;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (int) numSelected;
|
|
|
|
- (id) selectedBrush; // returns the first selected brush
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// operations on current selection
|
|
|
|
//
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) makeSelectedPerform: (SEL)sel;
|
|
|
|
- (id) makeUnselectedPerform: (SEL)sel;
|
|
|
|
- (id) makeAllPerform: (SEL)sel;
|
|
|
|
- (id) makeGlobalPerform: (SEL)sel; // in and out of region
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) cloneSelection: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) makeEntity: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) subtractSelection: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) selectCompletelyInside: sender;
|
|
|
|
- (id) selectPartiallyInside: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) tallBrush: sender;
|
|
|
|
- (id) shortBrush: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) rotate_x: sender;
|
|
|
|
- (id) rotate_y: sender;
|
|
|
|
- (id) rotate_z: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) flip_x: sender;
|
|
|
|
- (id) flip_y: sender;
|
|
|
|
- (id) flip_z: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-29 20:09:11 +00:00
|
|
|
- (id) selectCompleteEntity: sender;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
@end
|
2010-09-11 16:41:18 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
#endif // Map_h
|