Atrinik Client  4.0
Functions | Variables
image.c File Reference
#include <global.h>
#include <toolkit/packet.h>
#include <toolkit/string.h>
#include <toolkit/path.h>

Go to the source code of this file.


static void bmap_free (bmap_t *bmap)
void image_init (void)
void image_deinit (void)
void image_bmaps_init (void)
void image_bmaps_deinit (void)
void finish_face_cmd (int facenum, uint32_t checksum, const char *face)
static void load_picture_from_pack (int num)
static bool load_gfx_user_face (uint16_t num)
void image_request_face (int pnum)
int image_get_id (const char *name)


static bmap_hash_timage_bmap_packs = NULL
static bmap_timage_bmaps = NULL
static size_t image_bmaps_size = 0

Detailed Description

Handles image related code.

Definition in file image.c.

Function Documentation

static void bmap_free ( bmap_t bmap)

Free data associated with a bmap_t structure.

Definition at line 52 of file image.c.

void finish_face_cmd ( int  facenum,
uint32_t  checksum,
const char *  face 

Finish face command.

pnumID of the face.
checksumFace checksum.
faceFace name.

Definition at line 228 of file image.c.

void image_bmaps_deinit ( void  )

Deinitialize the bmaps.

Definition at line 191 of file image.c.

void image_bmaps_init ( void  )

Read bmaps server file.

Definition at line 143 of file image.c.

int image_get_id ( const char *  name)

Find a face ID by name. Request the face by finding it, loading it or requesting it.

nameFace name to find.
Face ID if found, -1 otherwise.

Definition at line 448 of file image.c.

void image_init ( void  )

Read bmaps from image packs, calculate checksums, etc.

Definition at line 62 of file image.c.

void image_request_face ( int  pnum)

We got a face - test if we have it loaded. If not, ask the server to send us face command.

pnumFace ID.

Definition at line 402 of file image.c.

static bool load_gfx_user_face ( uint16_t  num)

Load face from user's graphics directory.

numID of the face to load.
True on success, false on failure.

Definition at line 346 of file image.c.

static void load_picture_from_pack ( int  num)

Load picture from the image pack file.

numID of the picture to load.

Definition at line 297 of file image.c.

Variable Documentation

bmap_hash_t* image_bmap_packs = NULL

Bitmaps loaded from image packs.

Definition at line 38 of file image.c.

bmap_t* image_bmaps = NULL

Bitmaps loaded from the server bmaps file.

Definition at line 42 of file image.c.

size_t image_bmaps_size = 0

Number of entries in image_bmaps.

Definition at line 46 of file image.c.