Fix having the exact amount of XP not actually leveling you up. Fix strange shadow text clipping for text scaled less than 1.0 vertically. Release Build 8068.

pull/35/head
sigonasr2 9 months ago
parent 5a8a3d64e9
commit 2de0ba3810
  1. 2
      Adventures in Lestoria/Player.cpp
  2. 2
      Adventures in Lestoria/State_Death.cpp
  3. 1
      Adventures in Lestoria/State_GameHub.cpp
  4. 2
      Adventures in Lestoria/State_LevelComplete.cpp
  5. 2
      Adventures in Lestoria/State_MainMenu.cpp
  6. 2
      Adventures in Lestoria/State_OverworldMap.cpp
  7. 2
      Adventures in Lestoria/State_Story.cpp
  8. 4
      Adventures in Lestoria/TODO.txt
  9. 2
      Adventures in Lestoria/Version.h
  10. BIN
      Adventures in Lestoria/assets/nico-Ranger_512.png
  11. 4
      Adventures in Lestoria/olcPGEX_ViewPort.h
  12. 4
      Adventures in Lestoria/olcPixelGameEngine.h
  13. BIN
      x64/Release/Adventures in Lestoria.exe

@ -1282,7 +1282,7 @@ void Player::AddXP(const uint32_t xpGain){
totalXPEarned+=xpGain;
if(Level()<LevelCap()){
uint32_t nextLevelXP=NextLevelXPRequired();
while(currentLevelXP>nextLevelXP){
while(currentLevelXP>=nextLevelXP){
currentLevelXP-=nextLevelXP;
SetLevel(Level()+1);
OnLevelUp();

@ -101,5 +101,7 @@ void State_Death::OnUserUpdate(AiL*game){
accTime=0.f;
}
}
game->ClearTimedOutGarbage();
}
void State_Death::Draw(AiL*game){}

@ -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);

@ -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();

@ -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();

@ -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();

@ -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();

@ -11,7 +11,3 @@ 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.

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -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;

@ -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;

Loading…
Cancel
Save