![]() |
Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
|
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include "../stb/stb_image.h"
#include "../stb/stb_image_write.h"
#include "exoquant/exoquant.h"
#include "n64graphics_ci.h"
#include "utils.h"
#include <string.h>
Data Structures | |
struct | graphics_config |
struct | format_entry |
Macros | |
#define | STBI_NO_LINEAR |
#define | STBI_NO_HDR |
#define | STBI_NO_TGA |
#define | STB_IMAGE_IMPLEMENTATION |
#define | STB_IMAGE_WRITE_IMPLEMENTATION |
#define | SCALE_5_8(VAL_) (((VAL_) * 0xFF) / 0x1F) |
#define | SCALE_8_5(VAL_) ((((VAL_) + 4) * 0x1F) / 0xFF) |
#define | SCALE_4_8(VAL_) ((VAL_) * 0x11) |
#define | SCALE_8_4(VAL_) ((VAL_) / 0x11) |
#define | SCALE_3_8(VAL_) ((VAL_) * 0x24) |
#define | SCALE_8_3(VAL_) ((VAL_) / 0x24) |
#define | N64GRAPHICS_VERSION "0.4 - CI Only Branch" |
Enumerations | |
enum | img_format { IMG_FORMAT_RGBA, IMG_FORMAT_IA, IMG_FORMAT_I, IMG_FORMAT_CI, IMG_FORMAT_CI } |
enum | tool_mode { MODE_EXPORT, MODE_IMPORT } |
Functions | |
rgba * | raw2rgba (const uint8_t *raw, int width, int height, int depth) |
rgba * | rawci2rgba (const uint8_t *rawci, const uint8_t *palette, int width, int height, int depth) |
int | rgba2rawci (uint8_t *raw, uint8_t *out_palette, int *pal_len, const rgba *img, int width, int height, int depth) |
rgba * | png2rgba (const char *png_filename, int *width, int *height) |
int | rgba2png (const char *png_filename, const rgba *img, int width, int height) |
const char * | n64graphics_get_read_version (void) |
const char * | n64graphics_get_write_version (void) |
static const char * | format2str (img_format format, int depth) |
static int | parse_format (graphics_config *config, const char *str) |
static void | print_usage (void) |
static void | print_version (void) |
static int | parse_arguments (int argc, char *argv[], graphics_config *config) |
char * | getPaletteFilename (char *ci_filename) |
int | main (int argc, char *argv[]) |
Variables | |
static const graphics_config | default_config |
static const format_entry | format_table [] |
#define N64GRAPHICS_VERSION "0.4 - CI Only Branch" |
#define SCALE_3_8 | ( | VAL_ | ) | ((VAL_) * 0x24) |
#define SCALE_4_8 | ( | VAL_ | ) | ((VAL_) * 0x11) |
#define SCALE_5_8 | ( | VAL_ | ) | (((VAL_) * 0xFF) / 0x1F) |
#define SCALE_8_3 | ( | VAL_ | ) | ((VAL_) / 0x24) |
#define SCALE_8_4 | ( | VAL_ | ) | ((VAL_) / 0x11) |
#define SCALE_8_5 | ( | VAL_ | ) | ((((VAL_) + 4) * 0x1F) / 0xFF) |
#define STB_IMAGE_IMPLEMENTATION |
#define STB_IMAGE_WRITE_IMPLEMENTATION |
#define STBI_NO_HDR |
#define STBI_NO_LINEAR |
#define STBI_NO_TGA |
enum img_format |
enum tool_mode |
|
static |
|
static |
|
static |
rgba* rawci2rgba | ( | const uint8_t * | rawci, |
const uint8_t * | palette, | ||
int | width, | ||
int | height, | ||
int | depth | ||
) |
int rgba2rawci | ( | uint8_t * | raw, |
uint8_t * | out_palette, | ||
int * | pal_len, | ||
const rgba * | img, | ||
int | width, | ||
int | height, | ||
int | depth | ||
) |
|
static |
|
static |