mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 16:10:53 +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
|
||||
//
|
||||
- (NSString *) baseDirectoryPath;
|
||||
- (NSString *) getMapDirectory;
|
||||
- (NSString *) getFinalMapDirectory;
|
||||
- (NSString *) getProgDirectory;
|
||||
|
|
|
@ -344,6 +344,11 @@ id project_i;
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) baseDirectoryPath
|
||||
{
|
||||
return basepathinfo_i;
|
||||
}
|
||||
|
||||
- (NSString *) getMapDirectory
|
||||
{
|
||||
return path_mapdirectory;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "TexturePalette.h"
|
||||
#include "Preferences.h"
|
||||
#include "Project.h"
|
||||
#include "Map.h"
|
||||
#include "Entity.h"
|
||||
#include "QuakeEd.h"
|
||||
|
@ -191,7 +192,7 @@ TEX_InitFromWad (const char *path)
|
|||
|
||||
start = Sys_DoubleTime ();
|
||||
|
||||
newpath = [[preferences_i getProjectPath] cString];
|
||||
newpath = [[project_i baseDirectoryPath] cString];
|
||||
newpath = va ("%s%s%s", newpath, (newpath[0] ? "/" : ""), path);
|
||||
|
||||
// free any textures
|
||||
|
|
Loading…
Reference in a new issue