gbagfx: Various fixes and improvements

Fix num_colors exceeding amount of colors in palette leading to use of uninitialized colors
Handle png -> pal conversion (aka extracting JASC palettes from png)
Allow JASC pal files to be used as -palette argument when converting from GBA to PNG
Allow using only file extension as output to reuse entire path from input before extension
This commit is contained in:
Sierraffinity committed 2020-04-22 15:06:34 -07:00
1 parent 543434ea2d
commit 8c1d0d77a5
3 files changed
+69 -11

No files matched your search

+7
View File
@@ -47,6 +47,13 @@ char *GetFileExtension(char *path)
while (extension > path && *extension != '.')
extension--;
return extension;
}
char *GetFileExtensionAfterDot(char *path)
{
char *extension = GetFileExtension(path);
if (extension == path)
return NULL;