Changes between Version 11 and Version 13 of Ticket #30


Ignore:
Timestamp:
01/31/09 16:49:03 (10 years ago)
Author:
takkaria
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30

    • Property Owner changed from Elly to takkaria
  • Ticket #30 – Description

    v11 v13  
    1 There are comments at the top of save.c (see #ifdef FUTURE_SAVEFILES), which indicate plans to create a modular and better-versioned savefile format.  I used that as a base to create a new format, which has better versioning support, and is probably a whole lot more future-proof than what's currently there.  It also unified save/load code as far as possible. 
     1At the top of save.c, there was once a comment about moving to a block-based format.  I spent some time speccing a format at http://rephial.org/wiki/SavefileCode, which I intend to implement.  Its chief advantage over current practice is that instead of the entire savefile having the same version number as the game, each block of data can have its own, which should mean that changes to savefiles aren't quite as scary.  Also, a new format with blocks will make it much easier to catch load/save errors, since only a block will be in memory at a time. 
    22 
    3 The new savefile is constructed of a header, followed by a number of blocks, followed by a special "end block".  For a fuller description, see [http://rephial.org/wiki/SavefileCode]. 
     3Steps: 
     4 - copy load.c to load-old.c 
     5 - change magic numbers at start of file 
     6 - add in buffer implementation 
     7 - make sf_put() and sf_get() work from buffers 
     8 - remove encryption 
     9 - add headers before each write / turn load into a switch 
     10 - add checksum at end of block 
     11 - refactor