|
|
|
|
@ -218,33 +218,8 @@ string GetLineValue(const string &line, char a, char b) |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
|
string IntoStr(Color color) |
|
|
|
|
{ |
|
|
|
|
void GetKeys(string line, int *key) |
|
|
|
|
{ |
|
|
|
|
int i = line.find("=")+1; |
|
|
|
|
line = line.substr(i, line.length()-i); |
|
|
|
|
i = 0; |
|
|
|
|
if (line[i] == ' ') |
|
|
|
|
while (line[++i] == ' '); |
|
|
|
|
line = line.substr(i, line.length()-i); |
|
|
|
|
i = line.find(" "); |
|
|
|
|
string one; |
|
|
|
|
string two; |
|
|
|
|
if (i != string::npos) |
|
|
|
|
{ |
|
|
|
|
one = line.substr(0, i); |
|
|
|
|
i++; |
|
|
|
|
two = line.substr(i, line.length()-i); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
one = line; |
|
|
|
|
key[0] = !one.empty() && one[0] == '\'' ? one[1] : (atoi(one.c_str()) == 0 ? null_key : atoi(one.c_str())); |
|
|
|
|
key[1] = !two.empty() && two[0] == '\'' ? two[1] : (atoi(two.c_str()) == 0 ? null_key : atoi(two.c_str())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
string IntoStr(Color color) |
|
|
|
|
{ |
|
|
|
|
string result; |
|
|
|
|
|
|
|
|
|
if (color == clDefault) |
|
|
|
|
@ -267,6 +242,31 @@ namespace |
|
|
|
|
result = "white"; |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
|
{ |
|
|
|
|
void GetKeys(string line, int *key) |
|
|
|
|
{ |
|
|
|
|
int i = line.find("=")+1; |
|
|
|
|
line = line.substr(i, line.length()-i); |
|
|
|
|
i = 0; |
|
|
|
|
if (line[i] == ' ') |
|
|
|
|
while (line[++i] == ' '); |
|
|
|
|
line = line.substr(i, line.length()-i); |
|
|
|
|
i = line.find(" "); |
|
|
|
|
string one; |
|
|
|
|
string two; |
|
|
|
|
if (i != string::npos) |
|
|
|
|
{ |
|
|
|
|
one = line.substr(0, i); |
|
|
|
|
i++; |
|
|
|
|
two = line.substr(i, line.length()-i); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
one = line; |
|
|
|
|
key[0] = !one.empty() && one[0] == '\'' ? one[1] : (atoi(one.c_str()) == 0 ? null_key : atoi(one.c_str())); |
|
|
|
|
key[1] = !two.empty() && two[0] == '\'' ? two[1] : (atoi(two.c_str()) == 0 ? null_key : atoi(two.c_str())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Color IntoColor(const string &color) |
|
|
|
|
|