diff --git a/Adventures in Lestoria/State_GameHub.cpp b/Adventures in Lestoria/State_GameHub.cpp index 038174eb..4c8c2d08 100644 --- a/Adventures in Lestoria/State_GameHub.cpp +++ b/Adventures in Lestoria/State_GameHub.cpp @@ -55,7 +55,11 @@ void State_GameHub::OnStateChange(GameState*prevState){ if(Menu::IsMenuOpen()){ Menu::CloseAllMenus(); } - + + if(Unlock::IsUnlocked("STORY_1_3")&&!Tutorial::TaskIsComplete(TutorialTaskName::CLEAR_DEMO)){ + Tutorial::SetNextTask(TutorialTaskName::CLEAR_DEMO); + } + else if(Unlock::IsUnlocked("STORY_1_2")&&!Tutorial::TaskIsComplete(TutorialTaskName::BLACKSMITH)){ Tutorial::SetNextTask(TutorialTaskName::BLACKSMITH); } diff --git a/Adventures in Lestoria/State_OverworldMap.cpp b/Adventures in Lestoria/State_OverworldMap.cpp index 5a030102..2fceb5e0 100644 --- a/Adventures in Lestoria/State_OverworldMap.cpp +++ b/Adventures in Lestoria/State_OverworldMap.cpp @@ -48,6 +48,7 @@ All rights reserved. #include "State_OverworldMap.h" #include "SaveFile.h" #include "Audio.h" +#include "Tutorial.h" INCLUDE_MONSTER_LIST INCLUDE_game diff --git a/Adventures in Lestoria/Tutorial.cpp b/Adventures in Lestoria/Tutorial.cpp index b5e0a21b..95b6aa84 100644 --- a/Adventures in Lestoria/Tutorial.cpp +++ b/Adventures in Lestoria/Tutorial.cpp @@ -52,6 +52,7 @@ void Tutorial::Initialize(){ CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask); CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask); CREATETASK(TutorialTaskName::ARTIFICER_INTRO,ArtificerIntroductionTask); + CREATETASK(TutorialTaskName::CLEAR_DEMO,ClearDemoTask); currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM; ResetTasks(); } diff --git a/Adventures in Lestoria/Tutorial.h b/Adventures in Lestoria/Tutorial.h index 661b9683..2e86f4b2 100644 --- a/Adventures in Lestoria/Tutorial.h +++ b/Adventures in Lestoria/Tutorial.h @@ -51,6 +51,7 @@ All rights reserved. using A=Attribute; INCLUDE_game +INCLUDE_DEMO_BUILD #undef BLACKSMITH @@ -64,6 +65,7 @@ enum class TutorialTaskName{ BLACKSMITH, EQUIP_GEAR, ARTIFICER_INTRO, + CLEAR_DEMO, NONE, }; @@ -378,4 +380,21 @@ private: float textWidth=game->GetTextSizeProp(helpText).x; game->DrawShadowStringPropDecal({game->ScreenWidth()/2.f-textWidth/2.f,48.f},helpText); } +}; + +class ClearDemoTask:public TutorialTask{ +public: + inline ClearDemoTask():TutorialTask(){}; +private: + virtual inline void OnActivate()override final{ + } + virtual inline bool CompleteCondition()override final{ + return !DEMO_BUILD||GameState::STATE==GameState::states.at(States::OVERWORLD_MAP); + } + virtual void OnComplete()override final{} + virtual inline void Draw()const override final{ + std::string helpText="#FFFF00Thank you for playing this demo!\n#00FF00Game Releases on December 20th!"; + float textWidth=game->GetWrappedTextSizeProp(helpText,game->ScreenWidth()-24.f).x; + game->DrawShadowStringPropDecal({game->ScreenWidth()/2.f-textWidth/2.f,48.f},helpText,WHITE,BLACK,{1.f,1.f},{1.f,1.f},game->ScreenWidth()-24.f); + } }; \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 0a77fb04..8138ad6b 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -37,9 +37,9 @@ All rights reserved. #pragma endregion #pragma once #define VERSION_MAJOR 1 -#define VERSION_MINOR 2 -#define VERSION_PATCH 5 -#define VERSION_BUILD 11558 +#define VERSION_MINOR 3 +#define VERSION_PATCH 0 +#define VERSION_BUILD 11561 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index ce5f2e48..e99ecef2 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ