Sort Pokemon and trainer sprite palettes, with Makefile-specified exceptions (#1137)

This avoids the need to define their order via indexed PNG palettes

It also avoids the need to use gb-asm-tools' palfix.py on custom sprites

Fixes #1136
This commit is contained in:
Sylvie
2024-10-16 10:48:00 -04:00
committed by GitHub
parent 75f214e594
commit 5a53e297cf
9 changed files with 437 additions and 2696 deletions

View File

@@ -417,7 +417,7 @@ struct Buffer *process_template(const char *template_filename, const char *patch
int compare_patch(const void *patch1, const void *patch2) {
unsigned int offset1 = ((const struct Patch *)patch1)->offset;
unsigned int offset2 = ((const struct Patch *)patch2)->offset;
return offset1 > offset2 ? 1 : offset1 < offset2 ? -1 : 0;
return (offset1 > offset2) - (offset1 < offset2);
}
bool verify_completeness(FILE *restrict orig_rom, FILE *restrict new_rom, struct Buffer *patches) {