|
|
|
@ -66,12 +66,12 @@ void VisualNovel::Initialize(){ |
|
|
|
|
std::string currentStory; |
|
|
|
|
while(file.good()){ |
|
|
|
|
|
|
|
|
|
auto trim=[](std::string line){ |
|
|
|
|
for(int counter=0;counter<line.length();counter++){ |
|
|
|
|
if(line[counter]!=' '&&line[counter]!='\t')return line.substr(counter); |
|
|
|
|
} |
|
|
|
|
return line; |
|
|
|
|
auto trim = [](std::string& s) |
|
|
|
|
{ |
|
|
|
|
s.erase(0, s.find_first_not_of(" \t\n\r\f\v")); |
|
|
|
|
s.erase(s.find_last_not_of(" \t\n\r\f\v") + 1); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
auto ReadCSVArgs=[](std::string text){ |
|
|
|
|
std::vector<std::string>args; |
|
|
|
|
size_t counter=0; |
|
|
|
@ -86,7 +86,7 @@ void VisualNovel::Initialize(){ |
|
|
|
|
return args; |
|
|
|
|
}; |
|
|
|
|
std::getline(file,line); |
|
|
|
|
line=trim(line); |
|
|
|
|
trim(line); |
|
|
|
|
if(line.length()==0)continue; //It's a blank line, so we skip it.
|
|
|
|
|
|
|
|
|
|
switch(line[0]){ |
|
|
|
|