2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
#import <AppKit/AppKit.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
#define BASEPATHKEY "basepath"
|
|
|
|
#define MAPNAMESKEY "maps"
|
|
|
|
#define DESCKEY "desc"
|
|
|
|
#define WADSKEY "wads"
|
|
|
|
#define BSPFULLVIS "bspfullvis"
|
|
|
|
#define BSPFASTVIS "bspfastvis"
|
|
|
|
#define BSPNOVIS "bspnovis"
|
|
|
|
#define BSPRELIGHT "bsprelight"
|
|
|
|
#define BSPLEAKTEST "bspleaktest"
|
|
|
|
#define BSPENTITIES "bspentities"
|
|
|
|
|
|
|
|
#define SUBDIR_ENT "progs" // subdir names in heirarchy
|
|
|
|
#define SUBDIR_MAPS "maps"
|
|
|
|
#define SUBDIR_GFX "gfx"
|
|
|
|
|
|
|
|
extern id project_i;
|
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
@interface Project: NSObject
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
|
|
|
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 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 BSPoutput_i; // outlet to Text
|
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
NSString *path_projectinfo; // path of QE_Project file
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
NSString *path_basepath; // base path of heirarchy
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
NSString *path_progdir; // derived from basepath
|
|
|
|
NSString *path_mapdirectory; // derived from basepath
|
|
|
|
NSString *path_finalmapdir; // derived from basepath
|
|
|
|
|
|
|
|
NSString *path_wad8; // path of texture WAD for cmd-8 key
|
|
|
|
NSString *path_wad9; // path of texture WAD for cmd-9 key
|
|
|
|
NSString *path_wad0; // path of texture WAD for cmd-0 key
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
NSString *string_fullvis; // cmd-line parm
|
|
|
|
NSString *string_fastvis; // cmd-line parm
|
|
|
|
NSString *string_novis; // cmd-line parm
|
|
|
|
NSString *string_relight; // cmd-line parm
|
|
|
|
NSString *string_leaktest; // cmd-line parm
|
|
|
|
NSString *string_entities; // cmd-line parm
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
int showDescriptions; // 1 = show map descs in browser
|
|
|
|
|
|
|
|
time_t lastModified; // last time project file was modified
|
|
|
|
}
|
|
|
|
|
|
|
|
- initProject;
|
|
|
|
- initVars;
|
|
|
|
|
|
|
|
- (char *)currentProjectFile;
|
|
|
|
|
|
|
|
- setTextureWad: (char *)wf;
|
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
- addToOutput: (NSString *) string;
|
|
|
|
- clearBspOutput: sender;
|
2001-02-09 01:52:44 +00:00
|
|
|
- initProjSettings;
|
2001-03-02 07:01:51 +00:00
|
|
|
- changeChar: (char) f to: (char) t in: (id) obj;
|
|
|
|
- (int) searchForString: (NSString *) str in: (id) obj;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
- parseProjectFile; // read defaultsdatabase for project path
|
2001-03-02 07:01:51 +00:00
|
|
|
- openProjectFile: (NSString *) path; // called by openProject and newProject
|
2001-02-09 01:52:44 +00:00
|
|
|
- openProject;
|
|
|
|
- clickedOnMap:sender; // called if clicked on map in browser
|
|
|
|
- clickedOnWad:sender; // called if clicked on wad in browser
|
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
// methods to query the project file
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
- (NSString *) mapDirectory;
|
|
|
|
- (NSString *) finalMapDirectory;
|
|
|
|
- (NSString *) progDirectory;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
- (NSString *) WAD8;
|
|
|
|
- (NSString *) WAD9;
|
|
|
|
- (NSString *) WAD0;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
- (NSString *) fullVisCommand;
|
|
|
|
- (NSString *) fastVisCommand;
|
|
|
|
- (NSString *) noVisCommand;
|
|
|
|
- (NSString *) relightCommand;
|
|
|
|
- (NSString *) leakTestCommand;
|
|
|
|
- (NSString *) entitiesCommand;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2001-03-02 07:01:51 +00:00
|
|
|
void changeString(char cf, char ct, char *string);
|
2001-02-09 01:52:44 +00:00
|
|
|
|