sigonasr2 6 months ago
commit 688514fd97
  1. 1
      .gitignore
  2. 8
      Adventures in Lestoria/Adventures in Lestoria.vcxproj
  3. 13
      Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
  4. 100
      Adventures in Lestoria/ArtificerWindow.cpp
  5. 4
      Adventures in Lestoria/GameState.cpp
  6. 1
      Adventures in Lestoria/GameState.h
  7. 1
      Adventures in Lestoria/Menu.cpp
  8. 1
      Adventures in Lestoria/Menu.h
  9. 1
      Adventures in Lestoria/MenuType.h
  10. 8
      Adventures in Lestoria/NPC.cpp
  11. 55
      Adventures in Lestoria/State_Dialog.cpp
  12. 46
      Adventures in Lestoria/State_Dialog.h
  13. 1
      Adventures in Lestoria/Tutorial.cpp
  14. 11
      Adventures in Lestoria/Tutorial.h
  15. 2
      Adventures in Lestoria/Version.h
  16. 53
      Adventures in Lestoria/VisualNovel.cpp
  17. 8
      Adventures in Lestoria/VisualNovel.h
  18. 2
      Adventures in Lestoria/packkey.cpp

1
.gitignore vendored

@ -425,3 +425,4 @@ desktop.ini
/Adventures in Lestoria Tests/x64/Unit Testing
/x64/Unit Testing
/Adventures in Lestoria/assets/2.10
/Adventures in Lestoria/assets/items/Bird_s Treasure.png

@ -218,7 +218,7 @@
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalIncludeDirectories>C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\OneDrive\Documents\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\LabUser\Documents\include;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\OneDrive\Documents\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/MP20 %(AdditionalOptions)</AdditionalOptions>
<TreatSpecificWarningsAsErrors>4099;5030;4715;4172;4834</TreatSpecificWarningsAsErrors>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -226,7 +226,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>discord_game_sdk.dll.lib;freetype.lib;steam_api64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies);</AdditionalDependencies>
</Link>
<PreBuildEvent>
@ -622,6 +622,7 @@
<SubType>
</SubType>
</ClInclude>
<ClInclude Include="State_Dialog.h" />
<ClInclude Include="State_GameHub.h">
<SubType>
</SubType>
@ -725,6 +726,7 @@
<ClCompile Include="Ability.cpp" />
<ClCompile Include="Animation.cpp" />
<ClCompile Include="Arrow.cpp" />
<ClCompile Include="ArtificerWindow.cpp" />
<ClCompile Include="AttributableStat.cpp">
<SubType>
</SubType>
@ -1054,6 +1056,7 @@
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="State_Dialog.cpp" />
<ClCompile Include="State_GameHub.cpp">
<SubType>
</SubType>
@ -1167,6 +1170,7 @@
<Text Include="assets\config\shops\Chapter 5 Merchants.txt" />
<Text Include="assets\config\shops\Chapter 6 Merchants.txt" />
<Text Include="assets\config\story\Chapter 1.txt" />
<Text Include="Chapter 2.txt" />
<Text Include="Chapter_1_2nd_Boss.txt" />
<Text Include="Chapter_1_Creatures_Part_2.txt" />
<Text Include="Chapter_2_Boss.txt" />

@ -669,6 +669,9 @@
<ClInclude Include="HurtDamageInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="State_Dialog.h">
<Filter>Header Files\State</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Player.cpp">
@ -1154,8 +1157,11 @@
<ClCompile Include="PoisonBottle.cpp">
<Filter>Source Files\Bullet Types</Filter>
</ClCompile>
<ClCompile Include="Chapter 2.txt">
<Filter>Configurations\Story</Filter>
<ClCompile Include="State_Dialog.cpp">
<Filter>Source Files\Game States</Filter>
</ClCompile>
<ClCompile Include="ArtificerWindow.cpp">
<Filter>Source Files\Interface</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -1340,6 +1346,9 @@
<Text Include="Crawler_Artificer.txt">
<Filter>Documentation\Mechanics</Filter>
</Text>
<Text Include="Chapter 2.txt">
<Filter>Configurations\Story</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<Image Include="assets\heart.ico">

@ -0,0 +1,100 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2024 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#include "Menu.h"
#include "MenuComponent.h"
#include "GameState.h"
#include "AdventuresInLestoria.h"
#include "Unlock.h"
#include "MenuLabel.h"
#include "VisualNovel.h"
INCLUDE_game
void Menu::InitializeArtificerWindow(){
Menu*artificerWindow=CreateMenu(ARTIFICER,CENTERED,vi2d{144,144});
artificerWindow->ADD("Refine Button",MenuComponent)(geom2d::rect<float>{{0.f,4.f},{144.f,24.f}},"Refine",[](MenuFuncData data){
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->ADD("Disassemble Button",MenuComponent)(geom2d::rect<float>{{0.f,32.f},{144.f,24.f}},"Disassemble",[](MenuFuncData data){
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->ADD("Enchant Button",MenuComponent)(geom2d::rect<float>{{0.f,60.f},{144.f,24.f}},"Enchant",[](MenuFuncData data){
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->ADD("Help Button",MenuComponent)(geom2d::rect<float>{{0.f,88.f},{144.f,24.f}},"Help",[](MenuFuncData data){
VisualNovel::LoadDialog("ARTIFICER_HELP",[](){Menu::OpenMenu(MenuType::ARTIFICER);});
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->ADD("Leave Button",MenuComponent)(geom2d::rect<float>{{0.f,116.f},{144.f,24.f}},"Leave",[](MenuFuncData data){
Menu::CloseMenu();
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->SetupKeyboardNavigation(
[](MenuType type,Data&returnData){ //On Open
returnData="Refine Button";
},
{ //Button Key
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
{game->KEY_BACK,{"Stay",[](MenuType type){
Menu::CloseMenu();
}}},
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
}
,{ //Button Navigation Rules
{"Refine Button",{
.up="Leave Button",
.down="Disassemble Button",}},
{"Disassemble Button",{
.up="Refine Button",
.down="Enchant Button",}},
{"Enchant Button",{
.up="Disassemble Button",
.down="Help Button",}},
{"Help Button",{
.up="Enchant Button",
.down="Leave Button",}},
{"Leave Button",{
.up="Help Button",
.down="Refine Button",}},
});
}

@ -42,7 +42,8 @@ All rights reserved.
#include "State_LevelComplete.h"
#include "State_Story.h"
#include "State_GameHub.h"
#include "State_Death.h";
#include "State_Death.h"
#include "State_Dialog.h"
INCLUDE_game
@ -56,6 +57,7 @@ void GameState::Initialize(){
NEW_STATE(States::STORY,State_Story);
NEW_STATE(States::GAME_HUB,State_GameHub);
NEW_STATE(States::DEATH,State_Death);
NEW_STATE(States::DIALOG,State_Dialog);
}
void GameState::_ChangeState(States::State newState){

@ -51,6 +51,7 @@ namespace States{
MAIN_MENU,
LEVEL_COMPLETE,
STORY,
DIALOG,
KEYBIND,
DEATH,
};

@ -118,6 +118,7 @@ void Menu::InitializeMenus(){
InitializePauseWindow();
InitializeDeathWindow();
InitializeCreditsWindow();
InitializeArtificerWindow();
for(MenuType type=MenuType(int(MenuType::ENUM_START)+1);type<MenuType::ENUM_END;type=MenuType(int(type+1))){
if(menus.count(type)==0){

@ -112,6 +112,7 @@ class Menu:public IAttributable{
static void InitializePauseWindow();
static void InitializeDeathWindow();
static void InitializeCreditsWindow();
static void InitializeArtificerWindow();
friend class AiL;
friend class ItemInfo;

@ -69,6 +69,7 @@ enum MenuType{
PAUSE, //100% Controller Compatibility
DEATH, //100% Controller Compatibility
CREDITS, //100% Controller Compatibility
ARTIFICER, //100% Controller Compatibility
///////////////////////////////////////////////////////////
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
///////////////////////////////////////////////////////////

@ -45,6 +45,7 @@ All rights reserved.
#include "RowInventoryScrollableWindowComponent.h"
#include "InventoryCreator.h"
#include "Tutorial.h"
#include "VisualNovel.h"
using A=Attribute;
@ -85,7 +86,12 @@ void Monster::STRATEGY::NPC(Monster&m,float fElapsedTime,std::string strategy){
Menu::OpenMenu(MenuType::MERCHANT);
}else
if(m.npcData.function=="Artificer"){
Menu::OpenMenu(MenuType::MERCHANT);
if(!Tutorial::TaskIsComplete(TutorialTaskName::ARTIFICER_INTRO)){
Tutorial::CompleteTask(TutorialTaskName::ARTIFICER_INTRO);
VisualNovel::LoadDialog("ARTIFICER_INTRO",[](){Menu::OpenMenu(MenuType::ARTIFICER);});
}else{
Menu::OpenMenu(MenuType::ARTIFICER);
}
}
}
}else{

@ -0,0 +1,55 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2024 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#include "State_Dialog.h"
#include "VisualNovel.h"
#include "Menu.h"
#include "AdventuresInLestoria.h"
void State_Dialog::OnStateChange(GameState*prevState){
Menu::CloseAllMenus();
};
void State_Dialog::OnLevelLoad(){}
void State_Dialog::OnUserUpdate(AiL*game){
GameState::states[States::GAME_RUN]->OnUserUpdate(game);
VisualNovel::novel.Update();
game->ClearTimedOutGarbage();
};
void State_Dialog::Draw(AiL*game){
GameState::states[States::GAME_RUN]->Draw(game);
VisualNovel::novel.Draw(0U);
};

@ -0,0 +1,46 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2024 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#pragma once
#include "GameState.h"
class State_Dialog:public GameState {
virtual void OnStateChange(GameState*prevState)override final;
virtual void OnUserUpdate(AiL*game)override final;
virtual void Draw(AiL*game)override final;
virtual void OnLevelLoad()override final;
};

@ -51,6 +51,7 @@ void Tutorial::Initialize(){
CREATETASK(TutorialTaskName::USE_RECOVERY_ITEMS,UseRecoveryItemsTask);
CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask);
CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask);
CREATETASK(TutorialTaskName::ARTIFICER_INTRO,ArtificerIntroductionTask);
currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM;
ResetTasks();
}

@ -63,6 +63,7 @@ enum class TutorialTaskName{
USE_RECOVERY_ITEMS,
BLACKSMITH,
EQUIP_GEAR,
ARTIFICER_INTRO,
NONE,
};
@ -355,4 +356,14 @@ private:
startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"to equip your new gear.",255,InputType::KEY,{0.85f,1.f},"Open the #FFCF0CCharacter#FFFFFF menu with ");
}
}
};
class ArtificerIntroductionTask:public TutorialTask{
public:
inline ArtificerIntroductionTask():TutorialTask(){};
private:
virtual inline bool CompleteCondition()override final{
return false;
}
virtual inline void OnComplete()override final{}
};

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 3
#define VERSION_BUILD 10399
#define VERSION_BUILD 10402
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -184,14 +184,29 @@ void VisualNovel::Initialize(){
storyLevelData.SetInitialized();
};
void VisualNovel::Reset(){
activeText=U"";
leftCharacters.clear();
rightCharacters.clear();
backgroundFilename=novel.prevBackgroundFilename="";
commands.clear();
commandIndex=0;
}
void VisualNovel::LoadDialog(std::string dialogName,std::function<void()>dialogFinishedCallbackFunc){
novel.dialogFinishedCallbackFunc=dialogFinishedCallbackFunc;
novel.storyLevel=dialogName;
novel.Reset();
for(std::unique_ptr<Command>&command:storyLevelData.at(dialogName)){
novel.commands.push_back(command.get());
}
GameState::ChangeState(States::DIALOG);
novel.ExecuteNextCommand();
novel.prevTheme=Menu::GetCurrentTheme().GetThemeName();
Menu::themeSelection="Purple";
}
void VisualNovel::LoadVisualNovel(std::string storyLevelName){
novel.storyLevel=storyLevelName;
novel.activeText=U"";
novel.leftCharacters.clear();
novel.rightCharacters.clear();
novel.backgroundFilename=novel.prevBackgroundFilename="";
novel.commands.clear();
novel.commandIndex=0;
novel.Reset();
for(std::unique_ptr<Command>&command:storyLevelData.at(storyLevelName)){
novel.commands.push_back(command.get());
}
@ -219,25 +234,31 @@ void VisualNovel::ExecuteNextCommand(){
commandIndex++;
commands[size_t(commandIndex-1)]->Execute(novel);
}else{
if(game->GetCurrentMapName()=="NPCs.Greg.Camp Notification Unlock Condition"_S&&
!Unlock::IsUnlocked("NPCs.Greg.Camp Notification Unlock Condition"_S))State_OverworldMap::ConnectionPointFromString("HUB").value()->ResetVisitedFlag();
Unlock::UnlockCurrentMap();
Menu::themeSelection=novel.prevTheme;
GameState::ChangeState(States::OVERWORLD_MAP,0.5f);
if(GameState::STATE==GameState::states[States::DIALOG]){
Reset();
GameState::STATE=GameState::states[States::GAME_RUN];
dialogFinishedCallbackFunc();
}else{
if(game->GetCurrentMapName()=="NPCs.Greg.Camp Notification Unlock Condition"_S&&
!Unlock::IsUnlocked("NPCs.Greg.Camp Notification Unlock Condition"_S))State_OverworldMap::ConnectionPointFromString("HUB").value()->ResetVisitedFlag();
Unlock::UnlockCurrentMap();
Menu::themeSelection=novel.prevTheme;
GameState::ChangeState(States::OVERWORLD_MAP,0.5f);
}
}
}
void VisualNovel::Draw(){
void VisualNovel::Draw(const uint8_t backgroundAlpha){
if(backgroundFilename!=""){
float alpha=1;
float alpha=backgroundAlpha/255.f;
if(transitionTime>0){
alpha=util::lerp(0,1,1-(transitionTime/maxTransitionTime));
alpha=alpha*util::lerp(0,1,1-(transitionTime/maxTransitionTime));
}
if(prevBackgroundFilename!=""){
game->DrawDecal({0,-prevBackgroundScrollAmt},GFX["story_background_image_location"_S+prevBackgroundFilename].Decal());
game->DrawDecal({0,-prevBackgroundScrollAmt},GFX["story_background_image_location"_S+prevBackgroundFilename].Decal(),{1.f,1.f},{255,255,255,backgroundAlpha});
}
game->DrawDecal({0,-backgroundScrollAmt},GFX["story_background_image_location"_S+backgroundFilename].Decal(),{1,1},{255,255,255,uint8_t(255*alpha)});
}else{
game->FillRectDecal({0,0},game->GetScreenSize());
game->FillRectDecal({0,0},game->GetScreenSize(),{255,255,255,backgroundAlpha});
}
for(int i=leftCharacters.size()-1;i>=0;i--){
//Start 72 from the bottom.

@ -142,6 +142,7 @@ public:
class VisualNovel{
friend class State_Story;
friend class State_Dialog;
friend class AiL;
friend class Command;
friend class LocationCommand;
@ -154,7 +155,7 @@ class VisualNovel{
friend class AudioPitchCommand;
std::string storyLevel;
std::u32string speakerDisplayName=U"";
std::u32string actualSpeakerName=U"";
std::u32string actualSpeakerName=U"";
std::u32string activeText;
std::vector<std::string>leftCharacters;
std::vector<std::string>rightCharacters;
@ -173,6 +174,7 @@ class VisualNovel{
float prevBackgroundScrollAmt=0;
static constexpr float maxTextScrollTime=1.0f;
float audioPitch=1.f;
std::function<void()>dialogFinishedCallbackFunc{[](){}};
public:
static Font font,narratorFont,locationFont;
private:
@ -181,13 +183,15 @@ private:
static VisualNovel novel;
VisualNovel();
void Reset();
public:
VisualNovel(VisualNovel&)=delete;
VisualNovel(VisualNovel&&)=delete;
static void Initialize();
static void LoadDialog(std::string dialogName,std::function<void()>dialogFinishedCallbackFunc=[](){});
static void LoadVisualNovel(std::string storyLevelName);
void ExecuteNextCommand();
void Update();
void Draw();
void Draw(const uint8_t backgroundAlpha=255U);
std::string GetCharacterImage(std::u32string name);
};

@ -1,3 +1,3 @@
#include <string>
std::string PACK_KEY="INSERT_PACK_KEY_HERE";
std::string PACK_KEY="129jvgndsaf7dsa8932hJj0g43j20jajglikvczmlkvcmzx/";
Loading…
Cancel
Save