![]() |
Blamite Game Engine - blam!
00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
|
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | GifPalette |
struct | GifBitStatus |
struct | GifLzwNode |
struct | GifWriter |
Macros | |
#define | GIF_TEMP_MALLOC malloc |
#define | GIF_TEMP_FREE free |
#define | GIF_MALLOC malloc |
#define | GIF_FREE free |
Functions | |
int | GifIMax (int l, int r) |
int | GifIMin (int l, int r) |
int | GifIAbs (int i) |
void | GifGetClosestPaletteColor (GifPalette *pPal, int r, int g, int b, int *bestInd, int *bestDiff, int treeRoot) |
void | GifSwapPixels (uint8_t *image, int pixA, int pixB) |
int | GifPartition (uint8_t *image, const int left, const int right, const int elt, int pivotValue) |
void | GifPartitionByMedian (uint8_t *image, int left, int right, int com, int neededCenter) |
int | GifPartitionByMean (uint8_t *image, int left, int right, int com, int neededMean) |
void | GifSplitPalette (uint8_t *image, int numPixels, int treeNode, int treeLevel, bool buildForDither, GifPalette *pal) |
int | GifPickChangedPixels (const uint8_t *lastFrame, uint8_t *frame, int numPixels) |
void | GifMakePalette (const uint8_t *lastFrame, const uint8_t *nextFrame, uint32_t width, uint32_t height, int bitDepth, bool buildForDither, GifPalette *pPal) |
void | GifDitherImage (const uint8_t *lastFrame, const uint8_t *nextFrame, uint8_t *outFrame, uint32_t width, uint32_t height, GifPalette *pPal) |
void | GifThresholdImage (const uint8_t *lastFrame, const uint8_t *nextFrame, uint8_t *outFrame, uint32_t width, uint32_t height, GifPalette *pPal) |
void | GifWriteBit (GifBitStatus *stat, uint32_t bit) |
void | GifWriteChunk (FILE *f, GifBitStatus *stat) |
void | GifWriteCode (FILE *f, GifBitStatus *stat, uint32_t code, uint32_t length) |
void | GifWritePalette (const GifPalette *pPal, FILE *f) |
void | GifWriteLzwImage (FILE *f, uint8_t *image, uint32_t left, uint32_t top, uint32_t width, uint32_t height, uint32_t delay, GifPalette *pPal) |
bool | GifBegin (GifWriter *writer, const char *filename, uint32_t width, uint32_t height, uint32_t delay, int32_t bitDepth=8, bool dither=false) |
bool | GifWriteFrame (GifWriter *writer, const uint8_t *image, uint32_t width, uint32_t height, uint32_t delay, int bitDepth=8, bool dither=false) |
bool | GifEnd (GifWriter *writer) |
Variables | |
const int | kGifTransIndex = 0 |
#define GIF_FREE free |
#define GIF_MALLOC malloc |
#define GIF_TEMP_FREE free |
#define GIF_TEMP_MALLOC malloc |
bool GifBegin | ( | GifWriter * | writer, |
const char * | filename, | ||
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | delay, | ||
int32_t | bitDepth = 8 , |
||
bool | dither = false |
||
) |
void GifDitherImage | ( | const uint8_t * | lastFrame, |
const uint8_t * | nextFrame, | ||
uint8_t * | outFrame, | ||
uint32_t | width, | ||
uint32_t | height, | ||
GifPalette * | pPal | ||
) |
bool GifEnd | ( | GifWriter * | writer | ) |
void GifGetClosestPaletteColor | ( | GifPalette * | pPal, |
int | r, | ||
int | g, | ||
int | b, | ||
int * | bestInd, | ||
int * | bestDiff, | ||
int | treeRoot | ||
) |
int GifIAbs | ( | int | i | ) |
int GifIMax | ( | int | l, |
int | r | ||
) |
int GifIMin | ( | int | l, |
int | r | ||
) |
void GifMakePalette | ( | const uint8_t * | lastFrame, |
const uint8_t * | nextFrame, | ||
uint32_t | width, | ||
uint32_t | height, | ||
int | bitDepth, | ||
bool | buildForDither, | ||
GifPalette * | pPal | ||
) |
int GifPartition | ( | uint8_t * | image, |
const int | left, | ||
const int | right, | ||
const int | elt, | ||
int | pivotValue | ||
) |
int GifPartitionByMean | ( | uint8_t * | image, |
int | left, | ||
int | right, | ||
int | com, | ||
int | neededMean | ||
) |
void GifPartitionByMedian | ( | uint8_t * | image, |
int | left, | ||
int | right, | ||
int | com, | ||
int | neededCenter | ||
) |
void GifSplitPalette | ( | uint8_t * | image, |
int | numPixels, | ||
int | treeNode, | ||
int | treeLevel, | ||
bool | buildForDither, | ||
GifPalette * | pal | ||
) |
void GifSwapPixels | ( | uint8_t * | image, |
int | pixA, | ||
int | pixB | ||
) |
void GifThresholdImage | ( | const uint8_t * | lastFrame, |
const uint8_t * | nextFrame, | ||
uint8_t * | outFrame, | ||
uint32_t | width, | ||
uint32_t | height, | ||
GifPalette * | pPal | ||
) |
void GifWriteBit | ( | GifBitStatus * | stat, |
uint32_t | bit | ||
) |
void GifWriteChunk | ( | FILE * | f, |
GifBitStatus * | stat | ||
) |
void GifWriteCode | ( | FILE * | f, |
GifBitStatus * | stat, | ||
uint32_t | code, | ||
uint32_t | length | ||
) |
bool GifWriteFrame | ( | GifWriter * | writer, |
const uint8_t * | image, | ||
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | delay, | ||
int | bitDepth = 8 , |
||
bool | dither = false |
||
) |
void GifWriteLzwImage | ( | FILE * | f, |
uint8_t * | image, | ||
uint32_t | left, | ||
uint32_t | top, | ||
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | delay, | ||
GifPalette * | pPal | ||
) |
void GifWritePalette | ( | const GifPalette * | pPal, |
FILE * | f | ||
) |
const int kGifTransIndex = 0 |