mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 11:41:51 +02:00
Add checks for prerender_save in save_filename_ui, pass vx, vy and pv air data into parse and build save methods. New save format: OPS, basic reading and writing complete, uses BSON, BSON.c/h (Binary JSON) implementation from MongoDB. (Is License OK?)
This commit is contained in:
1199
includes/BSON.h
Normal file
1199
includes/BSON.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -123,6 +123,12 @@ typedef unsigned int pixel;
|
||||
#define fmaxf max
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__)
|
||||
#define TPT_INLINE _inline
|
||||
#else
|
||||
#define TPT_INLINE inline
|
||||
#endif
|
||||
|
||||
#define SDEUT
|
||||
//#define REALHEAT
|
||||
|
||||
@@ -242,9 +248,6 @@ extern char http_proxy_string[256];
|
||||
void thumb_cache_inval(char *id);
|
||||
void thumb_cache_add(char *id, void *thumb, int size);
|
||||
int thumb_cache_find(char *id, void **thumb, int *size);
|
||||
void *build_thumb(int *size, int bzip2);
|
||||
void *build_save(int *size, int x0, int y0, int w, int 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(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]);
|
||||
void clear_sim(void);
|
||||
void del_stamp(int d);
|
||||
void sdl_seticon(void);
|
||||
|
19
includes/save.h
Normal file
19
includes/save.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef SAVE_H
|
||||
#define SAVE_H
|
||||
|
||||
void *build_thumb(int *size, int bzip2);
|
||||
|
||||
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]);
|
||||
|
||||
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
|
||||
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]);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user