Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From: Robert Norris
- To: pioneer-dev@pioneerspacesim.net
- Subject: Re: Savefile upgrades - a modest proposal
- Date: Wednesday, December 19, 2012 11:09 PM
- On Wed, Dec 19, 2012 at 10:24:29PM +1100, Robert Norris wrote:
- > To mark this in the file for the parser, we'll store a double (or
- > float) as [ "d", "0x9.e0652141ef0dbf6p-3" ] (that's 1.23456789). Its
- > still relatively human-readable (maybe human-decipherable is a better
- > term).
- Actually the pseudo-type information isn't necessary, because you'll
- retrieve this value through a GetDouble() or similar method, which knows
- how to do the special handling required. So just storing as a string
- will be fine.
- For Lua data, just using the native JSON type information will be fine -
- it maps very closely to Lua's own types. See here for what I did for the
- RPC agent:
- https://github.com/robn/pioneer/blob/rpc-agent/src/LuaRPCAgent.cpp#L78
- I don't think the precision requirement for Lua data is quite as
- important, so the standard JSON double stuff should be just fine for
- that.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement