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:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-04-24 10:29:51 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-04-24 10:29:51 +0400
commit3a2194a534725d9e263b6f2af11ad8b6ef8ecc67 (patch)
tree8561f9010bf0ee1794aaa40e0c9c25b7337d5194 /source/gameengine/GamePlayer/ghost
parent8ff958e821b2d42b74c68af02ac9224fae734e86 (diff)
Remove ability to open a published executable from Blender.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index acdf3027f19..897fb4f27cd 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -63,6 +63,7 @@ extern "C"
#include "BLI_blenlib.h"
#include "DNA_scene_types.h"
#include "BLO_readfile.h"
+#include "BLO_readblenfile.h"
int GHOST_HACK_getFirstFile(char buf[]);
@@ -175,14 +176,19 @@ char *get_filename(int argc, char **argv) {
BlendFileData *load_game_data(char *progname, char *filename) {
BlendReadError error;
- BlendFileData *bfd;
+ BlendFileData *bfd = NULL;
/* try to load ourself, will only work if we are a runtime */
- bfd= BLO_read_from_file(progname, &error);
-
- if (!bfd) {
+ if (blo_is_a_runtime(progname)) {
+ bfd= blo_read_runtime(progname, &error);
+ }
+ if (bfd) {
+ bfd->type= BLENFILETYPE_RUNTIME;
+ strcpy(bfd->main->name, progname);
+ } else {
if (filename) {
- bfd= BLO_read_from_file(filename, &error);
+ return load_game_data(filename, NULL);
+// bfd= BLO_read_from_file(filename, &error);
}
}
@@ -566,7 +572,7 @@ int main(int argc, char** argv)
{
system->processEvents(false);
system->dispatchEvents();
- if (exitcode = app.getExitRequested())
+ if ((exitcode = app.getExitRequested()))
{
run = false;
exitstring = app.getExitString();