This luckily didn't take much work as I had already created generic classes for parsing XML in a previous project( Another Win for reusable code! ).
So now Instead of having a couple hundred lines of code for importing the assets for the engine I now have two lines:
ParseAssets parser( mEngine );
parser.ParseFile( "Assets.xml" );
With a tidy XML document that looks a little like this:
- All Game Entities with positioning
- GUI Layouts
- Engine Settings i.e. Resolution/Shader Detail/Shadows Toggle
One massive advantage to this way of loading is the most obvious in that the code is a lot less cluttered but it also means that you don't need to recompile when you only want to tweak game specific values; further than that it means that you can load radically different levels/assets that you may need for testing without having to change any source code.