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
22885a48ad
commit
877067de61
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