Logo Search packages:      
Sourcecode: adonthell version File versions  Download package

void config::write_adonthellrc (  ) 

Writes a default configuration file with the values set in the constructor

See also:
config::config ()

Definition at line 256 of file prefs.cc.

References audio_channels, audio_resolution, audio_sample_rate, audio_volume, language, quick_load, and screen_mode.

Referenced by read_adonthellrc().

{
    string fname;

#ifndef WIN32
    fname = adonthellrc + "/adonthellrc";
#else
    fname = adonthellrc + "/adonthell.ini";
#endif
    
    ofstream rc (fname.c_str ());

    rc << "# Sample Adonthell configuration file;\n"
       << "# edit to your needs!\n\n"
       << "# Screen-mode num\n#   0  Windowed mode\n"
       << "#   1  Fullscreen mode\n    Screen-mode " << (int) screen_mode 
       << "\n\n" << "# Double-size num\n#   0  320x240 mode\n"
       << "#   1  640x480 (double) mode\n    Double-size " 
       << (int) double_screen << "\n\n"
       << "# Language [locale]\n#   Where locale has the form fr_FR or de_DE, etc.\n"
       << "    Language [" << language << "]\n\n"
       << "# Font [font.ttf]\n#   Path to a true type font to use. Leave empty for default\n"
       << "    Font [" << font << "]\n\n"
       << "# Quick-load num\n#   0  off\n#   1  on\n    Quick-load "
       << (int) quick_load << "\n\n"
       << "# Audio-channels num\n#   0  Mono\n#   1  Stereo\n"
       << "    Audio-channels " << (int) audio_channels << "\n\n"
       << "# Audio-resolution num\n#   0  8 bit\n#   1  16 bit\n"
       << "    Audio-resolution " << (int) audio_resolution << "\n\n"
       << "# Audio-sample-rate num\n#   0  11025 Hz\n#   1  22050 Hz\n#   2  44100 Hz\n"
       << "    Audio-sample-rate " << (int) audio_sample_rate << "\n\n"
       << "# Audio-volume num\n#   0 - 100 %\n"
       << "    Audio-volume " << (int) audio_volume << "\n\n"
       << "# Version number of this file. Please don't edit\n    Version [" << VERSION << "]\n";

    rc.close ();
}


Generated by  Doxygen 1.6.0   Back to index