28#if defined(DF_NO_DEPRECATED_WARNINGS)
33#elif defined(_MSC_VER)
39#define DF_DEPRECATED __declspec(deprecated)
41#elif defined(__GNUC__)
44#define DF_DEPRECATED __attribute__ ((deprecated))
51#pragma message("DF_DEPRECATED not supported by your compiler")
94 int getWindowHorizontalPixels()
const;
95 int getWindowVerticalPixels()
const;
96 int getWindowHorizontalChars()
const;
97 int getWindowVerticalChars()
const;
98 enum Color getWindowBackgroundColor()
const;
99 int getWindowStyle()
const;
100 int getFrameTime()
const;
101 float getFontScale()
const;
102 std::string getWindowTitle()
const;
103 bool getShowMouse()
const;
104 bool getHeadless()
const;
105 std::string getFontFile()
const;
106 std::string getLogFile()
const;
107 int getRandomSeed()
const;
109 bool getNetworking()
const;
111 int getQuadtreeDepth()
const;
112 int getQuadtreeThreshold()
const;
113 int getGridWidth()
const;
114 int getGridHeight()
const;
115 bool getSignals()
const;
119 std::string
match(std::string find)
const;
123 void setWindowHorizontalPixels(
int window_horizontal_pixels);
124 void setWindowVerticalPixels(
int window_vertical_pixels);
125 void setWindowHorizontalChars(
int window_horizontal_chars);
126 void setWindowVerticalChars(
int window_vertical_chars);
127 void setWindowBackgroundColor(
enum Color window_background_color);
128 void setWindowStyle(
int window_style);
129 void setFrameTime(
int frame_time);
130 void setFontScale(
float font_scale);
131 void setWindowTitle(std::string window_title);
132 void setHeadless(
bool headless=
true);
133 void setShowMouse(
bool show_mouse=
true);
134 void setFontFile(std::string font_file);
135 void setLogFile(std::string logfile);
136 void setRandomSeed(
int random_seed);
138 void setNetworking(
bool networking);
140 void setQuadtreeDepth(
int quadtree_thresh);
141 void setQuadtreeThreshold(
int quadtree_depth);
142 void setGridWidth(
int grid_width);
143 void setGridHeight(
int grid_height);
144 void setSignals(
bool signals);
147 void writeToLog()
const;
156 std::string readConfig();
160 void loadConfig(std::string str=
"");
static Config & getInstance()
Get the singleton instance of the Config.
bool m_signals
True if catch signals.
Definition: Config.h:86
std::string m_font_file
Filename for graphics fonts.
Definition: Config.h:76
std::string getConfig() const
Get attributes.
Config()
Private since a singleton.
int m_quadtree_depth
Max depth for quadtree.
Definition: Config.h:83
int m_window_vertical_chars
Vertical ASCII spaces in window.
Definition: Config.h:68
Config(Config const &)
Don't allow copy.
float m_font_scale
Font scale multiplier.
Definition: Config.h:72
std::string m_config
Aggregate string from config file.
Definition: Config.h:64
bool m_networking
True if networking enabled.
Definition: Config.h:80
int m_random_seed
Seed for random number generation.
Definition: Config.h:78
int m_frame_time
Target time for 1 game loop (in mlsecs).
Definition: Config.h:71
int m_window_style
Style of window titlebar.
Definition: Config.h:69
int m_grid_height
Grid height.
Definition: Config.h:85
std::string m_window_title
Title of window.
Definition: Config.h:73
std::string match(std::string find) const
Match key:value pair in global configuration, returning value.
enum Color m_window_background_color
Window background color.
Definition: Config.h:70
int m_window_horizontal_pixels
Horizontal pixels in window.
Definition: Config.h:65
void operator=(Config const &)
Don't allow assignment.
int m_window_horizontal_chars
Horizontal ASCII spaces in window.
Definition: Config.h:67
int m_grid_width
Grid width.
Definition: Config.h:84
int m_quadtree_threshold
Object threshold for quadtree split.
Definition: Config.h:82
void setConfig(std::string config)
Set attributes.
int m_window_vertical_pixels
Vertical pixels in window.
Definition: Config.h:66
bool m_headless
True if run without graphics or input.
Definition: Config.h:75
bool m_show_mouse
True if should show mouse cursor.
Definition: Config.h:74
std::string m_logfile
Filename for dragonfly log.
Definition: Config.h:77
An animation for a sprite.
Definition: Animation.h:15
Color
Colors Dragonfly recognizes.
Definition: Color.h:11