open2jamorg / open2jam

open source o2jam emulator
open2jam.wordpress.com
Artistic License 2.0
109 stars 40 forks source link

Use XML to store game options instead #21

Closed dtinth closed 12 years ago

dtinth commented 12 years ago

I found a class, "XMLEncoder" which encodes a JavaBean into XML file.

I think that this is less messy than the current "properties" implementation...

The commits in this branch removes all the manual serialization of GameOptions and back (GameOptions <-> Properties), and uses XMLEncoder and XMLDecoder instead.

In addition, the GameOptions class no longer contains the logic for loading and saving game options to file system. It is now the responsibility of the Config class to do it. The GameOptions class now only contains the options.

Also note that the configuration file name is changed to "game-options.xml" instead of "game_options.properties".