Author: cazfi
Date: Fri Aug 21 22:56:15 2015
New Revision: 29632

URL: http://svn.gna.org/viewcvs/freeciv?rev=29632&view=rev
Log:
Added barebones compat_load_dev() for converting savegames from older 
development revisions to current.

See patch #6256

Modified:
    trunk/server/savecompat.c

Modified: trunk/server/savecompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=29632&r1=29631&r2=29632&view=diff
==============================================================================
--- trunk/server/savecompat.c   (original)
+++ trunk/server/savecompat.c   Fri Aug 21 22:56:15 2015
@@ -71,6 +71,10 @@
 static void compat_load_020500(struct loaddata *loading);
 static void compat_load_020600(struct loaddata *loading);
 static void compat_load_030000(struct loaddata *loading);
+
+#ifdef FREECIV_DEV_SAVE_COMPAT
+static void compat_load_dev(struct loaddata *loading);
+#endif /* FREECIV_DEV_SAVE_COMPAT */
 
 typedef void (*load_version_func_t) (struct loaddata *loading);
 
@@ -153,6 +157,11 @@
       compat[i].load(loading);
     }
   }
+
+#ifdef FREECIV_DEV_SAVE_COMPAT
+  compat_load_dev(loading);
+#endif /* FREECIV_DEV_SAVE_COMPAT */
+
 }
 
 /****************************************************************************
@@ -1010,6 +1019,20 @@
 }
 
 /****************************************************************************
+  Translate savegame secfile data from earlier development version format
+  to current one.
+****************************************************************************/
+#ifdef FREECIV_DEV_SAVE_COMPAT
+static void compat_load_dev(struct loaddata *loading)
+{
+  /* Check status and return if not OK (sg_success != TRUE). */
+  sg_check_ret();
+
+  log_debug("Upgrading data between development revisions");
+}
+#endif /* FREECIV_DEV_SAVE_COMPAT */
+
+/****************************************************************************
   Convert old ai level value to ai_level
 ****************************************************************************/
 enum ai_level ai_level_convert(int old_level)


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to