Add disabling of return to camp button when already at the camp or the camp has yet to be unlocked. Release Build 7644.

pull/35/head
sigonasr2 9 months ago
parent 53b5c1f967
commit e8ac5a957f
  1. 28
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 8
      Adventures in Lestoria/State_GameRun.cpp
  3. 9
      Adventures in Lestoria/State_OverworldMap.cpp
  4. 2
      Adventures in Lestoria/TODO.txt
  5. 2
      Adventures in Lestoria/Version.h
  6. 4
      Adventures in Lestoria/olcUTIL_Geometry2D.h
  7. BIN
      x64/Release/Adventures in Lestoria.exe

@ -1176,7 +1176,7 @@ void AiL::RenderWorld(float fElapsedTime){
m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy()); m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy());
it=monstersBeforeLower.erase(it); it=monstersBeforeLower.erase(it);
if(it==monstersBeforeLower.end())break; if(it==monstersBeforeLower.end())break;
--it; if(it!=monstersBeforeLower.begin())--it;
continue; continue;
} }
break; break;
@ -1187,7 +1187,7 @@ void AiL::RenderWorld(float fElapsedTime){
b.Draw(); b.Draw();
it=bulletsLower.erase(it); it=bulletsLower.erase(it);
if(it==bulletsLower.end())break; if(it==bulletsLower.end())break;
--it; if(it!=bulletsLower.begin())--it;
continue; continue;
} }
break; break;
@ -1198,7 +1198,7 @@ void AiL::RenderWorld(float fElapsedTime){
e.Draw(); e.Draw();
it=backgroundEffectsLower.erase(it); it=backgroundEffectsLower.erase(it);
if(it==backgroundEffectsLower.end())break; if(it==backgroundEffectsLower.end())break;
--it; if(it!=backgroundEffectsLower.begin())--it;
continue; continue;
} }
break; break;
@ -1209,7 +1209,7 @@ void AiL::RenderWorld(float fElapsedTime){
drop.Draw(); drop.Draw();
it=dropsBeforeLower.erase(it); it=dropsBeforeLower.erase(it);
if(it==dropsBeforeLower.end())break; if(it==dropsBeforeLower.end())break;
--it; if(it!=dropsBeforeLower.begin())--it;
continue; continue;
} }
break; break;
@ -1229,7 +1229,7 @@ void AiL::RenderWorld(float fElapsedTime){
m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy()); m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy());
it=monstersAfterLower.erase(it); it=monstersAfterLower.erase(it);
if(it==monstersAfterLower.end())break; if(it==monstersAfterLower.end())break;
--it; if(it!=monstersAfterLower.begin())--it;
continue; continue;
} }
break; break;
@ -1240,7 +1240,7 @@ void AiL::RenderWorld(float fElapsedTime){
drop.Draw(); drop.Draw();
it=dropsAfterLower.erase(it); it=dropsAfterLower.erase(it);
if(it==dropsAfterLower.end())break; if(it==dropsAfterLower.end())break;
--it; if(it!=dropsAfterLower.begin())--it;
continue; continue;
} }
break; break;
@ -1251,7 +1251,7 @@ void AiL::RenderWorld(float fElapsedTime){
e.Draw(); e.Draw();
it=foregroundEffectsLower.erase(it); it=foregroundEffectsLower.erase(it);
if(it==foregroundEffectsLower.end())break; if(it==foregroundEffectsLower.end())break;
--it; if(it!=foregroundEffectsLower.begin())--it;
continue; continue;
} }
break; break;
@ -1423,7 +1423,7 @@ void AiL::RenderWorld(float fElapsedTime){
m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy()); m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy());
it=monstersBeforeUpper.erase(it); it=monstersBeforeUpper.erase(it);
if(it==monstersBeforeUpper.end())break; if(it==monstersBeforeUpper.end())break;
--it; if(it!=monstersBeforeUpper.begin())--it;
continue; continue;
} }
break; break;
@ -1434,7 +1434,7 @@ void AiL::RenderWorld(float fElapsedTime){
b.Draw(); b.Draw();
it=bulletsUpper.erase(it); it=bulletsUpper.erase(it);
if(it==bulletsUpper.end())break; if(it==bulletsUpper.end())break;
--it; if(it!=bulletsUpper.begin())--it;
continue; continue;
} }
break; break;
@ -1445,7 +1445,7 @@ void AiL::RenderWorld(float fElapsedTime){
e.Draw(); e.Draw();
it=backgroundEffectsUpper.erase(it); it=backgroundEffectsUpper.erase(it);
if(it==backgroundEffectsUpper.end())break; if(it==backgroundEffectsUpper.end())break;
--it; if(it!=backgroundEffectsUpper.begin())--it;
continue; continue;
} }
break; break;
@ -1456,7 +1456,7 @@ void AiL::RenderWorld(float fElapsedTime){
drop.Draw(); drop.Draw();
it=dropsBeforeUpper.erase(it); it=dropsBeforeUpper.erase(it);
if(it==dropsBeforeUpper.end())break; if(it==dropsBeforeUpper.end())break;
--it; if(it!=dropsBeforeUpper.begin())--it;
continue; continue;
} }
break; break;
@ -1476,7 +1476,7 @@ void AiL::RenderWorld(float fElapsedTime){
m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy()); m.strategyDraw(this,m,MONSTER_DATA[m.GetName()].GetAIStrategy());
it=monstersAfterUpper.erase(it); it=monstersAfterUpper.erase(it);
if(it==monstersAfterUpper.end())break; if(it==monstersAfterUpper.end())break;
--it; if(it!=monstersAfterUpper.begin())--it;
continue; continue;
} }
break; break;
@ -1487,7 +1487,7 @@ void AiL::RenderWorld(float fElapsedTime){
drop.Draw(); drop.Draw();
it=dropsAfterUpper.erase(it); it=dropsAfterUpper.erase(it);
if(it==dropsAfterUpper.end())break; if(it==dropsAfterUpper.end())break;
--it; if(it!=dropsAfterUpper.begin())--it;
continue; continue;
} }
break; break;
@ -1498,7 +1498,7 @@ void AiL::RenderWorld(float fElapsedTime){
e.Draw(); e.Draw();
it=foregroundEffectsUpper.erase(it); it=foregroundEffectsUpper.erase(it);
if(it==foregroundEffectsUpper.end())break; if(it==foregroundEffectsUpper.end())break;
--it; if(it!=foregroundEffectsUpper.begin())--it;
continue; continue;
} }
break; break;

@ -43,6 +43,8 @@ All rights reserved.
#include "VisualNovel.h" #include "VisualNovel.h"
#include "State_OverworldMap.h" #include "State_OverworldMap.h"
#include "GameEvent.h" #include "GameEvent.h"
#include "MenuComponent.h"
#include "Unlock.h"
INCLUDE_MONSTER_LIST INCLUDE_MONSTER_LIST
INCLUDE_game INCLUDE_game
@ -73,7 +75,11 @@ void State_GameRun::OnStateChange(GameState*prevState){
game->LoadLevel(State_OverworldMap::GetCurrentConnectionPoint().map); game->LoadLevel(State_OverworldMap::GetCurrentConnectionPoint().map);
} }
void State_GameRun::OnLevelLoad(){} void State_GameRun::OnLevelLoad(){
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(
!Unlock::IsUnlocked("HUB")||game->GetCurrentMapName()=="HUB"
);
}
void State_GameRun::OnUserUpdate(AiL*game){ void State_GameRun::OnUserUpdate(AiL*game){
game->bossDisplayTimer=std::max(0.f,game->bossDisplayTimer-game->GetElapsedTime()); game->bossDisplayTimer=std::max(0.f,game->bossDisplayTimer-game->GetElapsedTime());
if(game->encounterStarted&&game->totalBossEncounterMobs>0){ if(game->encounterStarted&&game->totalBossEncounterMobs>0){

@ -92,15 +92,6 @@ void State_OverworldMap::OnUserUpdate(AiL*game){
game->UpdateCamera(game->GetElapsedTime()); game->UpdateCamera(game->GetElapsedTime());
game->GetPlayer()->Update(game->GetElapsedTime()); game->GetPlayer()->Update(game->GetElapsedTime());
if(game->GetKey(PGUP).bHeld){
mosaicAmt+=game->GetElapsedTime()*10;
game->SetMosaicEffect(uint8_t(mosaicAmt));
}
if(game->GetKey(PGDN).bHeld){
mosaicAmt-=game->GetElapsedTime()*10;
game->SetMosaicEffect(uint8_t(mosaicAmt));
}
if(game->GetPlayer()->GetPos()!=playerTargetPos){ if(game->GetPlayer()->GetPos()!=playerTargetPos){
if(geom2d::line<float>(game->GetPlayer()->GetPos(),playerTargetPos).length()<2){ if(geom2d::line<float>(game->GetPlayer()->GetPos(),playerTargetPos).length()<2){
game->GetPlayer()->SetPos(playerTargetPos); game->GetPlayer()->SetPos(playerTargetPos);

@ -3,8 +3,6 @@ March 6th -> Discord/Friend Playtesting
March 30th -> Public Demo Release March 30th -> Public Demo Release
- Foreground tile depth correction for tiles w/hitboxes
- Add Death screen (Zoom in on fatal blow, slow time down... Display some game over text... Allow retry or return to world map.) - Add Death screen (Zoom in on fatal blow, slow time down... Display some game over text... Allow retry or return to world map.)
- Track items used during a stage, on death, restore the loadout item quantities used. - Track items used during a stage, on death, restore the loadout item quantities used.

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 3 #define VERSION_MINOR 3
#define VERSION_PATCH 0 #define VERSION_PATCH 0
#define VERSION_BUILD 7635 #define VERSION_BUILD 7644
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

@ -580,8 +580,12 @@ namespace olc::utils::geom2d
// Given a real distance, get point along line // Given a real distance, get point along line
inline constexpr olc::v_2d<T> rpoint(const T& distance) const inline constexpr olc::v_2d<T> rpoint(const T& distance) const
{ {
if(distance<=0){
return start;
}else{
return start + vector().norm() * distance; return start + vector().norm() * distance;
} }
}
// Given a unit distance, get point along line // Given a unit distance, get point along line
inline constexpr olc::v_2d<T> upoint(const T& distance) const inline constexpr olc::v_2d<T> upoint(const T& distance) const

Loading…
Cancel
Save