Remove old C signatures in Imaging.h

This commit is contained in:
Ted John 2018-05-07 18:39:38 +01:00
parent 00278c6ca6
commit 4fa45abec9
5 changed files with 7 additions and 27 deletions

View File

@ -233,7 +233,7 @@ static bool sprite_file_export(sint32 spriteIndex, const char *outPath)
gfx_bmp_sprite_to_buffer((uint8*)spriteFilePalette, spriteHeader->offset, pixels, spriteHeader, &dpi, spriteHeader->height, spriteHeader->width, IMAGE_TYPE_DEFAULT);
}
if (image_io_png_write(&dpi, (rct_palette*)spriteFilePalette, outPath)) {
if (Imaging::PngWrite(&dpi, (rct_palette*)spriteFilePalette, outPath)) {
return true;
} else {
fprintf(stderr, "Error writing PNG");
@ -303,7 +303,7 @@ static bool sprite_file_import(const char *path, sint16 x_offset, sint16 y_offse
uint8 *pixels;
uint32 width, height;
sint32 bitDepth;
if (!image_io_png_read(&pixels, &width, &height, !keep_palette, path, &bitDepth))
if (!Imaging::PngRead(&pixels, &width, &height, !keep_palette, path, &bitDepth))
{
fprintf(stderr, "Error reading PNG\n");
return false;

View File

@ -300,19 +300,3 @@ namespace Imaging
log_error(b);
}
}
bool image_io_png_read(uint8 * * pixels, uint32 * width, uint32 * height, bool expand, const utf8 * path, sint32 * bitDepth)
{
return Imaging::PngRead(pixels, width, height, expand, path, bitDepth);
}
bool image_io_png_write(const rct_drawpixelinfo * dpi, const rct_palette * palette, const utf8 * path)
{
return Imaging::PngWrite(dpi, palette, path);
}
bool image_io_png_write_32bpp(sint32 width, sint32 height, const void * pixels, const utf8 * path)
{
return Imaging::PngWrite32bpp(width, height, pixels, path);
}

View File

@ -27,7 +27,3 @@ namespace Imaging
bool PngWrite(const rct_drawpixelinfo * dpi, const rct_palette * palette, const utf8 * path);
bool PngWrite32bpp(sint32 width, sint32 height, const void * pixels, const utf8 * path);
}
bool image_io_png_read(uint8 * * pixels, uint32 * width, uint32 * height, bool expand, const utf8 * path, sint32 * bitDepth);
bool image_io_png_write(const rct_drawpixelinfo * dpi, const rct_palette * palette, const utf8 * path);
bool image_io_png_write_32bpp(sint32 width, sint32 height, const void * pixels, const utf8 * path);

View File

@ -153,7 +153,7 @@ sint32 screenshot_dump_png(rct_drawpixelinfo *dpi)
rct_palette renderedPalette;
screenshot_get_rendered_palette(&renderedPalette);
if (image_io_png_write(dpi, &renderedPalette, path)) {
if (Imaging::PngWrite(dpi, &renderedPalette, path)) {
return index;
} else {
return -1;
@ -169,7 +169,7 @@ sint32 screenshot_dump_png_32bpp(sint32 width, sint32 height, const void *pixels
return -1;
}
if (image_io_png_write_32bpp(width, height, pixels, path)) {
if (Imaging::PngWrite32bpp(width, height, pixels, path)) {
return index;
} else {
return -1;
@ -259,7 +259,7 @@ void screenshot_giant()
rct_palette renderedPalette;
screenshot_get_rendered_palette(&renderedPalette);
image_io_png_write(&dpi, &renderedPalette, path);
Imaging::PngWrite(&dpi, &renderedPalette, path);
free(dpi.bits);
@ -576,7 +576,7 @@ sint32 cmdline_for_screenshot(const char * * argv, sint32 argc, ScreenshotOption
rct_palette renderedPalette;
screenshot_get_rendered_palette(&renderedPalette);
image_io_png_write(&dpi, &renderedPalette, outputPath);
Imaging::PngWrite(&dpi, &renderedPalette, outputPath);
free(dpi.bits);
drawing_engine_dispose();

View File

@ -656,7 +656,7 @@ bool mapgen_load_heightmap(const utf8 * path)
if (String::Equals(extension, ".png", false))
{
sint32 bitDepth;
if (!image_io_png_read(&pixels, &width, &height, true, path, &bitDepth))
if (!Imaging::PngRead(&pixels, &width, &height, true, path, &bitDepth))
{
log_warning("Error reading PNG");
context_show_error(STR_HEIGHT_MAP_ERROR, STR_ERROR_READING_PNG);