Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Data Structures | |
struct | pixel_t |
Macros | |
#define | STB_IMAGE_IMPLEMENTATION |
#define | STB_IMAGE_WRITE_IMPLEMENTATION |
#define | CLAMP(x, l, u) |
Functions | |
void | shuffleArray (uint32_t *ar, uint32_t len) |
Randomizes the order of the given array of ints. | |
int | isNeighborNotDrawn (pixel_t **img, int x, int y, int w, int h) |
void | spreadError (pixel_t **img, int x, int y, int w, int h, int teR, int teG, int teB, float diagScalar) |
bool | process_image (processorInput_t *arg) |
Variables | |
const assetProcessor_t | imageProcessor = {.name = "wsg", .type = FUNCTION, .function = process_image, .inFmt = FMT_FILE_BIN, .outFmt = FMT_FILE_BIN} |
The image processor converts PNG images to 8-bit images using the 216-color web-safe palette plus one bit of transparency. Colors outside the palette will be replaced with their closest value within the palette. | |
struct pixel_t |
#define STB_IMAGE_IMPLEMENTATION |
#define STB_IMAGE_WRITE_IMPLEMENTATION |
#define CLAMP | ( | x, | |
l, | |||
u ) |
void shuffleArray | ( | uint32_t * | ar, |
uint32_t | len ) |
Randomizes the order of the given array of ints.
ar | The array to randomize |
len | The number of items in the array |
int isNeighborNotDrawn | ( | pixel_t ** | img, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h ) |
void spreadError | ( | pixel_t ** | img, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
int | teR, | ||
int | teG, | ||
int | teB, | ||
float | diagScalar ) |
bool process_image | ( | processorInput_t * | arg | ) |
const assetProcessor_t imageProcessor = {.name = "wsg", .type = FUNCTION, .function = process_image, .inFmt = FMT_FILE_BIN, .outFmt = FMT_FILE_BIN} |
The image processor converts PNG images to 8-bit images using the 216-color web-safe palette plus one bit of transparency. Colors outside the palette will be replaced with their closest value within the palette.