mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-09 00:00:44 +00:00
Add n64texconv
and bin2c
tools to convert extracted .png and .bin to C arrays during build (#2477)
* n64texconv and bin2c * mv tools/n64texconv tools/assets/ * fix * more light fixes * Silence -Wshadow for libimagequant * Add reference counting gc for palette objects in python bindings * Fix missing alignment in n64texconv_*_to_c functions Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Check palette size in n64texconv_image_from_png * accept memoryview as well as bytes for binary data * minimal doc on n64texconv_quantize_shared * fix a buffer size passed to libimagequant * assert pal count <= 256 on png write * Disable palette size check for input pngs, ZAPD fails the check * No OpenMP for clang * When reading an indexed png into a CI format, requantize if there are too many colors for the target texel size --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
ec30dcbe4e
commit
3d61fb85ef
41 changed files with 15634 additions and 9 deletions
14
tools/assets/n64texconv/lib/libimagequant/nearest.h
Normal file
14
tools/assets/n64texconv/lib/libimagequant/nearest.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// nearest.h
|
||||
// pngquant
|
||||
//
|
||||
|
||||
#ifndef NEAREST_H
|
||||
#define NEAREST_H
|
||||
|
||||
struct nearest_map;
|
||||
LIQ_PRIVATE struct nearest_map *nearest_init(const colormap *palette);
|
||||
LIQ_PRIVATE unsigned int nearest_search(const struct nearest_map *map, const f_pixel *px, const int palette_index_guess, float *diff);
|
||||
LIQ_PRIVATE void nearest_free(struct nearest_map *map);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue