update submodules, fix/ignore tool compile errors

This commit is contained in:
someone2639 2024-05-19 15:18:57 -04:00
parent 6f93a6abe0
commit 666180839e
6 changed files with 16 additions and 12 deletions

2
f3dex2

@ -1 +1 @@
Subproject commit 3c8876815cfd57f5a7ae3077438452ea972ec31f
Subproject commit 7e3f9a3615185bc86c2d42ec4c59c5b2f6d8dd3b

View File

@ -1,5 +1,6 @@
CC := gcc
CFLAGS := -O2 -I . -Wall -Wextra -Wno-unused-parameter -pedantic
IGNORED := -Wno-implicit-function-declaration
CFLAGS := -O2 -I . $(IGNORED) -Wall -Wextra -Wno-unused-parameter -pedantic
PROGRAMS := iplfontutil n64graphics n64crc patch_libultra_math gfxdis_f3dex2 rgb2c
iplfontutil_SOURCES := iplfontutil.c

@ -1 +1 @@
Subproject commit be09df5eb4e751b816bade326f9b626d2822c0b9
Subproject commit 345ec4fdd98fdbc77b25489fb69264e08026ac9a

View File

@ -289,14 +289,15 @@ uint8_t *ci2raw(const uint8_t *rawci, const uint8_t *palette, int width, int hei
return raw;
}
typedef int (*fptr)(uint8_t *raw, const ia *img, int width, int height, int depth);
typedef int (*fptr)(uint8_t *raw, void *img, int width, int height, int depth);
//---------------------------------------------------------
// internal RGBA/IA -> N64 RGBA/IA/I/CI
// returns length written to 'raw' used or -1 on error
//---------------------------------------------------------
int rgba2raw(uint8_t *raw, const rgba *img, int width, int height, int depth)
int rgba2raw(uint8_t *raw, void *imgp, int width, int height, int depth)
{
rgba *img = (rgba *)imgp;
int size = width * height * depth / 8;
INFO("Converting RGBA%d %dx%d to raw\n", depth, width, height);
@ -325,8 +326,9 @@ int rgba2raw(uint8_t *raw, const rgba *img, int width, int height, int depth)
return size;
}
int ia2raw(uint8_t *raw, const ia *img, int width, int height, int depth)
int ia2raw(uint8_t *raw, void *imgp, int width, int height, int depth)
{
ia *img = (ia *)imgp;
int size = width * height * depth / 8;
INFO("Converting IA%d %dx%d to raw\n", depth, width, height);
@ -377,8 +379,9 @@ int ia2raw(uint8_t *raw, const ia *img, int width, int height, int depth)
return size;
}
int i2raw(uint8_t *raw, const ia *img, int width, int height, int depth)
int i2raw(uint8_t *raw, void *imgp, int width, int height, int depth)
{
ia *img = (ia *)imgp;
int size = width * height * depth / 8;
INFO("Converting I%d %dx%d to raw\n", depth, width, height);
@ -412,7 +415,7 @@ void ciFun(void) {
}
int img2bg(fptr fn, uint8_t *raw, const ia *img, int width, int height, int depth) {
int img2bg(fptr fn, uint8_t *raw, void *img, int width, int height, int depth) {
struct BGImageHeader *hd = (struct BGImageHeader *)raw;
if (fn == ia2raw) {
hd->fmt = 0x03; // G_IM_FMT_IA

View File

@ -57,13 +57,13 @@ ia *raw2i(const uint8_t *raw, int width, int height, int depth);
//---------------------------------------------------------
// intermediate RGBA -> N64 raw RGBA16/RGBA32
int rgba2raw(uint8_t *raw, const rgba *img, int width, int height, int depth);
int rgba2raw(uint8_t *raw, void *imgp, int width, int height, int depth);
// intermediate IA -> N64 raw IA1/IA4/IA8/IA16
int ia2raw(uint8_t *raw, const ia *img, int width, int height, int depth);
int ia2raw(uint8_t *raw, void *imgp, int width, int height, int depth);
// intermediate IA -> N64 raw I4/I8
int i2raw(uint8_t *raw, const ia *img, int width, int height, int depth);
int i2raw(uint8_t *raw, void *imgp, int width, int height, int depth);
//---------------------------------------------------------

View File

@ -75,7 +75,7 @@ const uint8_t imgFormatPNGDepths[] = {
void ci_raw2png(char *outpath, uint8_t *buf, int width, int height, unsigned fmt, uint8_t *pal) {
LodePNGState state;
char *final_pal;
char *png;
unsigned char *png;
uint8_t *rgba32 = NULL;