Created
September 17, 2016 20:23
-
-
Save iamtis/f500d44cbae518e7c1b04d023d0b334c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string rawFileData[100]; | |
int data2[66]; | |
float data3[33]; | |
inline void ParseSettings() | |
{ | |
int i = 0; | |
std::string SettingsFile = "C:\\TSC\\skins.txt"; | |
std::ifstream inputFile; | |
inputFile.open(SettingsFile); | |
if (std::ifstream(SettingsFile)) | |
{ | |
std::string linedata; | |
while (!inputFile.eof()) | |
{ | |
getline(inputFile, linedata); | |
rawFileData[i] = linedata.c_str(); | |
i++; | |
} | |
} | |
} | |
inline void ConvertSettings() | |
{ | |
for (int i = 0; i < 100; i++) { | |
rawFileData[i] = rawFileData[i].substr(rawFileData[i].find("=") + 1); | |
} | |
} | |
inline void ConvertVars() | |
{ | |
int i = 0; | |
int i2 = 0; | |
int i3 = 0; | |
while (i < 100 && i2 < 66 && i3 < 33) | |
{ | |
data2[i2] = std::stoi(rawFileData[i]); | |
i++; | |
i2++; | |
data2[i2] = std::stoi(rawFileData[i]); | |
i++; | |
data3[i3] = std::stof(rawFileData[i]); | |
i++; | |
i2++; | |
i3++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment