It seems I forgot to commit this with the plist changes.

This commit is contained in:
Bill Currie 2010-10-05 23:48:06 +09:00
parent b28ba46448
commit 1180a54d67
2 changed files with 15 additions and 98 deletions

View file

@ -28,9 +28,9 @@ extern id project_i;
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
struct plitem_s *mapList; // list of map names (Storage)
struct plitem_s *descList; // list of map descriptions (Storage)
struct plitem_s *wadList; // list of wad names (Storage)
struct plitem_s *mapList; // list of map names
struct plitem_s *descList; // list of map descriptions
struct plitem_s *wadList; // list of wad names
id pis_panel_i; // outlet to Project Info Settings (PIS)
// panel
@ -57,12 +57,12 @@ extern id project_i;
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
const char *string_fullvis; // cmd-line parm
const char *string_fastvis; // cmd-line parm
const char *string_novis; // cmd-line parm
const char *string_relight; // cmd-line parm
const char *string_leaktest; // cmd-line parm
const char *string_entities; // cmd-line parm
int showDescriptions; // 1 = show map descs in browser
@ -79,12 +79,6 @@ extern id project_i;
- (id) addToOutput: (const char *)string;
- (id) clearBspOutput: (id)sender;
- (id) initProjSettings;
- (id) changeChar: (char)f
to: (char)t
in: (id)obj;
- (int) searchForString: (const char *)str
in: (id)obj;
- (id) parseProjectFile; // read defaultsdatabase for project path
- (id) openProjectFile: (const char *)path; // called by openProject, newProject
@ -112,6 +106,4 @@ extern id project_i;
@end
void changeString (char cf, char ct, char *string);
#endif // Project_h

View file

@ -37,7 +37,6 @@ id project_i;
// ===========================================================
- (id) initVars
{
const char *s;
const char *pe;
char *ts;
@ -75,35 +74,13 @@ id project_i;
}
#endif
if ((s = [projectInfo getStringFor: BSPFULLVIS])) {
strcpy (string_fullvis, s);
changeString ('@', '\"', string_fullvis);
}
string_fullvis = [projectInfo getStringFor: BSPFULLVIS];
string_fastvis = [projectInfo getStringFor: BSPFASTVIS];
string_novis = [projectInfo getStringFor: BSPNOVIS];
string_relight = [projectInfo getStringFor: BSPRELIGHT];
string_leaktest = [projectInfo getStringFor: BSPLEAKTEST];
string_entities = [projectInfo getStringFor: BSPENTITIES];
if ((s = [projectInfo getStringFor: BSPFASTVIS])) {
strcpy (string_fastvis, s);
changeString ('@', '\"', string_fastvis);
}
if ((s = [projectInfo getStringFor: BSPNOVIS])) {
strcpy (string_novis, s);
changeString ('@', '\"', string_novis);
}
if ((s = [projectInfo getStringFor: BSPRELIGHT])) {
strcpy (string_relight, s);
changeString ('@', '\"', string_relight);
}
if ((s = [projectInfo getStringFor: BSPLEAKTEST])) {
strcpy (string_leaktest, s);
changeString ('@', '\"', string_leaktest);
}
if ((s = [projectInfo getStringFor: BSPENTITIES])) {
strcpy (string_entities, s);
changeString ('@', '\"', string_entities);
}
// Build list of wads
wadList = [projectInfo getArrayFor: WADSKEY];
@ -181,23 +158,6 @@ id project_i;
return self;
}
//
// Change a character to another in a Storage list of strings
//
- (id) changeChar: (char)f to: (char)t in: (id)obj
{
int i;
int max;
char *string;
max = [obj count];
for (i = 0; i < max; i++) {
string = [obj elementAt: i];
changeString (f, t, string);
}
return self;
}
//
// Fill the QuakeEd Maps or wads browser
// (Delegate method - delegated in Interface Builder)
@ -389,24 +349,6 @@ id project_i;
return nil;
}
//
// Search for a string in a List of strings
//
- (int) searchForString: (const char *)str in: (id)obj
{
int i;
int max;
const char *s;
max = [obj count];
for (i = 0; i < max; i++) {
s = (const char *) [obj elementAt: i]; // XXX Storage?
if (!strcmp (s, str))
return 1;
}
return 0;
}
- (const char *) getMapDirectory
{
return path_mapdirectory;
@ -519,20 +461,3 @@ id project_i;
}
@end
// ====================================================
// C Functions
// ====================================================
//
// Change a character to a different char in a string
//
void
changeString (char cf, char ct, char *string)
{
unsigned int j;
for (j = 0; j < strlen (string); j++) {
if (string[j] == cf)
string[j] = ct;
}
}