mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Export the base directory of the open project
Project -baseDirectoryPath returns the absolute path to the directory from which the .qpr file was loaded.
This commit is contained in:
parent
39da12282c
commit
34cf3f7570
3 changed files with 8 additions and 1 deletions
|
@ -89,6 +89,7 @@ extern id project_i;
|
||||||
//
|
//
|
||||||
// methods to query the project file
|
// methods to query the project file
|
||||||
//
|
//
|
||||||
|
- (NSString *) baseDirectoryPath;
|
||||||
- (NSString *) getMapDirectory;
|
- (NSString *) getMapDirectory;
|
||||||
- (NSString *) getFinalMapDirectory;
|
- (NSString *) getFinalMapDirectory;
|
||||||
- (NSString *) getProgDirectory;
|
- (NSString *) getProgDirectory;
|
||||||
|
|
|
@ -344,6 +344,11 @@ id project_i;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) baseDirectoryPath
|
||||||
|
{
|
||||||
|
return basepathinfo_i;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) getMapDirectory
|
- (NSString *) getMapDirectory
|
||||||
{
|
{
|
||||||
return path_mapdirectory;
|
return path_mapdirectory;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "TexturePalette.h"
|
#include "TexturePalette.h"
|
||||||
#include "Preferences.h"
|
#include "Preferences.h"
|
||||||
|
#include "Project.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "QuakeEd.h"
|
#include "QuakeEd.h"
|
||||||
|
@ -191,7 +192,7 @@ TEX_InitFromWad (const char *path)
|
||||||
|
|
||||||
start = Sys_DoubleTime ();
|
start = Sys_DoubleTime ();
|
||||||
|
|
||||||
newpath = [[preferences_i getProjectPath] cString];
|
newpath = [[project_i baseDirectoryPath] cString];
|
||||||
newpath = va ("%s%s%s", newpath, (newpath[0] ? "/" : ""), path);
|
newpath = va ("%s%s%s", newpath, (newpath[0] ? "/" : ""), path);
|
||||||
|
|
||||||
// free any textures
|
// free any textures
|
||||||
|
|
Loading…
Reference in a new issue