diff --git a/Adventures in Lestoria/AdventuresInLestoria.h b/Adventures in Lestoria/AdventuresInLestoria.h index 5ab777b4..b5468e8b 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.h +++ b/Adventures in Lestoria/AdventuresInLestoria.h @@ -60,6 +60,12 @@ All rights reserved. #include "Overlay.h" #include +#undef KEY_MENU +#undef KEY_SELECT +#undef KEY_SCROLLDOWN +#undef KEY_SCROLLUP +#undef KEY_ENTER + class SteamKeyboardCallbackHandler; class SteamStatsReceivedHandler; @@ -161,6 +167,7 @@ public: double levelTime=0.; Camera2D camera; std::mapMAP_DATA; + ResourcePack gamepack; private: std::vector>foregroundEffects,backgroundEffects,foregroundEffectsToBeInserted,backgroundEffectsToBeInserted; std::vectortilesWithCollision,tilesWithoutCollision; @@ -215,7 +222,6 @@ private: float lastMouseMovement=0.f; //Amount of time since the last time the cursor was moved or interacted with. vi2d lastMousePos={}; bool gameInitialized=false; - ResourcePack gamepack; uint8_t mosaicEffectTransition=1U; float saveGameDisplayTime=0.f; float loadingWaitTime=0.f; @@ -423,4 +429,4 @@ public: return layergamepack.Loaded()&&"GENERATE_GAMEPACK"_B){ - game->gamepack.AddFile("bgm_directory"_S+channelName); - } + if(!game->gamepack.Loaded()){ + if(!std::filesystem::exists("bgm_directory"_S+channelName))ERR(std::format("WARNING! Could not load file {} for track {}",channelName,songFileName)); + if("GENERATE_GAMEPACK"_B){ + game->gamepack.AddFile("bgm_directory"_S+channelName); + } + } bgm.AddChannel(channelName); channelCounter++; } @@ -428,4 +430,4 @@ int Audio::GetPrepareBGMLoopIterations(std::string_view sound){ void Audio::BGM::SetLoopStartTime(const float loopStartTime){ this->loopStartTime=loopStartTime; -} \ No newline at end of file +} diff --git a/Adventures in Lestoria/ItemEnchant.h b/Adventures in Lestoria/ItemEnchant.h index 25fe0320..e6138356 100644 --- a/Adventures in Lestoria/ItemEnchant.h +++ b/Adventures in Lestoria/ItemEnchant.h @@ -115,11 +115,11 @@ public: std::map::const_iterator begin()const; std::map::const_iterator end()const; const Pixel&DisplayCol()const; - const std::optional>Ability()const; + const std::optional>Ability()const; private: void UpdateDescription(); const ItemEnchantInfo&GetEnchantInfo()const; std::string enchantName; std::string description; ItemAttributable stats; -}; \ No newline at end of file +}; diff --git a/Adventures in Lestoria/MonsterSoul.cpp b/Adventures in Lestoria/MonsterSoul.cpp index a48da09d..406decb3 100644 --- a/Adventures in Lestoria/MonsterSoul.cpp +++ b/Adventures in Lestoria/MonsterSoul.cpp @@ -38,7 +38,7 @@ All rights reserved. #include "Effect.h" #include "util.h" -#include "AdventuresinLestoria.h" +#include "AdventuresInLestoria.h" #include "SoundEffect.h" INCLUDE_game @@ -89,4 +89,4 @@ void MonsterSoul::Draw(const Pixel blendCol)const{ game->view.DrawRotatedDecal(pos-vf2d{0,GetZ()},GFX["monstersoulglow.png"].Decal(),0.f,GFX["monstersoulglow.png"].Sprite()->Size()/2,size*util::lerp(0.6f,1.4f,abs(sin(2*PI*lifetime)))); game->SetDecalMode(DecalMode::NORMAL); Effect::Draw(blendCol); -} \ No newline at end of file +} diff --git a/debugGame.sh b/debugGame.sh index bfbc04cc..23b0d099 100755 --- a/debugGame.sh +++ b/debugGame.sh @@ -1,4 +1,5 @@ cd "Adventures in Lestoria" mkdir "Adventures in Lestoria" cp "discord_game_sdk.so" "Adventures in Lestoria" +cp "Adventures in Lestoria/"*.so "release/Adventures in Lestoria" gdb ../bin/AdventuresInLestoria diff --git a/release.sh b/release.sh index 0582a441..7ec2423f 100755 --- a/release.sh +++ b/release.sh @@ -1,2 +1,2 @@ git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp" -cmake -DCMAKE_BUILD_TYPE=Release .;make -j 8 +cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release .;make -j 8