Buh-bye headers.

This commit is contained in:
Jeff Teunissen 2001-11-05 19:40:34 +00:00
parent 2fbdbd5522
commit 02dd74b2f7
23 changed files with 0 additions and 1928 deletions

View file

@ -1,86 +0,0 @@
/*
Brush.h
(description)
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <appkit/appkit.h>
#import "SetBrush.h"
#import "EditWindow.h"
extern id brush_i;
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
}
- init;
- initFromSetBrush: br;
- deselect;
- (BOOL)isSelected;
- (BOOL)XYmouseDown: (NSPoint *)pt; // return YES if brush handled
- (BOOL)ZmouseDown: (NSPoint *)pt; // return YES if brush handled
- _keyDown:(NSEvent *)theEvent;
- (NSPoint)centerPoint; // for camera flyby mode
- InstanceSize;
- XYDrawSelf;
- ZDrawSelf;
- CameraDrawSelf;
- flipHorizontal: sender;
- flipVertical: sender;
- rotate90: sender;
- makeTall: sender;
- makeShort: sender;
- makeWide: sender;
- makeNarrow: sender;
- placeEntity: sender;
- cut: sender;
- copy: sender;
- addBrush;
@end

View file

@ -1,92 +0,0 @@
/*
CameraView.h
Perspective viwer class definitions
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#include <QF/mathlib.h>
#import "SetBrush.h"
@interface CameraView: NSView
{
float angles[3];
NSRect bounds;
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;
}
- setXYOrigin: (NSPoint) point;
- setZOrigin: (float) point;
- setOrigin: (vec3_t) org angle: (float) angle;
- getOrigin: (vec3_t) org;
- (float) yawAngle;
- matrixFromAngles;
- (void) _keyDown: (NSEvent *) theEvent;
- drawMode: (NSMatrix) sender;
- setDrawMode: (drawmode_t) mode;
- (id) homeView: (id) sender;
- XYDrawSelf; // for drawing viewpoint in XY view
- ZDrawSelf; // for drawing viewpoint in XY view
- (BOOL) XYmouseDown: (NSPoint) pt flags: (unsigned int) flags; // return YES if brush handled
- (BOOL) ZmouseDown: (NSPoint) pt flags: (unsigned int) flags; // return YES if brush handled
- upFloor: sender;
- downFloor: sender;
@end
extern CameraView *cameraView;
extern byte renderList[1024*1024*4];
extern BOOL timeDrawing;
void CameraMoveto (vec3_t p);
void CameraLineto (vec3_t p);

View file

@ -1,61 +0,0 @@
/*
Clipper.h
Clipping plane class definition
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#include <QF/mathlib.h>
#include <QF/bspfile.h>
#import <Foundation/NSGeometry.h>
#import <Foundation/NSObject.h>
#import "SetBrush.h"
@interface Clipper: NSObject
{
int num;
vec3_t pos[3];
mplane_t plane;
}
- (BOOL) hide;
- XYClick: (NSPoint) pt;
- (BOOL) XYDrag: (NSPoint *) pt;
- ZClick: (NSPoint) pt;
- carve;
- flipNormal;
- (BOOL) getFace: (face_t *) pl;
- (void) cameraDrawSelf;
- (void) xyDrawSelf;
- (void) zDrawSelf;
@end
extern Clipper *clipper;

View file

@ -1,62 +0,0 @@
/*
Entity.h
(description)
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <Foundation/NSObject.h>
@class NSArray, NSDictionary;
// an Entity is a list of brush objects, with additional key / value info
@interface Entity: NSObject <NSCopying, NSMutableCopying>
{
id brushes;
id fields;
}
- initWithClassname: (NSString *)classname;
- initWithTokens;
- (NSString *) targetname;
- writeToFile: (NSString *) filename region: (BOOL) reg;
- (id) objectForKey: (NSString *) k;
- (Brush *) brushAtIndex: (unsigned) index;
- (id) fieldForKey: (
@end
@class NSMutableArray, NSMutableDictionary;
@interface MutableEntity: Entity
{
}
@end

View file

@ -1,47 +0,0 @@
/*
EntityArray.h
(description)
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <Foundation/Foundation.h>
#import "mathlib.h"
@interface EntityArray: NSMutableArray
{
id nullclass;
char *source_path;
}
- initForSourceDirectory: (char *)path;
- (id)classForName: (char *)name;
- (void)scanDirectory;
@end
extern EntityArray *entityClasses;

View file

@ -1,58 +0,0 @@
/*
EntityClass.h
EntityClass (used by Entity) class definitions
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <Foundation/Foundation.h>
#import "mathlib.h"
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][32];
}
- initFromText: (char *)text;
- (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;
@end

View file

@ -1,132 +0,0 @@
/*
Forge.h
Main controller object class definitions
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/NSWindow.h>
@interface Forge: NSWindow
{
BOOL dirty;
NSMutableString *filename; // full path with .map extension
unsigned int eventMask;
// UI objects
id brushcount_i;
id entitycount_i;
id regionbutton_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
}
- (void) setDefaultFilename;
- (NSString *) currentFilename;
// events
- (void) postAppDefined; // post an NSAppDefined event
- (void) addToEventMask: (unsigned int) mask;
- (unsigned int) eventMask;
- (NSEvent *) peekNextEvent;
- (void) updateAll; // when a model has been changed
- (void) updateCamera; // when the camera has moved
- (void) updateXY;
- (void) updateZ;
- (void) updateAll: (id) sender;
- (void) newinstance; // force next flushwindow to clear all instance drawing
- (void) redrawInstance; // erase and redraw all instance now
- (void) appWillTerminate: (id) sender;
- (void) openProject: (id) sender;
- (void) textCommand: (id) sender;
- (void) applyRegion: (id) sender;
- (BOOL) dirty;
- (void) clear: (id) sender;
- (void) centerCamera: (id) sender;
- (void) centerZChecker: (id) sender;
- (void) changeXYLookUp: (id) sender;
- (void) setBrushRegion: (id) sender;
- (void) setXYRegion: (id) sender;
- (void) open: (id) sender;
- (void) save: (id) sender;
- (void) saveAs: (id) sender;
- (void) doOpen: (NSString *) fname;
- (void) saveBSP: (NSString *) cmdline dialog: (BOOL) wt;
- (void) BSP_Full: (id) sender;
- (void) BSP_FastVis: (id) sender;
- (void) BSP_NoVis: (id) sender;
- (void) BSP_relight: (id) sender;
- (void) BSP_stop: (id) sender;
- (void) BSP_entities: (id) sender;
// UI queries for other objects
- (BOOL) showCoordinates;
- (BOOL) showNames;
@end
extern Forge *forge;
extern BOOL filter_light, filter_path, filter_entities;
extern BOOL filter_clip_brushes, filter_water_brushes, filter_world;
extern id g_cmd_out_i;
double I_FloatTime (void);
void NopSound (void);
void qprintf (char *fmt, ...); // prints text to cmd_out_i

View file

@ -1,101 +0,0 @@
/*
InspectorControl.h
Inspector control class definitions
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/AppKit.h>
#define MINIWINICON "DoomEdIcon"
typedef enum
{
i_project,
i_textures,
i_things,
i_prefs,
i_settings,
i_output,
i_help,
i_end
} insp_e;
extern id inspcontrol_i;
@interface InspectorControl:Object
{
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 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!
// 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
// 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) awakeFromNib;
- (void) changeInspector: (id) sender;
- (void) changeInspectorTo: (insp_e) which;
- (insp_e) currentInspector;
@end
@protocol InspectorControl
- windowResized;
@end

View file

@ -1,46 +0,0 @@
/*
KeypairView.h
Key pair viewer class definitions
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
extern id keypairview_i;
@interface KeypairView: NSView
{
}
- (void) calcViewSize;
#define SPACING 4
#define FONTSIZE 12
#define EXTRASPC 2
#define LINEHEIGHT 16
@end

View file

@ -1,98 +0,0 @@
/*
Map.h
Map class definition for Forge
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
// Map is a collection of Entity objects
@interface Map: NSMutableArray
{
id currentEntity;
id oldselection; // temp when loading a new map
float minz, maxz;
}
- (void) newMap;
- (void) writeStats;
- (void) readMapFile: (NSString *) fname;
- (void) writeMapFile: (NSString *) fname useRegion: (BOOL) reg;
- 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;
- (id) currentEntity;
- (void) setCurrentEntity: (id) ent;
- (float) currentMaxZ;
- (float) currentMinZ;
- (void) setCurrentMaxZ: (float) m;
- (void) setCurrentMinZ: (float) m;
- (int) numSelected;
- (id) 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
- cloneSelection: sender;
- makeEntity: sender;
- subtractSelection: sender;
- selectCompletelyInside: sender;
- selectPartiallyInside: sender;
- tallBrush: sender;
- shortBrush: sender;
- rotate_x: sender;
- rotate_y: sender;
- rotate_z: sender;
- flip_x: sender;
- flip_y: sender;
- flip_z: sender;
- selectCompleteEntity: sender;
@end
extern Map *map;

View file

@ -1,43 +0,0 @@
/*
PopScrollView.h
(description)
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/AppKit.h>
@interface PopScrollView: NSScrollView
{
NSButton *button1;
NSButton *button2;
}
- (id) initWithFrame: (NSRect) frameRect button1: (NSButton *) b1 button2: (NSButton *) b2;
- (void) tile;
@end

View file

@ -1,92 +0,0 @@
/*
Preferences.h
Preferences class definition for Forge
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <Foundation/NSObject.h>
#import <Foundation/NSDictionary.h>
/*
Keys in the dictionary
*/
#define ProjectPath @"projectPath"
#define BspSoundPath @"bspSoundPath"
#define ShowBSPOutput @"showBSPOutput"
#define OffsetBrushCopy @"offsetBrushCopy"
#define StartWad @"startWad"
#define XLight @"xLight"
#define YLight @"yLight"
#define ZLight @"zLight"
@interface Preferences: NSObject
{
// UI targets
id projectPathField; // path to the project to load on startup
id bspSoundPathField; // location of BSP sounds
id startWadField; // which wadfile to load on startup
id xLightField; // Lighting for X side
id yLightField; // Lighting for Y side
id zLightField; // Lighting for Z side
id showBSPOutputButton; // "Show BSP Output" checkbox
id offsetBrushCopyButton; // "Brush offset" checkbox
NSDictionary *currentValues;
NSMutableDictionary *displayedValues;
}
+ (void) saveDefaults;
- (void) loadDefaults;
+ (Preferences *) sharedInstance; // Return the shared instance
- (NSDictionary *) preferences; // current prefs
- (void) updateUI; // Update the displayed values in the UI
- (void) commitDisplayedValues; // Make displayed settings current
- (void) discardDisplayedValues; // Replace displayed settings with current
// UI notifications
- (void) ok: (id) sender; // commit displayed values
- (void) revert: (id) sender; // revert to current values
- (void) revertToDefault: (id) sender; // revert current values to defaults and
// discard displayed values
- (void) prefsChanged: (id) sender; // Notify the object to update the UI
- (id) objectForKey: (id) key;
//+ (void) setObject: (id) obj forKey: (id) key;
+ (NSDictionary *) preferencesFromDefaults;
+ (void) savePreferencesToDefaults: (NSDictionary *) dict;
@end
extern Preferences *prefs;

View file

@ -1,132 +0,0 @@
/*
Project.h
Project class definition for Forge
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/AppKit.h>
#define EntSubdir @"progs"
#define MapSubdir @"maps"
#define MapNames @"mapNames"
#define Descriptions @"descriptions"
#define WadFiles @"wadFiles"
#define BSPFullVis @"bspFullVisCommand"
#define BSPFastVis @"bspFastVisCommand"
#define BSPNoVis @"bspNoVisCommand"
#define BSPRelight @"bspRelightCommand"
#define BSPLeakTest @"bspLeakTestCommand"
#define BSPEntities @"bspEntitiesCommand"
@interface Project: NSObject
{
id projectInfo; // NSDictionary storage of project info
id mapNames; // Array of map names (NSString)
id descriptions; // Array of map descriptions (NSString)
id wadNames; // Array of wad names (NSString)
id pBasePathField; // outlet to base path info (NSTextField)
id pCurrentMapField; // outlet to current map textfield
id pBSPOutputView; // outlet to a command output NSTextView
id pMapBrowser; // outlet to Forge Maps browser
id projectPrefsPanel; // outlet to Project Preferences panel
id ppBasePath; // outlet to PPanel->"Base Path"
id ppWadBrowser; // outlet to PPanel->"WAD Browser"
id ppFullVisField; // outlet to PPanel->"Full VIS Compile"
id ppFastVisField; // outlet to PPanel->"Fast VIS Compile"
id ppNoVisField; // outlet to PPanel->"No VIS Compile"
id ppRelightField; // outlet to PPanel->"Relighting Compile"
id ppLeakTestField; // outlet to PPanel->"Leak Check Compile"
NSString *_projectPath; // path to *.forge file
NSString *_basePath; // base path of heirarchy
NSString *_progsPath; // derived from basepath
NSString *_mapPath; // derived from basepath
NSString *_finalMapPath; // derived from basepath
NSString *_wad8; // path of texture WAD for cmd-8 key
NSString *_wad9; // path of texture WAD for cmd-9 key
NSString *_wad0; // path of texture WAD for cmd-0 key
NSString *_fullVisCommand; // cmd-line parm
NSString *_fastVisCommand; // cmd-line parm
NSString *_noVisCommand; // cmd-line parm
NSString *_relightCommand; // cmd-line parm
NSString *_leakTestCommand; // cmd-line parm
NSString *_entitiesCommand; // cmd-line parm
int showDescriptions; // 1 = show map descs in browser
time_t lastModified; // last time project file was modified
}
- (id) initProject;
- (id) initVars;
- (void) initProjectSettings;
//- (void) setTextureWad: (NSString *) wadFile;
- (void) addToOutput: (NSString *) string;
- (void) changeString: (NSString *) f to: (NSString *) t in: (id) obj;
- (BOOL) searchForString: (NSString *) str in: (id) obj;
- (void) parseProjectFile; // read database for project path
- (void) openProjectWithFile: (NSString *) path; // called by openProject and newProject
- (id) openProject;
//- (void) wadWasClicked: (id) sender; // called if clicked on wad in browser
//- (void) mapWasClicked: (id) sender; // called if clicked on map in browser
- (void) clearBspOutput: (id) sender; // Called if the BSP output view should
// be cleared
// methods to query the project file
- (NSString *) currentProject;
- (NSString *) mapDirectory;
- (NSString *) finalMapDirectory;
- (NSString *) progDirectory;
- (NSString *) wad8;
- (NSString *) wad9;
- (NSString *) wad0;
- (NSString *) fullVisCommand;
- (NSString *) fastVisCommand;
- (NSString *) noVisCommand;
- (NSString *) relightCommand;
- (NSString *) leakTestCommand;
- (NSString *) entitiesCommand;
@end
void changeString (char cf, char ct, char *string);

View file

@ -1,184 +0,0 @@
/*
SetBrush.h
SetBrush class definition for Forge
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import "TexturePalette.h"
#import "XYView.h"
#define MAX_FACES 16
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;
} plane_t;
typedef struct {
// implicit rep
vec3_t planepts[3];
texturedef_t texture;
// cached rep
plane_t plane;
qtexture_t *qtexture;
float light; // 0 - 1.0
winding_t *w;
} face_t;
#define ON_EPSILON 0.1
#define FP_EPSILON 0.01
#define VECTOR_EPSILON 0.0001
#define SIDE_FRONT 0
#define SIDE_BACK 1
#define SIDE_ON 2
winding_t *ClipWinding (winding_t *in, plane_t *split);
winding_t *CopyWinding (winding_t *w);
winding_t *NewWinding (int points);
@interface SetBrush: NSObject <NSCopying>
{
BOOL regioned; // not active
BOOL selected;
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];
}
- initOwner: own mins:(float *)mins maxs:(float *)maxs texture:(texturedef_t *)tex;
- initFromTokens: own;
- setMins:(float *)mins maxs:(float *)maxs;
- parent;
- setParent: (id)p;
- setEntityColor: (vec3_t)color;
- calcWindings;
- writeToFILE: (FILE *)f region: (BOOL)reg;
- (BOOL)selected;
- (BOOL)regioned;
- setSelected: (BOOL)s;
- setRegioned: (BOOL)s;
- getMins: (vec3_t)mins maxs: (vec3_t)maxs;
- (BOOL)containsPoint: (vec3_t)pt;
- freeWindings;
- removeIfInvalid;
extern vec3_t region_min, region_max;
- 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;
- addFace: (face_t *)f;
//
// multiple brush actions
//
- carveByClipper;
extern vec3_t sb_translate;
- translate;
extern id carve_in, carve_out;
- select;
- deselect;
- remove;
- flushTextures;
extern vec3_t sb_mins, sb_maxs;
- addToBBox;
extern vec3_t sel_x, sel_y, sel_z;
extern vec3_t sel_org;
- transform;
- flipNormals;
- carve;
- setCarveVars;
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

View file

@ -1,141 +0,0 @@
/*
TexturePalette.h
Texture Palette handling for Forge
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <Foundation/NSGeometry.h>
#import <Foundation/NSString.h>
#import <Foundation/NSObject.h>
#import <AppKit/NSBitmapImageRep.h>
typedef union pixel32_u {
byte chan[4];
unsigned int p;
} pixel32_t;
typedef struct texturedef_s {
char texture[16];
float rotate;
float shift[2];
float scale[2];
} texturedef_t;
typedef struct qtexture_s {
NSString *name;
NSSize size;
NSBitmapImageRep *rep;
void *data;
pixel32_t flatcolor;
} qtexture_t;
#define MAX_TEXTURES 1024
extern int tex_count;
extern qtexture_t qtextures[MAX_TEXTURES];
void TEX_InitFromWad (NSString *path);
qtexture_t *TEX_ForName (NSString *name);
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;
@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;
}
- (NSString *) currentWad;
- initPaletteFromWadfile:(NSString *) wadFile;
- computeTextureViewSize;
- alphabetize;
- getList;
- (int) getSelectedTexture;
- setSelectedTexture: (int) which;
- (int) getSelectedTexIndex;
// Called externally
- (NSString *) selectedTextureName;
- selectTextureByName: (NSString *) name;
// New methods to replace the 2 above ones
- (texturedef_t *) textureDef;
- setTextureDef: (texturedef_t *) td;
// Action methods
- searchForTexture: (id) sender;
- clearTexinfo: (id) sender;
- incXShift: (id) sender;
- decXShift: (id) sender;
- incYShift: (id) sender;
- decYShift: (id) sender;
- incRotate: (id) sender;
- decRotate: (id) sender;
- incXScale: (id) sender;
- decXScale: (id) sender;
- incYScale: (id) sender;
- decYScale: (id) sender;
- texturedefChanged: (id) sender;
- onlyShowMapTextures: (id) sender;
- (int) searchForTextureInPalette: (NSString *) texture;
- setDisplayFlag: (int) index to: (int) value;
@end

View file

@ -1,41 +0,0 @@
/*
TextureView.h
Texture viewer class definition for Forge
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
@interface TextureView: NSView
{
id parent_i;
int deselectIndex;
}
- setParent:(id)from;
- deselect;
@end

View file

@ -1,72 +0,0 @@
/*
Things.h
(description)
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/AppKit.h>
extern id things_i;
#define ENTITYNAMEKEY "spawn"
@interface Things: Object
{
id entity_browser_i; // browser
id entity_comment_i; // scrolling text window
id prog_path_i;
int lastSelected; // last row selected in browser
id keyInput_i;
id valueInput_i;
id flags_i;
}
- initEntities;
- newCurrentEntity;
- setSelectedKey:(epair_t *)ep;
- clearInputs;
- (char *)spawnName;
// UI targets
- reloadEntityClasses: sender;
- selectEntity: sender;
- doubleClickEntity: sender;
// Action methods
- addPair:sender;
- delPair:sender;
- setAngle:sender;
- setFlags:sender;
@end

View file

@ -1,74 +0,0 @@
/*
Vector.h
A vector math class supporting up to six dimensions (interface)
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#include <QF/mathlib.h>
#import <Foundation/NSObject.h>
@interface Vector: NSObject <NSCopying>
{
unsigned int _numDimensions;
double _values[6];
}
- (id) initWithString: (NSString *) str;
- (id) initwithNumbers: ...;
- (id) zero dimensions: (unsigned char) d;
- (id) one dimensions: (unsigned char) d;
- (double) x; // Convenience methods for three-dimensional vectors
- (double) y;
- (double) z;
- (double) dimension: (unsigned char) d;
- (void) setX: (double) val;
- (void) setY: (double) val;
- (void) setZ: (double) val;
- (void) setDimension: (unsigned char) d to: (double) val;
- (unsigned char) dimensions;
- (double) length;
- (double) direction;
- (void) add: (Vector *) vec;
- (void) subtract: (Vector *) vec;
- (void) scale: (double) scalar;
- (void) invert; // Turn the direction around
- (void) normalize; // Scale the vector so that its length is 1
- (void) isEqualToVector: (Vector *) vec;
- (NSString *) stringValue;
@end
Vector *
CrossProduct (Vector *, Vector *);
double
DotProduct (Vector *, Vector *);

View file

@ -1,95 +0,0 @@
/*
XYView.h
X/Y "perspective" viewer class definitions
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#include <QF/mathlib.h>
#import <AppKit/AppKit.h>
#import "SetBrush.h"
#define MINSCALE 0.125
#define MAXSCALE 2.0
typedef enum {dr_wire, dr_flat, dr_texture} drawmode_t;
@interface XYView: NSView
{
NSRect realbounds, newrect, combinedrect;
NSPoint midpoint;
int gridsize;
float scale;
// for textured view
int xywidth, xyheight;
float *xyzbuffer;
unsigned *xypicbuffer;
drawmode_t drawmode;
// UI links
id mode_radio_i;
}
- (float)currentScale;
- setModeRadio: m;
- drawMode: sender;
- setDrawMode: (drawmode_t) mode;
- newSuperBounds;
- newRealBounds: (NSRect) nb;
- addToScrollRange: (float) x : (float) y;
- setOrigin: (NSPoint) pt scale: (float) sc;
- centerOn: (vec3_t)org;
- drawMode: sender;
- superviewChanged;
- (int) gridsize;
- (float) snapToGrid: (float) f;
@end
extern XYView *xyView;
extern vec3_t xy_viewnormal; // v_forward for xy view
extern float xy_viewdist; // clip behind this plane
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 XYmoveto (vec3_t pt);
void XYlineto (vec3_t pt);

View file

@ -1,42 +0,0 @@
/*
ZScrollView.h
Depth scroller class definition
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/AppKit.h>
@interface ZScrollView: NSScrollView
{
id button1;
}
- (id) initWithFrame: (const NSRect) frameRect button1: (id) b1;
- (void) tile;
@end

View file

@ -1,74 +0,0 @@
/*
ZView.h
Depth viewer class definition
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
#import <AppKit/NSView.h>
#include <QF/mathlib.h>
@interface ZView: NSView
{
float minheight, maxheight;
float oldminheight, oldmaxheight;
float topbound, bottombound; // for floor clipping
float scale;
vec3_t origin;
}
- (float) currentScale;
- clearBounds;
- getBounds: (float *)top :(float *)bottom;
- getPoint: (NSPoint) point;
- setPoint: (NSPoint) point;
- addToHeightRange: (float)height;
- newRealBounds;
- newSuperBounds;
- XYDrawSelf;
- (BOOL)XYmouseDown: (NSPoint *)pt;
- setXYOrigin: (NSPoint) point;
- setOrigin: (NSPoint) pt scale: (float) sc;
@end
extern ZView *zView;
// zplane controls the objects displayed in the xyview
extern float zplane;
extern float zplanedir;

View file

@ -1,112 +0,0 @@
/* Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
See file, 'COPYING', for details.
*/
// cmdlib.h
#ifndef __CMDLIB__
#define __CMDLIB__
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <time.h>
#include <stdarg.h>
#ifndef __BYTEBOOL__
#define __BYTEBOOL__
typedef enum {false, true} qboolean;
typedef unsigned char byte;
#endif
// the dec offsetof macro doesn't work very well...
#define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
// set these before calling CheckParm
extern int myargc;
extern char **myargv;
char *strupr (char *in);
char *strlower (char *in);
int Q_strncasecmp (char *s1, char *s2, int n);
int Q_strcasecmp (char *s1, char *s2);
void Q_getwd (char *out);
int filelength (FILE *f);
int FileTime (char *path);
void Q_mkdir (char *path);
extern char qdir[1024];
extern char gamedir[1024];
void SetQdirFromPath (char *path);
char *ExpandPath (char *path);
char *ExpandPathAndArchive (char *path);
double I_FloatTime (void);
void Error (char *error, ...);
int CheckParm (char *check);
FILE *SafeOpenWrite (char *filename);
FILE *SafeOpenRead (char *filename);
void SafeRead (FILE *f, void *buffer, int count);
void SafeWrite (FILE *f, void *buffer, int count);
int LoadFile (char *filename, void **bufferptr);
void SaveFile (char *filename, void *buffer, int count);
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);
int ParseNum (char *str);
short BigShort (short l);
short LittleShort (short l);
int BigLong (int l);
int LittleLong (int l);
float BigFloat (float l);
float LittleFloat (float l);
char *COM_Parse (char *data);
extern char com_token[1024];
extern qboolean com_eof;
void CRC_Init(unsigned short *crcvalue);
void CRC_ProcessByte(unsigned short *crcvalue, byte data);
unsigned short CRC_Value(unsigned short crcvalue);
void CreatePath (char *path);
void CopyFile (char *from, char *to);
extern qboolean archive;
extern char archivedir[1024];
#endif

View file

@ -1,43 +0,0 @@
/*
render.h
Software renderer definitions and prototypes
Copyright (C) 2001 Jeff Teunissen <deek@d2dc.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "Config.h"
#endif
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;
void REN_ClearBuffers (void);
void REN_DrawCameraFace (face_t *idpol);
void REN_DrawXYFace (face_t *idpol);
void REN_BeginCamera (void);
void REN_BeginXY (void);