00001 //Filename : OCONFIG.H 00002 //Description : Header file for Game Config class 00003 00004 #ifndef __OCONFIG_H 00005 #define __OCONFIG_H 00006 00007 #include <GAMEDEF.H> 00008 00009 #ifndef __OFILE_H 00010 #include <OFILE.H> 00011 #endif 00012 00013 //------------- Define constant -------------// 00014 00015 enum { OPTION_NONE=0, OPTION_LOW, OPTION_MODERATE, OPTION_HIGH, OPTION_VERY_HIGH }; 00016 00017 //---------- Define class Config -----------// 00018 00020 class Config { 00021 public: 00022 void init(); 00023 void deinit(); 00024 00025 int write_file(File* filePtr); 00026 int read_file(File* filePtr, int keepSavedSysSettings=1); 00027 00028 void default_game_setting(); 00029 00030 //int save(char *); // save to file 00031 //int load(char *); // load from file 00032 00033 public: 00034 00035 //------- game options --------// 00036 00037 char disp_year_end_report; // whether a report should be displayed at the end of each academic year 00038 char context_sensitive_help; 00039 #if(GAME_VERSION>=200) 00040 int auto_save; 00041 char auto_save_file_name[MAX_PATH]; // include extension, which is .<year>, inital is empty, ask name in first autosave 00042 int log_enable; // 0=none, 1=year, 2=trimester 00043 char log_file_name[MAX_PATH]; 00044 char disp_building_label; 00045 #endif 00046 00047 //------ speed settings -------// 00048 00049 short scroll_speed; // map scrolling speed. 1-slowest, 10-fastest 00050 short frame_speed; // game speed, the desired frames per second 00051 00052 //------- sound effect --------// 00053 00054 char music_flag; 00055 short cd_music_volume; // a value from 0 to 100 00056 short wav_music_volume; // a value from 0 to 100 00057 00058 char sound_effect_flag; 00059 short sound_effect_volume; // a value from 0 to 100 00060 }; 00061 00062 //------------------------------------------// 00063 00064 extern Config config; 00065 #endif