www.pudn.com > Gimcrack-v0.0051-Source.zip > settings.h
////////////////////////////////////////////////////////////////////////// // This file deals with all the settings of the game, like screen res, // // alphablending, vsync etc. It can save thos settings to ini file so // // that they stay the same betwen sessions. // // // // Written by: Patrik Söderberg // // Modified: Leon Ljunggren, Carl Johannson // ////////////////////////////////////////////////////////////////////////// #ifndef _SETTINGS_H_ #define _SETTINGS_H_ #define SCREEN_WIDTH 1024 #define SCREEN_HEIGHT 768 #define SCREEN_DEPTH 32 #define FULL_SCREEN true #include#include "singleton.h" class GcSettings : public Singleton { public: // Constructor / Destrucotr GcSettings(); ~GcSettings(); // Read settings form file static bool ReadSettings(); // Write Settings to file static bool WriteSettings(); /* Accessors */ static int ScreenWidth() { return screenWidth; } static int ScreenHeight() { return screenHeight; } static int ScreenDepth() { return screenDepth; } static int FullScreen() { return fullScreen; } static void FullScreen(bool screen) { fullScreen = (int)screen; } static int RenderMethod() { return renderMethod; } static void RenderMethod(int method) { renderMethod = method; } static int ColorArray() { return useColor; } static void ColorArray(bool array) { useColor = (int)array; } static int Light() { return useLight; } static int Fog() { return useFog; } static void Fog(bool use) { useFog = (int)use; } static int FogDepth() { return fogDepth; } static void FogDepth(int depth) { fogDepth = depth; } static int DrawSkybox() { return drawSkybox; } static void DrawSkybox(bool draw) { drawSkybox = (int)draw; } static int ShowDebug() { return showDebug; } static void ShowDebug(bool debug) { showDebug = (int)debug; } static void ToggleDebug() { if(showDebug == 0) showDebug = 1; else showDebug = 0; } static int ShowHUD() { return showHUD; } static void ShowHUD(bool hud) { showHUD = (int)hud; } static void ToggleShowHUD() { if(showHUD == 0) showHUD = 1; else showHUD = 0; } static int TexDetail() { return detailTex; } static void TexDetail(int level) { detailTex = level; } static int Scale() { return scale; } static int HeightScael() { return heightScale; } static char *HeightmapPath() { return heighMapPath; } static char *LandTexPath() { return landTexPath; } static bool MultiTexture() { return multiTexture; } static void MultiTexture(bool use) { multiTexture = use; } static bool VideoMemory() { return videoMemory; } static void VideoMemory(bool use) { videoMemory = use; } static bool Gravity() { return gravity; } static void Gravity(bool use) { gravity = use; } private: static int screenWidth; static int screenHeight; static int screenDepth; static int fullScreen; static int renderMethod; static int useColor; static int useLight; static int useFog; static int fogDepth; static int drawSkybox; static int showDebug; static int showHUD; static int detailTex; static int scale; static int heightScale; static char heighMapPath[80]; static char landTexPath[80]; static bool multiTexture; static bool videoMemory; static bool gravity; }; #endif