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:
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_ghost.cpp')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 7c47d2353a6..2433c587179 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -58,6 +58,7 @@ extern "C"
#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_node.h"
+#include "BKE_report.h"
#include "BLI_blenlib.h"
#include "DNA_scene_types.h"
#include "BLO_readfile.h"
@@ -85,6 +86,8 @@ extern "C"
#include "BKE_main.h"
#include "BKE_utildefines.h"
+#include "RNA_define.h"
+
#ifdef WIN32
#include <windows.h>
#ifdef NDEBUG
@@ -259,35 +262,33 @@ static void get_filename(int argc, char **argv, char *filename)
#endif // !_APPLE
}
-static BlendFileData *load_game_data(char *progname, char *filename = NULL, char *relativename = NULL) {
- BlendReadError error;
+static BlendFileData *load_game_data(char *progname, char *filename = NULL, char *relativename = NULL)
+{
+ ReportList reports;
BlendFileData *bfd = NULL;
+
+ BKE_reports_init(&reports, RPT_STORE);
/* try to load ourself, will only work if we are a runtime */
if (blo_is_a_runtime(progname)) {
- bfd= blo_read_runtime(progname, &error);
+ bfd= blo_read_runtime(progname, &reports);
if (bfd) {
bfd->type= BLENFILETYPE_RUNTIME;
strcpy(bfd->main->name, progname);
}
} else {
- bfd= BLO_read_from_file(progname, &error);
- }
-
- /*
- if (bfd && bfd->type == BLENFILETYPE_BLEND) {
- BLO_blendfiledata_free(bfd);
- bfd = NULL;
- error = BRE_NOT_A_PUBFILE;
+ bfd= BLO_read_from_file(progname, &reports);
}
- */
if (!bfd && filename) {
bfd = load_game_data(filename);
if (!bfd) {
- printf("Loading %s failed: %s\n", filename, BLO_bre_as_string(error));
+ printf("Loading %s failed: ", filename);
+ BKE_reports_print(&reports, RPT_ERROR);
}
}
+
+ BKE_reports_clear(&reports);
return bfd;
}
@@ -345,6 +346,8 @@ int main(int argc, char** argv)
*/
#endif // __APPLE__
+ RNA_init();
+
init_nodesystem();
initglobals();