/** * $Id:$ * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * * The contents of this file may be used under the terms of either the GNU * General Public License Version 2 or later (the "GPL", see * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or * later (the "BL", see http://www.blender.org/BL/ ) which has to be * bought from the Blender Foundation to become active, in which case the * above mentioned GPL option does not apply. * * The Original Code is Copyright (C) 2002 by NaN Holding BV. * All rights reserved. * * The Original Code is: all of this file. * * Contributor(s): none yet. * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ /* file.h juli 94 */ /* * * * * Version: $Id: file.h,v 1.7 2000/08/25 15:27:33 nzc Exp $ */ #ifndef FILE_H #define FILE_H /* flags voor wegschrijven/lezen scene */ #include #include "blender.h" #include "storage.h" #ifndef WIN32 #ifdef __FreeBSD__ #include #include #include #else #if defined(linux) #include #else #ifndef __BeOS #include #endif #endif #endif #endif /* INTEGER CODES */ #define FORM MAKE_ID('F','O','R','M') #define DDG1 MAKE_ID('3','D','G','1') #define DDG2 MAKE_ID('3','D','G','2') #define DDG3 MAKE_ID('3','D','G','3') #define DDG4 MAKE_ID('3','D','G','4') #define GOUR MAKE_ID('G','O','U','R') #define BLEN MAKE_ID('B','L','E','N') #define DER_ MAKE_ID('D','E','R','_') #define V100 MAKE_ID('V','1','0','0') #define DATA MAKE_ID('D','A','T','A') #define GLOB MAKE_ID('G','L','O','B') #define IMAG MAKE_ID('I','M','A','G') #define DNA1 MAKE_ID('D','N','A','1') #define TEST MAKE_ID('T','E','S','T') #define REND MAKE_ID('R','E','N','D') #define USER MAKE_ID('U','S','E','R') #define ENDB MAKE_ID('E','N','D','B') # # struct SDNA { char *data; int datalen, nr_names; char **names; int nr_types, pointerlen; char **types; short *typelens; int nr_structs; short **structs; }; # # typedef struct BHead { int code, len; void *old; int SDNAnr, nr; } BHead; # # typedef struct BHead4 { int code, len; int old; int SDNAnr, nr; } BHead4; # # typedef struct BHead8 { int code, len; #ifdef WIN32 DWORDLONG old; #else long long old; #endif int SDNAnr, nr; } BHead8; /* structs alleen voor files: (moeten WEL in SDNA) */ // define voor fileflags #define FG_PACKED_FILE (1 << 0) typedef struct FileGlobal { void *curscreen; short displaymode, winpos; int fileflags; } FileGlobal; /* genfile.c */ extern void make_structDNA(FILE *); extern short *findstruct_name(struct SDNA *sdna, char *str); extern int findstruct_nr(struct SDNA *sdna, char *str); extern int struct_compare(char *stype, void *one, void *two); extern struct SDNA cur_sdna, old_sdna; extern struct chartrans *text_to_curve(Object *ob, int mode) ; extern void freestructDNA(struct SDNA *sdna); extern void freestructDNA_all(); extern void init_structDNA(struct SDNA *sdna); extern void reconstruct(int oldSDNAnr, int blocks, void **data); extern void switch_endian_struct(int oldSDNAnr, char *data); /* readfile.c */ extern BHead *find_bhead(void *old, char *filedata); extern void append_id_part(char *filedata, Main *main, ID *id); extern void append_named_part(SpaceFile *sfile, Main *main, char *name, int idcode); extern void do_versions(Main *main); extern void give_base_to_objects(Scene *sce, ListBase *lb); extern ID *is_yet_read(Main *main, BHead *bhead); extern void library_append(SpaceFile *sfile); /* append aan G */ extern void link_global(FileGlobal *fg); extern void link_list(ListBase *lb); /* alleen direkte data */ extern void link_recurs_seq(ListBase *lb); extern int read_libblock(Main *main, BHead *bhead, int flag); extern void *read_libstruct(BHead *bh); extern void read_struct(BHead *bh); extern void switch_endian_structs(BHead *bhead); extern void newstructname(BHead *bh); #include "readfile_ext.h" /* ******* writefile.c */ extern void add_cam_info(short mode); /* alleen current camera */ extern void add_network_info(short mode); /* alleen met CFRA */ extern int add_scal_info(Object *ob, short mode); /* return OK */ extern void delete_autosave(void); extern void do_history(char *name); extern void bgnwrite(int file); extern void endwrite(void); extern void flushwrite(void); extern void initrender_infofiles(void); extern void make_mdec_movies(void); extern void mdec_to_pupstring(char **str); extern void readBlog(void); extern void remove_mdec_chunks(int id); extern void test_Mdec_movie(char *name); extern void writeBlog(void); extern void write_file(char *dir); extern int write_homefile(void); extern void writedata(int filecode, int len, void *adr); /* geen struct */ extern void writestruct(int filecode, char *structname, int nr, void *adr); #endif /* FILE_H */