Re: [Alephmodular-devel] Serializing Terminals
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2005-06-13 04:38:03
|
On Jun 9, 2005, at 1:00 PM, Br'fin wrote: > The other aspect of unserialized items is Terminal structure. Now > the funny thing about Terminals is that they are read in from the > original map file. They should be unpacked for internal use to be > proper. (Being a mix of ints and chars, it managed to fit within > PowerPC alignment issues, so never went through the unserialization > process before.) > > Now, save files still have a complete map file in them (The current > level and all states). Should we save memory most of the time by > unpacking the terminals, then repacking them during the save. Or Do > we just use more memory by holding onto the original packed data > and handing that back to the save system when it is asked for? > I ended up going with serializing on reading and writing so as to not consume the memory during prime game time. I adapted some of the serializing from A1. Especially after some of the pitfalls I managed to fall into on my own. This shouldn't break existing save-games on macs. The next change, for serializing all of the stuff in the saved game file may (alignment issues can mean that structures on disk are aligned differently than in memory. This is what lead to the timing of A1 gaining serialization to begin with... 68k based memory structures saved to disk don't line up with PPC native versions of those same structures.) -Jeremy Parsons http://alephmodular.sourceforge.net/ |