src/Configuration.hh
author Tero Marttila <terom@fixme.fi>
Thu, 22 Jan 2009 02:38:33 +0200
branchnew_graphics
changeset 418 194bc810a570
parent 417 c503e0c6a740
permissions -rw-r--r--
add --log-level option, improve Config/Logger documentation, fix NETWORK_EANBLED typos in Engine
#ifndef CONFIGURATION_HH
#define CONFIGURATION_HH

/**
 * @file
 *
 * Various classes/modules have their own configuration structures, which are defined here
 *
 * XXX: rename to "Settings" to distinguish from Config/config?
 */

#include "Types.hh"
#include "Config.hh"

/**
 * Engine configuration
 */
struct EngineConfig {
    /** Path to the XML ClanLib resource file */
    std::string resource_path;

    /** Log output level */
    enum LogLevel log_level;

    /** Defaults */
    EngineConfig (void) : resource_path(RESOURCE_XML_PATH), log_level(DEFAULT_LOG_LEVEL) { }
};

/**
 * Terrain configuration
 */
struct TerrainConfig {
    /** Size of the terrain field*/
    PixelDimensions dimensions;

    /** Set to nonzero to generate random map */
    int random_seed;
    
    /** Defaults */
    TerrainConfig (void) : dimensions(TERRAIN_DIMENSIONS), random_seed(TERRAIN_RANDOM_SEED) { }
};

/**
 * Graphics display configuration
 */
struct DisplayConfig {
    /** Display resolution */
    PixelDimensions resolution;

    /** Fullscreen mode? */
    bool fullscreen;

    /** Defaults */
    DisplayConfig (void) : resolution(GRAPHICS_RESOLUTION), fullscreen(GRAPHICS_FULLSCREEN) { }
};


#endif