Enable save/load state support

This commit is contained in:
clobber
2015-08-06 15:14:10 -05:00
parent ec2a8c68e5
commit 0010a37c60
3 changed files with 6 additions and 14 deletions
+4 -2
View File
@@ -219,7 +219,9 @@ bool prosystem_Save(std::string filename, bool compress) {
}
logger_LogInfo("Saving game state to file " + filename + ".", PRO_SYSTEM_SOURCE);
if (!loc_buffer) loc_buffer = (byte *)malloc(33000 * sizeof(byte));
uint size = 0;
uint index;
@@ -312,7 +314,7 @@ bool prosystem_Load(const std::string filename) {
logger_LogInfo("Loading game state from file " + filename + ".", PRO_SYSTEM_SOURCE);
if (! loc_buffer) loc_buffer = (byte *)malloc(33000 * sizeof(byte));
if (!loc_buffer) loc_buffer = (byte *)malloc(33000 * sizeof(byte));
uint size = archive_GetUncompressedFileSize(filename);
if(size == 0) {