Changes between Version 1 and Version 2 of SavefileHowTo


Ignore:
Timestamp:
09/12/11 12:22:48 (8 years ago)
Author:
magnate
Comment:

Added clarification on rd_item

Legend:

Unmodified
Added
Removed
Modified
  • SavefileHowTo

    v1 v2  
    6565== A note about items == 
    6666 
    67 The functions wr_item and rd_item_X are special cases, as they are not savefile blocks in themselves but are called by three blocks (inventory, dungeon and stores - the three blocks containing carried, floor and store objects respectively). If you make changes to the data saved and loaded about objects you need to add the new version of rd_item to the function pointer definitions in load.c so that the correct version is used by each of the three blocks. This is in addition to incrementing the versions of the inventory, dungeon and stores blocks, but you do ''not'' need to write new loader functions, because the function pointers take care of this. 
     67The functions wr_item and rd_item_X are special cases, as they are not savefile blocks in themselves but are called by three blocks (inventory, dungeon and stores - the three blocks containing carried, floor and store objects respectively). If you make changes to the data saved and loaded about objects you need to add the new version of rd_item to the function pointer definitions in load.c so that the correct version is used by each of the three blocks. This is in addition to incrementing the versions of the inventory, dungeon and stores blocks, but you do ''not'' need to write new loader functions, because the function pointers take care of this. (You do need to write a new rd_item_X function though.)