summaryrefslogtreecommitdiffstats
path: root/src/common/profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/profile.cpp')
-rw-r--r--src/common/profile.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/common/profile.cpp b/src/common/profile.cpp
index 864cc22..ab7904b 100644
--- a/src/common/profile.cpp
+++ b/src/common/profile.cpp
@@ -33,24 +33,24 @@ static char g_filename[100];
-BOOL InitCurrentDirectory()
+bool InitCurrentDirectory()
{
#if _SCHOOL
_fullpath(g_filename, "ceebot.ini", 100);
#else
_fullpath(g_filename, "colobot.ini", 100);
#endif
- return TRUE;
+ return true;
}
-BOOL SetProfileString(char* section, char* key, char* string)
+bool SetProfileString(char* section, char* key, char* string)
{
WritePrivateProfileString(section, key, string, g_filename);
- return TRUE;
+ return true;
}
-BOOL GetProfileString(char* section, char* key, char* buffer, int max)
+bool GetProfileString(char* section, char* key, char* buffer, int max)
{
int nb;
@@ -58,22 +58,22 @@ BOOL GetProfileString(char* section, char* key, char* buffer, int max)
if ( nb == 0 )
{
buffer[0] = 0;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-BOOL SetProfileInt(char* section, char* key, int value)
+bool SetProfileInt(char* section, char* key, int value)
{
char s[20];
sprintf(s, "%d", value);
WritePrivateProfileString(section, key, s, g_filename);
- return TRUE;
+ return true;
}
-BOOL GetProfileInt(char* section, char* key, int &value)
+bool GetProfileInt(char* section, char* key, int &value)
{
char s[20];
int nb;
@@ -82,23 +82,23 @@ BOOL GetProfileInt(char* section, char* key, int &value)
if ( nb == 0 )
{
value = 0;
- return FALSE;
+ return false;
}
sscanf(s, "%d", &value);
- return TRUE;
+ return true;
}
-BOOL SetProfileFloat(char* section, char* key, float value)
+bool SetProfileFloat(char* section, char* key, float value)
{
char s[20];
sprintf(s, "%.2f", value);
WritePrivateProfileString(section, key, s, g_filename);
- return TRUE;
+ return true;
}
-BOOL GetProfileFloat(char* section, char* key, float &value)
+bool GetProfileFloat(char* section, char* key, float &value)
{
char s[20];
int nb;
@@ -107,10 +107,10 @@ BOOL GetProfileFloat(char* section, char* key, float &value)
if ( nb == 0 )
{
value = 0.0f;
- return FALSE;
+ return false;
}
sscanf(s, "%f", &value);
- return TRUE;
+ return true;
}