Blender V2.61 - r43446
Functions

packedFile.c File Reference

#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_image_types.h"
#include "DNA_sound_types.h"
#include "DNA_vfont_types.h"
#include "DNA_packedFile_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_utildefines.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_sound.h"
#include "BKE_image.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"

Go to the source code of this file.

Functions

int seekPackedFile (PackedFile *pf, int offset, int whence)
void rewindPackedFile (PackedFile *pf)
int readPackedFile (PackedFile *pf, void *data, int size)
int countPackedFiles (Main *bmain)
void freePackedFile (PackedFile *pf)
PackedFilenewPackedFileMemory (void *mem, int memlen)
PackedFilenewPackedFile (ReportList *reports, const char *filename, const char *basepath)
void packAll (Main *bmain, ReportList *reports)
int writePackedFile (ReportList *reports, const char *filename, PackedFile *pf, int guimode)
int checkPackedFile (const char *filename, PackedFile *pf)
char * unpackFile (ReportList *reports, const char *abs_name, const char *local_name, PackedFile *pf, int how)
int unpackVFont (ReportList *reports, VFont *vfont, int how)
int unpackSound (Main *bmain, ReportList *reports, bSound *sound, int how)
int unpackImage (ReportList *reports, Image *ima, int how)
void unpackAll (Main *bmain, ReportList *reports, int how)

Detailed Description

Definition in file packedFile.c.


Function Documentation

int checkPackedFile ( const char *  filename,
PackedFile pf 
)
int countPackedFiles ( Main bmain)
void freePackedFile ( PackedFile pf)
PackedFile* newPackedFile ( ReportList reports,
const char *  filename,
const char *  basepath 
) [read]
PackedFile* newPackedFileMemory ( void *  mem,
int  memlen 
) [read]

Definition at line 158 of file packedFile.c.

References PackedFile::data, MEM_callocN(), pf, and PackedFile::size.

Referenced by get_builtin_packedfile(), and newPackedFile().

void packAll ( Main bmain,
ReportList reports 
)
int readPackedFile ( PackedFile pf,
void *  data,
int  size 
)

Definition at line 104 of file packedFile.c.

References PackedFile::data, NULL, PackedFile::seek, size(), and PackedFile::size.

void rewindPackedFile ( PackedFile pf)

Definition at line 99 of file packedFile.c.

References seekPackedFile().

int seekPackedFile ( PackedFile pf,
int  offset,
int  whence 
)

Definition at line 69 of file packedFile.c.

References PackedFile::seek, rna_dump::seek(), and PackedFile::size.

Referenced by rewindPackedFile().

void unpackAll ( Main bmain,
ReportList reports,
int  how 
)
char* unpackFile ( ReportList reports,
const char *  abs_name,
const char *  local_name,
PackedFile pf,
int  how 
)
int unpackImage ( ReportList reports,
Image ima,
int  how 
)
int unpackSound ( Main bmain,
ReportList reports,
bSound sound,
int  how 
)
int unpackVFont ( ReportList reports,
VFont vfont,
int  how 
)
int writePackedFile ( ReportList reports,
const char *  filename,
PackedFile pf,
int  guimode 
)