home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
config.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2004-11-24
|
1KB
|
63 lines
#include "main.h"
//----------------------
//GLOBAL
//----------------------
int Resolution;
int DrawDistance;
int SceneDetail;
int Shadows;
int ParticleEffects;
int SpecularEffects;
int SoundEnabled;
int SoundEnabled3D;
int HardwareSound;
int MusicEnabled;
int MouseX;
int MouseY;
int Invert;
int JoyEnabled;
int Language;
//----------------------------------------------------------------
// Name: ReadConfigData
// Desc: Precita nastavenia z config.ini
//----------------------------------------------------------------
void ReadConfigData()
{
FILE *File = NULL;
char cBuf[80];
LogPrint("Nacitavam nastavenia z config.ini");
File = fopen("config.ini","r");
if (File == NULL)
{
LogPrint(" Nepodarilo sa otvorit subor config.ini");
return;
}
fscanf(File,"%s %d",cBuf,&Resolution);
fscanf(File,"%s %d",cBuf,&DrawDistance);
fscanf(File,"%s %d",cBuf,&SceneDetail);
fscanf(File,"%s %d",cBuf,&Shadows);
fscanf(File,"%s %d",cBuf,&ParticleEffects);
fscanf(File,"%s %d",cBuf,&SpecularEffects);
fscanf(File,"%s %d",cBuf,&SoundEnabled);
fscanf(File,"%s %d",cBuf,&SoundEnabled3D);
fscanf(File,"%s %d",cBuf,&HardwareSound);
fscanf(File,"%s %d",cBuf,&MusicEnabled);
fscanf(File,"%s %d",cBuf,&MouseX);
fscanf(File,"%s %d",cBuf,&MouseY);
fscanf(File,"%s %d",cBuf,&Invert);
fscanf(File,"%s %d",cBuf,&JoyEnabled);
fscanf(File,"%s %d",cBuf,&Language);
Language = 1;
fclose(File);
}