Merge pull request #4510 from pal1000/master

Cwcheat: Allow comments in cheat files starting with // mainly for writing cheat usage guidelines
This commit is contained in:
Henrik Rydgård 2013-11-14 07:14:21 -08:00
commit e98d0d8327

View File

@ -114,7 +114,10 @@ void CWCheatEngine::CreateCodeList() { //Creates code list to be used in functio
continue; //Line indicates Disc ID, not needed for cheats
}
if (initialCodesList[i].substr(0,2) == "_G") {
continue; //Line indicates game Title, also not needed for cheats.
continue; //Line indicates game Title, also not needed for cheats
}
if (initialCodesList[i].substr(0,2) == "//") {
continue; //Line indicates comment, also not needed for cheats.
}
if (initialCodesList[i].substr(0,3) == "_C1") {
cheatEnabled = true;
@ -231,7 +234,7 @@ std::vector<std::string> CWCheatEngine::GetCodesList() { //Reads the entire chea
}
for (int i = 0; !list.eof(); i ++) {
getline(list, line, '\n');
if (line.length() > 3 && line.substr(0,1) == "_"){
if (line.length() > 3 && (line.substr(0,1) == "_"||line.substr(0,2) == "//")){
codesList.push_back(line);
}
}