Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-21 21:37:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-21 21:37:38 +0400
commit00735ed9e49d2103e06b0e25513b5b880f0db226 (patch)
treec7138c391136a658698b3195635d6d2298ecb51f /source/gameengine
parent4d48dbe5fd553ab149abd1f062eec08ae813060a (diff)
Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrap
in BLI_ functions.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 78ea2aac8ce..f5439ba4f64 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -76,9 +76,6 @@ extern "C"
int GHOST_HACK_getFirstFile(char buf[]);
-extern char bprogname[]; /* holds a copy of argv[0], from creator.c */
-extern char btempdir[]; /* use this to store a valid temp directory */
-
// For BLF
#include "BLF_api.h"
#include "BLF_translation.h"
@@ -116,9 +113,6 @@ extern char datatoc_bfont_ttf[];
const int kMinWindowWidth = 100;
const int kMinWindowHeight = 100;
-char bprogname[FILE_MAX];
-char bprogdir[FILE_MAX];
-
static void mem_error_cb(const char *errorStr)
{
fprintf(stderr, "%s", errorStr);
@@ -380,8 +374,8 @@ int main(int argc, char** argv)
signal (SIGFPE, SIG_IGN);
#endif /* __alpha__ */
#endif /* __linux__ */
- BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]);
- BLI_split_dir_part(bprogname, bprogdir, sizeof(bprogdir));
+ BLI_init_program_path(argv[0]);
+ BLI_init_temporary_dir(NULL);
#ifdef __APPLE__
// Can't use Carbon right now because of double defined type ID (In Carbon.h and DNA_ID.h, sigh)
/*
@@ -786,7 +780,7 @@ int main(int argc, char** argv)
}
else
{
- bfd = load_game_data(bprogname, filename[0]? filename: NULL);
+ bfd = load_game_data(BLI_program_path(), filename[0]? filename: NULL);
}
//::printf("game data loaded from %s\n", filename);