Block off nonexistent <stacktrace> dependency for web builds. Fix up emscripten build errors with old CMakeCache. Update to C++23 in CMakeLists. Convert CanModifyEquipSlots function into a menu static function that returns a boolean (instead of being calculated only once on initialization. oops) Release Build 12111.

DynamicItemDescriptions
sigonasr2 1 month ago
parent 842a32e947
commit 4a4ffb1c6c
  1. 8
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 2
      Adventures in Lestoria/Bullet.h
  3. 54
      Adventures in Lestoria/BulletTypes.h
  4. 13
      Adventures in Lestoria/CharacterMenuWindow.cpp
  5. 12
      Adventures in Lestoria/Error.h
  6. 1
      Adventures in Lestoria/GhostOfPirateCaptain.cpp
  7. 4
      Adventures in Lestoria/Menu.cpp
  8. 3
      Adventures in Lestoria/Menu.h
  9. 2
      Adventures in Lestoria/OctopusArm.cpp
  10. 8
      Adventures in Lestoria/Player.h
  11. 2
      Adventures in Lestoria/Version.h
  12. 4
      Adventures in Lestoria/olcPixelGameEngine.h
  13. 6
      CMakeLists.txt
  14. BIN
      x64/Release/Adventures in Lestoria.exe

@ -82,7 +82,9 @@ All rights reserved.
#include "SteamKeyboardCallbackHandler.h"
#include "SteamStatsReceivedHandler.h"
#include "StageMaskPolygon.h"
#include <stacktrace>
#ifndef __EMSCRIPTEN__
#include <stacktrace>
#endif
#include <ranges>
INCLUDE_EMITTER_LIST
@ -3040,7 +3042,9 @@ int main(const int argn,char**args)
else std::cerr<<"Exiting without exception\n";
}catch(const std::exception& ex){std::cerr<<"Exception: "<<ex.what()<< '\n';}
catch(...){std::cerr << "Unknown exception caught\n";}
LOG(std::stacktrace::current());
#ifndef __EMSCRIPTEN__
LOG(std::stacktrace::current());
#endif
std::exit(EXIT_FAILURE);
});

@ -45,5 +45,5 @@ public:
//Initializes a bullet with an animation.
Bullet(vf2d pos,vf2d vel,float radius,int damage,const std::string&animation,bool upperLevel,bool hitsMultiple=false,float lifetime=INFINITE,bool rotatesWithAngle=false,bool friendly=false,Pixel col=WHITE,vf2d scale={1,1},float image_angle=0.f,std::string_view hitSound="");
protected:
virtual void ModifyOutgoingDamageData(HurtDamageInfo&data);
virtual void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};

@ -50,7 +50,7 @@ struct EnergyBolt:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct FireBolt:public Bullet{
@ -59,7 +59,7 @@ struct FireBolt:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
std::optional<std::reference_wrapper<TrailEffect>>flameTrail;
};
@ -74,7 +74,7 @@ struct LightningBolt:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
/*chainLightningRepeatCount - Set to higher amount to indicate when this monster instead affects monsters due to the enchantment, which changes which shock count variable we look at and will be used for counting down shock times.*/
static void ApplyLightningShock(const Monster&monster,const bool onUpperLevel,const ChainLightningStatus chainLightningRepeatCount=ORIGINAL_BOLT);
@ -94,7 +94,7 @@ struct Arrow:public Bullet{
const vf2d PointToBestTargetPath(const uint8_t perceptionLevel);
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
void Draw(const Pixel blendCol)const override;
};
@ -105,7 +105,7 @@ struct ChargedArrow:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
std::string laserGraphic;
};
@ -121,7 +121,7 @@ struct FrogTongue:public Bullet{
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void Draw(const Pixel blendCol)const override;
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct Wisp:public Bullet{
@ -129,7 +129,7 @@ struct Wisp:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
enum class HorizontalFlip{
@ -158,7 +158,7 @@ struct DaggerStab:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct DaggerSlash:public Bullet{
@ -171,7 +171,7 @@ struct DaggerSlash:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct Bomb:public Bullet{
@ -188,7 +188,7 @@ struct Bomb:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
void Draw(const Pixel blendCol)const override;
};
@ -214,7 +214,7 @@ struct LevitatingRock:public Bullet{
void Draw(const Pixel blendCol)const override;
void AssignMaster(LevitatingRock*masterRock);
const bool IsMaster()const;
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct Tornado:public Bullet{
@ -229,7 +229,7 @@ struct Tornado:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct Debris:public Bullet{
@ -240,7 +240,7 @@ struct Debris:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
void Draw(const Pixel blendCol)const override;
};
@ -253,12 +253,12 @@ struct LargeTornado:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct Feather:public Bullet{
Feather(vf2d pos,vf2d vel,float radius,int damage,bool upperLevel,bool hitsMultiple=false,float lifetime=INFINITE,bool friendly=false,Pixel col=WHITE,vf2d scale={1,1},float image_angle=0.f);
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct LargeStone:public Bullet{
@ -268,7 +268,7 @@ protected:
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
const float gravity;
const float fixedTimeStep{1/30.f};
@ -288,7 +288,7 @@ struct FallingBullet:public Bullet{
protected:
void Update(float fElapsedTime)override;
void Draw(const Pixel blendCol)const override;
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
const vf2d targetPos;
const float zVel{};
@ -304,7 +304,7 @@ struct DeadlyDash:public Bullet{
DeadlyDash(vf2d startPos,vf2d endPos,float radius,float afterImagesLingeringTime,int damage,float knockbackAmt,bool upperLevel,bool friendly,float afterImagesSpreadDist,const std::string&animation,Pixel col);
protected:
void Draw(const Pixel blendCol)const override;
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
const vf2d startPos;
const vf2d endPos;
@ -319,7 +319,7 @@ struct BearTrap:public Bullet{
BearTrap(vf2d pos,float radius,int damage,float fadeinTime,float fadeoutTime,bool upperLevel,bool hitsMultiple=false,float lifetime=INFINITE,bool friendly=false,Pixel col=WHITE,vf2d scale={1,1});
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
};
struct ExplosiveTrap:public Bullet{
@ -327,7 +327,7 @@ struct ExplosiveTrap:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
void Detonate();
const float explosionRadius{};
@ -358,7 +358,7 @@ private:
struct ThrownProjectile:public Bullet{
ThrownProjectile(vf2d pos,vf2d targetPos,const std::string&img,float explodeRadius,float z,float totalFallTime,float totalRiseZAmt,int damage,bool upperLevel,bool hitsMultiple=false,float lifetime=INFINITE,bool friendly=false,Pixel col=WHITE,vf2d scale={1,1},float image_angle={0.f},const std::optional<Effect>explodeEffect={},const std::optional<std::string>explodeSoundEffect={},const std::optional<LingeringEffect>lingeringEffect={});
void Update(float fElapsedTime)override;
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
void _OnGroundLand();
virtual void OnGroundLand(); //This is called when the projectile lands, damage is not dealt yet, default behavior just deals damage in the area.
protected:
@ -379,7 +379,7 @@ protected:
struct PoisonBottle:public ThrownProjectile{
PoisonBottle(vf2d pos,vf2d targetPos,const std::string&img,float explodeRadius,float bounceExplodeRadius,float z,float totalFallTime,float totalRiseZAmt,int damage,int additionalBounceCount,bool upperLevel,bool hitsMultiple=false,float lifetime=INFINITE,bool friendly=false,Pixel col=WHITE,vf2d scale={1,1},float image_angle={0.f});
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
virtual void OnGroundLand()override final; //This is called when the projectile lands, damage is not dealt yet, default behavior just deals damage in the area.
private:
const float bounceExplodeRadius;
@ -391,7 +391,7 @@ struct BurstBullet:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
void Explode();
const Entity target;
@ -413,7 +413,7 @@ struct RotateBullet:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
const float headingAngleChange;
};
@ -423,7 +423,7 @@ struct InkBullet:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
void Splat();
const vf2d targetPos;
@ -437,7 +437,7 @@ private:
struct HomingBullet:public Bullet{
HomingBullet(const vf2d pos,const Entity target,const float rotateTowardsSpeed,const float rotateTowardsSpeedCoveredInInk,const float lifetime,const float speed,const float radius,const int damage,const bool upperLevel,const bool friendly=false,const Pixel col=WHITE,const vf2d scale={1,1},const float image_angle=0.f);
void Update(float fElapsedTime)override;
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
const Entity target;
const float rotateTowardsSpeed;
@ -449,7 +449,7 @@ struct GhostSaber:public Bullet{
void Update(float fElapsedTime)override;
BulletDestroyState PlayerHit(Player*player)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
BulletDestroyState MonsterHit(Monster&monster,const uint8_t markStacksBeforeHit)override;//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!
void ModifyOutgoingDamageData(HurtDamageInfo&data);
void ModifyOutgoingDamageData(HurtDamageInfo&data)override;
private:
const std::weak_ptr<Monster>attachedMonster;
const float rotSpd;

@ -53,6 +53,7 @@ All rights reserved.
#ifndef __EMSCRIPTEN__
#include "steam/isteamuserstats.h"
#endif
#include <bit>
INCLUDE_game
INCLUDE_GFX
@ -164,8 +165,6 @@ void Menu::InitializeCharacterMenuWindow(){
return attrStr;
};
const bool CanModifyEquipSlots{game->GetCurrentMap().GetMapType()==Map::MapType::HUB||game->GetCurrentMap().GetMapType()==Map::MapType::WORLD_MAP};
int equipSlot=1;
for(int i=0;i<8;i++){
float x=31+(i%2)*33;
@ -179,7 +178,7 @@ void Menu::InitializeCharacterMenuWindow(){
EquipSlot slot=EquipSlot(equipSlot);
auto equipmentSlot=characterMenuWindow->ADD("Equip Slot "+CharacterMenuWindow::slotNames[i],EquipSlotButton)(geom2d::rect<float>{{x,y+28},{24,24}},slot,
[&](MenuFuncData data){
if(CanModifyEquipSlots){
if(CanModifyEquipSlots()){
EquipSlot slot=EquipSlot(data.component.lock()->I(Attribute::EQUIP_TYPE));
data.menu.I(A::EQUIP_TYPE)=int(slot);
@ -375,10 +374,10 @@ void Menu::InitializeCharacterMenuWindow(){
}
}
return "";
},[&CanModifyEquipSlots](MenuType type){
},[](MenuType type){
if(!Menu::menus[type]->GetSelection().expired()&&
Menu::menus[type]->GetSelection().lock()->GetName().starts_with("Equip Slot ")){
if(CanModifyEquipSlots){
if(CanModifyEquipSlots()){
EquipSlot slot=EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE));
if(!ISBLANK(Inventory::GetEquip(slot))){
Inventory::UnequipItem(slot);
@ -400,10 +399,10 @@ void Menu::InitializeCharacterMenuWindow(){
}
}
return "";
},[&CanModifyEquipSlots](MenuType type){
},[](MenuType type){
if(!Menu::menus[type]->GetSelection().expired()&&
Menu::menus[type]->GetSelection().lock()->GetName().starts_with("Equip Slot ")){
if(CanModifyEquipSlots){
if(CanModifyEquipSlots()){
EquipSlot slot=EquipSlot(Menu::menus[type]->GetSelection().lock()->I(Attribute::EQUIP_TYPE));
if(!ISBLANK(Inventory::GetEquip(slot))){
Inventory::UnequipItem(slot);

@ -43,7 +43,9 @@ All rights reserved.
#include <memory>
#include <source_location>
#include <fstream>
#include <stacktrace>
#ifndef __EMSCRIPTEN__
#include <stacktrace>
#endif
inline std::ofstream debugLogger;
@ -91,16 +93,16 @@ inline std::ofstream debugLogger;
#define ERR(err) { \
std::stringstream errStream; \
errStream<<err; \
Error::log(errStream,std::source_location::current());}
Error::log(errStream);}
#define LOG(err) { \
std::stringstream errStream; \
errStream<<err; \
Error::log(errStream,std::source_location::current());}
Error::log(errStream);}
class Error{
public:
inline static void log(std::stringstream&str,std::source_location loc){
std::cout<<loc.file_name()<<"("<<loc.line()<<":"<<loc.column()<<") "<<loc.function_name()<<": "<<str.str()<<std::endl;
inline static void log(std::stringstream&str){
std::cout<<__FILE__<<"("<<__LINE__<<":) "<<str.str()<<std::endl;
#ifdef __DEBUG__
throw;
#endif

@ -246,6 +246,7 @@ void Monster::STRATEGY::GHOST_OF_PIRATE_CAPTAIN(Monster&m,float fElapsedTime,std
m.SetStrategyOnHitFunction([&m](const HurtDamageInfo damageData,Monster&monster,const StrategyName&strategyName)->void{
m.SetPhase(strategyName,NORMAL);
m.arrowIndicator=true;
m.SetStrategyOnHitFunction({});
});
SETPHASE(HIDING);
}

@ -848,4 +848,8 @@ void Menu::ScrollDown(const MenuType type,const std::string&componentName,Data&r
returnData=Component<ScrollableWindowComponent>(type,componentName)->GetComponents()[index];
}
}
}
const bool Menu::CanModifyEquipSlots(){
return game->GetCurrentMap().GetMapType()==Map::MapType::HUB||game->GetCurrentMap().GetMapType()==Map::MapType::WORLD_MAP;
}

@ -138,6 +138,9 @@ class Menu:public IAttributable{
static safemap<ITCategory,std::vector<std::weak_ptr<MenuComponent>>>merchantInventoryListeners; //All menu components that care about merchant inventory updates subscribe to this list indirectly (See Menu::AddMerchantInventoryListener()).
static std::vector<std::weak_ptr<MenuComponent>>equipStatListeners; //All menu components that care about stat/equip updates subscribe to this list indirectly (See Menu::AddStatListener()).
static std::vector<std::weak_ptr<MenuComponent>>chapterListeners; //All menu components that care about story chapter updates subscribe to this list indirectly (See Menu::AddChapterListener()).
const static bool CanModifyEquipSlots();
public:
//The constructor is private. Use CreateMenu() instead!
Menu()=default;

@ -157,7 +157,7 @@ void Monster::STRATEGY::OCTOPUS_ARM(Monster&m,float fElapsedTime,std::string str
Arc attackArc{GetAttackArc(m)};
m.SetStrategyDrawFunction([arc=attackArc,&storedArc=m.ANY(A::STORED_ARC),&alphaTimer=m.F(A::ENVIRONMENT_TIMER),attackEffectTime=ConfigFloat("Attack Effect Time")](AiL*game,Monster&monster,const std::string&strategy){
const float alphaTimer{float(std::fmod(game->GetRunTime(),2.f))};
//const float alphaTimer{float(std::fmod(game->GetRunTime(),2.f))}; //Commented out for testing behavior. Should not be using run time...?
uint8_t alpha{util::lerp(uint8_t(0),uint8_t(128),alphaTimer)};
if(alphaTimer>1.f)alpha=util::lerp(0,128,1-(alphaTimer-1));
const_cast<Arc&>(arc).Draw(game,{0,0,128,uint8_t(alpha)});

@ -686,10 +686,10 @@ struct Wizard:Player{
static void InitializeClassAbilities();
const std::string&GetClassName()override;
Ability&GetRightClickAbility()override;
Ability&GetAbility1();
Ability&GetAbility2();
Ability&GetAbility3();
Ability&GetAbility4();
Ability&GetAbility1()override;
Ability&GetAbility2()override;
Ability&GetAbility3()override;
Ability&GetAbility4()override;
virtual Ability&_GetOriginalAbility1()override;
virtual Ability&_GetOriginalAbility2()override;
virtual Ability&_GetOriginalAbility3()override;

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

@ -1124,8 +1124,8 @@ namespace olc
void DrawShadowStringProp(const olc::vi2d& pos, std::string_view sText, Pixel col = olc::WHITE, const Pixel shadowCol = olc::BLACK, const olc::vf2d& scale = { 1.0f, 1.0f },const float width=std::numeric_limits<float>::max(),const float shadowSizeFactor=1);
olc::vi2d GetTextSize(std::string_view s);
olc::vi2d GetTextSizeProp(std::string_view s);
olc::vf2d GetWrappedTextSize(std::string_view s,const float width=std::numeric_limits<int>::max(),const vf2d scale={1,1});
olc::vf2d GetWrappedTextSizeProp(std::string_view s,const float width=std::numeric_limits<int>::max(),const vf2d scale={1,1});
olc::vf2d GetWrappedTextSize(std::string_view s,const float width=std::numeric_limits<float>::max(),const vf2d scale={1,1});
olc::vf2d GetWrappedTextSizeProp(std::string_view s,const float width=std::numeric_limits<float>::max(),const vf2d scale={1,1});
void DrawString(const olc::vi2d& pos, std::string_view sText, Pixel col = olc::WHITE, uint32_t scale = 1,const float width=std::numeric_limits<float>::max(),const bool colorOverride=false);
void DrawString(int32_t x, int32_t y, std::string_view sText, Pixel col = olc::WHITE, uint32_t scale = 1,const float width=std::numeric_limits<float>::max(),const bool colorOverride=false);

@ -1,5 +1,5 @@
# require version 3.10 or higher
cmake_minimum_required(VERSION 3.10)
# require version 3.20 or higher
cmake_minimum_required(VERSION 3.20)
#
# Project
@ -45,7 +45,7 @@ set(ASSETS_EMSCRIPTEN_DIR "bin/assets")
##########################################################################
# Set C++ Standards
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Loading…
Cancel
Save