Fix BGE building.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 16 Mar 2017 09:30:02 +0000 (10:30 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 16 Mar 2017 09:30:02 +0000 (10:30 +0100)
When you use typedef'ed enum, you need to define all supported values
explicitely in enum, else compiler goes grumpy...

source/blender/blenkernel/intern/blender_undo.c
source/blender/blenkernel/intern/blendfile.c
source/blender/blenloader/BLO_readfile.h
source/blender/editors/render/render_preview.c
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 396c06f96d13cbfc81b00f9f0cacd9d61968bfd9..e3a5edb2049d0219eb627c09152f78cc43129fd9 100644 (file)
@@ -389,7 +389,7 @@ bool BKE_undo_save_file(const char *filename)
 Main *BKE_undo_get_main(Scene **r_scene)
 {
        Main *mainp = NULL;
-       BlendFileData *bfd = BLO_read_from_memfile(G.main, G.main->name, &curundo->memfile, NULL, 0);
+       BlendFileData *bfd = BLO_read_from_memfile(G.main, G.main->name, &curundo->memfile, NULL, BLO_READ_SKIP_NONE);
 
        if (bfd) {
                mainp = bfd->main;
index 146c67576ef25c458ad7efd72cbf3b57d008442d..354f392528f813b5258032b11833b161786fc2ba 100644 (file)
@@ -430,7 +430,7 @@ int BKE_blendfile_read_userdef(const char *filepath, ReportList *reports)
        BlendFileData *bfd;
        int retval = BKE_BLENDFILE_READ_FAIL;
 
-       bfd = BLO_read_from_file(filepath, reports, 0);
+       bfd = BLO_read_from_file(filepath, reports, BLO_READ_SKIP_NONE);
        if (bfd) {
                if (bfd->user) {
                        retval = BKE_BLENDFILE_READ_OK_USERPREFS;
index e07d567ce61a919b470a3b5c8d91dc5756954175..52b8d15b987b2b465bd9e27d4549606938aba326 100644 (file)
@@ -74,6 +74,7 @@ typedef struct BlendFileData {
 
 /* skip reading some data-block types (may want to skip screen data too). */
 typedef enum eBLOReadSkip {
+       BLO_READ_SKIP_NONE    = 0,
        BLO_READ_SKIP_USERDEF = (1 << 0),
 } eBLOReadSkip;
 
index b715d636e62569f02c9f7142faf352c03b85dd3b..fa18b82507e9aa6e239ab064f07f5d8890bec123 100644 (file)
@@ -196,7 +196,7 @@ static Main *load_main_from_memory(const void *blend, int blend_size)
        BlendFileData *bfd;
 
        G.fileflags |= G_FILE_NO_UI;
-       bfd = BLO_read_from_memory(blend, blend_size, NULL, 0);
+       bfd = BLO_read_from_memory(blend, blend_size, NULL, BLO_READ_SKIP_NONE);
        if (bfd) {
                bmain = bfd->main;
 
index dd93a6ff4240733fe64a53e84f7ac656225a2701..0c206dfce3ddde58b94b4cf885c34685bcab13a2 100644 (file)
@@ -355,7 +355,7 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
                        BLI_strncpy(bfd->main->name, progname, sizeof(bfd->main->name));
                }
        } else {
-               bfd= BLO_read_from_file(progname, &reports);
+               bfd= BLO_read_from_file(progname, &reports, BLO_READ_SKIP_NONE);
        }
        
        if (!bfd && filename) {