diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index f8b9185b..f98c2371 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -706,6 +706,10 @@ void AiL::UpdateCamera(float fElapsedTime){ worldShake=player->GetPos()+worldShakeVel; } camera.Update(fElapsedTime); + if(view.GetZoom().x!=targetZoom){ + if(view.GetZoom().xview.SetZoom(1.f,game->view.WorldToScreen(game->camera.GetViewPosition())); + targetZoom=1.f; + game->view.SetZoom(1.2f,game->view.WorldToScreen(game->camera.GetViewPosition())); worldColor=WHITE; worldColorFunc=[&](vi2d pos){return game->worldColor;}; levelTime=0; @@ -2371,7 +2376,6 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ Inventory::ResetLoadoutItemsUsed(); Input::StopVibration(); - Input::SetLightbar({255,0,255}); GetPlayer()->hp=GetPlayer()->GetMaxHealth(); GetPlayer()->mana=GetPlayer()->GetMaxMana(); diff --git a/Adventures in Lestoria/AdventuresInLestoria.h b/Adventures in Lestoria/AdventuresInLestoria.h index 98c63e34..13e53480 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.h +++ b/Adventures in Lestoria/AdventuresInLestoria.h @@ -225,6 +225,8 @@ private: std::optionalbossIndicatorPos{}; bool steamAPIEnabled{true}; Overlay hudOverlay{"pixel.png",BLANK}; + float targetZoom{1.f}; + float zoomAdjustSpeed{0.1f}; public: AiL(); bool OnUserCreate() override; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 72705c2a..c26a25ae 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 10093 +#define VERSION_BUILD 10094 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/olcPGEX_TransformedView.h b/Adventures in Lestoria/olcPGEX_TransformedView.h index a009cd6b..b5dea462 100644 --- a/Adventures in Lestoria/olcPGEX_TransformedView.h +++ b/Adventures in Lestoria/olcPGEX_TransformedView.h @@ -102,6 +102,7 @@ namespace olc olc::vf2d GetWorldVisibleArea() const; void ZoomAtScreenPos(const float fDeltaZoom, const olc::vi2d& vPos); void SetZoom(const float fZoom, const olc::vf2d& vPos); + const vf2d&GetZoom()const; void StartPan(const olc::vi2d& vPos); void UpdatePan(const olc::vi2d& vPos); void EndPan(const olc::vi2d& vPos); @@ -292,6 +293,10 @@ namespace olc m_vWorldOffset += vOffsetBeforeZoom - vOffsetAfterZoom; } + const vf2d&TransformedView::GetZoom()const{ + return m_vWorldScale; + } + void TransformedView::StartPan(const olc::vi2d& vPos) { m_bPanning = true; diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 017c7f6e..d230771f 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ