Cherry-pick bring in Visual Novel change to demo branch. Release Build 8950.

sigonasr2 12 months ago
parent 65a3e23200
commit 9b2d260e6f
  1. 4
      Adventures in Lestoria/Version.h
  2. 12
      Adventures in Lestoria/VisualNovel.cpp
  3. BIN
      x64/Release/Adventures in Lestoria.exe

@ -38,8 +38,8 @@ All rights reserved.
#pragma once
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 0
#define VERSION_BUILD 8948
#define VERSION_PATCH 1
#define VERSION_BUILD 8951
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -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]){

Loading…
Cancel
Save