mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-01 20:12:50 +02:00
Change variable declarations to make Visual Studio happy
This commit is contained in:
committed by
Simon Robertshaw
parent
dcac550ef4
commit
ff55050b9b
11
src/save.c
11
src/save.c
@@ -1,4 +1,5 @@
|
|||||||
#include <bzlib.h>
|
#include <bzlib.h>
|
||||||
|
#include <math.h>
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "powder.h"
|
#include "powder.h"
|
||||||
#include "save.h"
|
#include "save.h"
|
||||||
@@ -56,6 +57,8 @@ pixel *prerender_save_OPS(void *save, int size, int *width, int *height)
|
|||||||
int i, x, y, j;
|
int i, x, y, j;
|
||||||
int blockX, blockY, blockW, blockH, fullX, fullY, fullW, fullH;
|
int blockX, blockY, blockW, blockH, fullX, fullY, fullW, fullH;
|
||||||
pixel * vidBuf = NULL;
|
pixel * vidBuf = NULL;
|
||||||
|
bson b;
|
||||||
|
bson_iterator iter;
|
||||||
|
|
||||||
//Block sizes
|
//Block sizes
|
||||||
blockX = 0;
|
blockX = 0;
|
||||||
@@ -115,8 +118,6 @@ pixel *prerender_save_OPS(void *save, int size, int *width, int *height)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
bson b;
|
|
||||||
bson_iterator iter;
|
|
||||||
bson_init_data(&b, bsonData);
|
bson_init_data(&b, bsonData);
|
||||||
bson_iterator_init(&iter, &b);
|
bson_iterator_init(&iter, &b);
|
||||||
while(bson_iterator_next(&iter))
|
while(bson_iterator_next(&iter))
|
||||||
@@ -311,6 +312,7 @@ void *build_save_OPS(int *size, int orig_x0, int orig_y0, int orig_w, int orig_h
|
|||||||
int blockX, blockY, blockW, blockH, fullX, fullY, fullW, fullH;
|
int blockX, blockY, blockW, blockH, fullX, fullY, fullW, fullH;
|
||||||
int x, y, i, wallDataFound = 0;
|
int x, y, i, wallDataFound = 0;
|
||||||
int posCount, signsCount;
|
int posCount, signsCount;
|
||||||
|
bson b;
|
||||||
|
|
||||||
//Get coords in blocks
|
//Get coords in blocks
|
||||||
blockX = orig_x0/CELL;
|
blockX = orig_x0/CELL;
|
||||||
@@ -542,7 +544,6 @@ void *build_save_OPS(int *size, int orig_x0, int orig_y0, int orig_w, int orig_h
|
|||||||
partsData = NULL;
|
partsData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bson b;
|
|
||||||
bson_init(&b);
|
bson_init(&b);
|
||||||
bson_append_bool(&b, "waterEEnabled", water_equal_test);
|
bson_append_bool(&b, "waterEEnabled", water_equal_test);
|
||||||
bson_append_bool(&b, "legacyEnable", legacy_enable);
|
bson_append_bool(&b, "legacyEnable", legacy_enable);
|
||||||
@@ -640,6 +641,8 @@ int parse_save_OPS(void *save, int size, int replace, int x0, int y0, unsigned c
|
|||||||
int i, freeIndicesCount, x, y, returnCode = 0, j;
|
int i, freeIndicesCount, x, y, returnCode = 0, j;
|
||||||
int *freeIndices = NULL;
|
int *freeIndices = NULL;
|
||||||
int blockX, blockY, blockW, blockH, fullX, fullY, fullW, fullH;
|
int blockX, blockY, blockW, blockH, fullX, fullY, fullW, fullH;
|
||||||
|
bson b;
|
||||||
|
bson_iterator iter;
|
||||||
|
|
||||||
//Block sizes
|
//Block sizes
|
||||||
blockX = x0/CELL;
|
blockX = x0/CELL;
|
||||||
@@ -701,8 +704,6 @@ int parse_save_OPS(void *save, int size, int replace, int x0, int y0, unsigned c
|
|||||||
clear_sim();
|
clear_sim();
|
||||||
}
|
}
|
||||||
|
|
||||||
bson b;
|
|
||||||
bson_iterator iter;
|
|
||||||
bson_init_data(&b, bsonData);
|
bson_init_data(&b, bsonData);
|
||||||
bson_iterator_init(&iter, &b);
|
bson_iterator_init(&iter, &b);
|
||||||
while(bson_iterator_next(&iter))
|
while(bson_iterator_next(&iter))
|
||||||
|
Reference in New Issue
Block a user