src/saveload.cpp
branchnoai
changeset 9826 9707ad4c9b60
parent 9800 ab08ca2a2018
child 9837 c9ec4f82e0d0
equal deleted inserted replaced
9825:cc77111ebd85 9826:9707ad4c9b60
    32 #include "autoreplace_base.h"
    32 #include "autoreplace_base.h"
    33 #include <list>
    33 #include <list>
    34 
    34 
    35 #include "table/strings.h"
    35 #include "table/strings.h"
    36 
    36 
    37 extern const uint16 SAVEGAME_VERSION = 90;
    37 extern const uint16 SAVEGAME_VERSION = 92;
    38 uint16 _sl_version;       ///< the major savegame version identifier
    38 uint16 _sl_version;       ///< the major savegame version identifier
    39 byte   _sl_minor_version; ///< the minor savegame version, DO NOT USE!
    39 byte   _sl_minor_version; ///< the minor savegame version, DO NOT USE!
    40 
    40 
    41 typedef void WriterProc(uint len);
    41 typedef void WriterProc(uint len);
    42 typedef uint ReaderProc();
    42 typedef uint ReaderProc();
  1598 	/* Load a TTDLX or TTDPatch game */
  1598 	/* Load a TTDLX or TTDPatch game */
  1599 	if (mode == SL_OLD_LOAD) {
  1599 	if (mode == SL_OLD_LOAD) {
  1600 		InitializeGame(IG_DATE_RESET, 256, 256); // set a mapsize of 256x256 for TTDPatch games or it might get confused
  1600 		InitializeGame(IG_DATE_RESET, 256, 256); // set a mapsize of 256x256 for TTDPatch games or it might get confused
  1601 		if (!LoadOldSaveGame(filename)) return SL_REINIT;
  1601 		if (!LoadOldSaveGame(filename)) return SL_REINIT;
  1602 		_sl_version = 0;
  1602 		_sl_version = 0;
  1603 		AfterLoadGame();
  1603 		if (!AfterLoadGame()) return SL_REINIT;
  1604 		return SL_OK;
  1604 		return SL_OK;
  1605 	}
  1605 	}
  1606 
  1606 
  1607 	_sl.excpt_uninit = NULL;
  1607 	_sl.excpt_uninit = NULL;
  1608 	try {
  1608 	try {