mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-21 11:11:37 +00:00
And the header files.
This commit is contained in:
parent
d23300d58b
commit
c1e2d4c17a
27 changed files with 931 additions and 872 deletions
|
@ -5,54 +5,52 @@
|
||||||
#include "SetBrush.h"
|
#include "SetBrush.h"
|
||||||
#include "EditWindow.h"
|
#include "EditWindow.h"
|
||||||
|
|
||||||
extern id brush_i;
|
extern id brush_i;
|
||||||
|
|
||||||
extern BOOL brushdraw; // YES when drawing cutbrushes and ents
|
extern BOOL brushdraw; // YES when drawing cutbrushes and ents
|
||||||
|
|
||||||
@interface Brush : SetBrush
|
@interface Brush:SetBrush {
|
||||||
{
|
id cutbrushes_i;
|
||||||
id cutbrushes_i;
|
id cutentities_i;
|
||||||
id cutentities_i;
|
boolean updatemask[MAXBRUSHVERTEX];
|
||||||
boolean updatemask[MAXBRUSHVERTEX];
|
BOOL dontdraw; // for modal instance loops
|
||||||
BOOL dontdraw; // for modal instance loops
|
BOOL deleted; // when not visible at all
|
||||||
BOOL deleted; // when not visible at all
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- init;
|
-init;
|
||||||
|
|
||||||
- initFromSetBrush: br;
|
-initFromSetBrush:br;
|
||||||
|
|
||||||
- deselect;
|
-deselect;
|
||||||
- (BOOL)isSelected;
|
-(BOOL) isSelected;
|
||||||
|
|
||||||
- (BOOL)XYmouseDown: (NSPoint *)pt; // return YES if brush handled
|
-(BOOL) XYmouseDown:(NSPoint *) pt; // return YES if brush handled
|
||||||
- (BOOL)ZmouseDown: (NSPoint *)pt; // return YES if brush handled
|
-(BOOL) ZmouseDown:(NSPoint *) pt; // return YES if brush handled
|
||||||
|
|
||||||
- _keyDown:(NSEvent *)theEvent;
|
-_keyDown:(NSEvent *) theEvent;
|
||||||
|
|
||||||
- (NSPoint)centerPoint; // for camera flyby mode
|
-(NSPoint) centerPoint; // for camera flyby mode
|
||||||
|
|
||||||
- InstanceSize;
|
-InstanceSize;
|
||||||
- XYDrawSelf;
|
-XYDrawSelf;
|
||||||
- ZDrawSelf;
|
-ZDrawSelf;
|
||||||
- CameraDrawSelf;
|
-CameraDrawSelf;
|
||||||
|
|
||||||
- flipHorizontal: sender;
|
-flipHorizontal:sender;
|
||||||
- flipVertical: sender;
|
-flipVertical:sender;
|
||||||
- rotate90: sender;
|
-rotate90:sender;
|
||||||
|
|
||||||
- makeTall: sender;
|
-makeTall:sender;
|
||||||
- makeShort: sender;
|
-makeShort:sender;
|
||||||
- makeWide: sender;
|
-makeWide:sender;
|
||||||
- makeNarrow: sender;
|
-makeNarrow:sender;
|
||||||
|
|
||||||
- placeEntity: sender;
|
-placeEntity:sender;
|
||||||
|
|
||||||
- cut: sender;
|
-cut:sender;
|
||||||
- copy: sender;
|
-copy:sender;
|
||||||
|
|
||||||
- addBrush;
|
-addBrush;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#define Brush_h
|
#define Brush_h
|
||||||
|
|
|
@ -9,61 +9,70 @@
|
||||||
|
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
extern id cameraview_i;
|
extern id cameraview_i;
|
||||||
|
|
||||||
extern byte renderlist[1024*1024*4];
|
extern byte renderlist[1024 * 1024 * 4];
|
||||||
|
|
||||||
void CameraMoveto(vec3_t p);
|
void CameraMoveto (vec3_t p);
|
||||||
void CameraLineto(vec3_t p);
|
void CameraLineto (vec3_t p);
|
||||||
|
|
||||||
extern BOOL timedrawing;
|
extern BOOL timedrawing;
|
||||||
|
|
||||||
|
@interface CameraView:NSView {
|
||||||
|
float xa, ya, za;
|
||||||
|
float move;
|
||||||
|
|
||||||
|
float *zbuffer;
|
||||||
|
unsigned *imagebuffer;
|
||||||
|
|
||||||
|
BOOL angleChange; // JR 6.8.95
|
||||||
|
|
||||||
|
vec3_t origin;
|
||||||
|
vec3_t matrix[3];
|
||||||
|
|
||||||
|
NSPoint dragspot;
|
||||||
|
|
||||||
|
drawmode_t drawmode;
|
||||||
|
|
||||||
@interface CameraView : NSView
|
|
||||||
{
|
|
||||||
float xa, ya, za;
|
|
||||||
float move;
|
|
||||||
|
|
||||||
float *zbuffer;
|
|
||||||
unsigned *imagebuffer;
|
|
||||||
|
|
||||||
BOOL angleChange; // JR 6.8.95
|
|
||||||
|
|
||||||
vec3_t origin;
|
|
||||||
vec3_t matrix[3];
|
|
||||||
|
|
||||||
NSPoint dragspot;
|
|
||||||
|
|
||||||
drawmode_t drawmode;
|
|
||||||
|
|
||||||
// UI links
|
// UI links
|
||||||
id mode_radio_i;
|
id mode_radio_i;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- setXYOrigin: (NSPoint *)pt;
|
-setXYOrigin:(NSPoint *) pt;
|
||||||
- setZOrigin: (float)pt;
|
-setZOrigin:(float) pt;
|
||||||
|
|
||||||
- setOrigin: (vec3_t)org angle: (float)angle;
|
-setOrigin:(vec3_t)
|
||||||
- getOrigin: (vec3_t)org;
|
org
|
||||||
|
angle:(float)
|
||||||
|
angle;
|
||||||
|
|
||||||
- (float)yawAngle;
|
-getOrigin:(vec3_t) org;
|
||||||
|
|
||||||
- matrixFromAngles;
|
-(float) yawAngle;
|
||||||
- _keyDown: (NSEvent *)theEvent;
|
|
||||||
|
|
||||||
- drawMode: sender;
|
-matrixFromAngles;
|
||||||
- setDrawMode: (drawmode_t)mode;
|
-_keyDown:(NSEvent *) theEvent;
|
||||||
|
|
||||||
- homeView: sender;
|
-drawMode:sender;
|
||||||
|
-setDrawMode:(drawmode_t) mode;
|
||||||
|
|
||||||
- XYDrawSelf; // for drawing viewpoint in XY view
|
-homeView:sender;
|
||||||
- ZDrawSelf; // for drawing viewpoint in XY view
|
|
||||||
- (BOOL)XYmouseDown: (NSPoint *)pt flags:(int)flags; // return YES if brush handled
|
|
||||||
- (BOOL)ZmouseDown: (NSPoint *)pt flags:(int)flags; // return YES if brush handled
|
|
||||||
|
|
||||||
- upFloor:sender;
|
-XYDrawSelf; // for drawing viewpoint in XY view
|
||||||
- downFloor: sender;
|
-ZDrawSelf; // for drawing viewpoint in XY view
|
||||||
|
-(BOOL) XYmouseDown:(NSPoint *)
|
||||||
|
pt
|
||||||
|
flags:(int)
|
||||||
|
flags; // return YES if brush handled
|
||||||
|
|
||||||
|
-(BOOL) ZmouseDown:(NSPoint *)
|
||||||
|
pt
|
||||||
|
flags:(int)
|
||||||
|
flags; // return YES if brush handled
|
||||||
|
|
||||||
|
-upFloor:sender;
|
||||||
|
-downFloor:sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // CameraView_h
|
||||||
#endif//CameraView_h
|
|
||||||
|
|
|
@ -7,27 +7,25 @@
|
||||||
|
|
||||||
#include "SetBrush.h"
|
#include "SetBrush.h"
|
||||||
|
|
||||||
extern id clipper_i;
|
extern id clipper_i;
|
||||||
|
|
||||||
@interface Clipper : NSObject
|
@interface Clipper:NSObject {
|
||||||
{
|
int num;
|
||||||
int num;
|
vec3_t pos[3];
|
||||||
vec3_t pos[3];
|
plane_t plane;
|
||||||
plane_t plane;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)hide;
|
-(BOOL) hide;
|
||||||
- XYClick: (NSPoint)pt;
|
-XYClick:(NSPoint) pt;
|
||||||
- (BOOL)XYDrag: (NSPoint *)pt;
|
-(BOOL) XYDrag:(NSPoint *) pt;
|
||||||
- ZClick: (NSPoint)pt;
|
-ZClick:(NSPoint) pt;
|
||||||
- carve;
|
-carve;
|
||||||
- flipNormal;
|
-flipNormal;
|
||||||
- (BOOL)getFace: (face_t *)pl;
|
-(BOOL) getFace:(face_t *) pl;
|
||||||
|
|
||||||
- cameraDrawSelf;
|
-cameraDrawSelf;
|
||||||
- XYDrawSelf;
|
-XYDrawSelf;
|
||||||
- ZDrawSelf;
|
-ZDrawSelf;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // Clipper_h
|
||||||
#endif//Clipper_h
|
|
||||||
|
|
|
@ -5,49 +5,60 @@
|
||||||
|
|
||||||
#include "Storage.h"
|
#include "Storage.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
char *key;
|
||||||
char *key;
|
char *value;
|
||||||
char *value;
|
|
||||||
} dict_t;
|
} dict_t;
|
||||||
|
|
||||||
@interface Dict:Storage
|
@interface Dict:Storage {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initFromFile:(FILE *)fp;
|
-initFromFile:(FILE *) fp;
|
||||||
|
|
||||||
- (id) parseMultipleFrom:(char *)value;
|
-(id) parseMultipleFrom:(char *) value;
|
||||||
- (int) getValueUnits:(char *)key;
|
-(int) getValueUnits:(char *) key;
|
||||||
- delString:(char *)string fromValue:(char *)key;
|
-delString:(char *)
|
||||||
- addString:(char *)string toValue:(char *)key;
|
string fromValue:(char *) key;
|
||||||
- (char *)convertListToString:(id)list;
|
|
||||||
- (char *)getStringFor:(char *)name;
|
|
||||||
- removeKeyword:(char *)key;
|
|
||||||
- (unsigned int)getValueFor:(char *)name;
|
|
||||||
- changeStringFor:(char *)key to:(char *)value;
|
|
||||||
- (dict_t *) findKeyword:(char *)key;
|
|
||||||
|
|
||||||
- writeBlockTo:(FILE *)fp;
|
-addString:(char *)
|
||||||
- writeFile:(char *)path;
|
string toValue:(char *) key;
|
||||||
|
|
||||||
|
-(char *) convertListToString:(id) list;
|
||||||
|
-(char *) getStringFor:(char *) name;
|
||||||
|
-removeKeyword:(char *) key;
|
||||||
|
-(unsigned int) getValueFor:(char *) name;
|
||||||
|
-changeStringFor:(char *)
|
||||||
|
key to:(char *) value;
|
||||||
|
|
||||||
|
-(dict_t *) findKeyword:(char *) key;
|
||||||
|
|
||||||
|
-writeBlockTo:(FILE *) fp;
|
||||||
|
-writeFile:(char *) path;
|
||||||
|
|
||||||
// INTERNAL
|
// INTERNAL
|
||||||
- init;
|
-init;
|
||||||
- (id) parseBraceBlock:(FILE *)fp;
|
-(id) parseBraceBlock:(FILE *) fp;
|
||||||
- setupMultiple:(char *)value;
|
-setupMultiple:(char *) value;
|
||||||
- (char *)getNextParameter;
|
-(char *) getNextParameter;
|
||||||
|
|
||||||
@end
|
@end int
|
||||||
|
GetNextChar (FILE * fp);
|
||||||
|
void
|
||||||
|
CopyUntilWhitespc (FILE * fp, char *buffer);
|
||||||
|
void
|
||||||
|
CopyUntilQuote (FILE * fp, char *buffer);
|
||||||
|
int
|
||||||
|
FindBrace (FILE * fp);
|
||||||
|
int
|
||||||
|
FindQuote (FILE * fp);
|
||||||
|
int
|
||||||
|
FindWhitespc (FILE * fp);
|
||||||
|
int
|
||||||
|
FindNonwhitespc (FILE * fp);
|
||||||
|
|
||||||
int GetNextChar(FILE *fp);
|
char *
|
||||||
void CopyUntilWhitespc(FILE *fp,char *buffer);
|
FindWhitespcInBuffer (char *buffer);
|
||||||
void CopyUntilQuote(FILE *fp,char *buffer);
|
char *
|
||||||
int FindBrace(FILE *fp);
|
FindNonwhitespcInBuffer (char *buffer);
|
||||||
int FindQuote(FILE *fp);
|
|
||||||
int FindWhitespc(FILE *fp);
|
|
||||||
int FindNonwhitespc(FILE *fp);
|
|
||||||
|
|
||||||
char *FindWhitespcInBuffer(char *buffer);
|
#endif // Dict_h
|
||||||
char *FindNonwhitespcInBuffer(char *buffer);
|
|
||||||
|
|
||||||
#endif//Dict_h
|
|
||||||
|
|
|
@ -3,14 +3,12 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface DictList:NSMutableArray
|
@ interface DictList:NSMutableArray {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initListFromFile:(FILE *)fp;
|
-initListFromFile:(FILE *) fp;
|
||||||
- writeListFile:(char *)filename;
|
-writeListFile:(char *) filename;
|
||||||
- (id) findDictKeyword:(char *)key;
|
-(id) findDictKeyword:(char *) key;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // DictList_h
|
||||||
#endif//DictList_h
|
|
||||||
|
|
|
@ -13,31 +13,34 @@ typedef struct epair_s {
|
||||||
|
|
||||||
// an Entity is a list of brush objects, with additional key / value info
|
// an Entity is a list of brush objects, with additional key / value info
|
||||||
|
|
||||||
@interface Entity : NSMutableArray
|
@interface Entity:NSMutableArray {
|
||||||
{
|
epair_t *epairs;
|
||||||
epair_t *epairs;
|
BOOL modifiable;
|
||||||
BOOL modifiable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initClass: (char *)classname;
|
-initClass:(char *) classname;
|
||||||
- initFromScript: (struct script_s *) script;
|
-initFromScript:(struct script_s *) script;
|
||||||
|
|
||||||
- (void)dealloc;
|
-(void) dealloc;
|
||||||
|
|
||||||
- (BOOL)modifiable;
|
-(BOOL) modifiable;
|
||||||
- setModifiable: (BOOL)m;
|
-setModifiable:(BOOL) m;
|
||||||
|
|
||||||
- (char *)targetname;
|
-(char *) targetname;
|
||||||
|
|
||||||
- writeToFILE: (FILE *)f region:(BOOL)reg;
|
-writeToFILE:(FILE *)
|
||||||
|
f region:(BOOL) reg;
|
||||||
|
|
||||||
- (char *)valueForQKey: (char *)k;
|
-(char *) valueForQKey:(char *) k;
|
||||||
- getVector: (vec3_t)v forKey: (char *)k;
|
-getVector:(vec3_t)
|
||||||
- setKey:(const char *)k toValue:(const char *)v;
|
v forKey:(char *) k;
|
||||||
- (int)numPairs;
|
|
||||||
- (epair_t *)epairs;
|
-setKey:(const char *)
|
||||||
- removeKeyPair: (char *)key;
|
k toValue:(const char *) v;
|
||||||
|
|
||||||
|
-(int) numPairs;
|
||||||
|
-(epair_t *) epairs;
|
||||||
|
-removeKeyPair:(char *) key;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // Entity_h
|
||||||
#endif//Entity_h
|
|
||||||
|
|
|
@ -5,43 +5,41 @@
|
||||||
|
|
||||||
#include "QF/mathlib.h"
|
#include "QF/mathlib.h"
|
||||||
|
|
||||||
typedef enum {esize_model, esize_fixed} esize_t;
|
typedef enum { esize_model, esize_fixed } esize_t;
|
||||||
|
|
||||||
#define MAX_FLAGS 8
|
#define MAX_FLAGS 8
|
||||||
|
|
||||||
@interface EntityClass : NSObject
|
@interface EntityClass:NSObject {
|
||||||
{
|
char *name;
|
||||||
char *name;
|
esize_t esize;
|
||||||
esize_t esize;
|
vec3_t mins, maxs;
|
||||||
vec3_t mins, maxs;
|
vec3_t color;
|
||||||
vec3_t color;
|
char *comments;
|
||||||
char *comments;
|
char *flagnames[MAX_FLAGS];
|
||||||
char *flagnames[MAX_FLAGS];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initFromText: (const char *)text source: (const char *)filename;
|
-initFromText:(const char *)
|
||||||
- (char *)classname;
|
text source:(const char *) filename;
|
||||||
- (esize_t)esize;
|
|
||||||
- (float *)mins; // only for esize_fixed
|
|
||||||
- (float *)maxs; // only for esize_fixed
|
|
||||||
- (float *)drawColor;
|
|
||||||
- (char *)comments;
|
|
||||||
- (char *)flagName: (unsigned)flagnum;
|
|
||||||
|
|
||||||
@end
|
-(char *) classname;
|
||||||
|
-(esize_t) esize;
|
||||||
|
-(float *) mins; // only for esize_fixed
|
||||||
|
-(float *) maxs; // only for esize_fixed
|
||||||
|
-(float *) drawColor;
|
||||||
|
-(char *) comments;
|
||||||
|
-(char *) flagName:(unsigned) flagnum;
|
||||||
|
|
||||||
extern id entity_classes_i;
|
@end extern id entity_classes_i;
|
||||||
|
|
||||||
@interface EntityClassList : NSMutableArray
|
@interface EntityClassList:NSMutableArray
|
||||||
{
|
{
|
||||||
id nullclass;
|
id nullclass;
|
||||||
char *source_path;
|
char *source_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
- initForSourceDirectory: (char *)path;
|
-initForSourceDirectory:(char *) path;
|
||||||
- (id)classForName: (char *)name;
|
-(id) classForName:(char *) name;
|
||||||
- (void)scanDirectory;
|
-(void) scanDirectory;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // EntityClass_h
|
||||||
#endif//EntityClass_h
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
#define MINIWINICON "DoomEdIcon"
|
#define MINIWINICON "DoomEdIcon"
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
i_project,
|
i_project,
|
||||||
i_textures,
|
i_textures,
|
||||||
i_things,
|
i_things,
|
||||||
|
@ -17,59 +16,59 @@ typedef enum
|
||||||
i_end
|
i_end
|
||||||
} insp_e;
|
} insp_e;
|
||||||
|
|
||||||
extern id inspcontrol_i;
|
extern id inspcontrol_i;
|
||||||
|
|
||||||
@interface InspectorControl:NSObject
|
@interface InspectorControl:NSObject {
|
||||||
{
|
id inspectorView_i; // inspector view
|
||||||
id inspectorView_i; // inspector view
|
id inspectorSubview_i; // inspector view's current subview
|
||||||
id inspectorSubview_i; // inspector view's current subview (gets replaced)
|
// (gets replaced)
|
||||||
|
|
||||||
id contentList; // List of contentviews (corresponds to
|
id contentList; // List of contentviews (corresponds to
|
||||||
// insp_e enum order)
|
|
||||||
id windowList; // List of Windows (corresponds to
|
|
||||||
// insp_e enum order)
|
|
||||||
|
|
||||||
id obj_textures_i; // TexturePalette object (for delegating)
|
// insp_e enum order)
|
||||||
id obj_genkeypair_i; // GenKeyPair object
|
id windowList; // List of Windows (corresponds to
|
||||||
|
|
||||||
|
// insp_e enum order)
|
||||||
|
|
||||||
|
id obj_textures_i; // TexturePalette object (for
|
||||||
|
// delegating)
|
||||||
|
id obj_genkeypair_i; // GenKeyPair object
|
||||||
|
|
||||||
|
id popUpButton_i; // PopUpList title button
|
||||||
|
id popUpMatrix_i; // PopUpList matrix
|
||||||
|
id itemList; // List of popUp buttons
|
||||||
|
|
||||||
|
insp_e currentInspectorType; // keep track of current inspector
|
||||||
|
|
||||||
|
//
|
||||||
|
// Add id's here for new inspectors
|
||||||
|
// **NOTE: Make sure PopUpList has correct TAG value that
|
||||||
|
// corresponds to the enums above!
|
||||||
|
|
||||||
id popUpButton_i; // PopUpList title button
|
|
||||||
id popUpMatrix_i; // PopUpList matrix
|
|
||||||
id itemList; // List of popUp buttons
|
|
||||||
|
|
||||||
insp_e currentInspectorType; // keep track of current inspector
|
|
||||||
//
|
|
||||||
// Add id's here for new inspectors
|
|
||||||
// **NOTE: Make sure PopUpList has correct TAG value that
|
|
||||||
// corresponds to the enums above!
|
|
||||||
|
|
||||||
// Windows
|
// Windows
|
||||||
id win_project_i; // project
|
id win_project_i; // project
|
||||||
id win_textures_i; // textures
|
id win_textures_i; // textures
|
||||||
id win_things_i; // things
|
id win_things_i; // things
|
||||||
id win_prefs_i; // preferences
|
id win_prefs_i; // preferences
|
||||||
id win_settings_i; // project settings
|
id win_settings_i; // project settings
|
||||||
id win_output_i; // bsp output
|
id win_output_i; // bsp output
|
||||||
id win_help_i; // documentation
|
id win_help_i; // documentation
|
||||||
|
|
||||||
// PopUpList objs
|
// PopUpList objs
|
||||||
id itemProject_i; // project
|
id itemProject_i; // project
|
||||||
id itemTextures_i; // textures
|
id itemTextures_i; // textures
|
||||||
id itemThings_i; // things
|
id itemThings_i; // things
|
||||||
id itemPrefs_i; // preferences
|
id itemPrefs_i; // preferences
|
||||||
id itemSettings_i; // project settings
|
id itemSettings_i; // project settings
|
||||||
id itemOutput_i; // bsp output
|
id itemOutput_i; // bsp output
|
||||||
id itemHelp_i; // docs
|
id itemHelp_i; // docs
|
||||||
}
|
}
|
||||||
|
|
||||||
- awakeFromNib;
|
-awakeFromNib;
|
||||||
- changeInspector:sender;
|
-changeInspector:sender;
|
||||||
- changeInspectorTo:(insp_e)which;
|
-changeInspectorTo:(insp_e) which;
|
||||||
- (insp_e)getCurrentInspector;
|
-(insp_e) getCurrentInspector;
|
||||||
|
|
||||||
|
@end @ protocol InspectorControl - windowResized;
|
||||||
@end
|
@end
|
||||||
|
#endif // InspectorControl_h
|
||||||
@protocol InspectorControl
|
|
||||||
- windowResized;
|
|
||||||
@end
|
|
||||||
|
|
||||||
#endif//InspectorControl_h
|
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
extern id keypairview_i;
|
extern id keypairview_i;
|
||||||
|
|
||||||
@interface KeypairView:NSView
|
@interface KeypairView:NSView {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- calcViewSize;
|
-calcViewSize;
|
||||||
|
|
||||||
#define SPACING 4
|
#define SPACING 4
|
||||||
#define FONTSIZE 12
|
#define FONTSIZE 12
|
||||||
|
@ -18,5 +17,4 @@ extern id keypairview_i;
|
||||||
#define LINEHEIGHT 16
|
#define LINEHEIGHT 16
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // KeypairView_h
|
||||||
#endif//KeypairView_h
|
|
||||||
|
|
|
@ -7,70 +7,69 @@
|
||||||
|
|
||||||
// Map is a list of Entity objects
|
// Map is a list of Entity objects
|
||||||
|
|
||||||
extern id map_i;
|
extern id map_i;
|
||||||
|
|
||||||
@interface Map : NSMutableArray
|
@interface Map:NSMutableArray {
|
||||||
{
|
id currentEntity;
|
||||||
id currentEntity;
|
id oldselection; // temp when loading a new map
|
||||||
id oldselection; // temp when loading a new map
|
float minz, maxz;
|
||||||
float minz, maxz;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- newMap;
|
-newMap;
|
||||||
|
|
||||||
- writeStats;
|
-writeStats;
|
||||||
|
|
||||||
- readMapFile: (char *)fname;
|
-readMapFile:(char *) fname;
|
||||||
- writeMapFile: (char *)fname useRegion: (BOOL)reg;
|
-writeMapFile:(char *)
|
||||||
|
fname useRegion:(BOOL) reg;
|
||||||
|
|
||||||
- entityConnect: (vec3_t)p1 : (vec3_t)p2;
|
-entityConnect: (vec3_t) p1:(vec3_t) p2;
|
||||||
|
|
||||||
- selectRay: (vec3_t)p1 : (vec3_t)p2 : (BOOL)ef;
|
-selectRay: (vec3_t) p1: (vec3_t) p2:(BOOL) ef;
|
||||||
- grabRay: (vec3_t)p1 : (vec3_t)p2;
|
-grabRay: (vec3_t) p1:(vec3_t) p2;
|
||||||
- setTextureRay: (vec3_t)p1 : (vec3_t)p2 : (BOOL)allsides;
|
-setTextureRay: (vec3_t) p1: (vec3_t) p2:(BOOL) allsides;
|
||||||
- getTextureRay: (vec3_t)p1 : (vec3_t)p2;
|
-getTextureRay: (vec3_t) p1:(vec3_t) p2;
|
||||||
|
|
||||||
- currentEntity;
|
-currentEntity;
|
||||||
- setCurrentEntity: ent;
|
-setCurrentEntity:ent;
|
||||||
|
|
||||||
- (float)currentMinZ;
|
-(float) currentMinZ;
|
||||||
- setCurrentMinZ: (float)m;
|
-setCurrentMinZ:(float) m;
|
||||||
- (float)currentMaxZ;
|
-(float) currentMaxZ;
|
||||||
- setCurrentMaxZ: (float)m;
|
-setCurrentMaxZ:(float) m;
|
||||||
|
|
||||||
- (int)numSelected;
|
-(int) numSelected;
|
||||||
- selectedBrush; // returns the first selected brush
|
-selectedBrush; // returns the first selected brush
|
||||||
|
|
||||||
//
|
//
|
||||||
// operations on current selection
|
// operations on current selection
|
||||||
//
|
//
|
||||||
- makeSelectedPerform: (SEL)sel;
|
-makeSelectedPerform:(SEL) sel;
|
||||||
- makeUnselectedPerform: (SEL)sel;
|
-makeUnselectedPerform:(SEL) sel;
|
||||||
- makeAllPerform: (SEL)sel;
|
-makeAllPerform:(SEL) sel;
|
||||||
- makeGlobalPerform: (SEL)sel; // in and out of region
|
-makeGlobalPerform:(SEL) sel; // in and out of region
|
||||||
|
|
||||||
- cloneSelection: sender;
|
-cloneSelection:sender;
|
||||||
|
|
||||||
- makeEntity: sender;
|
-makeEntity:sender;
|
||||||
|
|
||||||
- subtractSelection: sender;
|
-subtractSelection:sender;
|
||||||
|
|
||||||
- selectCompletelyInside: sender;
|
-selectCompletelyInside:sender;
|
||||||
- selectPartiallyInside: sender;
|
-selectPartiallyInside:sender;
|
||||||
|
|
||||||
- tallBrush: sender;
|
-tallBrush:sender;
|
||||||
- shortBrush: sender;
|
-shortBrush:sender;
|
||||||
|
|
||||||
- rotate_x: sender;
|
-rotate_x:sender;
|
||||||
- rotate_y: sender;
|
-rotate_y:sender;
|
||||||
- rotate_z: sender;
|
-rotate_z:sender;
|
||||||
|
|
||||||
- flip_x: sender;
|
-flip_x:sender;
|
||||||
- flip_y: sender;
|
-flip_y:sender;
|
||||||
- flip_z: sender;
|
-flip_z:sender;
|
||||||
|
|
||||||
- selectCompleteEntity: sender;
|
-selectCompleteEntity:sender;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // Map_h
|
||||||
#endif//Map_h
|
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface PopScrollView : NSScrollView
|
@ interface PopScrollView:NSScrollView {
|
||||||
{
|
id button1, button2;
|
||||||
id button1, button2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithFrame:(NSRect)frameRect button1: b1 button2: b2;
|
-initWithFrame:(NSRect)
|
||||||
- tile;
|
frameRect button1:b1 button2:b2;
|
||||||
|
|
||||||
|
-tile;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // PopScrollView_h
|
||||||
#endif//PopScrollView_h
|
|
||||||
|
|
|
@ -3,82 +3,81 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
extern id preferences_i;
|
extern id preferences_i;
|
||||||
|
|
||||||
extern float lightaxis[3];
|
extern float lightaxis[3];
|
||||||
|
|
||||||
// these are personal preferences saved in NeXT defaults, not project
|
// these are personal preferences saved in NeXT defaults, not project
|
||||||
// parameters saved in the quake.qe_project file
|
// parameters saved in the quake.qe_project file
|
||||||
|
|
||||||
@interface Preferences:NSObject
|
@interface Preferences:NSObject {
|
||||||
{
|
id bspSound_i; // actual sound object
|
||||||
id bspSound_i; // actual sound object
|
|
||||||
|
|
||||||
// internal state
|
// internal state
|
||||||
char projectpath[1024];
|
char projectpath[1024];
|
||||||
char bspSound[1024];
|
char bspSound[1024];
|
||||||
|
|
||||||
BOOL brushOffset;
|
BOOL brushOffset;
|
||||||
BOOL showBSP;
|
BOOL showBSP;
|
||||||
|
|
||||||
|
float xlight;
|
||||||
|
float ylight;
|
||||||
|
float zlight; // 0.0 - 1.0
|
||||||
|
|
||||||
|
int startwad; // 0 - 2
|
||||||
|
|
||||||
float xlight;
|
|
||||||
float ylight;
|
|
||||||
float zlight; // 0.0 - 1.0
|
|
||||||
|
|
||||||
int startwad; // 0 - 2
|
|
||||||
|
|
||||||
// UI targets
|
// UI targets
|
||||||
id startproject_i; // TextField
|
id startproject_i; // TextField
|
||||||
|
|
||||||
id bspSoundField_i; // TextField of bspSound
|
id bspSoundField_i; // TextField of bspSound
|
||||||
|
|
||||||
id brushOffset_i; // Brush Offset checkbox
|
id brushOffset_i; // Brush Offset checkbox
|
||||||
id showBSP_i; // Show BSP Output checkbox
|
id showBSP_i; // Show BSP Output checkbox
|
||||||
|
|
||||||
id startwad_i; // which wad to load at startup
|
|
||||||
|
|
||||||
id xlight_i; // X-side lighting
|
id startwad_i; // which wad to load at startup
|
||||||
id ylight_i; // Y-side lighting
|
|
||||||
id zlight_i; // Z-side lighting
|
id xlight_i; // X-side lighting
|
||||||
|
id ylight_i; // Y-side lighting
|
||||||
|
id zlight_i; // Z-side lighting
|
||||||
}
|
}
|
||||||
|
|
||||||
- readDefaults;
|
-readDefaults;
|
||||||
|
|
||||||
//
|
//
|
||||||
// validate and set methods called by UI or defaults
|
// validate and set methods called by UI or defaults
|
||||||
//
|
//
|
||||||
- setProjectPath:(char *)path;
|
-setProjectPath:(char *) path;
|
||||||
- setBspSoundPath:(char *)path; // set the path of the soundfile externally
|
-setBspSoundPath:(char *) path; // set the path of the soundfile
|
||||||
- setShowBSP:(int)state; // set the state of ShowBSP
|
// externally
|
||||||
- setBrushOffset:(int)state; // set the state of BrushOffset
|
-setShowBSP:(int) state; // set the state of ShowBSP
|
||||||
- setStartWad:(int)value; // set start wad (0-2)
|
-setBrushOffset:(int) state; // set the state of BrushOffset
|
||||||
- setXlight:(float)value; // set Xlight value for CameraView
|
-setStartWad:(int) value; // set start wad (0-2)
|
||||||
- setYlight:(float)value; // set Ylight value for CameraView
|
-setXlight:(float) value; // set Xlight value for CameraView
|
||||||
- setZlight:(float)value; // set Zlight value for CameraView
|
-setYlight:(float) value; // set Ylight value for CameraView
|
||||||
|
-setZlight:(float) value; // set Zlight value for CameraView
|
||||||
|
|
||||||
//
|
//
|
||||||
// UI targets
|
// UI targets
|
||||||
//
|
//
|
||||||
- setBspSound:sender; // use OpenPanel to select sound
|
-setBspSound:sender; // use OpenPanel to select sound
|
||||||
- setCurrentProject:sender; // make current roject the default
|
-setCurrentProject:sender; // make current roject the default
|
||||||
- UIChanged: sender; // target for all checks and fields
|
-UIChanged:sender; // target for all checks and fields
|
||||||
|
|
||||||
//
|
//
|
||||||
// methods used by other objects to retreive defaults
|
// methods used by other objects to retreive defaults
|
||||||
//
|
//
|
||||||
- playBspSound;
|
-playBspSound;
|
||||||
|
|
||||||
- (char *)getProjectPath;
|
-(char *) getProjectPath;
|
||||||
- (int)getBrushOffset; // get the state
|
-(int) getBrushOffset; // get the state
|
||||||
- (int)getShowBSP; // get the state
|
-(int) getShowBSP; // get the state
|
||||||
|
|
||||||
- (float)getXlight; // get Xlight value
|
-(float) getXlight; // get Xlight value
|
||||||
- (float)getYlight; // get Ylight value
|
-(float) getYlight; // get Ylight value
|
||||||
- (float)getZlight; // get Zlight value
|
-(float) getZlight; // get Zlight value
|
||||||
|
|
||||||
- (int)getStartWad;
|
-(int) getStartWad;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // Preferences_h
|
||||||
#endif//Preferences_h
|
|
||||||
|
|
|
@ -15,98 +15,102 @@
|
||||||
#define BSPLEAKTEST "bspleaktest"
|
#define BSPLEAKTEST "bspleaktest"
|
||||||
#define BSPENTITIES "bspentities"
|
#define BSPENTITIES "bspentities"
|
||||||
|
|
||||||
#define SUBDIR_ENT "progs" // subdir names in heirarchy
|
#define SUBDIR_ENT "progs" // subdir names in heirarchy
|
||||||
#define SUBDIR_MAPS "maps"
|
#define SUBDIR_MAPS "maps"
|
||||||
#define SUBDIR_GFX "gfx"
|
#define SUBDIR_GFX "gfx"
|
||||||
|
|
||||||
extern id project_i;
|
extern id project_i;
|
||||||
|
|
||||||
@interface Project:NSObject
|
@interface Project:NSObject {
|
||||||
{
|
id projectInfo; // dictionary storage of project info
|
||||||
id projectInfo; // dictionary storage of project info
|
|
||||||
|
|
||||||
id basepathinfo_i; // outlet to base path info textfield
|
id basepathinfo_i; // outlet to base path info textfield
|
||||||
id mapbrowse_i; // outlet to QuakeEd Maps browser
|
id mapbrowse_i; // outlet to QuakeEd Maps browser
|
||||||
id currentmap_i; // outlet to current map textfield
|
id currentmap_i; // outlet to current map textfield
|
||||||
id mapList; // list of map names (Storage)
|
id mapList; // list of map names (Storage)
|
||||||
id descList; // list of map descriptions (Storage)
|
id descList; // list of map descriptions (Storage)
|
||||||
id wadList; // list of wad names (Storage)
|
id wadList; // list of wad names (Storage)
|
||||||
|
|
||||||
id pis_panel_i; // outlet to Project Info Settings (PIS) panel
|
|
||||||
|
|
||||||
id pis_basepath_i; // outlet to PIS->base path
|
id pis_panel_i; // outlet to Project Info Settings
|
||||||
id pis_wads_i; // outlet to PIS->wad browser
|
// (PIS) panel
|
||||||
id pis_fullvis_i; // outlet to PIS->full vis command
|
|
||||||
id pis_fastvis_i; // outlet to PIS->fast vis command
|
|
||||||
id pis_novis_i; // outlet to PIS->no vis command
|
|
||||||
id pis_relight_i; // outlet to PIS->relight command
|
|
||||||
id pis_leaktest_i; // outlet to PIS->leak test command
|
|
||||||
|
|
||||||
id BSPoutput_i; // outlet to Text
|
id pis_basepath_i; // outlet to PIS->base path
|
||||||
|
id pis_wads_i; // outlet to PIS->wad browser
|
||||||
char path_projectinfo[128]; // path of QE_Project file
|
id pis_fullvis_i; // outlet to PIS->full vis command
|
||||||
|
id pis_fastvis_i; // outlet to PIS->fast vis command
|
||||||
|
id pis_novis_i; // outlet to PIS->no vis command
|
||||||
|
id pis_relight_i; // outlet to PIS->relight command
|
||||||
|
id pis_leaktest_i; // outlet to PIS->leak test command
|
||||||
|
|
||||||
char path_basepath[128]; // base path of heirarchy
|
id BSPoutput_i; // outlet to Text
|
||||||
|
|
||||||
char path_progdir[128]; // derived from basepath
|
char path_projectinfo[128]; // path of QE_Project file
|
||||||
char path_mapdirectory[128]; // derived from basepath
|
|
||||||
char path_finalmapdir[128]; // derived from basepath
|
|
||||||
|
|
||||||
char path_wad8[128]; // path of texture WAD for cmd-8 key
|
|
||||||
char path_wad9[128]; // path of texture WAD for cmd-9 key
|
|
||||||
char path_wad0[128]; // path of texture WAD for cmd-0 key
|
|
||||||
|
|
||||||
char string_fullvis[1024]; // cmd-line parm
|
char path_basepath[128]; // base path of heirarchy
|
||||||
char string_fastvis[1024]; // cmd-line parm
|
|
||||||
char string_novis[1024]; // cmd-line parm
|
|
||||||
char string_relight[1024]; // cmd-line parm
|
|
||||||
char string_leaktest[1024]; // cmd-line parm
|
|
||||||
char string_entities[1024]; // cmd-line parm
|
|
||||||
|
|
||||||
int showDescriptions; // 1 = show map descs in browser
|
char path_progdir[128]; // derived from basepath
|
||||||
|
char path_mapdirectory[128]; // derived from basepath
|
||||||
|
char path_finalmapdir[128]; // derived from basepath
|
||||||
|
|
||||||
time_t lastModified; // last time project file was modified
|
char path_wad8[128]; // path of texture WAD for cmd-8 key
|
||||||
|
char path_wad9[128]; // path of texture WAD for cmd-9 key
|
||||||
|
char path_wad0[128]; // path of texture WAD for cmd-0 key
|
||||||
|
|
||||||
|
char string_fullvis[1024]; // cmd-line parm
|
||||||
|
char string_fastvis[1024]; // cmd-line parm
|
||||||
|
char string_novis[1024]; // cmd-line parm
|
||||||
|
char string_relight[1024]; // cmd-line parm
|
||||||
|
char string_leaktest[1024]; // cmd-line parm
|
||||||
|
char string_entities[1024]; // cmd-line parm
|
||||||
|
|
||||||
|
int showDescriptions; // 1 = show map descs in browser
|
||||||
|
|
||||||
|
time_t lastModified; // last time project file was modified
|
||||||
}
|
}
|
||||||
|
|
||||||
- initProject;
|
-initProject;
|
||||||
- initVars;
|
-initVars;
|
||||||
|
|
||||||
- (char *)currentProjectFile;
|
-(char *) currentProjectFile;
|
||||||
|
|
||||||
- setTextureWad: (char *)wf;
|
-setTextureWad:(char *) wf;
|
||||||
|
|
||||||
- addToOutput:(char *)string;
|
-addToOutput:(char *) string;
|
||||||
- clearBspOutput:sender;
|
-clearBspOutput:sender;
|
||||||
- initProjSettings;
|
-initProjSettings;
|
||||||
- changeChar:(char)f to:(char)t in:(id)obj;
|
-changeChar:(char)
|
||||||
- (int)searchForString:(char *)str in:(id)obj;
|
f to:(char)
|
||||||
|
t in:(id) obj;
|
||||||
|
|
||||||
- parseProjectFile; // read defaultsdatabase for project path
|
-(int) searchForString:(char *)
|
||||||
- openProjectFile:(char *)path; // called by openProject and newProject
|
str in:(id) obj;
|
||||||
- openProject;
|
|
||||||
- clickedOnMap:sender; // called if clicked on map in browser
|
|
||||||
- clickedOnWad:sender; // called if clicked on wad in browser
|
|
||||||
|
|
||||||
// methods to querie the project file
|
-parseProjectFile; // read defaultsdatabase for project
|
||||||
|
// path
|
||||||
|
-openProjectFile:(char *) path; // called by openProject and newProject
|
||||||
|
-openProject;
|
||||||
|
-clickedOnMap:sender; // called if clicked on map in browser
|
||||||
|
-clickedOnWad:sender; // called if clicked on wad in browser
|
||||||
|
|
||||||
- (char *)getMapDirectory;
|
// methods to querie the project file
|
||||||
- (char *)getFinalMapDirectory;
|
|
||||||
- (char *)getProgDirectory;
|
|
||||||
|
|
||||||
- (char *)getWAD8;
|
-(char *) getMapDirectory;
|
||||||
- (char *)getWAD9;
|
-(char *) getFinalMapDirectory;
|
||||||
- (char *)getWAD0;
|
-(char *) getProgDirectory;
|
||||||
|
|
||||||
- (char *)getFullVisCmd;
|
-(char *) getWAD8;
|
||||||
- (char *)getFastVisCmd;
|
-(char *) getWAD9;
|
||||||
- (char *)getNoVisCmd;
|
-(char *) getWAD0;
|
||||||
- (char *)getRelightCmd;
|
|
||||||
- (char *)getLeaktestCmd;
|
|
||||||
- (char *)getEntitiesCmd;
|
|
||||||
|
|
||||||
@end
|
-(char *) getFullVisCmd;
|
||||||
|
-(char *) getFastVisCmd;
|
||||||
|
-(char *) getNoVisCmd;
|
||||||
|
-(char *) getRelightCmd;
|
||||||
|
-(char *) getLeaktestCmd;
|
||||||
|
-(char *) getEntitiesCmd;
|
||||||
|
|
||||||
void changeString(char cf,char ct,char *string);
|
@end void
|
||||||
|
changeString (char cf, char ct, char *string);
|
||||||
|
|
||||||
|
|
||||||
#endif//Project_h
|
#endif // Project_h
|
||||||
|
|
|
@ -3,99 +3,101 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
extern id quakeed_i;
|
extern id quakeed_i;
|
||||||
|
|
||||||
extern BOOL filter_light, filter_path, filter_entities;
|
extern BOOL filter_light, filter_path, filter_entities;
|
||||||
extern BOOL filter_clip_brushes, filter_water_brushes, filter_world;
|
extern BOOL filter_clip_brushes, filter_water_brushes, filter_world;
|
||||||
|
|
||||||
extern id g_cmd_out_i;
|
extern id g_cmd_out_i;
|
||||||
|
|
||||||
double I_FloatTime (void);
|
double I_FloatTime (void);
|
||||||
|
|
||||||
void NopSound (void);
|
void NopSound (void);
|
||||||
|
|
||||||
void qprintf (char *fmt, ...); // prints text to cmd_out_i
|
void qprintf (char *fmt, ...); // prints text to cmd_out_i
|
||||||
|
|
||||||
@interface QuakeEd : NSWindow
|
@interface QuakeEd:NSWindow {
|
||||||
{
|
BOOL dirty;
|
||||||
BOOL dirty;
|
char filename[1024]; // full path with .map extension
|
||||||
char filename[1024]; // full path with .map extension
|
|
||||||
|
|
||||||
// UI objects
|
// UI objects
|
||||||
id brushcount_i;
|
id brushcount_i;
|
||||||
id entitycount_i;
|
id entitycount_i;
|
||||||
id regionbutton_i;
|
id regionbutton_i;
|
||||||
|
|
||||||
id show_coordinates_i;
|
id show_coordinates_i;
|
||||||
id show_names_i;
|
id show_names_i;
|
||||||
|
|
||||||
id filter_light_i;
|
id filter_light_i;
|
||||||
id filter_path_i;
|
id filter_path_i;
|
||||||
id filter_entities_i;
|
id filter_entities_i;
|
||||||
id filter_clip_i;
|
id filter_clip_i;
|
||||||
id filter_water_i;
|
id filter_water_i;
|
||||||
id filter_world_i;
|
id filter_world_i;
|
||||||
|
|
||||||
id cmd_in_i; // text fields
|
id cmd_in_i; // text fields
|
||||||
id cmd_out_i;
|
id cmd_out_i;
|
||||||
|
|
||||||
id xy_drawmode_i; // passed over to xyview after init
|
id xy_drawmode_i; // passed over to xyview after init
|
||||||
}
|
}
|
||||||
|
|
||||||
- setDefaultFilename;
|
-setDefaultFilename;
|
||||||
- (char *)currentFilename;
|
-(char *) currentFilename;
|
||||||
|
|
||||||
- updateAll; // when a model has been changed
|
-updateAll; // when a model has been changed
|
||||||
- updateCamera; // when the camera has moved
|
-updateCamera; // when the camera has moved
|
||||||
- updateXY;
|
-updateXY;
|
||||||
- updateZ;
|
-updateZ;
|
||||||
|
|
||||||
- updateAll:sender;
|
-updateAll:sender;
|
||||||
|
|
||||||
- newinstance; // force next flushwindow to clear all instance drawing
|
-newinstance; // force next flushwindow to clear all
|
||||||
- redrawInstance; // erase and redraw all instance now
|
// instance drawing
|
||||||
|
-redrawInstance; // erase and redraw all instance now
|
||||||
|
|
||||||
- appDidInit:sender;
|
-appDidInit:sender;
|
||||||
- appWillTerminate:sender;
|
-appWillTerminate:sender;
|
||||||
|
|
||||||
- openProject:sender;
|
-openProject:sender;
|
||||||
|
|
||||||
- textCommand: sender;
|
-textCommand:sender;
|
||||||
|
|
||||||
- applyRegion: sender;
|
-applyRegion:sender;
|
||||||
|
|
||||||
- (BOOL)dirty;
|
-(BOOL) dirty;
|
||||||
|
|
||||||
- clear: sender;
|
-clear:sender;
|
||||||
- centerCamera: sender;
|
-centerCamera:sender;
|
||||||
- centerZChecker: sender;
|
-centerZChecker:sender;
|
||||||
|
|
||||||
- changeXYLookUp: sender;
|
-changeXYLookUp:sender;
|
||||||
|
|
||||||
- setBrushRegion: sender;
|
-setBrushRegion:sender;
|
||||||
- setXYRegion: sender;
|
-setXYRegion:sender;
|
||||||
|
|
||||||
- open: sender;
|
-open:sender;
|
||||||
- save: sender;
|
-save:sender;
|
||||||
- saveAs: sender;
|
-saveAs:sender;
|
||||||
|
|
||||||
- doOpen: (char *)fname;
|
-doOpen:(char *) fname;
|
||||||
|
|
||||||
- saveBSP:(char *)cmdline dialog:(BOOL)wt;
|
-saveBSP:(char *)
|
||||||
|
cmdline
|
||||||
|
dialog:(BOOL)
|
||||||
|
wt;
|
||||||
|
|
||||||
- BSP_Full: sender;
|
-BSP_Full:sender;
|
||||||
- BSP_FastVis: sender;
|
-BSP_FastVis:sender;
|
||||||
- BSP_NoVis: sender;
|
-BSP_NoVis:sender;
|
||||||
- BSP_relight: sender;
|
-BSP_relight:sender;
|
||||||
- BSP_stop: sender;
|
-BSP_stop:sender;
|
||||||
- BSP_entities: sender;
|
-BSP_entities:sender;
|
||||||
|
|
||||||
//
|
//
|
||||||
// UI querie for other objects
|
// UI querie for other objects
|
||||||
//
|
//
|
||||||
- (BOOL)showCoordinates;
|
-(BOOL) showCoordinates;
|
||||||
- (BOOL)showNames;
|
-(BOOL) showNames;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // QuakeEd_h
|
||||||
#endif//QuakeEd_h
|
|
||||||
|
|
|
@ -9,31 +9,28 @@
|
||||||
|
|
||||||
#define MAX_FACES 16
|
#define MAX_FACES 16
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
int numpoints;
|
||||||
int numpoints;
|
vec5_t points[8]; // variable sized
|
||||||
vec5_t points[8]; // variable sized
|
|
||||||
} winding_t;
|
} winding_t;
|
||||||
|
|
||||||
#define MAX_POINTS_ON_WINDING 64
|
#define MAX_POINTS_ON_WINDING 64
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
vec3_t normal;
|
||||||
vec3_t normal;
|
float dist;
|
||||||
float dist;
|
|
||||||
} plane_t;
|
} plane_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
// implicit rep
|
// implicit rep
|
||||||
vec3_t planepts[3];
|
vec3_t planepts[3];
|
||||||
texturedef_t texture;
|
texturedef_t texture;
|
||||||
|
|
||||||
// cached rep
|
// cached rep
|
||||||
plane_t plane;
|
plane_t plane;
|
||||||
qtexture_t *qtexture;
|
qtexture_t *qtexture;
|
||||||
float light; // 0 - 1.0
|
float light; // 0 - 1.0
|
||||||
winding_t *w;
|
winding_t *w;
|
||||||
} face_t;
|
} face_t;
|
||||||
|
|
||||||
#define ON_EPSILON 0.1
|
#define ON_EPSILON 0.1
|
||||||
|
@ -45,120 +42,167 @@ typedef struct
|
||||||
#define SIDE_ON 2
|
#define SIDE_ON 2
|
||||||
|
|
||||||
|
|
||||||
winding_t *ClipWinding (winding_t *in, plane_t *split);
|
winding_t *ClipWinding (winding_t * in, plane_t *split);
|
||||||
winding_t *CopyWinding (winding_t *w);
|
winding_t *CopyWinding (winding_t * w);
|
||||||
winding_t *NewWinding (int points);
|
winding_t *NewWinding (int points);
|
||||||
|
|
||||||
|
|
||||||
@interface SetBrush : NSObject
|
@interface SetBrush:NSObject {
|
||||||
{
|
BOOL regioned; // not active
|
||||||
BOOL regioned; // not active
|
BOOL selected;
|
||||||
BOOL selected;
|
|
||||||
|
|
||||||
BOOL invalid; // not a proper polyhedron
|
BOOL invalid; // not a proper polyhedron
|
||||||
|
|
||||||
id parent; // the entity this brush is in
|
id parent; // the entity this brush is in
|
||||||
vec3_t bmins, bmaxs;
|
vec3_t bmins, bmaxs;
|
||||||
vec3_t entitycolor;
|
vec3_t entitycolor;
|
||||||
int numfaces;
|
int numfaces;
|
||||||
face_t faces[MAX_FACES];
|
face_t faces[MAX_FACES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initOwner: own mins:(float *)mins maxs:(float *)maxs texture:(texturedef_t *)tex;
|
-initOwner: own mins:(float *)
|
||||||
- initFromScript: (struct script_s *) script owner: own;
|
mins
|
||||||
- setMins:(float *)mins maxs:(float *)maxs;
|
maxs:(float *)
|
||||||
|
maxs
|
||||||
|
texture:(texturedef_t *)
|
||||||
|
tex;
|
||||||
|
|
||||||
- parent;
|
-initFromScript:(struct script_s *)
|
||||||
- setParent: (id)p;
|
script
|
||||||
|
owner:
|
||||||
|
own;
|
||||||
|
|
||||||
- setEntityColor: (vec3_t)color;
|
-setMins:(float *)
|
||||||
|
mins
|
||||||
|
maxs:(float *)
|
||||||
|
maxs;
|
||||||
|
|
||||||
- calcWindings;
|
-parent;
|
||||||
|
-setParent:(id) p;
|
||||||
|
|
||||||
- writeToFILE: (FILE *)f region: (BOOL)reg;
|
-setEntityColor:(vec3_t) color;
|
||||||
|
|
||||||
- (BOOL)selected;
|
-calcWindings;
|
||||||
- (BOOL)regioned;
|
|
||||||
- setSelected: (BOOL)s;
|
|
||||||
- setRegioned: (BOOL)s;
|
|
||||||
|
|
||||||
- getMins: (vec3_t)mins maxs: (vec3_t)maxs;
|
-writeToFILE:(FILE *)
|
||||||
|
f
|
||||||
|
region:(BOOL)
|
||||||
|
reg;
|
||||||
|
|
||||||
- (BOOL)containsPoint: (vec3_t)pt;
|
-(BOOL) selected;
|
||||||
|
-(BOOL) regioned;
|
||||||
|
-setSelected:(BOOL) s;
|
||||||
|
-setRegioned:(BOOL) s;
|
||||||
|
|
||||||
- freeWindings;
|
-getMins:(vec3_t)
|
||||||
- removeIfInvalid;
|
mins
|
||||||
|
maxs:(vec3_t)
|
||||||
|
maxs;
|
||||||
|
|
||||||
extern vec3_t region_min, region_max;
|
-(BOOL) containsPoint:(vec3_t) pt;
|
||||||
- newRegion;
|
|
||||||
|
|
||||||
- (texturedef_t *)texturedef;
|
-freeWindings;
|
||||||
- (texturedef_t *)texturedefForFace: (int)f;
|
-removeIfInvalid;
|
||||||
- setTexturedef: (texturedef_t *)tex;
|
|
||||||
- setTexturedef: (texturedef_t *)tex forFace:(int)f;
|
|
||||||
|
|
||||||
- XYDrawSelf;
|
extern vec3_t
|
||||||
- ZDrawSelf;
|
region_min,
|
||||||
- CameraDrawSelf;
|
region_max;
|
||||||
- XYRenderSelf;
|
|
||||||
- CameraRenderSelf;
|
|
||||||
|
|
||||||
- hitByRay: (vec3_t)p1 : (vec3_t) p2 : (float *)time : (int *)face;
|
-newRegion;
|
||||||
|
|
||||||
|
-(texturedef_t *) texturedef;
|
||||||
|
-(texturedef_t *) texturedefForFace:(int) f;
|
||||||
|
-setTexturedef:(texturedef_t *) tex;
|
||||||
|
-setTexturedef:(texturedef_t *)
|
||||||
|
tex
|
||||||
|
forFace:(int)
|
||||||
|
f;
|
||||||
|
|
||||||
|
-XYDrawSelf;
|
||||||
|
-ZDrawSelf;
|
||||||
|
-CameraDrawSelf;
|
||||||
|
-XYRenderSelf;
|
||||||
|
-CameraRenderSelf;
|
||||||
|
|
||||||
|
-hitByRay: (vec3_t) p1: (vec3_t) p2: (float *) time:(int *) face;
|
||||||
|
|
||||||
//
|
//
|
||||||
// single brush actions
|
// single brush actions
|
||||||
//
|
//
|
||||||
extern int numcontrolpoints;
|
extern int
|
||||||
extern float *controlpoints[MAX_FACES*3];
|
numcontrolpoints;
|
||||||
- getZdragface: (vec3_t)dragpoint;
|
extern float *
|
||||||
- getXYdragface: (vec3_t)dragpoint;
|
controlpoints[MAX_FACES * 3];
|
||||||
- getXYShearPoints: (vec3_t)dragpoint;
|
|
||||||
|
|
||||||
- addFace: (face_t *)f;
|
-getZdragface:(vec3_t) dragpoint;
|
||||||
|
-getXYdragface:(vec3_t) dragpoint;
|
||||||
|
-getXYShearPoints:(vec3_t) dragpoint;
|
||||||
|
|
||||||
|
-addFace:(face_t *) f;
|
||||||
|
|
||||||
//
|
//
|
||||||
// multiple brush actions
|
// multiple brush actions
|
||||||
//
|
//
|
||||||
- carveByClipper;
|
-carveByClipper;
|
||||||
|
|
||||||
extern vec3_t sb_translate;
|
extern vec3_t
|
||||||
- translate;
|
sb_translate;
|
||||||
|
|
||||||
extern id carve_in, carve_out;
|
-translate;
|
||||||
- select;
|
|
||||||
- deselect;
|
|
||||||
- remove;
|
|
||||||
- flushTextures;
|
|
||||||
|
|
||||||
extern vec3_t sb_mins, sb_maxs;
|
extern id
|
||||||
- addToBBox;
|
carve_in,
|
||||||
|
carve_out;
|
||||||
|
|
||||||
extern vec3_t sel_x, sel_y, sel_z;
|
-select;
|
||||||
extern vec3_t sel_org;
|
-deselect;
|
||||||
- transform;
|
-remove;
|
||||||
|
-flushTextures;
|
||||||
|
|
||||||
- flipNormals;
|
extern vec3_t
|
||||||
|
sb_mins,
|
||||||
|
sb_maxs;
|
||||||
|
|
||||||
- carve;
|
-addToBBox;
|
||||||
- setCarveVars;
|
|
||||||
|
|
||||||
extern id sb_newowner;
|
extern vec3_t
|
||||||
- moveToEntity;
|
sel_x,
|
||||||
|
sel_y,
|
||||||
|
sel_z;
|
||||||
|
extern vec3_t
|
||||||
|
sel_org;
|
||||||
|
|
||||||
- takeCurrentTexture;
|
-transform;
|
||||||
|
|
||||||
extern vec3_t select_min, select_max;
|
-flipNormals;
|
||||||
- selectPartial;
|
|
||||||
- selectComplete;
|
|
||||||
- regionPartial;
|
|
||||||
- regionComplete;
|
|
||||||
|
|
||||||
extern float sb_floor_dir, sb_floor_dist;
|
-carve;
|
||||||
- feetToFloor;
|
-setCarveVars;
|
||||||
|
|
||||||
- (int) getNumBrushFaces;
|
extern id
|
||||||
- (face_t *)getBrushFace: (int)which;
|
sb_newowner;
|
||||||
|
|
||||||
|
-moveToEntity;
|
||||||
|
|
||||||
|
-takeCurrentTexture;
|
||||||
|
|
||||||
|
extern vec3_t
|
||||||
|
select_min,
|
||||||
|
select_max;
|
||||||
|
|
||||||
|
-selectPartial;
|
||||||
|
-selectComplete;
|
||||||
|
-regionPartial;
|
||||||
|
-regionComplete;
|
||||||
|
|
||||||
|
extern float
|
||||||
|
sb_floor_dir,
|
||||||
|
sb_floor_dist;
|
||||||
|
|
||||||
|
-feetToFloor;
|
||||||
|
|
||||||
|
-(int) getNumBrushFaces;
|
||||||
|
-(face_t *) getBrushFace:(int) which;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // SetBrush_h
|
||||||
#endif//SetBrush_h
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with this library; if not, write to the Free
|
License along with this library; if not, write to the Free
|
||||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
TODO:
|
TODO:
|
||||||
|
@ -31,55 +31,57 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface Storage : NSObject
|
@ interface Storage:NSObject {
|
||||||
{
|
@public void *dataPtr; /* data of the Storage object */
|
||||||
@public
|
const char *description; /* Element description */
|
||||||
void *dataPtr; /* data of the Storage object */
|
NSUInteger numElements; /* Actual number of elements */
|
||||||
const char *description; /* Element description */
|
NSUInteger maxElements; /* Total allocated elements */
|
||||||
NSUInteger numElements; /* Actual number of elements */
|
NSUInteger elementSize; /* Element size */
|
||||||
NSUInteger maxElements; /* Total allocated elements */
|
|
||||||
NSUInteger elementSize; /* Element size */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Creating, freeing, initializing, and emptying */
|
/* Creating, freeing, initializing, and emptying */
|
||||||
|
|
||||||
- init;
|
-init;
|
||||||
- initCount:(NSUInteger)numSlots elementSize:(NSUInteger)sizeInBytes
|
-initCount:(NSUInteger)
|
||||||
description:(const char*)elemDesc;
|
numSlots elementSize:(NSUInteger) sizeInBytes
|
||||||
- (void)dealloc;
|
description:(const char *) elemDesc;
|
||||||
- empty;
|
-(void) dealloc;
|
||||||
- copy;
|
-empty;
|
||||||
|
-copy;
|
||||||
|
|
||||||
/* Manipulating the elements */
|
/* Manipulating the elements */
|
||||||
|
|
||||||
- (BOOL)isEqual: anObject;
|
-(BOOL) isEqual:anObject;
|
||||||
- (const char *)description;
|
-(const char *) description;
|
||||||
- (NSUInteger)count;
|
-(NSUInteger) count;
|
||||||
- (void *)elementAt:(NSUInteger)index;
|
-(void *) elementAt:(NSUInteger) index;
|
||||||
- replaceElementAt:(NSUInteger)index with:(void *)anElement;
|
-replaceElementAt:(NSUInteger)
|
||||||
- setNumSlots:(NSUInteger)numSlots;
|
index with:(void *) anElement;
|
||||||
- setAvailableCapacity:(NSUInteger)numSlots;
|
|
||||||
- addElement:(void *)anElement;
|
-setNumSlots:(NSUInteger) numSlots;
|
||||||
- removeLastElement;
|
-setAvailableCapacity:(NSUInteger) numSlots;
|
||||||
- insertElement:(void *)anElement at:(NSUInteger)index;
|
-addElement:(void *) anElement;
|
||||||
- removeElementAt:(NSUInteger)index;
|
-removeLastElement;
|
||||||
|
-insertElement:(void *)
|
||||||
|
anElement at:(NSUInteger) index;
|
||||||
|
|
||||||
|
-removeElementAt:(NSUInteger) index;
|
||||||
|
|
||||||
/* Archiving */
|
/* Archiving */
|
||||||
|
|
||||||
- write:(TypedStream *)stream;
|
-write:(TypedStream *) stream;
|
||||||
- read:(TypedStream *)stream;
|
-read:(TypedStream *) stream;
|
||||||
|
|
||||||
/* old-style creation */
|
/* old-style creation */
|
||||||
|
|
||||||
+ new;
|
+new;
|
||||||
+ newCount:(NSUInteger)count elementSize:(NSUInteger)sizeInBytes
|
+newCount:(NSUInteger)
|
||||||
description:(const char *)descriptor;
|
count elementSize:(NSUInteger) sizeInBytes
|
||||||
|
description:(const char *) descriptor;
|
||||||
|
|
||||||
@end
|
@end typedef struct {
|
||||||
|
@defs (Storage)
|
||||||
typedef struct {
|
} NXStorageId;
|
||||||
@defs(Storage)
|
|
||||||
} NXStorageId;
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __Storage_h_INCLUDE_GNU */
|
#endif /* __Storage_h_INCLUDE_GNU */
|
||||||
|
|
|
@ -5,117 +5,114 @@
|
||||||
|
|
||||||
#include "QF/qtypes.h"
|
#include "QF/qtypes.h"
|
||||||
|
|
||||||
typedef union
|
typedef union {
|
||||||
{
|
byte chan[4];
|
||||||
byte chan[4];
|
unsigned p;
|
||||||
unsigned p;
|
|
||||||
} pixel32_t;
|
} pixel32_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
char texture[16];
|
||||||
char texture[16];
|
float rotate;
|
||||||
float rotate;
|
float shift[2];
|
||||||
float shift[2];
|
float scale[2];
|
||||||
float scale[2];
|
|
||||||
} texturedef_t;
|
} texturedef_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
char name[16];
|
||||||
char name[16];
|
|
||||||
|
int width;
|
||||||
int width;
|
int height;
|
||||||
int height;
|
NSBitmapImageRep *rep;
|
||||||
NSBitmapImageRep *rep;
|
void *data;
|
||||||
void *data;
|
pixel32_t flatcolor;
|
||||||
pixel32_t flatcolor;
|
|
||||||
} qtexture_t;
|
} qtexture_t;
|
||||||
|
|
||||||
#define MAX_TEXTURES 1024
|
#define MAX_TEXTURES 1024
|
||||||
|
|
||||||
extern int tex_count;
|
extern int tex_count;
|
||||||
extern qtexture_t qtextures[MAX_TEXTURES];
|
extern qtexture_t qtextures[MAX_TEXTURES];
|
||||||
|
|
||||||
void TEX_InitFromWad (char *path);
|
void TEX_InitFromWad (char *path);
|
||||||
qtexture_t *TEX_ForName (char *name);
|
qtexture_t *TEX_ForName (char *name);
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
id image; // NSImage
|
||||||
id image; // NSImage
|
NSRect r;
|
||||||
NSRect r;
|
char *name;
|
||||||
char *name;
|
int index;
|
||||||
int index;
|
int display; // flag (on/off)
|
||||||
int display; // flag (on/off)
|
|
||||||
} texpal_t;
|
} texpal_t;
|
||||||
|
|
||||||
#define TEX_INDENT 10
|
#define TEX_INDENT 10
|
||||||
#define TEX_SPACING 16
|
#define TEX_SPACING 16
|
||||||
|
|
||||||
extern id texturepalette_i;
|
extern id texturepalette_i;
|
||||||
|
|
||||||
@interface TexturePalette:NSObject
|
@interface TexturePalette:NSObject {
|
||||||
{
|
char currentwad[1024];
|
||||||
char currentwad[1024];
|
id textureList_i;
|
||||||
id textureList_i;
|
id textureView_i;
|
||||||
id textureView_i;
|
id searchField_i;
|
||||||
id searchField_i;
|
id sizeField_i;
|
||||||
id sizeField_i;
|
|
||||||
|
id field_Xshift_i;
|
||||||
id field_Xshift_i;
|
id field_Yshift_i;
|
||||||
id field_Yshift_i;
|
id field_Xscale_i;
|
||||||
id field_Xscale_i;
|
id field_Yscale_i;
|
||||||
id field_Yscale_i;
|
id field_Rotate_i;
|
||||||
id field_Rotate_i;
|
|
||||||
|
int viewWidth;
|
||||||
int viewWidth;
|
int viewHeight;
|
||||||
int viewHeight;
|
int selectedTexture;
|
||||||
int selectedTexture;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (char*)currentWad;
|
-(char *) currentWad;
|
||||||
- initPaletteFromWadfile:(char *)wf;
|
-initPaletteFromWadfile:(char *) wf;
|
||||||
- computeTextureViewSize;
|
-computeTextureViewSize;
|
||||||
- alphabetize;
|
-alphabetize;
|
||||||
- getList;
|
-getList;
|
||||||
- (int)getSelectedTexture;
|
-(int) getSelectedTexture;
|
||||||
- setSelectedTexture:(int)which;
|
-setSelectedTexture:(int) which;
|
||||||
- (int)getSelectedTexIndex;
|
-(int) getSelectedTexIndex;
|
||||||
|
|
||||||
// Called externally
|
// Called externally
|
||||||
- (char *)getSelTextureName;
|
-(char *) getSelTextureName;
|
||||||
- setTextureByName:(char *)name;
|
-setTextureByName:(char *) name;
|
||||||
|
|
||||||
// New methods to replace the 2 above ones
|
// New methods to replace the 2 above ones
|
||||||
- setTextureDef:(texturedef_t *)td;
|
-setTextureDef:(texturedef_t *) td;
|
||||||
- getTextureDef:(texturedef_t *)td;
|
-getTextureDef:(texturedef_t *) td;
|
||||||
|
|
||||||
// Action methods
|
// Action methods
|
||||||
- searchForTexture:sender;
|
-searchForTexture:sender;
|
||||||
|
|
||||||
- clearTexinfo: sender;
|
-clearTexinfo:sender;
|
||||||
|
|
||||||
- incXShift:sender;
|
-incXShift:sender;
|
||||||
- decXShift:sender;
|
-decXShift:sender;
|
||||||
|
|
||||||
- incYShift:sender;
|
-incYShift:sender;
|
||||||
- decYShift:sender;
|
-decYShift:sender;
|
||||||
|
|
||||||
- incRotate: sender;
|
-incRotate:sender;
|
||||||
- decRotate: sender;
|
-decRotate:sender;
|
||||||
|
|
||||||
- incXScale:sender;
|
-incXScale:sender;
|
||||||
- decXScale:sender;
|
-decXScale:sender;
|
||||||
|
|
||||||
- incYScale:sender;
|
-incYScale:sender;
|
||||||
- decYScale:sender;
|
-decYScale:sender;
|
||||||
|
|
||||||
- texturedefChanged: sender;
|
-texturedefChanged:sender;
|
||||||
- onlyShowMapTextures:sender;
|
-onlyShowMapTextures:sender;
|
||||||
- (int) searchForTextureInPalette:(char *)texture;
|
-(int) searchForTextureInPalette:(char *) texture;
|
||||||
- setDisplayFlag:(int)index to:(int)value;
|
-setDisplayFlag:(int)
|
||||||
|
index
|
||||||
|
to:(int)
|
||||||
|
value;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // TexturePalette_h
|
||||||
#endif//TexturePalette_h
|
|
||||||
|
|
|
@ -3,15 +3,13 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface TextureView:NSView
|
@ interface TextureView:NSView {
|
||||||
{
|
id parent_i;
|
||||||
id parent_i;
|
int deselectIndex;
|
||||||
int deselectIndex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- setParent:(id)from;
|
-setParent:(id) from;
|
||||||
- deselect;
|
-deselect;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // TextureView_h
|
||||||
#endif//TextureView_h
|
|
||||||
|
|
|
@ -5,44 +5,42 @@
|
||||||
|
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
|
|
||||||
extern id things_i;
|
extern id things_i;
|
||||||
|
|
||||||
#define ENTITYNAMEKEY "spawn"
|
#define ENTITYNAMEKEY "spawn"
|
||||||
|
|
||||||
@interface Things:NSObject
|
@interface Things:NSObject {
|
||||||
{
|
id entity_browser_i; // browser
|
||||||
id entity_browser_i; // browser
|
id entity_comment_i; // scrolling text window
|
||||||
id entity_comment_i; // scrolling text window
|
|
||||||
|
|
||||||
id prog_path_i;
|
|
||||||
|
|
||||||
int lastSelected; // last row selected in browser
|
|
||||||
|
|
||||||
id keyInput_i;
|
id prog_path_i;
|
||||||
id valueInput_i;
|
|
||||||
id flags_i;
|
int lastSelected; // last row selected in browser
|
||||||
|
|
||||||
|
id keyInput_i;
|
||||||
|
id valueInput_i;
|
||||||
|
id flags_i;
|
||||||
}
|
}
|
||||||
|
|
||||||
- initEntities;
|
-initEntities;
|
||||||
|
|
||||||
- newCurrentEntity;
|
-newCurrentEntity;
|
||||||
- setSelectedKey:(epair_t *)ep;
|
-setSelectedKey:(epair_t *) ep;
|
||||||
|
|
||||||
- clearInputs;
|
-clearInputs;
|
||||||
- (char *)spawnName;
|
-(char *) spawnName;
|
||||||
|
|
||||||
// UI targets
|
// UI targets
|
||||||
- reloadEntityClasses: sender;
|
-reloadEntityClasses:sender;
|
||||||
- selectEntity: sender;
|
-selectEntity:sender;
|
||||||
- doubleClickEntity: sender;
|
-doubleClickEntity:sender;
|
||||||
|
|
||||||
// Action methods
|
// Action methods
|
||||||
- addPair:sender;
|
-addPair:sender;
|
||||||
- delPair:sender;
|
-delPair:sender;
|
||||||
- setAngle:sender;
|
-setAngle:sender;
|
||||||
- setFlags:sender;
|
-setFlags:sender;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // Things_h
|
||||||
#endif//Things_h
|
|
||||||
|
|
|
@ -37,41 +37,44 @@
|
||||||
#include <AppKit/NSGraphicsContext.h>
|
#include <AppKit/NSGraphicsContext.h>
|
||||||
|
|
||||||
typedef struct _UP {
|
typedef struct _UP {
|
||||||
float *points;
|
float *points;
|
||||||
int numberOfPoints;
|
int numberOfPoints;
|
||||||
char *ops;
|
char *ops;
|
||||||
NSPoint cp;
|
NSPoint cp;
|
||||||
int numberOfOps;
|
int numberOfOps;
|
||||||
int max;
|
int max;
|
||||||
float bbox[4];
|
float bbox[4];
|
||||||
int opForUserPath;
|
int opForUserPath;
|
||||||
BOOL ping;
|
BOOL ping;
|
||||||
} UserPath;
|
} UserPath;
|
||||||
|
|
||||||
/* UserPath functions */
|
/* UserPath functions */
|
||||||
NSZone *userPathZone();
|
NSZone *userPathZone ();
|
||||||
UserPath *newUserPath();
|
UserPath *newUserPath ();
|
||||||
void freeUserPath(UserPath *up);
|
void freeUserPath (UserPath * up);
|
||||||
void debugUserPath(UserPath *up, BOOL shouldPing);
|
void debugUserPath (UserPath * up, BOOL shouldPing);
|
||||||
void growUserPath(UserPath *up);
|
void growUserPath (UserPath * up);
|
||||||
void beginUserPath(UserPath *up, BOOL cache);
|
void beginUserPath (UserPath * up, BOOL cache);
|
||||||
void endUserPath(UserPath *up, int op);
|
void endUserPath (UserPath * up, int op);
|
||||||
int sendUserPath(UserPath *up);
|
int sendUserPath (UserPath * up);
|
||||||
void UPmoveto(UserPath *up, float x, float y);
|
void UPmoveto (UserPath * up, float x, float y);
|
||||||
void UPrmoveto(UserPath *up, float x, float y);
|
void UPrmoveto (UserPath * up, float x, float y);
|
||||||
void UPlineto(UserPath *up, float x, float y);
|
void UPlineto (UserPath * up, float x, float y);
|
||||||
void UPrlineto(UserPath *up, float x, float y);
|
void UPrlineto (UserPath * up, float x, float y);
|
||||||
void UPcurveto(UserPath *up, float x1, float y1, float x2, float y2, float x3,
|
void UPcurveto (UserPath * up, float x1, float y1, float x2, float y2,
|
||||||
float y3);
|
float x3, float y3);
|
||||||
void UPrcurveto(UserPath *up, float dx1, float dy1, float dx2, float dy2,
|
void UPrcurveto (UserPath * up, float dx1, float dy1, float dx2,
|
||||||
float dx3, float dy3);
|
float dy2, float dx3, float dy3);
|
||||||
void UParc(UserPath *up, float x, float y, float r, float ang1, float ang2);
|
void UParc (UserPath * up, float x, float y, float r, float ang1,
|
||||||
void UParcn(UserPath *up, float x, float y, float r, float ang1, float ang2);
|
float ang2);
|
||||||
void UParct(UserPath *up, float x1, float y1, float x2, float y2, float r);
|
void UParcn (UserPath * up, float x, float y, float r, float ang1,
|
||||||
void closePath(UserPath *up);
|
float ang2);
|
||||||
void addPts(UserPath *up, float x, float y);
|
void UParct (UserPath * up, float x1, float y1, float x2, float y2,
|
||||||
void addOp(UserPath *up, int op);
|
float r);
|
||||||
void add(UserPath *up, int op, float x, float y);
|
void closePath (UserPath * up);
|
||||||
void checkBBox(UserPath *up, float x, float y);
|
void addPts (UserPath * up, float x, float y);
|
||||||
|
void addOp (UserPath * up, int op);
|
||||||
|
void add (UserPath * up, int op, float x, float y);
|
||||||
|
void checkBBox (UserPath * up, float x, float y);
|
||||||
|
|
||||||
#endif//UserPath_h
|
#endif // UserPath_h
|
||||||
|
|
|
@ -9,65 +9,67 @@
|
||||||
|
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
extern id xyview_i;
|
extern id xyview_i;
|
||||||
|
|
||||||
#define MINSCALE 0.125
|
#define MINSCALE 0.125
|
||||||
#define MAXSCALE 2.0
|
#define MAXSCALE 2.0
|
||||||
|
|
||||||
|
|
||||||
extern vec3_t xy_viewnormal; // v_forward for xy view
|
extern vec3_t xy_viewnormal; // v_forward for xy view
|
||||||
extern float xy_viewdist; // clip behind this plane
|
extern float xy_viewdist; // clip behind this plane
|
||||||
|
|
||||||
extern NSRect xy_draw_rect;
|
extern NSRect xy_draw_rect;
|
||||||
|
|
||||||
void linestart (float r, float g, float b);
|
void linestart (float r, float g, float b);
|
||||||
void lineflush (void);
|
void lineflush (void);
|
||||||
void linecolor (float r, float g, float b);
|
void linecolor (float r, float g, float b);
|
||||||
|
|
||||||
void XYmoveto (vec3_t pt);
|
void XYmoveto (vec3_t pt);
|
||||||
void XYlineto (vec3_t pt);
|
void XYlineto (vec3_t pt);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface XYView : NSView
|
@interface XYView:NSView {
|
||||||
{
|
NSRect realbounds, newrect, combinedrect;
|
||||||
NSRect realbounds, newrect, combinedrect;
|
NSPoint midpoint;
|
||||||
NSPoint midpoint;
|
int gridsize;
|
||||||
int gridsize;
|
float scale;
|
||||||
float scale;
|
|
||||||
|
|
||||||
// for textured view
|
// for textured view
|
||||||
int xywidth, xyheight;
|
int xywidth, xyheight;
|
||||||
float *xyzbuffer;
|
float *xyzbuffer;
|
||||||
unsigned *xypicbuffer;
|
unsigned *xypicbuffer;
|
||||||
|
|
||||||
drawmode_t drawmode;
|
drawmode_t drawmode;
|
||||||
|
|
||||||
// UI links
|
// UI links
|
||||||
id mode_radio_i;
|
id mode_radio_i;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float)currentScale;
|
-(float) currentScale;
|
||||||
|
|
||||||
- setModeRadio: m;
|
-setModeRadio:m;
|
||||||
|
|
||||||
- drawMode: sender;
|
-drawMode:sender;
|
||||||
- setDrawMode: (drawmode_t)mode;
|
-setDrawMode:(drawmode_t) mode;
|
||||||
|
|
||||||
- newSuperBounds;
|
-newSuperBounds;
|
||||||
- newRealBounds: (NSRect *)nb;
|
-newRealBounds:(NSRect *) nb;
|
||||||
|
|
||||||
- addToScrollRange: (float)x :(float)y;
|
-addToScrollRange: (float) x:(float) y;
|
||||||
- setOrigin: (NSPoint *)pt scale: (float)sc;
|
-setOrigin:(NSPoint *)
|
||||||
- centerOn: (vec3_t)org;
|
pt
|
||||||
|
scale:(float)
|
||||||
|
sc;
|
||||||
|
|
||||||
- drawMode: sender;
|
-centerOn:(vec3_t) org;
|
||||||
|
|
||||||
- superviewChanged;
|
-drawMode:sender;
|
||||||
|
|
||||||
- (int)gridsize;
|
-superviewChanged;
|
||||||
- (float)snapToGrid: (float)f;
|
|
||||||
|
-(int) gridsize;
|
||||||
|
-(float) snapToGrid:(float) f;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // XYView_h
|
||||||
#endif//XYView_h
|
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface ZScrollView : NSScrollView
|
@ interface ZScrollView:NSScrollView {
|
||||||
{
|
id button1;
|
||||||
id button1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithFrame:(NSRect)frameRect button1: b1;
|
-initWithFrame:(NSRect)
|
||||||
- tile;
|
frameRect button1:b1;
|
||||||
|
|
||||||
|
-tile;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // ZScrollView_h
|
||||||
#endif//ZScrollView_h
|
|
||||||
|
|
|
@ -7,42 +7,41 @@
|
||||||
|
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
extern id zview_i;
|
extern id zview_i;
|
||||||
|
|
||||||
// zplane controls the objects displayed in the xyview
|
// zplane controls the objects displayed in the xyview
|
||||||
extern float zplane;
|
extern float zplane;
|
||||||
extern float zplanedir;
|
extern float zplanedir;
|
||||||
|
|
||||||
@interface ZView : NSView
|
@interface ZView:NSView {
|
||||||
{
|
float minheight, maxheight;
|
||||||
float minheight, maxheight;
|
float oldminheight, oldmaxheight;
|
||||||
float oldminheight, oldmaxheight;
|
float topbound, bottombound; // for floor clipping
|
||||||
float topbound, bottombound; // for floor clipping
|
|
||||||
|
float scale;
|
||||||
float scale;
|
|
||||||
|
vec3_t origin;
|
||||||
vec3_t origin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- clearBounds;
|
-clearBounds;
|
||||||
- getBounds: (float *)top :(float *)bottom;
|
-getBounds: (float *) top:(float *) bottom;
|
||||||
|
|
||||||
- getPoint: (NSPoint *)pt;
|
-getPoint:(NSPoint *) pt;
|
||||||
- setPoint: (NSPoint *)pt;
|
-setPoint:(NSPoint *) pt;
|
||||||
|
|
||||||
- addToHeightRange: (float)height;
|
-addToHeightRange:(float) height;
|
||||||
|
|
||||||
- newRealBounds;
|
-newRealBounds;
|
||||||
- newSuperBounds;
|
-newSuperBounds;
|
||||||
|
|
||||||
- XYDrawSelf;
|
-XYDrawSelf;
|
||||||
|
|
||||||
- (BOOL)XYmouseDown: (NSPoint *)pt;
|
-(BOOL) XYmouseDown:(NSPoint *) pt;
|
||||||
|
|
||||||
- setXYOrigin: (NSPoint *)pt;
|
-setXYOrigin:(NSPoint *) pt;
|
||||||
|
|
||||||
- setOrigin: (NSPoint *)pt scale: (float)sc;
|
-setOrigin:(NSPoint *)
|
||||||
|
pt scale:(float) sc;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
#endif // ZView_h
|
||||||
#endif//ZView_h
|
|
||||||
|
|
|
@ -9,54 +9,54 @@
|
||||||
|
|
||||||
#define strcmpi strcasecmp
|
#define strcmpi strcasecmp
|
||||||
#define stricmp strcasecmp
|
#define stricmp strcasecmp
|
||||||
char *strupr (char *in);
|
char *strupr (char *in);
|
||||||
char *strlower (char *in);
|
char *strlower (char *in);
|
||||||
int filelength (int handle);
|
int filelength (int handle);
|
||||||
int tell (int handle);
|
int tell (int handle);
|
||||||
|
|
||||||
#ifndef __BYTEBOOL__
|
#ifndef __BYTEBOOL__
|
||||||
#define __BYTEBOOL__
|
#define __BYTEBOOL__
|
||||||
typedef enum {false, true} boolean;
|
typedef enum { false, true } boolean;
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
double I_FloatTime (void);
|
double I_FloatTime (void);
|
||||||
|
|
||||||
int GetKey (void);
|
int GetKey (void);
|
||||||
|
|
||||||
void Error (char *error, ...);
|
void Error (char *error, ...);
|
||||||
int CheckParm (char *check);
|
int CheckParm (char *check);
|
||||||
|
|
||||||
int SafeOpenWrite (char *filename);
|
int SafeOpenWrite (char *filename);
|
||||||
int SafeOpenRead (char *filename);
|
int SafeOpenRead (char *filename);
|
||||||
void SafeRead (int handle, void *buffer, long count);
|
void SafeRead (int handle, void *buffer, long count);
|
||||||
void SafeWrite (int handle, void *buffer, long count);
|
void SafeWrite (int handle, void *buffer, long count);
|
||||||
void *SafeMalloc (long size);
|
void *SafeMalloc (long size);
|
||||||
|
|
||||||
long LoadFile (char *filename, void **bufferptr);
|
long LoadFile (char *filename, void **bufferptr);
|
||||||
void SaveFile (char *filename, void *buffer, long count);
|
void SaveFile (char *filename, void *buffer, long count);
|
||||||
|
|
||||||
void DefaultExtension (char *path, char *extension);
|
void DefaultExtension (char *path, char *extension);
|
||||||
void DefaultPath (char *path, char *basepath);
|
void DefaultPath (char *path, char *basepath);
|
||||||
void StripFilename (char *path);
|
void StripFilename (char *path);
|
||||||
void StripExtension (char *path);
|
void StripExtension (char *path);
|
||||||
|
|
||||||
void ExtractFilePath (char *path, char *dest);
|
void ExtractFilePath (char *path, char *dest);
|
||||||
void ExtractFileBase (char *path, char *dest);
|
void ExtractFileBase (char *path, char *dest);
|
||||||
void ExtractFileExtension (char *path, char *dest);
|
void ExtractFileExtension (char *path, char *dest);
|
||||||
|
|
||||||
long ParseNum (char *str);
|
long ParseNum (char *str);
|
||||||
|
|
||||||
short BigShort (short l);
|
short BigShort (short l);
|
||||||
short LittleShort (short l);
|
short LittleShort (short l);
|
||||||
long BigLong (long l);
|
long BigLong (long l);
|
||||||
long LittleLong (long l);
|
long LittleLong (long l);
|
||||||
float BigFloat (float l);
|
float BigFloat (float l);
|
||||||
float LittleFloat (float l);
|
float LittleFloat (float l);
|
||||||
|
|
||||||
extern char com_token[1024];
|
extern char com_token[1024];
|
||||||
extern boolean com_eof;
|
extern boolean com_eof;
|
||||||
|
|
||||||
char *COM_Parse (char *data);
|
char *COM_Parse (char *data);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,22 +10,22 @@ typedef vec_t vec3_t[3];
|
||||||
|
|
||||||
extern vec3_t vec3_origin;
|
extern vec3_t vec3_origin;
|
||||||
|
|
||||||
boolean VectorCompare (vec3_t v1, vec3_t v2);
|
boolean VectorCompare (vec3_t v1, vec3_t v2);
|
||||||
|
|
||||||
#define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])
|
#define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])
|
||||||
#define VectorSubtract(a,b,c) {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}
|
#define VectorSubtract(a,b,c) {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}
|
||||||
#define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
|
#define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
|
||||||
#define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
|
#define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
|
||||||
|
|
||||||
vec_t _DotProduct (vec3_t v1, vec3_t v2);
|
vec_t _DotProduct (vec3_t v1, vec3_t v2);
|
||||||
void _VectorSubtract (vec3_t va, vec3_t vb, vec3_t out);
|
void _VectorSubtract (vec3_t va, vec3_t vb, vec3_t out);
|
||||||
void _VectorAdd (vec3_t va, vec3_t vb, vec3_t out);
|
void _VectorAdd (vec3_t va, vec3_t vb, vec3_t out);
|
||||||
void _VectorCopy (vec3_t in, vec3_t out);
|
void _VectorCopy (vec3_t in, vec3_t out);
|
||||||
|
|
||||||
void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
|
void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
|
||||||
void VectorNormalize (vec3_t v);
|
void VectorNormalize (vec3_t v);
|
||||||
void VectorScale (vec3_t v, vec_t scale, vec3_t out);
|
void VectorScale (vec3_t v, vec_t scale, vec3_t out);
|
||||||
double VectorLength(vec3_t v);
|
double VectorLength (vec3_t v);
|
||||||
void VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc);
|
void VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,20 +35,20 @@
|
||||||
#include "Clipper.h"
|
#include "Clipper.h"
|
||||||
|
|
||||||
|
|
||||||
void PrintRect (NSRect *r);
|
void PrintRect (NSRect * r);
|
||||||
int FileTime (char *path);
|
int FileTime (char *path);
|
||||||
void Sys_UpdateFile (char *path, char *netpath);
|
void Sys_UpdateFile (char *path, char *netpath);
|
||||||
void CleanupName (char *in, char *out);
|
void CleanupName (char *in, char *out);
|
||||||
|
|
||||||
extern BOOL in_error;
|
extern BOOL in_error;
|
||||||
void Error (char *error, ...);
|
void Error (char *error, ...);
|
||||||
|
|
||||||
#define MAXTOKEN 128
|
#define MAXTOKEN 128
|
||||||
extern char token[MAXTOKEN];
|
extern char token[MAXTOKEN];
|
||||||
extern int scriptline;
|
extern int scriptline;
|
||||||
void StartTokenParsing (char *data);
|
void StartTokenParsing (char *data);
|
||||||
boolean GetToken (boolean crossline); // returns false at eof
|
boolean GetToken (boolean crossline); // returns false at eof
|
||||||
void UngetToken ();
|
void UngetToken ();
|
||||||
|
|
||||||
|
|
||||||
#define FN_CMDOUT "/tmp/QuakeEdCmd.txt"
|
#define FN_CMDOUT "/tmp/QuakeEdCmd.txt"
|
||||||
|
@ -57,4 +57,4 @@ void UngetToken ();
|
||||||
#define FN_CRASHSAVE "/qcache/ErrorSaveMap.map"
|
#define FN_CRASHSAVE "/qcache/ErrorSaveMap.map"
|
||||||
#define FN_DEVLOG "/qcache/devlog"
|
#define FN_DEVLOG "/qcache/devlog"
|
||||||
|
|
||||||
#endif//qedefs_h
|
#endif // qedefs_h
|
||||||
|
|
|
@ -3,19 +3,19 @@
|
||||||
|
|
||||||
#include "SetBrush.h"
|
#include "SetBrush.h"
|
||||||
|
|
||||||
typedef enum {dr_wire, dr_flat, dr_texture} drawmode_t;
|
typedef enum { dr_wire, dr_flat, dr_texture } drawmode_t;
|
||||||
|
|
||||||
extern int r_width, r_height;
|
extern int r_width, r_height;
|
||||||
extern unsigned *r_picbuffer;
|
extern unsigned *r_picbuffer;
|
||||||
extern float *r_zbuffer;
|
extern float *r_zbuffer;
|
||||||
|
|
||||||
extern vec3_t r_origin, r_matrix[3];
|
extern vec3_t r_origin, r_matrix[3];
|
||||||
extern BOOL r_drawflat;
|
extern BOOL r_drawflat;
|
||||||
|
|
||||||
void REN_ClearBuffers (void);
|
void REN_ClearBuffers (void);
|
||||||
void REN_DrawCameraFace (face_t *idpol);
|
void REN_DrawCameraFace (face_t * idpol);
|
||||||
void REN_DrawXYFace (face_t *idpol);
|
void REN_DrawXYFace (face_t * idpol);
|
||||||
void REN_BeginCamera (void);
|
void REN_BeginCamera (void);
|
||||||
void REN_BeginXY (void);
|
void REN_BeginXY (void);
|
||||||
|
|
||||||
#endif//render_h
|
#endif // render_h
|
||||||
|
|
Loading…
Reference in a new issue