Results 1 to 10 of 14

Thread: loading set from file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    I don't think it's as much a type problem, but more of a file-format problem. If you have old version file where is
    Code:
    [someobject1]
    type=10
    (where type 10 meant grass)
    And new file
    Code:
    [someobject1]
    type=11
    (where type 11 means grass)
    Loading old file with new loader, would consider that type 10 object something else than it was meant to be.

    You need a way to distinct the 2 files. I'm not one to give you right answer to that. Clumsiest of all ways is to have version number on top, and different loading routine for each version. You can forget to change the file version from the source code, and override your work file with garbage data.

    One other way is to explain all the types at beginning of file. For example:
    Code:
    [type10]
    texture=grass.png
    burnable=true
    That might also mean new list structure for program to store this information.
    (In essence, new types will be added to the end of the list.)
    Last edited by User137; 17-07-2013 at 05:32 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •