2012-05-05 20:06:34 -05:00
|
|
|
/**
|
|
|
|
* Powder Toy - saving and loading functions header
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2011-12-29 20:06:31 -06:00
|
|
|
#ifndef SAVE_H
|
|
|
|
#define SAVE_H
|
|
|
|
|
2012-01-14 11:46:38 -06:00
|
|
|
void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate);
|
|
|
|
|
2011-12-29 20:06:31 -06:00
|
|
|
void *build_thumb(int *size, int bzip2);
|
|
|
|
|
2011-12-30 13:48:11 -06:00
|
|
|
pixel *prerender_save(void *save, int size, int *width, int *height);
|
|
|
|
|
2011-12-29 20:06:31 -06:00
|
|
|
void *build_save(int *size, int orig_x0, int orig_y0, int orig_w, int orig_h, unsigned char bmap[YRES/CELL][XRES/CELL], float vx[YRES/CELL][XRES/CELL], float vy[YRES/CELL][XRES/CELL], float pv[YRES/CELL][XRES/CELL], float fvx[YRES/CELL][XRES/CELL], float fvy[YRES/CELL][XRES/CELL], sign signs[MAXSIGNS], void* partsptr);
|
|
|
|
|
|
|
|
int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char bmap[YRES/CELL][XRES/CELL], float vx[YRES/CELL][XRES/CELL], float vy[YRES/CELL][XRES/CELL], float pv[YRES/CELL][XRES/CELL], float fvx[YRES/CELL][XRES/CELL], float fvy[YRES/CELL][XRES/CELL], sign signs[MAXSIGNS], void* partsptr, unsigned pmap[YRES][XRES]);
|
|
|
|
|
2011-12-30 13:48:11 -06:00
|
|
|
pixel *prerender_save_OPS(void *save, int size, int *width, int *height);
|
|
|
|
|
2011-12-29 20:06:31 -06:00
|
|
|
void *build_save_OPS(int *size, int orig_x0, int orig_y0, int orig_w, int orig_h, unsigned char bmap[YRES/CELL][XRES/CELL], float vx[YRES/CELL][XRES/CELL], float vy[YRES/CELL][XRES/CELL], float pv[YRES/CELL][XRES/CELL], float fvx[YRES/CELL][XRES/CELL], float fvy[YRES/CELL][XRES/CELL], sign signs[MAXSIGNS], void* partsptr);
|
|
|
|
|
|
|
|
int parse_save_OPS(void *save, int size, int replace, int x0, int y0, unsigned char bmap[YRES/CELL][XRES/CELL], float vx[YRES/CELL][XRES/CELL], float vy[YRES/CELL][XRES/CELL], float pv[YRES/CELL][XRES/CELL], float fvx[YRES/CELL][XRES/CELL], float fvy[YRES/CELL][XRES/CELL], sign signs[MAXSIGNS], void* partsptr, unsigned pmap[YRES][XRES]);
|
|
|
|
|
|
|
|
//Old save parsers, readers
|
2011-12-30 13:48:11 -06:00
|
|
|
pixel *prerender_save_PSv(void *save, int size, int *width, int *height);
|
|
|
|
|
2011-12-29 20:06:31 -06:00
|
|
|
void *build_save_PSv(int *size, int orig_x0, int orig_y0, int orig_w, int orig_h, unsigned char bmap[YRES/CELL][XRES/CELL], float fvx[YRES/CELL][XRES/CELL], float fvy[YRES/CELL][XRES/CELL], sign signs[MAXSIGNS], void* partsptr);
|
|
|
|
|
|
|
|
int parse_save_PSv(void *save, int size, int replace, int x0, int y0, unsigned char bmap[YRES/CELL][XRES/CELL], float fvx[YRES/CELL][XRES/CELL], float fvy[YRES/CELL][XRES/CELL], sign signs[MAXSIGNS], void* partsptr, unsigned pmap[YRES][XRES]);
|
|
|
|
|
2012-01-14 11:46:38 -06:00
|
|
|
#endif
|