adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Proposed changes to loading/saving


From: Kai Sterker
Subject: [Adonthell-devel] Proposed changes to loading/saving
Date: Sat, 14 Nov 2009 11:34:02 +0100

I've updated the test code to initialize the world manager from its
data file. That means, the only thing not completely initialized from
a file is the rpg::character stuff. That has to wait until Frederico
has done his changes, though.

Now that things are actually initialized from data files, a flaw in
the file handling code becomes obvious. The original idea was to have
data in xml format, while we're developing stuff. That way, we can
more easily manipulate data files manually, if required and can
properly version control them. However, by tying format to the file
extension, this doesn't work out anymore.

So my proposal is the following:
* Add a static flag to diskio that allows to globally set file format
when saving.
* When loading a file, actually look at the first bytes of the file
and decide format based on those.

That way, we can keep our data files named .data and still have them
contain XML during development. For release, we can convert them
(maybe automatically during make dist/make install) or manually or
just ship the initial data as XML and save subsequent games as binary.

Comments welcome. At any rate, I'll now go back to the editors and
bring them up-to-date with all the engine changes that either broke
file formats or code.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]