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.)
Bookmarks