diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 098e1a9f..57bf1cbe 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -1282,7 +1282,7 @@ void Player::AddXP(const uint32_t xpGain){ totalXPEarned+=xpGain; if(Level()nextLevelXP){ + while(currentLevelXP>=nextLevelXP){ currentLevelXP-=nextLevelXP; SetLevel(Level()+1); OnLevelUp(); diff --git a/Adventures in Lestoria/State_Death.cpp b/Adventures in Lestoria/State_Death.cpp index ce2b4e94..c9890376 100644 --- a/Adventures in Lestoria/State_Death.cpp +++ b/Adventures in Lestoria/State_Death.cpp @@ -101,5 +101,7 @@ void State_Death::OnUserUpdate(AiL*game){ accTime=0.f; } } + + game->ClearTimedOutGarbage(); } void State_Death::Draw(AiL*game){} \ No newline at end of file diff --git a/Adventures in Lestoria/State_GameHub.cpp b/Adventures in Lestoria/State_GameHub.cpp index b81cafbd..e1feeb6c 100644 --- a/Adventures in Lestoria/State_GameHub.cpp +++ b/Adventures in Lestoria/State_GameHub.cpp @@ -64,6 +64,7 @@ void State_GameHub::OnLevelLoad(){ } void State_GameHub::OnUserUpdate(AiL*game){ State_GameRun::OnUserUpdate(game); + game->ClearTimedOutGarbage(); } void State_GameHub::Draw(AiL*game){ State_GameRun::Draw(game); diff --git a/Adventures in Lestoria/State_LevelComplete.cpp b/Adventures in Lestoria/State_LevelComplete.cpp index d9c6d062..5f0977f0 100644 --- a/Adventures in Lestoria/State_LevelComplete.cpp +++ b/Adventures in Lestoria/State_LevelComplete.cpp @@ -124,6 +124,8 @@ void State_LevelComplete::OnUserUpdate(AiL*game){ }else{ Audio::Engine().SetVolume(xpGainSound,0.f); } + + game->ClearTimedOutGarbage(); }; void State_LevelComplete::Draw(AiL*game){ game->RenderHud(); diff --git a/Adventures in Lestoria/State_MainMenu.cpp b/Adventures in Lestoria/State_MainMenu.cpp index 6764821b..f0acad6f 100644 --- a/Adventures in Lestoria/State_MainMenu.cpp +++ b/Adventures in Lestoria/State_MainMenu.cpp @@ -74,6 +74,8 @@ void State_MainMenu::OnUserUpdate(AiL*game){ ItemDrop::UpdateDrops(game->GetElapsedTime()); game->UpdateBullets(game->GetElapsedTime()); game->UpdateCamera(game->GetElapsedTime()); + + game->ClearTimedOutGarbage(); }; void State_MainMenu::Draw(AiL*game){ TitleScreen::Draw(); diff --git a/Adventures in Lestoria/State_OverworldMap.cpp b/Adventures in Lestoria/State_OverworldMap.cpp index 7b4b64e8..294452db 100644 --- a/Adventures in Lestoria/State_OverworldMap.cpp +++ b/Adventures in Lestoria/State_OverworldMap.cpp @@ -151,6 +151,8 @@ void State_OverworldMap::OnUserUpdate(AiL*game){ if(abs(game->KEY_SCROLLVERT_L.Analog())<0.2f&&abs(game->KEY_SCROLLHORZ_L.Analog())<0.2f){ analogMove=false; } + + game->ClearTimedOutGarbage(); }; void State_OverworldMap::Draw(AiL*game){ currentTime+=game->GetElapsedTime(); diff --git a/Adventures in Lestoria/State_Story.cpp b/Adventures in Lestoria/State_Story.cpp index de20d801..194589df 100644 --- a/Adventures in Lestoria/State_Story.cpp +++ b/Adventures in Lestoria/State_Story.cpp @@ -38,6 +38,7 @@ All rights reserved. #include "State_Story.h" #include "VisualNovel.h" #include "Menu.h" +#include "AdventuresInLestoria.h" void State_Story::OnStateChange(GameState*prevState){ Menu::CloseAllMenus(); @@ -45,6 +46,7 @@ void State_Story::OnStateChange(GameState*prevState){ void State_Story::OnLevelLoad(){} void State_Story::OnUserUpdate(AiL*game){ VisualNovel::novel.Update(); + game->ClearTimedOutGarbage(); }; void State_Story::Draw(AiL*game){ VisualNovel::novel.Draw(); diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index ce7b134e..ea9af8d1 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -10,8 +10,4 @@ should gemstones dropp from boss stages aswell? (Maybe lower droprate?) Funny text colors with text color override on blacksmith menu -Toggle for displaying error messages - -Fix size of icons in merchant menus. -Sherman's consumable crafting menu needs enabling/disabling of +/- buttons -Label doesn't constantly update in the merchant window. \ No newline at end of file +Toggle for displaying error messages \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 17909534..b1ceb873 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 5 #define VERSION_PATCH 1 -#define VERSION_BUILD 8066 +#define VERSION_BUILD 8068 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/nico-Ranger_512.png b/Adventures in Lestoria/assets/nico-Ranger_512.png index 3e1dada7..490f5fd9 100644 Binary files a/Adventures in Lestoria/assets/nico-Ranger_512.png and b/Adventures in Lestoria/assets/nico-Ranger_512.png differ diff --git a/Adventures in Lestoria/olcPGEX_ViewPort.h b/Adventures in Lestoria/olcPGEX_ViewPort.h index 7444191c..09387635 100644 --- a/Adventures in Lestoria/olcPGEX_ViewPort.h +++ b/Adventures in Lestoria/olcPGEX_ViewPort.h @@ -707,7 +707,7 @@ void olc::ViewPort::DrawShadowStringDecal(const olc::vf2d& pos, std::string_view vi2d imageSize=pge->GetWrappedTextSize(sText,width,scale); Decal*newDecal=nullptr; if(!pge->garbageCollector.count(key)){ - newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.y/scale.x)); + newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.x/scale.x)); pge->garbageCollector[key].decal=newDecal; }else{ newDecal=pge->garbageCollector[key].decal; @@ -754,7 +754,7 @@ void olc::ViewPort::DrawShadowStringPropDecal(const olc::vf2d& pos, std::string_ vi2d imageSize=pge->GetWrappedTextSizeProp(sText,width,scale); Decal*newDecal=nullptr; if(!pge->garbageCollector.count(key)){ - newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.y/scale.x)); + newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.x/scale.x)); pge->garbageCollector[key].decal=newDecal; }else{ newDecal=pge->garbageCollector[key].decal; diff --git a/Adventures in Lestoria/olcPixelGameEngine.h b/Adventures in Lestoria/olcPixelGameEngine.h index 0c8855d8..f3197d98 100644 --- a/Adventures in Lestoria/olcPixelGameEngine.h +++ b/Adventures in Lestoria/olcPixelGameEngine.h @@ -3552,7 +3552,7 @@ namespace olc vi2d imageSize=GetWrappedTextSize(sText,width,scale); Decal*newDecal=nullptr; if(!garbageCollector.count(key)){ - newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.y/scale.x)); + newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.x/scale.x)); garbageCollector[key].decal=newDecal; }else{ newDecal=garbageCollector[key].decal; @@ -3654,7 +3654,7 @@ namespace olc vi2d imageSize=GetWrappedTextSizeProp(sText,width,scale); Decal*newDecal=nullptr; if(!garbageCollector.count(key)){ - newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.y/scale.x)); + newDecal=new Decal(new Sprite(imageSize.x/scale.x,imageSize.x/scale.x)); garbageCollector[key].decal=newDecal; }else{ newDecal=garbageCollector[key].decal; diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 7c078c44..a423d5e7 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ