Fix crash when hovering over a blank item loadout slot in the item loadout menu. Tutorial tasks now are only drawn while a stage is being actively played. Tutorial tasks get cleared upon a stage completion. Release Build 8210.

mac-build
sigonasr2 9 months ago
parent 3aaa79eda4
commit bf2a2982c9
  1. 1
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 18
      Adventures in Lestoria/ItemLoadoutWindow.cpp
  3. 1
      Adventures in Lestoria/State_GameRun.cpp
  4. 2
      Adventures in Lestoria/State_LevelComplete.cpp
  5. 4
      Adventures in Lestoria/TODO.txt
  6. 4
      Adventures in Lestoria/Tutorial.cpp
  7. 1
      Adventures in Lestoria/Tutorial.h
  8. 2
      Adventures in Lestoria/Version.h
  9. BIN
      x64/Release/Adventures in Lestoria.exe

@ -355,7 +355,6 @@ bool AiL::OnUserUpdate(float fElapsedTime){
Audio::Update(); Audio::Update();
GameState::STATE->Draw(this); GameState::STATE->Draw(this);
RenderMenu(); RenderMenu();
Tutorial::Draw();
GameState::STATE->DrawOverlay(this); GameState::STATE->DrawOverlay(this);
RenderFadeout(); RenderFadeout();
LoadingScreen::Draw(); LoadingScreen::Draw();

@ -63,8 +63,10 @@ void Menu::InitializeItemLoadoutWindow(){
return true; return true;
},[](MenuFuncData data){ },[](MenuFuncData data){
std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component); std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component);
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName()); if(!ISBLANK(loadoutButton.lock()->GetItem())){
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description()); Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
}
return true; return true;
},[](MenuFuncData data){ },[](MenuFuncData data){
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(""); Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
@ -78,8 +80,10 @@ void Menu::InitializeItemLoadoutWindow(){
return true; return true;
},[](MenuFuncData data){ },[](MenuFuncData data){
std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component); std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component);
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName()); if(!ISBLANK(loadoutButton.lock()->GetItem())){
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description()); Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
}
return true; return true;
},[](MenuFuncData data){ },[](MenuFuncData data){
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(""); Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
@ -93,8 +97,10 @@ void Menu::InitializeItemLoadoutWindow(){
return true; return true;
},[](MenuFuncData data){ },[](MenuFuncData data){
std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component); std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component);
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName()); if(!ISBLANK(loadoutButton.lock()->GetItem())){
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description()); Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
}
return true; return true;
},[](MenuFuncData data){ },[](MenuFuncData data){
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(""); Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");

@ -93,4 +93,5 @@ void State_GameRun::OnUserUpdate(AiL*game){
void State_GameRun::Draw(AiL*game){ void State_GameRun::Draw(AiL*game){
game->RenderWorld(game->GetElapsedTime()); game->RenderWorld(game->GetElapsedTime());
game->RenderHud(); game->RenderHud();
Tutorial::Draw();
} }

@ -44,6 +44,7 @@ All rights reserved.
#include "ProgressBar.h" #include "ProgressBar.h"
#include "SoundEffect.h" #include "SoundEffect.h"
#include "Unlock.h" #include "Unlock.h"
#include "Tutorial.h"
INCLUDE_MONSTER_LIST INCLUDE_MONSTER_LIST
INCLUDE_game INCLUDE_game
@ -85,6 +86,7 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
game->GetPlayer()->AddXP(game->GetPlayer()->GetAccumulatedXP()); game->GetPlayer()->AddXP(game->GetPlayer()->GetAccumulatedXP());
Tutorial::GiveUpCurrentTask();
game->GetPlayer()->SetState(State::NORMAL); game->GetPlayer()->SetState(State::NORMAL);
Menu::OpenMenu(LEVEL_COMPLETE); Menu::OpenMenu(LEVEL_COMPLETE);
}; };

@ -13,7 +13,3 @@ Toggle for displaying error messages
Equip Gear using Start menu tutorial Equip Gear using Start menu tutorial
Steam Controller SDK Steam Controller SDK
Add in vsync system option Add in vsync system option
Hint text does not appear except during actual gameplay.
Terrain Collision Boxes

@ -127,3 +127,7 @@ void Tutorial::Draw(){
const bool Tutorial::TaskIsComplete(TutorialTaskName task){ const bool Tutorial::TaskIsComplete(TutorialTaskName task){
return taskList.at(task)->IsComplete(); return taskList.at(task)->IsComplete();
} }
void Tutorial::GiveUpCurrentTask(){
SetNextTask(TutorialTaskName::NONE);
}

@ -91,6 +91,7 @@ public:
static void SetNextTask(TutorialTaskName task); static void SetNextTask(TutorialTaskName task);
static TutorialTask&GetTask(TutorialTaskName task); static TutorialTask&GetTask(TutorialTaskName task);
static void CompleteTask(TutorialTaskName task); static void CompleteTask(TutorialTaskName task);
static void GiveUpCurrentTask();
private: private:
static TutorialTaskName currentTaskState; static TutorialTaskName currentTaskState;
static std::map<TutorialTaskName,std::unique_ptr<TutorialTask>>taskList; static std::map<TutorialTaskName,std::unique_ptr<TutorialTask>>taskList;

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 5 #define VERSION_MINOR 5
#define VERSION_PATCH 1 #define VERSION_PATCH 1
#define VERSION_BUILD 8208 #define VERSION_BUILD 8210
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

Loading…
Cancel
Save