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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user