Compile fixes, we're getting a bit closer.

This commit is contained in:
Jeff Teunissen 2001-03-02 07:01:51 +00:00
parent c7d74c6743
commit 1bd5d98c4d
9 changed files with 334 additions and 336 deletions

View file

@ -368,7 +368,7 @@ drawSolid
*/ */
- drawSolid - drawSolid
{ {
unsigned char *planes[5]; const unsigned char *planes[5];
// //
// draw it // draw it
@ -408,7 +408,7 @@ drawSolid
planes planes
); );
NSPing (); // NSPing ();
[[self window] setBackingType:NSBackingStoreBuffered]; [[self window] setBackingType:NSBackingStoreBuffered];
@ -468,9 +468,8 @@ drawSelf
else else
[self drawWire: rects]; [self drawWire: rects];
if (timedrawing) if (timedrawing) {
{ // NSPing ();
NSPing ();
drawtime = I_FloatTime() - drawtime; drawtime = I_FloatTime() - drawtime;
printf ("CameraView drawtime: %5.3f\n", drawtime); printf ("CameraView drawtime: %5.3f\n", drawtime);
} }

View file

@ -8,12 +8,14 @@
the classname, color triple, and bounding box are parsed out of comments the classname, color triple, and bounding box are parsed out of comments
A ? size means take the exact brush size. A ? size means take the exact brush size.
/*QUAKED <classname> (0 0 0) ? (these are really comments, but a space has been added to shut the compiler up.)
/*QUAKED <classname> (0 0 0) (-8 -8 -8) (8 8 8)
/ *QUAKED <classname> (0 0 0) ?
/ *QUAKED <classname> (0 0 0) (-8 -8 -8) (8 8 8)
Flag names can follow the size description: Flag names can follow the size description:
/*QUAKED func_door (0 .5 .8) ? START_OPEN STONE_SOUND DOOR_DONT_LINK GOLD_KEY SILVER_KEY / *QUAKED func_door (0 .5 .8) ? START_OPEN STONE_SOUND DOOR_DONT_LINK GOLD_KEY SILVER_KEY
*/ */
char *debugname; char *debugname;

View file

@ -5,6 +5,9 @@
#import "Forge.h" #import "Forge.h"
#include <sys/types.h>
#include <signal.h>
id quakeed_i; id quakeed_i;
id entclasses_i; id entclasses_i;
@ -63,19 +66,19 @@ void AutoSave(DPSTimedEntry tag, double now, void *userData)
void DisplayCmdOutput (void) void DisplayCmdOutput (void)
{ {
char *buffer; NSString *output;
LoadFile (FN_CMDOUT, (void **)&buffer); output = [NSString stringWithContentsOfFile: commandOutput];
unlink (FN_CMDOUT); unlink ([commandOutput cString]);
[project_i addToOutput:buffer]; [project_i addToOutput: output];
free (buffer); [output release];
if ([preferences_i getShowBSP]) if ([preferences_i getShowBSP])
[inspcontrol_i changeInspectorTo:i_output]; [inspcontrol_i changeInspectorTo: i_output];
[preferences_i playBspSound]; [preferences_i playBspSound];
NSPing (); // NSPing ();
} }
/* /*
@ -120,7 +123,7 @@ init
// [self addToEventMask: NSRightMouseDraggedMask | NSLeftMouseDraggedMask]; // [self addToEventMask: NSRightMouseDraggedMask | NSLeftMouseDraggedMask];
malloc_error(My_Malloc_Error); malloc_error (My_Malloc_Error);
quakeed_i = self; quakeed_i = self;
dirty = autodirty = NO; dirty = autodirty = NO;
@ -134,7 +137,12 @@ init
- setDefaultFilename - setDefaultFilename
{ {
filename = [NSString stringWithCString: FN_TEMPSAVE]; if (!filename) {
filename = [NSMutableString stringWithString: tempSaveFile];
} else {
[filename setString: tempSaveFile];
}
[self setTitleWithRepresentedFilename: filename]; [self setTitleWithRepresentedFilename: filename];
return self; return self;
@ -187,7 +195,7 @@ int c_updateall;
{ {
updatecamera = updatexy = updatez = YES; updatecamera = updatexy = updatez = YES;
c_updateall++; c_updateall++;
postappdefined (); [self postAppDefined];
return self; return self;
} }
@ -202,21 +210,21 @@ int c_updateall;
updatecamera = YES; updatecamera = YES;
clearinstance = YES; clearinstance = YES;
postappdefined (); [self postAppDefined];
return self; return self;
} }
- updateXY - updateXY
{ {
updatexy = YES; updatexy = YES;
postappdefined (); [self postAppDefined];
return self; return self;
} }
- updateZ - updateZ
{ {
updatez = YES; updatez = YES;
postappdefined (); [self postAppDefined];
return self; return self;
} }
@ -299,21 +307,19 @@ App delegate methods
- applicationDefined: (NSEvent *) theEvent - applicationDefined: (NSEvent *) theEvent
{ {
NSEvent *ev, *evp; NSEvent *ev;
updateinflight = NO; updateinflight = NO;
//printf ("serviced\n"); //printf ("serviced\n");
// update screen // update screen
evp = [NSApp peekNextEvent:-1 into:&ev]; ev = [NSApp peekNextEvent: -1];
if (evp) if (ev) {
{ [self postAppDefined];
postappdefined();
return self; return self;
} }
[self disableFlushWindow]; [self disableFlushWindow];
if ([map_i count] != [entitycount_i intValue]) if ([map_i count] != [entitycount_i intValue])
@ -340,8 +346,10 @@ App delegate methods
- appDidInitialize: sender - appDidInitialize: sender
{ {
#if 0
NSScreen const *screens; NSScreen const *screens;
int screencount; int screencount;
#endif
running = YES; running = YES;
g_cmd_out_i = cmd_out_i; // for qprintf g_cmd_out_i = cmd_out_i; // for qprintf
@ -569,28 +577,14 @@ BSP PROCESSING
============================================================================== ==============================================================================
*/ */
void ExpandCommand (char *in, char *out, char *src, char *dest) NSString *
ExpandCommand (NSString *input, NSString *src, NSString *dest)
{ {
while (*in) return [[[[input
{ componentsSeparatedByString: @"$1"]
if (in[0] == '$') componentsJoinedByString: src]
{ componentsSeparatedByString: @"$2"]
if (in[1] == '1') componentsJoinedByString: dest];
{
strcpy (out, src);
out += strlen(src);
}
else if (in[1] == '2')
{
strcpy (out, dest);
out += strlen(dest);
}
in += 2;
continue;
}
*out++ = *in++;
}
*out = 0;
} }
@ -599,18 +593,17 @@ void ExpandCommand (char *in, char *out, char *src, char *dest)
saveBSP saveBSP
============= =============
*/ */
- saveBSP: (char *) cmdline dialog: (BOOL) wt - saveBSP: (NSString *) cmdline dialog: (BOOL) wt
{ {
char expandedcmd[1024];
NSString *mappath;
char bsppath[1024];
int oldLightFilter; int oldLightFilter;
int oldPathFilter; int oldPathFilter;
char *destdir; NSString *expandedcmd;
NSString *mappath;
NSString *bsppath;
NSString *destdir;
if (bsppid) if (bsppid) {
{ NSBeep();
NXBeep();
return self; return self;
} }
@ -624,14 +617,14 @@ saveBSP
[self applyRegion: self]; [self applyRegion: self];
if ([regionbutton_i intValue]) { if ([regionbutton_i intValue]) {
mappath = [[[NSString stringWithString: filename] mappath = [[filename
stringByDeletingPathExtension] stringByDeletingPathExtension]
stringByAppendingPathExtension: @"reg"]; stringByAppendingPathExtension: @"reg"];
[map_i writeMapFile: mappath useRegion: YES]; [map_i writeMapFile: mappath useRegion: YES];
wt = YES; // always pop the dialog on region ops wt = YES; // always pop the dialog on region ops
} else {
mappath = filename;
} }
else
strcpy (mappath, filename);
// save the entire thing, just in case there is a problem // save the entire thing, just in case there is a problem
[self save: self]; [self save: self];
@ -643,43 +636,39 @@ saveBSP
// //
// write the command to the bsp host // write the command to the bsp host
// //
destdir = [project_i getFinalMapDirectory]; destdir = [project_i finalMapDirectory];
strcpy (bsppath, destdir); bsppath = [[destdir
strcat (bsppath, "/"); stringByAppendingString: @"/"]
ExtractFileBase (mappath, bsppath + strlen(bsppath)); stringByAppendingString: [[[mappath lastPathComponent]
strcat (bsppath, ".bsp"); stringByDeletingPathExtension]
stringByAppendingPathExtension: @"bsp"]];
ExpandCommand (cmdline, expandedcmd, mappath, bsppath); expandedcmd = ExpandCommand (cmdline, mappath, bsppath);
strcat (expandedcmd, " > "); NSLog (@"system: %s", expandedcmd);
strcat (expandedcmd, FN_CMDOUT);
strcat (expandedcmd, "\n");
printf ("system: %s", expandedcmd);
[project_i addToOutput: "\n\n========= BUSY =========\n\n"]; [project_i addToOutput: @"\n\n========= BUSY =========\n\n"];
[project_i addToOutput: expandedcmd]; [project_i addToOutput: expandedcmd];
if ([preferences_i getShowBSP]) if ([preferences_i getShowBSP])
[inspcontrol_i changeInspectorTo:i_output]; [inspcontrol_i changeInspectorTo:i_output];
if (wt) if (wt) {
{
id panel; id panel;
panel = NXGetAlertPanel("BSP In Progress",expandedcmd,NULL,NULL,NULL); panel = NSGetAlertPanel (@"BSP In Progress", expandedcmd, NULL, NULL, NULL);
[panel makeKeyAndOrderFront:NULL];
system(expandedcmd); [panel makeKeyAndOrderFront: NULL];
NXFreeAlertPanel(panel); system ([expandedcmd cString]);
[self makeKeyAndOrderFront:NULL]; NSReleaseAlertPanel (panel);
[self makeKeyAndOrderFront: NULL];
DisplayCmdOutput (); DisplayCmdOutput ();
} } else {
else // cmdte = DPSAddTimedEntry(1, CheckCmdDone, self, NX_BASETHRESHOLD);
{ if (!(bsppid = fork ())) {
cmdte = DPSAddTimedEntry(1, CheckCmdDone, self, NX_BASETHRESHOLD); system ([expandedcmd cString]);
if (! (bsppid = fork ()) )
{
system (expandedcmd);
exit (0); exit (0);
} }
} }
@ -690,45 +679,44 @@ saveBSP
- BSP_Full: sender - BSP_Full: sender
{ {
[self saveBSP:[project_i getFullVisCmd] dialog: NO]; [self saveBSP: [project_i fullVisCommand] dialog: NO];
return self; return self;
} }
- BSP_FastVis: sender - BSP_FastVis: sender
{ {
[self saveBSP:[project_i getFastVisCmd] dialog: NO]; [self saveBSP: [project_i fastVisCommand] dialog: NO];
return self; return self;
} }
- BSP_NoVis: sender - BSP_NoVis: sender
{ {
[self saveBSP:[project_i getNoVisCmd] dialog: NO]; [self saveBSP: [project_i noVisCommand] dialog: NO];
return self; return self;
} }
- BSP_relight: sender - BSP_relight: sender
{ {
[self saveBSP:[project_i getRelightCmd] dialog: NO]; [self saveBSP: [project_i relightCommand] dialog: NO];
return self; return self;
} }
- BSP_entities: sender - BSP_entities: sender
{ {
[self saveBSP:[project_i getEntitiesCmd] dialog: NO]; [self saveBSP: [project_i entitiesCommand] dialog: NO];
return self; return self;
} }
- BSP_stop: sender - BSP_stop: sender
{ {
if (!bsppid) if (!bsppid) {
{ NSBeep ();
NXBeep();
return self; return self;
} }
kill (bsppid, 9); kill (bsppid, 9);
CheckCmdDone (cmdte, 0, NULL); // CheckCmdDone (cmdte, 0, NULL);
[project_i addToOutput: "\n\n========= STOPPED =========\n\n"]; [project_i addToOutput: @"\n\n========= STOPPED =========\n\n"];
return self; return self;
} }
@ -742,14 +730,14 @@ doOpen:
Called by open or the project panel Called by open or the project panel
============== ==============
*/ */
- doOpen: (char *)fname; - doOpen: (NSString *)fname;
{ {
strcpy (filename, fname); [filename setString: fname];
[map_i readMapFile:filename]; [map_i readMapFile: filename];
[regionbutton_i setIntValue: 0]; [regionbutton_i setIntValue: 0];
[self setTitleAsFilename:fname]; [self setTitleWithRepresentedFilename: filename];
[self updateAll]; [self updateAll];
qprintf ("%s loaded\n", fname); qprintf ("%s loaded\n", fname);
@ -765,18 +753,16 @@ open
*/ */
- open: sender; - open: sender;
{ {
id openpanel; id openPanel = [NSOpenPanel openPanel];
static char *suffixlist[] = {"map", 0}; id fileTypes = [NSArray arrayWithObject: @"map"];
openpanel = [OpenPanel new]; if ([openPanel
runModalForDirectory: [project_i mapDirectory]
if ( [openpanel file: @""
runModalForDirectory: [project_i getMapDirectory] types: fileTypes] != NSOKButton)
file: ""
types: suffixlist] != NX_OKTAG)
return self; return self;
[self doOpen: (char *)[openpanel filename]]; [self doOpen: [openPanel filename]];
return self; return self;
} }
@ -789,18 +775,18 @@ save:
*/ */
- save: sender; - save: sender;
{ {
char backup[1024]; NSString *backup;
// force a name change if using tempname // force a name change if using tempname
if (!strcmp (filename, FN_TEMPSAVE) ) if ([filename isEqualToString: tempSaveFile])
return [self saveAs: self]; return [self saveAs: self];
dirty = autodirty = NO; dirty = autodirty = NO;
strcpy (backup, filename); backup = [[filename stringByDeletingPathExtension]
StripExtension (backup); stringByAppendingPathExtension: @"bak"];
strcat (backup, ".bak");
rename (filename, backup); // copy old to .bak rename ([filename cString], [backup cString]); // copy old to .bak
[map_i writeMapFile: filename useRegion: NO]; [map_i writeMapFile: filename useRegion: NO];
@ -809,24 +795,22 @@ save:
/* /*
============== saveAs
saveAs
==============
*/ */
- saveAs: sender; - saveAs: sender;
{ {
id panel_i; id panel_i = [NSSavePanel savePanel];
char dir[1024]; NSString *dir;
panel_i = [SavePanel new]; dir = [[filename lastPathComponent] stringByDeletingPathExtension];
ExtractFileBase (filename, dir);
[panel_i setRequiredFileType: "map"]; [panel_i setRequiredFileType: @"map"];
if ( [panel_i runModalForDirectory:[project_i getMapDirectory] file: dir] != NX_OKTAG) if ([panel_i runModalForDirectory: [project_i mapDirectory] file: dir] != NSOKButton)
return self; return self;
strcpy (filename, [panel_i filename]); [filename setString: [panel_i filename]];
[self setTitleAsFilename:filename]; [self setTitleWithRepresentedFilename: filename];
[self save: self]; [self save: self];
@ -846,7 +830,7 @@ saveAs
// //
// AJR - added this for Project info // AJR - added this for Project info
// //
- (char *)currentFilename - (NSString *) currentFilename
{ {
return filename; return filename;
} }
@ -856,7 +840,7 @@ saveAs
if ([clipper_i hide]) // first click hides clipper only if ([clipper_i hide]) // first click hides clipper only
return [self updateAll]; return [self updateAll];
[map_i setCurrentEntity: [map_i objectAt: 0]]; // make world selected [map_i setCurrentEntity: [map_i objectAtIndex: 0]]; // make world selected
[map_i makeSelectedPerform: @selector(deselect)]; [map_i makeSelectedPerform: @selector(deselect)];
[self updateAll]; [self updateAll];
@ -875,64 +859,56 @@ keyDown
#define KEY_UPARROW 0xad #define KEY_UPARROW 0xad
#define KEY_DOWNARROW 0xaf #define KEY_DOWNARROW 0xaf
- keyDown:(NSEvent *)theEvent - (void) keyDown:(NSEvent *)theEvent
{ {
int ch; // function keys
switch ([[theEvent characters] characterAtIndex: 0]) {
// function keys case NSF2FunctionKey: // F2
switch (theEvent->data.key.keyCode)
{
case 60: // F2
[cameraview_i setDrawMode: dr_wire]; [cameraview_i setDrawMode: dr_wire];
qprintf ("wire draw mode"); qprintf ("wire draw mode");
return self; return;
case 61: // F3 case NSF3FunctionKey: // F3
[cameraview_i setDrawMode: dr_flat]; [cameraview_i setDrawMode: dr_flat];
qprintf ("flat draw mode"); qprintf ("flat draw mode");
return self; return;
case 62: // F4 case NSF4FunctionKey: // F4
[cameraview_i setDrawMode: dr_texture]; [cameraview_i setDrawMode: dr_texture];
qprintf ("texture draw mode"); qprintf ("texture draw mode");
return self; return;
case NSF5FunctionKey: // F5
case 63: // F5
[xyview_i setDrawMode: dr_wire]; [xyview_i setDrawMode: dr_wire];
qprintf ("wire draw mode"); qprintf ("wire draw mode");
return self; return;
case 64: // F6 case NSF6FunctionKey: // F6
qprintf ("texture draw mode"); qprintf ("texture draw mode");
return self; return;
case 66: // F8 case NSF8FunctionKey: // F8
[cameraview_i homeView: self]; [cameraview_i homeView: self];
return self; return;
case 88: // F12 case NSF12FunctionKey: // F12
[map_i subtractSelection: self]; [map_i subtractSelection: self];
return self; return;
case 106: // page up case NSPageUpFunctionKey: // page up
[cameraview_i upFloor: self]; [cameraview_i upFloor: self];
return self; return;
case NSPageDownFunctionKey: // page down
case 107: // page down
[cameraview_i downFloor: self]; [cameraview_i downFloor: self];
return self; return;
case 109: // end case NSEndFunctionKey: // end
[self deselect: self]; [self deselect: self];
return self; return;
} }
// portable things // portable things
ch = tolower(theEvent->data.key.charCode); switch ([[[theEvent characters] lowercaseString] characterAtIndex: 0]) {
case NSRightArrowFunctionKey:
switch (ch) case NSLeftArrowFunctionKey:
{ case NSUpArrowFunctionKey:
case KEY_RIGHTARROW: case NSDownArrowFunctionKey:
case KEY_LEFTARROW:
case KEY_UPARROW:
case KEY_DOWNARROW:
case 'a': case 'a':
case 'z': case 'z':
case 'd': case 'd':
@ -945,9 +921,9 @@ keyDown
case 27: // escape case 27: // escape
autodirty = dirty = YES; autodirty = dirty = YES;
[self deselect: self]; [self deselect: self];
return self; return;
case 127: // delete case NSDeleteFunctionKey: // delete
autodirty = dirty = YES; autodirty = dirty = YES;
[map_i makeSelectedPerform: @selector(remove)]; [map_i makeSelectedPerform: @selector(remove)];
[clipper_i hide]; [clipper_i hide];
@ -969,7 +945,6 @@ keyDown
[map_i cloneSelection: self]; [map_i cloneSelection: self];
break; break;
// //
// move selection keys // move selection keys
// //
@ -979,6 +954,7 @@ keyDown
[map_i makeSelectedPerform: @selector(translate)]; [map_i makeSelectedPerform: @selector(translate)];
[self updateAll]; [self updateAll];
break; break;
case '8': case '8':
VectorCopy (vec3_origin, sb_translate); VectorCopy (vec3_origin, sb_translate);
sb_translate[1] = [xyview_i gridsize]; sb_translate[1] = [xyview_i gridsize];
@ -992,6 +968,7 @@ keyDown
[map_i makeSelectedPerform: @selector(translate)]; [map_i makeSelectedPerform: @selector(translate)];
[self updateAll]; [self updateAll];
break; break;
case '6': case '6':
VectorCopy (vec3_origin, sb_translate); VectorCopy (vec3_origin, sb_translate);
sb_translate[0] = [xyview_i gridsize]; sb_translate[0] = [xyview_i gridsize];
@ -1018,7 +995,7 @@ keyDown
break; break;
} }
return self; return;
} }

View file

@ -1,15 +1,18 @@
/* Generated by the NeXT Project Builder
NOTE: Do NOT change this file -- Project Builder maintains it.
*/
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>
void main(int argc, char *argv[]) { NSString *commandOutput = @"/tmp/Forge/command.txt";
NSString *developerLogFile = @"/tmp/Forge/developer.log";
NSString *tempSaveFile = @"/tmp/Forge/temp.map";
NSString *autoSaveFile = @"/tmp/Forge/autoSave.map";
NSString *errorSaveFile = @"/tmp/Forge/errorSave.map";
[Application new]; int
if ([NXApp loadNibSection:"QuakeEd.nib" owner:NXApp withNames:NO]) main (int argc, char *argv[]) {
[NXApp run];
[NXApp free]; [NSApplication new];
exit(0); if ([NSBundle loadNibNamed: @"Forge" owner: NSApp])
[NSApp run];
[NSApp release];
return 0;
} }

View file

@ -2,10 +2,10 @@
ADDITIONAL_CPPFLAGS += ADDITIONAL_CPPFLAGS +=
# Additional flags to pass to the Objective-C compiler # Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS += -g -Wall ADDITIONAL_OBJCFLAGS += -g -Wall -Werror
# Additional flags to pass to the C compiler # Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS += -g -Wall ADDITIONAL_CFLAGS += -g -Wall -Werror
# Additional include directories the compiler should search # Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS += -I ./Headers ADDITIONAL_INCLUDE_DIRS += -I ./Headers
@ -16,7 +16,20 @@ ADDITIONAL_LDFLAGS +=
# Additional library directories the linker should search # Additional library directories the linker should search
ADDITIONAL_LIB_DIRS += ADDITIONAL_LIB_DIRS +=
# Additional libraries
# GNUstepWeb
ADDITIONAL_GSW_LIBS +=
# GUI apps
ADDITIONAL_GUI_LIBS +=
# Libraries
ADDITIONAL_LIBRARY_LIBS +=
# ObjC stuff
ADDITIONAL_OBJC_LIBS +=
# Tools
ADDITIONAL_TOOL_LIBS += ADDITIONAL_TOOL_LIBS +=
# WebObjects
ADDITIONAL_WO_LIBS +=
# #
# Flags dealing with installing and uninstalling # Flags dealing with installing and uninstalling

View file

@ -1,4 +1,7 @@
#include <sys/types.h>
#include <signal.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;
@ -17,7 +20,7 @@ void qprintf (char *fmt, ...); // prints text to cmd_out_i
@interface Forge: NSWindow @interface Forge: NSWindow
{ {
BOOL dirty; BOOL dirty;
NSString *filename; // full path with .map extension NSMutableString *filename; // full path with .map extension
// UI objects // UI objects
id brushcount_i; id brushcount_i;
@ -41,27 +44,27 @@ void qprintf (char *fmt, ...); // prints text to cmd_out_i
} }
- setDefaultFilename; - setDefaultFilename;
- (char *)currentFilename; - (NSString *)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 instance drawing
- redrawInstance; // erase and redraw all instance now - redrawInstance; // erase and redraw all instance now
- 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;
@ -76,9 +79,9 @@ void qprintf (char *fmt, ...); // prints text to cmd_out_i
- save: sender; - save: sender;
- saveAs: sender; - saveAs: sender;
- doOpen: (char *)fname; - doOpen: (NSString *) fname;
- saveBSP:(char *)cmdline dialog:(BOOL)wt; - saveBSP: (NSString *) cmdline dialog: (BOOL) wt;
- BSP_Full: sender; - BSP_Full: sender;
- BSP_FastVis: sender; - BSP_FastVis: sender;

View file

@ -14,34 +14,34 @@ extern id map_i;
- writeStats; - writeStats;
- readMapFile: (char *)fname; - readMapFile: (NSString *) fname;
- writeMapFile: (char *)fname useRegion: (BOOL)reg; - writeMapFile: (NSString *) 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;

View file

@ -19,7 +19,7 @@
extern id project_i; extern id project_i;
@interface Project:Object @interface Project: NSObject
{ {
id projectInfo; // dictionary storage of project info id projectInfo; // dictionary storage of project info
@ -42,24 +42,24 @@ extern id project_i;
id BSPoutput_i; // outlet to Text id BSPoutput_i; // outlet to Text
char path_projectinfo[128]; // path of QE_Project file NSString *path_projectinfo; // path of QE_Project file
char path_basepath[128]; // base path of heirarchy NSString *path_basepath; // base path of heirarchy
char path_progdir[128]; // derived from basepath NSString *path_progdir; // derived from basepath
char path_mapdirectory[128]; // derived from basepath NSString *path_mapdirectory; // derived from basepath
char path_finalmapdir[128]; // derived from basepath NSString *path_finalmapdir; // derived from basepath
char path_wad8[128]; // path of texture WAD for cmd-8 key NSString *path_wad8; // path of texture WAD for cmd-8 key
char path_wad9[128]; // path of texture WAD for cmd-9 key NSString *path_wad9; // path of texture WAD for cmd-9 key
char path_wad0[128]; // path of texture WAD for cmd-0 key NSString *path_wad0; // path of texture WAD for cmd-0 key
char string_fullvis[1024]; // cmd-line parm NSString *string_fullvis; // cmd-line parm
char string_fastvis[1024]; // cmd-line parm NSString *string_fastvis; // cmd-line parm
char string_novis[1024]; // cmd-line parm NSString *string_novis; // cmd-line parm
char string_relight[1024]; // cmd-line parm NSString *string_relight; // cmd-line parm
char string_leaktest[1024]; // cmd-line parm NSString *string_leaktest; // cmd-line parm
char string_entities[1024]; // cmd-line parm NSString *string_entities; // cmd-line parm
int showDescriptions; // 1 = show map descs in browser int showDescriptions; // 1 = show map descs in browser
@ -73,36 +73,36 @@ extern id project_i;
- setTextureWad: (char *)wf; - setTextureWad: (char *)wf;
- addToOutput:(char *)string; - addToOutput: (NSString *) string;
- clearBspOutput:sender; - clearBspOutput: sender;
- initProjSettings; - initProjSettings;
- changeChar:(char)f to:(char)t in:(id)obj; - changeChar: (char) f to: (char) t in: (id) obj;
- (int)searchForString:(char *)str in:(id)obj; - (int) searchForString: (NSString *) str in: (id) obj;
- parseProjectFile; // read defaultsdatabase for project path - parseProjectFile; // read defaultsdatabase for project path
- openProjectFile:(char *)path; // called by openProject and newProject - openProjectFile: (NSString *) path; // called by openProject and newProject
- openProject; - openProject;
- clickedOnMap:sender; // called if clicked on map in browser - clickedOnMap:sender; // called if clicked on map in browser
- clickedOnWad:sender; // called if clicked on wad in browser - clickedOnWad:sender; // called if clicked on wad in browser
// methods to querie the project file // methods to query the project file
- (char *)getMapDirectory; - (NSString *) mapDirectory;
- (char *)getFinalMapDirectory; - (NSString *) finalMapDirectory;
- (char *)getProgDirectory; - (NSString *) progDirectory;
- (char *)getWAD8; - (NSString *) WAD8;
- (char *)getWAD9; - (NSString *) WAD9;
- (char *)getWAD0; - (NSString *) WAD0;
- (char *)getFullVisCmd; - (NSString *) fullVisCommand;
- (char *)getFastVisCmd; - (NSString *) fastVisCommand;
- (char *)getNoVisCmd; - (NSString *) noVisCommand;
- (char *)getRelightCmd; - (NSString *) relightCommand;
- (char *)getLeaktestCmd; - (NSString *) leakTestCommand;
- (char *)getEntitiesCmd; - (NSString *) entitiesCommand;
@end @end
void changeString(char cf,char ct,char *string); void changeString(char cf, char ct, char *string);

View file

@ -49,10 +49,11 @@ qboolean GetToken (qboolean crossline); // returns false at eof
void UngetToken (); void UngetToken ();
#define FN_CMDOUT "/tmp/QuakeEdCmd.txt" extern NSString *commandOutput;
#define FN_TEMPSAVE "/qcache/temp.map" extern NSString *developerLogFile;
#define FN_AUTOSAVE "/qcache/AutoSaveMap.map"
#define FN_CRASHSAVE "/qcache/ErrorSaveMap.map" extern NSString *tempSaveFile;
#define FN_DEVLOG "/qcache/devlog" extern NSString *autoSaveFile;
extern NSString *errorSaveFile;
extern char *debugname; extern char *debugname;