FreeBASIC  0.91.0
gfx_bload.c File Reference
#include "fb_gfx.h"
Include dependency graph for gfx_bload.c:

Go to the source code of this file.

Macros

#define BI_RGB   0
 
#define BI_RLE8   1
 
#define BI_RLE4   2
 
#define BI_BITFIELDS   3
 
#define CONVERT_DEPTH(c, from, to)
 

Typedefs

typedef void(* FBGFX_BLOAD_IMAGE_CONVERT )(const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 

Functions

static int fread_16_le (uint16_t *buf, FILE *f)
 
static int fread_32_le (uint32_t *buf, FILE *f)
 
static void convert_8to8 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_8to16 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_8to32 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_bf_16to16 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_bf_16to32 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_bf_24to16 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_bf_24to32 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_bf_32to16 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static void convert_bf_32to32 (const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)
 
static int load_bmp (FB_GFXCTX *ctx, FILE *f, void *dest, void *pal, int usenewheader)
 
static int gfx_bload (FBSTRING *filename, void *dest, void *pal, int usenewheader)
 
FBCALL int fb_GfxBload (FBSTRING *filename, void *dest, void *pal)
 
FBCALL int fb_GfxBloadQB (FBSTRING *filename, void *dest, void *pal)
 

Macro Definition Documentation

#define BI_BITFIELDS   3

Definition at line 12 of file gfx_bload.c.

#define BI_RGB   0

Definition at line 9 of file gfx_bload.c.

#define BI_RLE4   2

Definition at line 11 of file gfx_bload.c.

#define BI_RLE8   1

Definition at line 10 of file gfx_bload.c.

#define CONVERT_DEPTH (   c,
  from,
  to 
)
Value:
((from) <= (to) ? \
((c) << (to - from)) | (c >> (from - (to - from))) \
: (c) >> (from - to))

Definition at line 48 of file gfx_bload.c.

Typedef Documentation

typedef void(* FBGFX_BLOAD_IMAGE_CONVERT)(const unsigned char *src, unsigned char *dest, int w, const uint32_t *masks, const int *shifts, const int *bits)

Definition at line 31 of file gfx_bload.c.

Function Documentation

static void convert_8to16 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 38 of file gfx_bload.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void convert_8to32 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 43 of file gfx_bload.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void convert_8to8 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 33 of file gfx_bload.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void convert_bf_16to16 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 53 of file gfx_bload.c.

Here is the caller graph for this function:

static void convert_bf_16to32 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 71 of file gfx_bload.c.

Here is the caller graph for this function:

static void convert_bf_24to16 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 89 of file gfx_bload.c.

Here is the caller graph for this function:

static void convert_bf_24to32 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 108 of file gfx_bload.c.

Here is the caller graph for this function:

static void convert_bf_32to16 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 127 of file gfx_bload.c.

Here is the caller graph for this function:

static void convert_bf_32to32 ( const unsigned char *  src,
unsigned char *  dest,
int  w,
const uint32_t *  masks,
const int *  shifts,
const int *  bits 
)
static

Definition at line 144 of file gfx_bload.c.

Here is the caller graph for this function:

FBCALL int fb_GfxBload ( FBSTRING filename,
void *  dest,
void *  pal 
)

Definition at line 533 of file gfx_bload.c.

Here is the call graph for this function:

FBCALL int fb_GfxBloadQB ( FBSTRING filename,
void *  dest,
void *  pal 
)

Definition at line 538 of file gfx_bload.c.

Here is the call graph for this function:

static int fread_16_le ( uint16_t *  buf,
FILE *  f 
)
inlinestatic

Definition at line 15 of file gfx_bload.c.

Here is the caller graph for this function:

static int fread_32_le ( uint32_t *  buf,
FILE *  f 
)
inlinestatic

Definition at line 23 of file gfx_bload.c.

Here is the caller graph for this function:

static int gfx_bload ( FBSTRING filename,
void *  dest,
void *  pal,
int  usenewheader 
)
static

Definition at line 447 of file gfx_bload.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int load_bmp ( FB_GFXCTX ctx,
FILE *  f,
void *  dest,
void *  pal,
int  usenewheader 
)
static

Definition at line 163 of file gfx_bload.c.

Here is the call graph for this function:

Here is the caller graph for this function: