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>2009-08-18 19:27:48 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-18 19:27:48 +0400
commit368262461641f23239c1a7bd2e6fa9d5057902e7 (patch)
treed16e6982db7cf207d380d06f354791ca78e71257 /source/blender/blenloader/intern
parentede954b93821e3eda5e30ce362ce8472ee17368d (diff)
2.5: Game Engine
* Added Shading and Performance panels in the scene buttons, containing the options previously in the 2.4x game menu. * Added show framerate/debug/physics/warnings back in game menu. * Moved these settings from G.fileflags to scene GameData. * Enabled Display Lists by default. * Some other small game scene button tweaks.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c39
-rw-r--r--source/blender/blenloader/intern/readfile.h1
2 files changed, 40 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 61f6cb8b44c..779a898bd6a 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5345,6 +5345,9 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead)
bfd->curscene= fg->curscene;
MEM_freeN(fg);
+
+ fd->globalf= bfd->globalf;
+ fd->fileflags= bfd->fileflags;
return blo_nextbhead(fd, bhead);
}
@@ -9560,6 +9563,42 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+ if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 2)) {
+ Scene *sce;
+
+ for(sce = main->scene.first; sce; sce = sce->id.next) {
+ if(fd->fileflags & G_FILE_ENABLE_ALL_FRAMES)
+ sce->gm.flag |= GAME_ENABLE_ALL_FRAMES;
+ if(fd->fileflags & G_FILE_SHOW_DEBUG_PROPS)
+ sce->gm.flag |= GAME_SHOW_DEBUG_PROPS;
+ if(fd->fileflags & G_FILE_SHOW_FRAMERATE)
+ sce->gm.flag |= GAME_SHOW_FRAMERATE;
+ if(fd->fileflags & G_FILE_SHOW_PHYSICS)
+ sce->gm.flag |= GAME_SHOW_PHYSICS;
+ if(fd->fileflags & G_FILE_GLSL_NO_SHADOWS)
+ sce->gm.flag |= GAME_GLSL_NO_SHADOWS;
+ if(fd->fileflags & G_FILE_GLSL_NO_SHADERS)
+ sce->gm.flag |= GAME_GLSL_NO_SHADERS;
+ if(fd->fileflags & G_FILE_GLSL_NO_RAMPS)
+ sce->gm.flag |= GAME_GLSL_NO_RAMPS;
+ if(fd->fileflags & G_FILE_GLSL_NO_NODES)
+ sce->gm.flag |= GAME_GLSL_NO_NODES;
+ if(fd->fileflags & G_FILE_GLSL_NO_EXTRA_TEX)
+ sce->gm.flag |= GAME_GLSL_NO_EXTRA_TEX;
+ if(fd->fileflags & G_FILE_IGNORE_DEPRECATION_WARNINGS)
+ sce->gm.flag |= GAME_IGNORE_DEPRECATION_WARNINGS;
+
+ if(fd->fileflags & G_FILE_GAME_MAT_GLSL)
+ sce->gm.matmode= GAME_MAT_GLSL;
+ else if(fd->fileflags & G_FILE_GAME_MAT)
+ sce->gm.matmode= GAME_MAT_MULTITEX;
+ else
+ sce->gm.matmode= GAME_MAT_TEXFACE;
+
+ sce->gm.flag |= GAME_DISPLAY_LISTS;
+ }
+ }
+
/* put 2.50 compatibility code here until next subversion bump */
{
}
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index f0e00b75b67..e39fefa8205 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -69,6 +69,7 @@ typedef struct FileData {
int fileversion;
int id_name_offs; /* used to retrieve ID names from (bhead+1) */
+ int globalf, fileflags; /* for do_versions patching */
struct OldNewMap *datamap;
struct OldNewMap *globmap;