diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index 72e3504e..db2ffa7e 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -3408,7 +3408,7 @@ void AiL::DrawPie(vf2d center,float radius,float degreesCut,Pixel col){ DrawPolygonDecal(nullptr,circleCooldownPoints,circleCooldownPoints,std::max(1,int(degreesCut/4)),center,radius,col); } -void AiL::DrawPieArc(const std::string_view texture,vf2d center,float radius,float degreesCut,Pixel col){ +void AiL::DrawPieArc(const std::string&texture,vf2d center,float radius,float degreesCut,Pixel col){ std::vectordonutUVs{}; bool first{true}; std::transform(game->circleCooldownPoints.begin(),game->circleCooldownPoints.end(),std::back_inserter(donutUVs),[&first](const vf2d&point){ @@ -3417,7 +3417,7 @@ void AiL::DrawPieArc(const std::string_view texture,vf2d center,float radius,flo return IsFirstPoint?vf2d{}:vf2d{1,1}; } ); - DrawPolygonDecal(GFX[std::string(texture)].Decal(),circleCooldownPoints,donutUVs,std::max(1,int(degreesCut/4)),center,radius,col); + DrawPolygonDecal(GFX[texture].Decal(),circleCooldownPoints,donutUVs,std::max(1,int(degreesCut/4)),center,radius,col); } void AiL::DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col){ @@ -3603,7 +3603,7 @@ void AiL::InitializeDefaultKeybinds(){ InputGroup::menuNamesToInputGroups.SetInitialized(); } -void AiL::SetBossNameDisplay(std::string name,float time){ +void AiL::SetBossNameDisplay(const std::string&name,float time){ const bool HasNotBeenDisplayedYet=bossName==""; bossName=name; if(HasNotBeenDisplayedYet)bossDisplayTimer=time; //Only display once. @@ -3832,9 +3832,9 @@ void AiL::ValidateGameStatus(){ } } - auto MapStoryDataExists = [&](std::string_view mapName){ + auto MapStoryDataExists = [&](const std::string&mapName){ return MAP_DATA.count(MapName(mapName))>0|| - VisualNovel::storyLevelData.count(std::string(mapName))>0; + VisualNovel::storyLevelData.count(mapName)>0; }; if(!MapStoryDataExists("NPCs.Sherman.Potion Crafting Unlock Condition"_S))ERR(std::format("WARNING! Sherman's Potion Crafting Unlock Condition: {} is not a valid map!","NPCs.Sherman.Potion Crafting Unlock Condition"_S)) diff --git a/Adventures in Lestoria/AdventuresInLestoria.h b/Adventures in Lestoria/AdventuresInLestoria.h index 04cf0bcc..f98d694a 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.h +++ b/Adventures in Lestoria/AdventuresInLestoria.h @@ -335,11 +335,11 @@ public: bool IsReflectiveTile(TilesheetData tileSheet,int tileID); Monster&SpawnMonster(vf2d pos,MonsterData&data,bool upperLevel=false,bool isBossSpawn=false); //Queues a monster for spawning on the next frame. void DrawPie(vf2d center,float radius,float degreesCut,Pixel col); - void DrawPieArc(const std::string_view texture,vf2d center,float radius,float degreesCut,Pixel col); //Draws an arc that has UV coordinates going from (0,0) in the center out to (1,1) + void DrawPieArc(const std::string&texture,vf2d center,float radius,float degreesCut,Pixel col); //Draws an arc that has UV coordinates going from (0,0) in the center out to (1,1) void DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col); void RenderCooldowns(); void InitializeDefaultKeybinds(); - void SetBossNameDisplay(std::string name,float time=5); + void SetBossNameDisplay(const std::string&name,float time=5); bool InBossEncounter(); void StartBossEncounter(); void DisplayBossEncounterInfo(); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 4cc8e345..500ecd0e 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 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 12250 +#define VERSION_BUILD 12258 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/olcPixelGameEngine.h b/Adventures in Lestoria/olcPixelGameEngine.h index abd814c4..dff54a71 100644 --- a/Adventures in Lestoria/olcPixelGameEngine.h +++ b/Adventures in Lestoria/olcPixelGameEngine.h @@ -6914,8 +6914,8 @@ namespace olc WINDOWPLACEMENT placement; GetWindowPlacement(olc_hWnd,&placement); AdjustWindowRectEx(&rWndRect, dwStyle, FALSE, dwExStyle); - int width = rWndRect.right - rWndRect.left; - int height = rWndRect.bottom - rWndRect.top; + int width = std::clamp(LONG(100),LONG(1000),rWndRect.right - rWndRect.left); + int height = std::clamp(LONG(100),LONG(1000),rWndRect.bottom - rWndRect.top); MoveWindow(olc_hWnd,placement.rcNormalPosition.left, placement.rcNormalPosition.top, width, height,true); } } @@ -6973,6 +6973,15 @@ namespace olc ptrPGE->olc_UpdateActualWindowPos(placement.rcNormalPosition.left, placement.rcNormalPosition.top); return 0; } + case WM_GETMINMAXINFO: + { + MINMAXINFO* mmi = (MINMAXINFO*)lParam; + mmi->ptMinTrackSize.x = 450; + mmi->ptMinTrackSize.y = 250; + mmi->ptMaxTrackSize.x = 640; + mmi->ptMaxTrackSize.y = 480; + return 0; + }break; case WM_SIZE: ptrPGE->olc_UpdateWindowSize(lParam & 0xFFFF, (lParam >> 16) & 0xFFFF); return 0; case WM_SIZING: sideBeingDragged = wParam; return 0; case WM_MOUSEWHEEL: ptrPGE->olc_UpdateMouseWheel(GET_WHEEL_DELTA_WPARAM(wParam)); return 0; diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 29171b76..9234234d 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ