And the header files.

This commit is contained in:
Bill Currie 2010-09-11 19:06:04 +09:00
parent d23300d58b
commit c1e2d4c17a
27 changed files with 931 additions and 872 deletions

View file

@ -5,54 +5,52 @@
#include "SetBrush.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
{
id cutbrushes_i;
id cutentities_i;
boolean updatemask[MAXBRUSHVERTEX];
BOOL dontdraw; // for modal instance loops
BOOL deleted; // when not visible at all
@interface Brush:SetBrush {
id cutbrushes_i;
id cutentities_i;
boolean updatemask[MAXBRUSHVERTEX];
BOOL dontdraw; // for modal instance loops
BOOL deleted; // when not visible at all
}
- init;
-init;
- initFromSetBrush: br;
-initFromSetBrush:br;
- deselect;
- (BOOL)isSelected;
-deselect;
-(BOOL) isSelected;
- (BOOL)XYmouseDown: (NSPoint *)pt; // return YES if brush handled
- (BOOL)ZmouseDown: (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
- _keyDown:(NSEvent *)theEvent;
-_keyDown:(NSEvent *) theEvent;
- (NSPoint)centerPoint; // for camera flyby mode
-(NSPoint) centerPoint; // for camera flyby mode
- InstanceSize;
- XYDrawSelf;
- ZDrawSelf;
- CameraDrawSelf;
-InstanceSize;
-XYDrawSelf;
-ZDrawSelf;
-CameraDrawSelf;
- flipHorizontal: sender;
- flipVertical: sender;
- rotate90: sender;
-flipHorizontal:sender;
-flipVertical:sender;
-rotate90:sender;
- makeTall: sender;
- makeShort: sender;
- makeWide: sender;
- makeNarrow: sender;
-makeTall:sender;
-makeShort:sender;
-makeWide:sender;
-makeNarrow:sender;
- placeEntity: sender;
-placeEntity:sender;
- cut: sender;
- copy: sender;
-cut:sender;
-copy:sender;
- addBrush;
-addBrush;
@end
#define Brush_h

View file

@ -9,61 +9,70 @@
#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 CameraLineto(vec3_t p);
void CameraMoveto (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
id mode_radio_i;
id mode_radio_i;
}
- setXYOrigin: (NSPoint *)pt;
- setZOrigin: (float)pt;
-setXYOrigin:(NSPoint *) pt;
-setZOrigin:(float) pt;
- setOrigin: (vec3_t)org angle: (float)angle;
- getOrigin: (vec3_t)org;
-setOrigin:(vec3_t)
org
angle:(float)
angle;
- (float)yawAngle;
-getOrigin:(vec3_t) org;
- matrixFromAngles;
- _keyDown: (NSEvent *)theEvent;
-(float) yawAngle;
- drawMode: sender;
- setDrawMode: (drawmode_t)mode;
-matrixFromAngles;
-_keyDown:(NSEvent *) theEvent;
- homeView: sender;
-drawMode:sender;
-setDrawMode:(drawmode_t) mode;
- XYDrawSelf; // for drawing viewpoint in XY view
- 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
-homeView:sender;
- upFloor:sender;
- downFloor: sender;
-XYDrawSelf; // for drawing viewpoint in XY view
-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
#endif//CameraView_h
#endif // CameraView_h

View file

@ -7,27 +7,25 @@
#include "SetBrush.h"
extern id clipper_i;
extern id clipper_i;
@interface Clipper : NSObject
{
int num;
vec3_t pos[3];
plane_t plane;
@interface Clipper:NSObject {
int num;
vec3_t pos[3];
plane_t plane;
}
- (BOOL)hide;
- XYClick: (NSPoint)pt;
- (BOOL)XYDrag: (NSPoint *)pt;
- ZClick: (NSPoint)pt;
- carve;
- flipNormal;
- (BOOL)getFace: (face_t *)pl;
-(BOOL) hide;
-XYClick:(NSPoint) pt;
-(BOOL) XYDrag:(NSPoint *) pt;
-ZClick:(NSPoint) pt;
-carve;
-flipNormal;
-(BOOL) getFace:(face_t *) pl;
- cameraDrawSelf;
- XYDrawSelf;
- ZDrawSelf;
-cameraDrawSelf;
-XYDrawSelf;
-ZDrawSelf;
@end
#endif//Clipper_h
#endif // Clipper_h

View file

@ -5,49 +5,60 @@
#include "Storage.h"
typedef struct
{
char *key;
char *value;
typedef struct {
char *key;
char *value;
} dict_t;
@interface Dict:Storage
{
@interface Dict:Storage {
}
- initFromFile:(FILE *)fp;
-initFromFile:(FILE *) fp;
- (id) parseMultipleFrom:(char *)value;
- (int) getValueUnits:(char *)key;
- delString:(char *)string fromValue:(char *)key;
- addString:(char *)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;
-(id) parseMultipleFrom:(char *) value;
-(int) getValueUnits:(char *) key;
-delString:(char *)
string fromValue:(char *) key;
- writeBlockTo:(FILE *)fp;
- writeFile:(char *)path;
-addString:(char *)
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
- init;
- (id) parseBraceBlock:(FILE *)fp;
- setupMultiple:(char *)value;
- (char *)getNextParameter;
-init;
-(id) parseBraceBlock:(FILE *) fp;
-setupMultiple:(char *) value;
-(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);
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);
char *
FindWhitespcInBuffer (char *buffer);
char *
FindNonwhitespcInBuffer (char *buffer);
char *FindWhitespcInBuffer(char *buffer);
char *FindNonwhitespcInBuffer(char *buffer);
#endif//Dict_h
#endif // Dict_h

View file

@ -3,14 +3,12 @@
#include <AppKit/AppKit.h>
@interface DictList:NSMutableArray
{
@ interface DictList:NSMutableArray {
}
- initListFromFile:(FILE *)fp;
- writeListFile:(char *)filename;
- (id) findDictKeyword:(char *)key;
-initListFromFile:(FILE *) fp;
-writeListFile:(char *) filename;
-(id) findDictKeyword:(char *) key;
@end
#endif//DictList_h
#endif // DictList_h

View file

@ -13,31 +13,34 @@ typedef struct epair_s {
// an Entity is a list of brush objects, with additional key / value info
@interface Entity : NSMutableArray
{
epair_t *epairs;
BOOL modifiable;
@interface Entity:NSMutableArray {
epair_t *epairs;
BOOL modifiable;
}
- initClass: (char *)classname;
- initFromScript: (struct script_s *) script;
-initClass:(char *) classname;
-initFromScript:(struct script_s *) script;
- (void)dealloc;
-(void) dealloc;
- (BOOL)modifiable;
- setModifiable: (BOOL)m;
-(BOOL) modifiable;
-setModifiable:(BOOL) m;
- (char *)targetname;
-(char *) targetname;
- writeToFILE: (FILE *)f region:(BOOL)reg;
-writeToFILE:(FILE *)
f region:(BOOL) reg;
- (char *)valueForQKey: (char *)k;
- getVector: (vec3_t)v forKey: (char *)k;
- setKey:(const char *)k toValue:(const char *)v;
- (int)numPairs;
- (epair_t *)epairs;
- removeKeyPair: (char *)key;
-(char *) valueForQKey:(char *) k;
-getVector:(vec3_t)
v forKey:(char *) k;
-setKey:(const char *)
k toValue:(const char *) v;
-(int) numPairs;
-(epair_t *) epairs;
-removeKeyPair:(char *) key;
@end
#endif//Entity_h
#endif // Entity_h

View file

@ -5,43 +5,41 @@
#include "QF/mathlib.h"
typedef enum {esize_model, esize_fixed} esize_t;
typedef enum { esize_model, esize_fixed } esize_t;
#define MAX_FLAGS 8
@interface EntityClass : NSObject
{
char *name;
esize_t esize;
vec3_t mins, maxs;
vec3_t color;
char *comments;
char *flagnames[MAX_FLAGS];
@interface EntityClass:NSObject {
char *name;
esize_t esize;
vec3_t mins, maxs;
vec3_t color;
char *comments;
char *flagnames[MAX_FLAGS];
}
- initFromText: (const char *)text source: (const char *)filename;
- (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;
-initFromText:(const char *)
text source:(const char *) filename;
@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;
char *source_path;
id nullclass;
char *source_path;
}
- initForSourceDirectory: (char *)path;
- (id)classForName: (char *)name;
- (void)scanDirectory;
-initForSourceDirectory:(char *) path;
-(id) classForName:(char *) name;
-(void) scanDirectory;
@end
#endif//EntityClass_h
#endif // EntityClass_h

View file

@ -5,8 +5,7 @@
#define MINIWINICON "DoomEdIcon"
typedef enum
{
typedef enum {
i_project,
i_textures,
i_things,
@ -17,59 +16,59 @@ typedef enum
i_end
} insp_e;
extern id inspcontrol_i;
extern id inspcontrol_i;
@interface InspectorControl:NSObject
{
id inspectorView_i; // inspector view
id inspectorSubview_i; // inspector view's current subview (gets replaced)
@interface InspectorControl:NSObject {
id inspectorView_i; // inspector view
id inspectorSubview_i; // inspector view's current subview
// (gets replaced)
id contentList; // List of contentviews (corresponds to
// insp_e enum order)
id windowList; // List of Windows (corresponds to
// insp_e enum order)
id contentList; // List of contentviews (corresponds to
id obj_textures_i; // TexturePalette object (for delegating)
id obj_genkeypair_i; // GenKeyPair object
// insp_e enum order)
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
id win_project_i; // project
id win_textures_i; // textures
id win_things_i; // things
id win_prefs_i; // preferences
id win_settings_i; // project settings
id win_output_i; // bsp output
id win_help_i; // documentation
id win_project_i; // project
id win_textures_i; // textures
id win_things_i; // things
id win_prefs_i; // preferences
id win_settings_i; // project settings
id win_output_i; // bsp output
id win_help_i; // documentation
// PopUpList objs
id itemProject_i; // project
id itemTextures_i; // textures
id itemThings_i; // things
id itemPrefs_i; // preferences
id itemSettings_i; // project settings
id itemOutput_i; // bsp output
id itemHelp_i; // docs
id itemProject_i; // project
id itemTextures_i; // textures
id itemThings_i; // things
id itemPrefs_i; // preferences
id itemSettings_i; // project settings
id itemOutput_i; // bsp output
id itemHelp_i; // docs
}
- awakeFromNib;
- changeInspector:sender;
- changeInspectorTo:(insp_e)which;
- (insp_e)getCurrentInspector;
-awakeFromNib;
-changeInspector:sender;
-changeInspectorTo:(insp_e) which;
-(insp_e) getCurrentInspector;
@end @ protocol InspectorControl - windowResized;
@end
@protocol InspectorControl
- windowResized;
@end
#endif//InspectorControl_h
#endif // InspectorControl_h

View file

@ -3,13 +3,12 @@
#include <AppKit/AppKit.h>
extern id keypairview_i;
extern id keypairview_i;
@interface KeypairView:NSView
{
@interface KeypairView:NSView {
}
- calcViewSize;
-calcViewSize;
#define SPACING 4
#define FONTSIZE 12
@ -18,5 +17,4 @@ extern id keypairview_i;
#define LINEHEIGHT 16
@end
#endif//KeypairView_h
#endif // KeypairView_h

View file

@ -7,70 +7,69 @@
// Map is a list of Entity objects
extern id map_i;
extern id map_i;
@interface Map : NSMutableArray
{
id currentEntity;
id oldselection; // temp when loading a new map
float minz, maxz;
@interface Map:NSMutableArray {
id currentEntity;
id oldselection; // temp when loading a new map
float minz, maxz;
}
- newMap;
-newMap;
- writeStats;
-writeStats;
- readMapFile: (char *)fname;
- writeMapFile: (char *)fname useRegion: (BOOL)reg;
-readMapFile:(char *) fname;
-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;
- grabRay: (vec3_t)p1 : (vec3_t)p2;
- setTextureRay: (vec3_t)p1 : (vec3_t)p2 : (BOOL)allsides;
- getTextureRay: (vec3_t)p1 : (vec3_t)p2;
-selectRay: (vec3_t) p1: (vec3_t) p2:(BOOL) ef;
-grabRay: (vec3_t) p1:(vec3_t) p2;
-setTextureRay: (vec3_t) p1: (vec3_t) p2:(BOOL) allsides;
-getTextureRay: (vec3_t) p1:(vec3_t) p2;
- currentEntity;
- setCurrentEntity: ent;
-currentEntity;
-setCurrentEntity:ent;
- (float)currentMinZ;
- setCurrentMinZ: (float)m;
- (float)currentMaxZ;
- setCurrentMaxZ: (float)m;
-(float) currentMinZ;
-setCurrentMinZ:(float) m;
-(float) currentMaxZ;
-setCurrentMaxZ:(float) m;
- (int)numSelected;
- selectedBrush; // returns the first selected brush
-(int) numSelected;
-selectedBrush; // returns the first selected brush
//
// operations on current selection
//
- makeSelectedPerform: (SEL)sel;
- makeUnselectedPerform: (SEL)sel;
- makeAllPerform: (SEL)sel;
- makeGlobalPerform: (SEL)sel; // in and out of region
-makeSelectedPerform:(SEL) sel;
-makeUnselectedPerform:(SEL) sel;
-makeAllPerform:(SEL) sel;
-makeGlobalPerform:(SEL) sel; // in and out of region
- cloneSelection: sender;
-cloneSelection:sender;
- makeEntity: sender;
-makeEntity:sender;
- subtractSelection: sender;
-subtractSelection:sender;
- selectCompletelyInside: sender;
- selectPartiallyInside: sender;
-selectCompletelyInside:sender;
-selectPartiallyInside:sender;
- tallBrush: sender;
- shortBrush: sender;
-tallBrush:sender;
-shortBrush:sender;
- rotate_x: sender;
- rotate_y: sender;
- rotate_z: sender;
-rotate_x:sender;
-rotate_y:sender;
-rotate_z:sender;
- flip_x: sender;
- flip_y: sender;
- flip_z: sender;
-flip_x:sender;
-flip_y:sender;
-flip_z:sender;
- selectCompleteEntity: sender;
-selectCompleteEntity:sender;
@end
#endif//Map_h
#endif // Map_h

View file

@ -3,14 +3,14 @@
#include <AppKit/AppKit.h>
@interface PopScrollView : NSScrollView
{
id button1, button2;
@ interface PopScrollView:NSScrollView {
id button1, button2;
}
- initWithFrame:(NSRect)frameRect button1: b1 button2: b2;
- tile;
-initWithFrame:(NSRect)
frameRect button1:b1 button2:b2;
-tile;
@end
#endif//PopScrollView_h
#endif // PopScrollView_h

View file

@ -3,82 +3,81 @@
#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
// parameters saved in the quake.qe_project file
@interface Preferences:NSObject
{
id bspSound_i; // actual sound object
@interface Preferences:NSObject {
id bspSound_i; // actual sound object
// internal state
char projectpath[1024];
char bspSound[1024];
BOOL brushOffset;
BOOL showBSP;
char projectpath[1024];
char bspSound[1024];
BOOL brushOffset;
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
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 showBSP_i; // Show BSP Output checkbox
id startwad_i; // which wad to load at startup
id brushOffset_i; // Brush Offset checkbox
id showBSP_i; // Show BSP Output checkbox
id xlight_i; // X-side lighting
id ylight_i; // Y-side lighting
id zlight_i; // Z-side lighting
id startwad_i; // which wad to load at startup
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
//
- setProjectPath:(char *)path;
- setBspSoundPath:(char *)path; // set the path of the soundfile externally
- setShowBSP:(int)state; // set the state of ShowBSP
- setBrushOffset:(int)state; // set the state of BrushOffset
- setStartWad:(int)value; // set start wad (0-2)
- setXlight:(float)value; // set Xlight value for CameraView
- setYlight:(float)value; // set Ylight value for CameraView
- setZlight:(float)value; // set Zlight value for CameraView
-setProjectPath:(char *) path;
-setBspSoundPath:(char *) path; // set the path of the soundfile
// externally
-setShowBSP:(int) state; // set the state of ShowBSP
-setBrushOffset:(int) state; // set the state of BrushOffset
-setStartWad:(int) value; // set start wad (0-2)
-setXlight:(float) value; // set Xlight value for CameraView
-setYlight:(float) value; // set Ylight value for CameraView
-setZlight:(float) value; // set Zlight value for CameraView
//
// UI targets
//
- setBspSound:sender; // use OpenPanel to select sound
- setCurrentProject:sender; // make current roject the default
- UIChanged: sender; // target for all checks and fields
-setBspSound:sender; // use OpenPanel to select sound
-setCurrentProject:sender; // make current roject the default
-UIChanged:sender; // target for all checks and fields
//
// methods used by other objects to retreive defaults
//
- playBspSound;
-playBspSound;
- (char *)getProjectPath;
- (int)getBrushOffset; // get the state
- (int)getShowBSP; // get the state
-(char *) getProjectPath;
-(int) getBrushOffset; // get the state
-(int) getShowBSP; // get the state
- (float)getXlight; // get Xlight value
- (float)getYlight; // get Ylight value
- (float)getZlight; // get Zlight value
-(float) getXlight; // get Xlight value
-(float) getYlight; // get Ylight value
-(float) getZlight; // get Zlight value
- (int)getStartWad;
-(int) getStartWad;
@end
#endif//Preferences_h
#endif // Preferences_h

View file

@ -15,98 +15,102 @@
#define BSPLEAKTEST "bspleaktest"
#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_GFX "gfx"
extern id project_i;
extern id project_i;
@interface Project:NSObject
{
id projectInfo; // dictionary storage of project info
@interface Project:NSObject {
id projectInfo; // dictionary storage of project info
id basepathinfo_i; // outlet to base path info textfield
id mapbrowse_i; // outlet to QuakeEd Maps browser
id currentmap_i; // outlet to current map textfield
id mapList; // list of map names (Storage)
id descList; // list of map descriptions (Storage)
id wadList; // list of wad names (Storage)
id pis_panel_i; // outlet to Project Info Settings (PIS) panel
id basepathinfo_i; // outlet to base path info textfield
id mapbrowse_i; // outlet to QuakeEd Maps browser
id currentmap_i; // outlet to current map textfield
id mapList; // list of map names (Storage)
id descList; // list of map descriptions (Storage)
id wadList; // list of wad names (Storage)
id pis_basepath_i; // outlet to PIS->base path
id pis_wads_i; // outlet to PIS->wad browser
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 pis_panel_i; // outlet to Project Info Settings
// (PIS) panel
id BSPoutput_i; // outlet to Text
char path_projectinfo[128]; // path of QE_Project file
id pis_basepath_i; // outlet to PIS->base path
id pis_wads_i; // outlet to PIS->wad browser
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_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 path_projectinfo[128]; // path of QE_Project file
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
char path_basepath[128]; // base path of heirarchy
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;
- initVars;
-initProject;
-initVars;
- (char *)currentProjectFile;
-(char *) currentProjectFile;
- setTextureWad: (char *)wf;
-setTextureWad:(char *) wf;
- addToOutput:(char *)string;
- clearBspOutput:sender;
- initProjSettings;
- changeChar:(char)f to:(char)t in:(id)obj;
- (int)searchForString:(char *)str in:(id)obj;
-addToOutput:(char *) string;
-clearBspOutput:sender;
-initProjSettings;
-changeChar:(char)
f to:(char)
t in:(id) obj;
- 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
-(int) searchForString:(char *)
str in:(id) obj;
// 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;
- (char *)getFinalMapDirectory;
- (char *)getProgDirectory;
// methods to querie the project file
- (char *)getWAD8;
- (char *)getWAD9;
- (char *)getWAD0;
-(char *) getMapDirectory;
-(char *) getFinalMapDirectory;
-(char *) getProgDirectory;
- (char *)getFullVisCmd;
- (char *)getFastVisCmd;
- (char *)getNoVisCmd;
- (char *)getRelightCmd;
- (char *)getLeaktestCmd;
- (char *)getEntitiesCmd;
-(char *) getWAD8;
-(char *) getWAD9;
-(char *) getWAD0;
@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

View file

@ -3,99 +3,101 @@
#include <AppKit/AppKit.h>
extern id quakeed_i;
extern id quakeed_i;
extern BOOL filter_light, filter_path, filter_entities;
extern BOOL filter_clip_brushes, filter_water_brushes, filter_world;
extern BOOL filter_light, filter_path, filter_entities;
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
{
BOOL dirty;
char filename[1024]; // full path with .map extension
@interface QuakeEd:NSWindow {
BOOL dirty;
char filename[1024]; // full path with .map extension
// UI objects
id brushcount_i;
id entitycount_i;
id regionbutton_i;
id brushcount_i;
id entitycount_i;
id regionbutton_i;
id show_coordinates_i;
id show_names_i;
id show_coordinates_i;
id show_names_i;
id filter_light_i;
id filter_path_i;
id filter_entities_i;
id filter_clip_i;
id filter_water_i;
id filter_world_i;
id cmd_in_i; // text fields
id cmd_out_i;
id xy_drawmode_i; // passed over to xyview after init
id filter_light_i;
id filter_path_i;
id filter_entities_i;
id filter_clip_i;
id filter_water_i;
id filter_world_i;
id cmd_in_i; // text fields
id cmd_out_i;
id xy_drawmode_i; // passed over to xyview after init
}
- setDefaultFilename;
- (char *)currentFilename;
-setDefaultFilename;
-(char *) currentFilename;
- updateAll; // when a model has been changed
- updateCamera; // when the camera has moved
- updateXY;
- updateZ;
-updateAll; // when a model has been changed
-updateCamera; // when the camera has moved
-updateXY;
-updateZ;
- updateAll:sender;
-updateAll:sender;
- newinstance; // force next flushwindow to clear all instance drawing
- redrawInstance; // erase and redraw all instance now
-newinstance; // force next flushwindow to clear all
// instance drawing
-redrawInstance; // erase and redraw all instance now
- appDidInit:sender;
- appWillTerminate:sender;
-appDidInit:sender;
-appWillTerminate:sender;
- openProject:sender;
-openProject:sender;
- textCommand: sender;
-textCommand:sender;
- applyRegion: sender;
-applyRegion:sender;
- (BOOL)dirty;
-(BOOL) dirty;
- clear: sender;
- centerCamera: sender;
- centerZChecker: sender;
-clear:sender;
-centerCamera:sender;
-centerZChecker:sender;
- changeXYLookUp: sender;
-changeXYLookUp:sender;
- setBrushRegion: sender;
- setXYRegion: sender;
-setBrushRegion:sender;
-setXYRegion:sender;
- open: sender;
- save: sender;
- saveAs: sender;
-open:sender;
-save: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_FastVis: sender;
- BSP_NoVis: sender;
- BSP_relight: sender;
- BSP_stop: sender;
- BSP_entities: sender;
-BSP_Full:sender;
-BSP_FastVis:sender;
-BSP_NoVis:sender;
-BSP_relight:sender;
-BSP_stop:sender;
-BSP_entities:sender;
//
// UI querie for other objects
//
- (BOOL)showCoordinates;
- (BOOL)showNames;
-(BOOL) showCoordinates;
-(BOOL) showNames;
@end
#endif//QuakeEd_h
#endif // QuakeEd_h

View file

@ -9,31 +9,28 @@
#define MAX_FACES 16
typedef struct
{
int numpoints;
vec5_t points[8]; // variable sized
typedef struct {
int numpoints;
vec5_t points[8]; // variable sized
} winding_t;
#define MAX_POINTS_ON_WINDING 64
typedef struct
{
vec3_t normal;
float dist;
typedef struct {
vec3_t normal;
float dist;
} plane_t;
typedef struct
{
typedef struct {
// implicit rep
vec3_t planepts[3];
texturedef_t texture;
vec3_t planepts[3];
texturedef_t texture;
// cached rep
plane_t plane;
qtexture_t *qtexture;
float light; // 0 - 1.0
winding_t *w;
plane_t plane;
qtexture_t *qtexture;
float light; // 0 - 1.0
winding_t *w;
} face_t;
#define ON_EPSILON 0.1
@ -45,120 +42,167 @@ typedef struct
#define SIDE_ON 2
winding_t *ClipWinding (winding_t *in, plane_t *split);
winding_t *CopyWinding (winding_t *w);
winding_t *NewWinding (int points);
winding_t *ClipWinding (winding_t * in, plane_t *split);
winding_t *CopyWinding (winding_t * w);
winding_t *NewWinding (int points);
@interface SetBrush : NSObject
{
BOOL regioned; // not active
BOOL selected;
@interface SetBrush:NSObject {
BOOL regioned; // not active
BOOL selected;
BOOL invalid; // not a proper polyhedron
BOOL invalid; // not a proper polyhedron
id parent; // the entity this brush is in
vec3_t bmins, bmaxs;
vec3_t entitycolor;
int numfaces;
face_t faces[MAX_FACES];
id parent; // the entity this brush is in
vec3_t bmins, bmaxs;
vec3_t entitycolor;
int numfaces;
face_t faces[MAX_FACES];
}
- initOwner: own mins:(float *)mins maxs:(float *)maxs texture:(texturedef_t *)tex;
- initFromScript: (struct script_s *) script owner: own;
- setMins:(float *)mins maxs:(float *)maxs;
-initOwner: own mins:(float *)
mins
maxs:(float *)
maxs
texture:(texturedef_t *)
tex;
- parent;
- setParent: (id)p;
-initFromScript:(struct script_s *)
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;
- (BOOL)regioned;
- setSelected: (BOOL)s;
- setRegioned: (BOOL)s;
-calcWindings;
- 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;
- removeIfInvalid;
-getMins:(vec3_t)
mins
maxs:(vec3_t)
maxs;
extern vec3_t region_min, region_max;
- newRegion;
-(BOOL) containsPoint:(vec3_t) pt;
- (texturedef_t *)texturedef;
- (texturedef_t *)texturedefForFace: (int)f;
- setTexturedef: (texturedef_t *)tex;
- setTexturedef: (texturedef_t *)tex forFace:(int)f;
-freeWindings;
-removeIfInvalid;
- XYDrawSelf;
- ZDrawSelf;
- CameraDrawSelf;
- XYRenderSelf;
- CameraRenderSelf;
extern vec3_t
region_min,
region_max;
- 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
//
extern int numcontrolpoints;
extern float *controlpoints[MAX_FACES*3];
- getZdragface: (vec3_t)dragpoint;
- getXYdragface: (vec3_t)dragpoint;
- getXYShearPoints: (vec3_t)dragpoint;
extern int
numcontrolpoints;
extern float *
controlpoints[MAX_FACES * 3];
- addFace: (face_t *)f;
-getZdragface:(vec3_t) dragpoint;
-getXYdragface:(vec3_t) dragpoint;
-getXYShearPoints:(vec3_t) dragpoint;
-addFace:(face_t *) f;
//
// multiple brush actions
//
- carveByClipper;
-carveByClipper;
extern vec3_t sb_translate;
- translate;
extern vec3_t
sb_translate;
extern id carve_in, carve_out;
- select;
- deselect;
- remove;
- flushTextures;
-translate;
extern vec3_t sb_mins, sb_maxs;
- addToBBox;
extern id
carve_in,
carve_out;
extern vec3_t sel_x, sel_y, sel_z;
extern vec3_t sel_org;
- transform;
-select;
-deselect;
-remove;
-flushTextures;
- flipNormals;
extern vec3_t
sb_mins,
sb_maxs;
- carve;
- setCarveVars;
-addToBBox;
extern id sb_newowner;
- moveToEntity;
extern vec3_t
sel_x,
sel_y,
sel_z;
extern vec3_t
sel_org;
- takeCurrentTexture;
-transform;
extern vec3_t select_min, select_max;
- selectPartial;
- selectComplete;
- regionPartial;
- regionComplete;
-flipNormals;
extern float sb_floor_dir, sb_floor_dist;
- feetToFloor;
-carve;
-setCarveVars;
- (int) getNumBrushFaces;
- (face_t *)getBrushFace: (int)which;
extern id
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
#endif//SetBrush_h
#endif // SetBrush_h

View file

@ -19,7 +19,7 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
*/
/******************************************************************
TODO:
@ -31,55 +31,57 @@
#include <AppKit/AppKit.h>
@interface Storage : NSObject
{
@public
void *dataPtr; /* data of the Storage object */
const char *description; /* Element description */
NSUInteger numElements; /* Actual number of elements */
NSUInteger maxElements; /* Total allocated elements */
NSUInteger elementSize; /* Element size */
@ interface Storage:NSObject {
@public void *dataPtr; /* data of the Storage object */
const char *description; /* Element description */
NSUInteger numElements; /* Actual number of elements */
NSUInteger maxElements; /* Total allocated elements */
NSUInteger elementSize; /* Element size */
}
/* Creating, freeing, initializing, and emptying */
- init;
- initCount:(NSUInteger)numSlots elementSize:(NSUInteger)sizeInBytes
description:(const char*)elemDesc;
- (void)dealloc;
- empty;
- copy;
-init;
-initCount:(NSUInteger)
numSlots elementSize:(NSUInteger) sizeInBytes
description:(const char *) elemDesc;
-(void) dealloc;
-empty;
-copy;
/* Manipulating the elements */
- (BOOL)isEqual: anObject;
- (const char *)description;
- (NSUInteger)count;
- (void *)elementAt:(NSUInteger)index;
- replaceElementAt:(NSUInteger)index with:(void *)anElement;
- setNumSlots:(NSUInteger)numSlots;
- setAvailableCapacity:(NSUInteger)numSlots;
- addElement:(void *)anElement;
- removeLastElement;
- insertElement:(void *)anElement at:(NSUInteger)index;
- removeElementAt:(NSUInteger)index;
-(BOOL) isEqual:anObject;
-(const char *) description;
-(NSUInteger) count;
-(void *) elementAt:(NSUInteger) index;
-replaceElementAt:(NSUInteger)
index with:(void *) anElement;
-setNumSlots:(NSUInteger) numSlots;
-setAvailableCapacity:(NSUInteger) numSlots;
-addElement:(void *) anElement;
-removeLastElement;
-insertElement:(void *)
anElement at:(NSUInteger) index;
-removeElementAt:(NSUInteger) index;
/* Archiving */
- write:(TypedStream *)stream;
- read:(TypedStream *)stream;
-write:(TypedStream *) stream;
-read:(TypedStream *) stream;
/* old-style creation */
+ new;
+ newCount:(NSUInteger)count elementSize:(NSUInteger)sizeInBytes
description:(const char *)descriptor;
+new;
+newCount:(NSUInteger)
count elementSize:(NSUInteger) sizeInBytes
description:(const char *) descriptor;
@end
typedef struct {
@defs(Storage)
} NXStorageId;
@end typedef struct {
@defs (Storage)
} NXStorageId;
#endif /* __Storage_h_INCLUDE_GNU */

View file

@ -5,117 +5,114 @@
#include "QF/qtypes.h"
typedef union
{
byte chan[4];
unsigned p;
typedef union {
byte chan[4];
unsigned p;
} pixel32_t;
typedef struct
{
char texture[16];
float rotate;
float shift[2];
float scale[2];
typedef struct {
char texture[16];
float rotate;
float shift[2];
float scale[2];
} texturedef_t;
typedef struct
{
char name[16];
int width;
int height;
NSBitmapImageRep *rep;
void *data;
pixel32_t flatcolor;
typedef struct {
char name[16];
int width;
int height;
NSBitmapImageRep *rep;
void *data;
pixel32_t flatcolor;
} qtexture_t;
#define MAX_TEXTURES 1024
extern int tex_count;
extern qtexture_t qtextures[MAX_TEXTURES];
extern int tex_count;
extern qtexture_t qtextures[MAX_TEXTURES];
void TEX_InitFromWad (char *path);
void TEX_InitFromWad (char *path);
qtexture_t *TEX_ForName (char *name);
typedef struct
{
id image; // NSImage
NSRect r;
char *name;
int index;
int display; // flag (on/off)
typedef struct {
id image; // NSImage
NSRect r;
char *name;
int index;
int display; // flag (on/off)
} texpal_t;
#define TEX_INDENT 10
#define TEX_SPACING 16
extern id texturepalette_i;
extern id texturepalette_i;
@interface TexturePalette:NSObject
{
char currentwad[1024];
id textureList_i;
id textureView_i;
id searchField_i;
id sizeField_i;
id field_Xshift_i;
id field_Yshift_i;
id field_Xscale_i;
id field_Yscale_i;
id field_Rotate_i;
int viewWidth;
int viewHeight;
int selectedTexture;
@interface TexturePalette:NSObject {
char currentwad[1024];
id textureList_i;
id textureView_i;
id searchField_i;
id sizeField_i;
id field_Xshift_i;
id field_Yshift_i;
id field_Xscale_i;
id field_Yscale_i;
id field_Rotate_i;
int viewWidth;
int viewHeight;
int selectedTexture;
}
- (char*)currentWad;
- initPaletteFromWadfile:(char *)wf;
- computeTextureViewSize;
- alphabetize;
- getList;
- (int)getSelectedTexture;
- setSelectedTexture:(int)which;
- (int)getSelectedTexIndex;
-(char *) currentWad;
-initPaletteFromWadfile:(char *) wf;
-computeTextureViewSize;
-alphabetize;
-getList;
-(int) getSelectedTexture;
-setSelectedTexture:(int) which;
-(int) getSelectedTexIndex;
// Called externally
- (char *)getSelTextureName;
- setTextureByName:(char *)name;
-(char *) getSelTextureName;
-setTextureByName:(char *) name;
// New methods to replace the 2 above ones
- setTextureDef:(texturedef_t *)td;
- getTextureDef:(texturedef_t *)td;
-setTextureDef:(texturedef_t *) td;
-getTextureDef:(texturedef_t *) td;
// Action methods
- searchForTexture:sender;
-searchForTexture:sender;
- clearTexinfo: sender;
-clearTexinfo:sender;
- incXShift:sender;
- decXShift:sender;
-incXShift:sender;
-decXShift:sender;
- incYShift:sender;
- decYShift:sender;
-incYShift:sender;
-decYShift:sender;
- incRotate: sender;
- decRotate: sender;
-incRotate:sender;
-decRotate:sender;
- incXScale:sender;
- decXScale:sender;
-incXScale:sender;
-decXScale:sender;
- incYScale:sender;
- decYScale:sender;
-incYScale:sender;
-decYScale:sender;
- texturedefChanged: sender;
- onlyShowMapTextures:sender;
- (int) searchForTextureInPalette:(char *)texture;
- setDisplayFlag:(int)index to:(int)value;
-texturedefChanged:sender;
-onlyShowMapTextures:sender;
-(int) searchForTextureInPalette:(char *) texture;
-setDisplayFlag:(int)
index
to:(int)
value;
@end
#endif//TexturePalette_h
#endif // TexturePalette_h

View file

@ -3,15 +3,13 @@
#include <AppKit/AppKit.h>
@interface TextureView:NSView
{
id parent_i;
int deselectIndex;
@ interface TextureView:NSView {
id parent_i;
int deselectIndex;
}
- setParent:(id)from;
- deselect;
-setParent:(id) from;
-deselect;
@end
#endif//TextureView_h
#endif // TextureView_h

View file

@ -5,44 +5,42 @@
#include "Entity.h"
extern id things_i;
extern id things_i;
#define ENTITYNAMEKEY "spawn"
@interface Things:NSObject
{
id entity_browser_i; // browser
id entity_comment_i; // scrolling text window
id prog_path_i;
int lastSelected; // last row selected in browser
@interface Things:NSObject {
id entity_browser_i; // browser
id entity_comment_i; // scrolling text window
id keyInput_i;
id valueInput_i;
id flags_i;
id prog_path_i;
int lastSelected; // last row selected in browser
id keyInput_i;
id valueInput_i;
id flags_i;
}
- initEntities;
-initEntities;
- newCurrentEntity;
- setSelectedKey:(epair_t *)ep;
-newCurrentEntity;
-setSelectedKey:(epair_t *) ep;
- clearInputs;
- (char *)spawnName;
-clearInputs;
-(char *) spawnName;
// UI targets
- reloadEntityClasses: sender;
- selectEntity: sender;
- doubleClickEntity: sender;
-reloadEntityClasses:sender;
-selectEntity:sender;
-doubleClickEntity:sender;
// Action methods
- addPair:sender;
- delPair:sender;
- setAngle:sender;
- setFlags:sender;
-addPair:sender;
-delPair:sender;
-setAngle:sender;
-setFlags:sender;
@end
#endif//Things_h
#endif // Things_h

View file

@ -37,41 +37,44 @@
#include <AppKit/NSGraphicsContext.h>
typedef struct _UP {
float *points;
int numberOfPoints;
char *ops;
NSPoint cp;
int numberOfOps;
int max;
float bbox[4];
int opForUserPath;
BOOL ping;
float *points;
int numberOfPoints;
char *ops;
NSPoint cp;
int numberOfOps;
int max;
float bbox[4];
int opForUserPath;
BOOL ping;
} UserPath;
/* UserPath functions */
NSZone *userPathZone();
UserPath *newUserPath();
void freeUserPath(UserPath *up);
void debugUserPath(UserPath *up, BOOL shouldPing);
void growUserPath(UserPath *up);
void beginUserPath(UserPath *up, BOOL cache);
void endUserPath(UserPath *up, int op);
int sendUserPath(UserPath *up);
void UPmoveto(UserPath *up, float x, float y);
void UPrmoveto(UserPath *up, float x, float y);
void UPlineto(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,
float y3);
void UPrcurveto(UserPath *up, float dx1, float dy1, float dx2, float dy2,
float dx3, float dy3);
void UParc(UserPath *up, float x, float y, float r, float ang1, float ang2);
void UParcn(UserPath *up, float x, float y, float r, float ang1, float ang2);
void UParct(UserPath *up, float x1, float y1, float x2, float y2, float r);
void closePath(UserPath *up);
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);
NSZone *userPathZone ();
UserPath *newUserPath ();
void freeUserPath (UserPath * up);
void debugUserPath (UserPath * up, BOOL shouldPing);
void growUserPath (UserPath * up);
void beginUserPath (UserPath * up, BOOL cache);
void endUserPath (UserPath * up, int op);
int sendUserPath (UserPath * up);
void UPmoveto (UserPath * up, float x, float y);
void UPrmoveto (UserPath * up, float x, float y);
void UPlineto (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, float y3);
void UPrcurveto (UserPath * up, float dx1, float dy1, float dx2,
float dy2, float dx3, float dy3);
void UParc (UserPath * up, float x, float y, float r, float ang1,
float ang2);
void UParcn (UserPath * up, float x, float y, float r, float ang1,
float ang2);
void UParct (UserPath * up, float x1, float y1, float x2, float y2,
float r);
void closePath (UserPath * up);
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

View file

@ -9,65 +9,67 @@
#include "render.h"
extern id xyview_i;
extern id xyview_i;
#define MINSCALE 0.125
#define MAXSCALE 2.0
extern vec3_t xy_viewnormal; // v_forward for xy view
extern float xy_viewdist; // clip behind this plane
extern vec3_t xy_viewnormal; // v_forward for xy view
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 lineflush (void);
void linecolor (float r, float g, float b);
void linestart (float r, float g, float b);
void lineflush (void);
void linecolor (float r, float g, float b);
void XYmoveto (vec3_t pt);
void XYlineto (vec3_t pt);
void XYmoveto (vec3_t pt);
void XYlineto (vec3_t pt);
@interface XYView : NSView
{
NSRect realbounds, newrect, combinedrect;
NSPoint midpoint;
int gridsize;
float scale;
@interface XYView:NSView {
NSRect realbounds, newrect, combinedrect;
NSPoint midpoint;
int gridsize;
float scale;
// for textured view
int xywidth, xyheight;
float *xyzbuffer;
unsigned *xypicbuffer;
int xywidth, xyheight;
float *xyzbuffer;
unsigned *xypicbuffer;
drawmode_t drawmode;
drawmode_t drawmode;
// UI links
id mode_radio_i;
id mode_radio_i;
}
- (float)currentScale;
-(float) currentScale;
- setModeRadio: m;
-setModeRadio:m;
- drawMode: sender;
- setDrawMode: (drawmode_t)mode;
-drawMode:sender;
-setDrawMode:(drawmode_t) mode;
- newSuperBounds;
- newRealBounds: (NSRect *)nb;
-newSuperBounds;
-newRealBounds:(NSRect *) nb;
- addToScrollRange: (float)x :(float)y;
- setOrigin: (NSPoint *)pt scale: (float)sc;
- centerOn: (vec3_t)org;
-addToScrollRange: (float) x:(float) y;
-setOrigin:(NSPoint *)
pt
scale:(float)
sc;
- drawMode: sender;
-centerOn:(vec3_t) org;
- superviewChanged;
-drawMode:sender;
- (int)gridsize;
- (float)snapToGrid: (float)f;
-superviewChanged;
-(int) gridsize;
-(float) snapToGrid:(float) f;
@end
#endif//XYView_h
#endif // XYView_h

View file

@ -3,14 +3,14 @@
#include <AppKit/AppKit.h>
@interface ZScrollView : NSScrollView
{
id button1;
@ interface ZScrollView:NSScrollView {
id button1;
}
- initWithFrame:(NSRect)frameRect button1: b1;
- tile;
-initWithFrame:(NSRect)
frameRect button1:b1;
-tile;
@end
#endif//ZScrollView_h
#endif // ZScrollView_h

View file

@ -7,42 +7,41 @@
#include "render.h"
extern id zview_i;
extern id zview_i;
// zplane controls the objects displayed in the xyview
extern float zplane;
extern float zplanedir;
extern float zplane;
extern float zplanedir;
@interface ZView : NSView
{
float minheight, maxheight;
float oldminheight, oldmaxheight;
float topbound, bottombound; // for floor clipping
float scale;
vec3_t origin;
@interface ZView:NSView {
float minheight, maxheight;
float oldminheight, oldmaxheight;
float topbound, bottombound; // for floor clipping
float scale;
vec3_t origin;
}
- clearBounds;
- getBounds: (float *)top :(float *)bottom;
-clearBounds;
-getBounds: (float *) top:(float *) bottom;
- getPoint: (NSPoint *)pt;
- setPoint: (NSPoint *)pt;
-getPoint:(NSPoint *) pt;
-setPoint:(NSPoint *) pt;
- addToHeightRange: (float)height;
-addToHeightRange:(float) height;
- newRealBounds;
- newSuperBounds;
-newRealBounds;
-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
#endif//ZView_h
#endif // ZView_h

View file

@ -9,54 +9,54 @@
#define strcmpi strcasecmp
#define stricmp strcasecmp
char *strupr (char *in);
char *strlower (char *in);
int filelength (int handle);
int tell (int handle);
char *strupr (char *in);
char *strlower (char *in);
int filelength (int handle);
int tell (int handle);
#ifndef __BYTEBOOL__
#define __BYTEBOOL__
typedef enum {false, true} boolean;
typedef enum { false, true } boolean;
typedef unsigned char byte;
#endif
double I_FloatTime (void);
double I_FloatTime (void);
int GetKey (void);
int GetKey (void);
void Error (char *error, ...);
int CheckParm (char *check);
void Error (char *error, ...);
int CheckParm (char *check);
int SafeOpenWrite (char *filename);
int SafeOpenRead (char *filename);
void SafeRead (int handle, void *buffer, long count);
void SafeWrite (int handle, void *buffer, long count);
void *SafeMalloc (long size);
int SafeOpenWrite (char *filename);
int SafeOpenRead (char *filename);
void SafeRead (int handle, void *buffer, long count);
void SafeWrite (int handle, void *buffer, long count);
void *SafeMalloc (long size);
long LoadFile (char *filename, void **bufferptr);
void SaveFile (char *filename, void *buffer, long count);
long LoadFile (char *filename, void **bufferptr);
void SaveFile (char *filename, void *buffer, long count);
void DefaultExtension (char *path, char *extension);
void DefaultPath (char *path, char *basepath);
void StripFilename (char *path);
void StripExtension (char *path);
void DefaultExtension (char *path, char *extension);
void DefaultPath (char *path, char *basepath);
void StripFilename (char *path);
void StripExtension (char *path);
void ExtractFilePath (char *path, char *dest);
void ExtractFileBase (char *path, char *dest);
void ExtractFileExtension (char *path, char *dest);
void ExtractFilePath (char *path, char *dest);
void ExtractFileBase (char *path, char *dest);
void ExtractFileExtension (char *path, char *dest);
long ParseNum (char *str);
long ParseNum (char *str);
short BigShort (short l);
short LittleShort (short l);
long BigLong (long l);
long LittleLong (long l);
float BigFloat (float l);
float LittleFloat (float l);
short BigShort (short l);
short LittleShort (short l);
long BigLong (long l);
long LittleLong (long l);
float BigFloat (float l);
float LittleFloat (float l);
extern char com_token[1024];
extern boolean com_eof;
extern char com_token[1024];
extern boolean com_eof;
char *COM_Parse (char *data);
char *COM_Parse (char *data);
#endif

View file

@ -10,22 +10,22 @@ typedef vec_t vec3_t[3];
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 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 VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
vec_t _DotProduct (vec3_t v1, vec3_t v2);
void _VectorSubtract (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);
vec_t _DotProduct (vec3_t v1, vec3_t v2);
void _VectorSubtract (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 CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
void VectorNormalize (vec3_t v);
void VectorScale (vec3_t v, vec_t scale, vec3_t out);
double VectorLength(vec3_t v);
void VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc);
void CrossProduct (vec3_t v1, vec3_t v2, vec3_t cross);
void VectorNormalize (vec3_t v);
void VectorScale (vec3_t v, vec_t scale, vec3_t out);
double VectorLength (vec3_t v);
void VectorMA (vec3_t va, double scale, vec3_t vb, vec3_t vc);
#endif

View file

@ -35,20 +35,20 @@
#include "Clipper.h"
void PrintRect (NSRect *r);
int FileTime (char *path);
void Sys_UpdateFile (char *path, char *netpath);
void CleanupName (char *in, char *out);
void PrintRect (NSRect * r);
int FileTime (char *path);
void Sys_UpdateFile (char *path, char *netpath);
void CleanupName (char *in, char *out);
extern BOOL in_error;
void Error (char *error, ...);
extern BOOL in_error;
void Error (char *error, ...);
#define MAXTOKEN 128
extern char token[MAXTOKEN];
extern int scriptline;
void StartTokenParsing (char *data);
boolean GetToken (boolean crossline); // returns false at eof
void UngetToken ();
extern char token[MAXTOKEN];
extern int scriptline;
void StartTokenParsing (char *data);
boolean GetToken (boolean crossline); // returns false at eof
void UngetToken ();
#define FN_CMDOUT "/tmp/QuakeEdCmd.txt"
@ -57,4 +57,4 @@ void UngetToken ();
#define FN_CRASHSAVE "/qcache/ErrorSaveMap.map"
#define FN_DEVLOG "/qcache/devlog"
#endif//qedefs_h
#endif // qedefs_h

View file

@ -3,19 +3,19 @@
#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 unsigned *r_picbuffer;
extern float *r_zbuffer;
extern int r_width, r_height;
extern unsigned *r_picbuffer;
extern float *r_zbuffer;
extern vec3_t r_origin, r_matrix[3];
extern BOOL r_drawflat;
extern vec3_t r_origin, r_matrix[3];
extern BOOL r_drawflat;
void REN_ClearBuffers (void);
void REN_DrawCameraFace (face_t *idpol);
void REN_DrawXYFace (face_t *idpol);
void REN_BeginCamera (void);
void REN_BeginXY (void);
void REN_ClearBuffers (void);
void REN_DrawCameraFace (face_t * idpol);
void REN_DrawXYFace (face_t * idpol);
void REN_BeginCamera (void);
void REN_BeginXY (void);
#endif//render_h
#endif // render_h