//	ConfigLoader.h - Class to load the config file.
//  ----------------------------------------------------------------------------
//	This file is part of 'GameTemplate', a game.
//	Copyright (C) 2009  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef CONFIGLOADER_H_
#define CONFIGLOADER_H_

#include "ThreeFloats.h"

#include <string>
#include <vector>

///	Helper method to return the compiled-for platform's home directory.
std::string getFilePath();

class ConfigLoader
{
  public:
	///	Constructor.
	/*!
		The config file is loaded (or created) here.
	 */
	ConfigLoader();
	///	Destructor.
	~ConfigLoader();

	///	Returns the screen width to use.
	int getScreenWidth() const {return width;};
	///	Returns the screen height to use.
	int getScreenHeight() const {return height;};
	///	Returns the antialiasing level.
	int getAntialiasLevel() const {return aa;};
	///	Returns whether to go fullscreen or not.
	bool getFullscreen() const {return fullscreen;};
	///	Returns whether to have no sound or not.
	bool getNoSound() const {return noSound;};
	///	Returns whether to have no music or not.
	bool getNoMusic() const {return noMusic;};
	///	Returns whether to use the SDL drawing backend.
	bool getSDL() const {return sdl;};
  private:
	///	Helper method to create the file if it doesn't exist.
	void createFile() const;

	///	The screen width to use.
	int width;
	///	The screen height to use.
	int height;
	///	The level of antialiasing to use.
	int aa;
	///	Whether or not to go fullscreen.
	bool fullscreen;
	///	Whether or not to have no sound.
	bool noSound;
	///	Whether or not to have no Music.
	bool noMusic;
	///	Whether to use the SDL backend.
	bool sdl;
	///	The path to record to.
	std::string recordPath;
	///	The path to playback from.
	std::string loadPath;
};

#endif
