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 using only file extension as output to reuse entire path from input before extension
This commit is contained in:
Sierraffinity
2020-04-22 14:39:20 -07:00
parent 922a8de78d
commit 21e9ed6615
3 changed files with 69 additions and 11 deletions
+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;