saveload.c
changeset 2141 d3167783c73c
parent 2138 44ab9e23c669
child 2144 eb9f5557b52f
equal deleted inserted replaced
2140:a04d0142ad65 2141:d3167783c73c
  1233 static bool SaveFileToDisk(void *ptr)
  1233 static bool SaveFileToDisk(void *ptr)
  1234 {
  1234 {
  1235 	const SaveLoadFormat *fmt = GetSavegameFormat(_savegame_format);
  1235 	const SaveLoadFormat *fmt = GetSavegameFormat(_savegame_format);
  1236 	/* XXX - backup _sl.buf cause it is used internally by the writer
  1236 	/* XXX - backup _sl.buf cause it is used internally by the writer
  1237 	 * and we update it for our own purposes */
  1237 	 * and we update it for our own purposes */
  1238 	byte *tmp = _sl.buf;
  1238 	static byte *tmp = NULL;
  1239 	uint32 hdr[2];
  1239 	uint32 hdr[2];
       
  1240 
       
  1241 	tmp = _sl.buf;
  1240 
  1242 
  1241 	SaveFileStart();
  1243 	SaveFileStart();
  1242 
  1244 
  1243 	/* XXX - Setup setjmp error handler if an error occurs anywhere deep during
  1245 	/* XXX - Setup setjmp error handler if an error occurs anywhere deep during
  1244 	 * loading/saving execute a longjmp() and continue execution here */
  1246 	 * loading/saving execute a longjmp() and continue execution here */