From aa9f2a57339a0382404474a2985a69120c96f80d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 21 Jul 2003 19:41:07 +0000 Subject: - saves the 'draw faces' flag in a file, in fact the entire G.f flag. WARN: this recompiles other stuff too, outside of the loader. be sure to 'make' in source/blender/ or a higher dir. --- source/blender/blenloader/BLO_readfile.h | 1 + source/blender/blenloader/intern/readfile.c | 3 ++- source/blender/blenloader/intern/writefile.c | 1 + source/blender/makesdna/DNA_fileglobal_types.h | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index c664f7f5354..48f9886c61c 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -82,6 +82,7 @@ typedef struct BlendFileData { int winpos; int fileflags; int displaymode; + int globalf; struct bScreen* curscreen; struct Scene* curscene; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ec051b0ec22..26a6a05374f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2791,10 +2791,11 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID static void link_global(FileData *fd, BlendFileData *bfd, FileGlobal *fg) { + // this is nonsense... will get rid of it once (ton) bfd->winpos= fg->winpos; bfd->fileflags= fg->fileflags; bfd->displaymode= fg->displaymode; - + bfd->globalf= fg->globalf; bfd->curscreen= newlibadr(fd, 0, fg->curscreen); } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 9845899c7d9..bdbef708b90 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1499,6 +1499,7 @@ static void write_global(WriteData *wd) fg.displaymode= R.displaymode; fg.winpos= R.winpos; fg.fileflags= G.fileflags; + fg.globalf= G.f; writestruct(wd, GLOB, "FileGlobal", 1, &fg); } diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index 1d1d5b2b7f7..40bf5e2a68f 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -42,6 +42,8 @@ typedef struct FileGlobal { void *curscreen; short displaymode, winpos; int fileflags; + int globalf; + int pad; } FileGlobal; #endif -- cgit v1.2.3