|
|
|
@ -126,40 +126,40 @@ void VisualNovel::Initialize(){ |
|
|
|
|
arguments=ReadCSVArgs(args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(line.find("{LOCATION")!=std::string::npos){//Location command
|
|
|
|
|
if(line.find("{LOCATION")!=std::string::npos){ |
|
|
|
|
if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") |
|
|
|
|
data.emplace_back(std::make_unique<LocationCommand>(arguments[0])); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{BACKGROUND")!=std::string::npos){//Background command
|
|
|
|
|
if(line.find("{BACKGROUND")!=std::string::npos){ |
|
|
|
|
if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") |
|
|
|
|
graphicsToLoad.insert("story_background_image_location"_S+arguments[0]); |
|
|
|
|
data.push_back(std::make_unique<BackgroundCommand>(arguments[0])); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{LEFT")!=std::string::npos){//Left command
|
|
|
|
|
if(line.find("{LEFT")!=std::string::npos){ |
|
|
|
|
AddImagesForLoading(arguments); |
|
|
|
|
data.emplace_back(std::make_unique<LeftCommand>(arguments)); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{RIGHT")!=std::string::npos){//Right command
|
|
|
|
|
if(line.find("{RIGHT")!=std::string::npos){ |
|
|
|
|
AddImagesForLoading(arguments); |
|
|
|
|
data.emplace_back(std::make_unique<RightCommand>(arguments)); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{PAUSE")!=std::string::npos){//Pause command
|
|
|
|
|
if(line.find("{PAUSE")!=std::string::npos){ |
|
|
|
|
if(arguments.size()!=0)ERR("Arguments size is "<<arguments.size()<<". Expecting no arguments.") |
|
|
|
|
data.emplace_back(std::make_unique<PauseCommand>()); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{AUDIOPITCH")!=std::string::npos){//Pause command
|
|
|
|
|
if(line.find("{AUDIOPITCH")!=std::string::npos){ |
|
|
|
|
if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") |
|
|
|
|
data.emplace_back(std::make_unique<AudioPitchCommand>(arguments[0])); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{BGM")!=std::string::npos){//Pause command
|
|
|
|
|
if(line.find("{BGM")!=std::string::npos){ |
|
|
|
|
if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") |
|
|
|
|
data.emplace_back(std::make_unique<BGMCommand>(arguments[0])); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{CHAPTER")!=std::string::npos){//Pause command
|
|
|
|
|
if(line.find("{CHAPTER")!=std::string::npos){ |
|
|
|
|
if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") |
|
|
|
|
data.emplace_back(std::make_unique<ChapterCommand>(std::stoi(arguments[0]))); |
|
|
|
|
}else |
|
|
|
|
if(line.find("{SETPLAYERWORLDLOC")!=std::string::npos){//Pause command
|
|
|
|
|
if(line.find("{SETPLAYERWORLDLOC")!=std::string::npos){ |
|
|
|
|
if(arguments.size()<1)ERR("Arguments size is "<<arguments.size()<<". Expecting at least 1 argument.") |
|
|
|
|
std::string connectionPointName{}; |
|
|
|
|
for(int i=0;std::string&arg:arguments){ |
|
|
|
|