2 * Copyright (C) 2003-2010 Neverball authors
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
20 /*---------------------------------------------------------------------------*/
22 void fs_png_read(png_structp readp, png_bytep data, png_size_t length)
24 int read = fs_read(data, 1, length, png_get_io_ptr(readp));
27 memset(data + read, 0, length - read);
30 void fs_png_write(png_structp writep, png_bytep data, png_size_t length)
32 fs_write(data, 1, length, png_get_io_ptr(writep));
35 void fs_png_flush(png_structp writep)
37 fs_flush(png_get_io_ptr(writep));
40 /*---------------------------------------------------------------------------*/