Implemented unlocking of areas via clearing stages. Game fade in/out for state transitions. Asset loading for visual novel assets. Visual Novel command execution code implemented. Visual Novel basic rendering and input handling enabled.

This commit is contained in:
2023-11-28 18:29:06 -06:00
parent 3601e8b83a
commit a7f13e0077
21 changed files with 279 additions and 127 deletions
+21 -2
View File
@@ -35,10 +35,12 @@ SUCH DAMAGE.
#include <vector>
#include <memory>
#include "safemap.h"
#include <set>
class VisualNovel;
class Command{
friend class VisualNovel;
virtual void Execute(VisualNovel&vn)=0;
protected:
Command();
@@ -95,14 +97,30 @@ public:
};
class VisualNovel{
friend class State_Story;
friend class Crawler;
friend class Command;
friend class LocationCommand;
friend class BackgroundCommand;
friend class LeftCommand;
friend class RightCommand;
friend class SpeakerCommand;
friend class DialogCommand;
friend class PauseCommand;
std::string storyLevel;
std::string speakerDisplayName="";
std::string actualSpeakerName="";
std::string activeText;
std::vector<std::string>leftCharacters;
std::vector<std::string>rightCharacters;
std::string backgroundFilename;
std::vector<Command*>commands;
int commandIndex=0;
std::string locationDisplayText="";
float locationDisplayTime=0;
std::string prevTheme="";
static std::set<std::string>graphicsToLoad;
static safemap<std::string,std::vector<std::unique_ptr<Command>>>storyLevelData;
static VisualNovel novel;
@@ -112,6 +130,7 @@ public:
VisualNovel(VisualNovel&&)=delete;
static void Initialize();
static void LoadVisualNovel(std::string storyLevelName);
static void Update();
static void Draw();
void ExecuteNextCommand();
void Update();
void Draw();
};