From a16ca296c76296b8ce837509d21e22a037aa3adc Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Tue, 17 Sep 2024 14:47:35 -0500 Subject: [PATCH] Linux changes and fixes --- Adventures in Lestoria/AdventuresInLestoria.h | 13 ++++++++++--- Adventures in Lestoria/Item.cpp | 4 ++-- Adventures in Lestoria/Item.h | 4 ++-- Adventures in Lestoria/ItemEnchant.h | 4 ++-- Adventures in Lestoria/MonsterSoul.cpp | 4 ++-- debugGame.sh | 1 + distribute.sh | 4 ++-- release.sh | 2 +- 8 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Adventures in Lestoria/AdventuresInLestoria.h b/Adventures in Lestoria/AdventuresInLestoria.h index 5ab777b4..04a57b25 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,8 +167,10 @@ public: double levelTime=0.; Camera2D camera; std::mapMAP_DATA; + + ResourcePack gamepack; private: - std::vector>foregroundEffects,backgroundEffects,foregroundEffectsToBeInserted,backgroundEffectsToBeInserted; + std::vector>foregroundEffects,backgroundEffects,foregroundEffectsToBeInserted,backgroundEffectsToBeInserted; std::vectortilesWithCollision,tilesWithoutCollision; std::vectordropsBeforeLower,dropsAfterLower,dropsBeforeUpper,dropsAfterUpper; std::vectorendZones,upperEndZones; @@ -215,7 +223,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 +430,4 @@ public: return layerGetPlayer()->RemoveMoney("Fragment Enchant Cost"_i[1]); return ItemEnchantInfo::GetEnchant(randomEnchantName); -} \ No newline at end of file +} diff --git a/Adventures in Lestoria/Item.h b/Adventures in Lestoria/Item.h index a0b15154..543881a3 100644 --- a/Adventures in Lestoria/Item.h +++ b/Adventures in Lestoria/Item.h @@ -388,7 +388,7 @@ public: const std::string&Name()const; const std::string&Description()const; const ITCategory Category()const; - const::Renderable&const Icon()const; + const::Renderable& Icon()const; static const EquipSlot StringToEquipSlot(std::string_view slotName); /* For the useFunc, return true if the item can be used, false otherwise. @@ -436,4 +436,4 @@ public: void ResetTimer(); }; -#define ISBLANK(itemRef) Item::IsBlank(itemRef) \ No newline at end of file +#define ISBLANK(itemRef) Item::IsBlank(itemRef) diff --git a/Adventures in Lestoria/ItemEnchant.h b/Adventures in Lestoria/ItemEnchant.h index 1053cb7d..289c73b1 100644 --- a/Adventures in Lestoria/ItemEnchant.h +++ b/Adventures in Lestoria/ItemEnchant.h @@ -117,11 +117,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..4e09f196 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 "libsteam_api.so" "Adventures in Lestoria" gdb ../bin/AdventuresInLestoria diff --git a/distribute.sh b/distribute.sh index 9e956082..9c2de03a 100755 --- a/distribute.sh +++ b/distribute.sh @@ -18,7 +18,7 @@ cp -R "Adventures in Lestoria/assets/themes" release/assets cp -R "Adventures in Lestoria/assets/gamepack.pak" release/assets cp -R "Adventures in Lestoria/assets/"*.ttf release/assets cp -R "Adventures in Lestoria/controller_config" release -cp "Adventures in Lestoria/Adventures in Lestoria/"*.so "release/Adventures in Lestoria" +cp "Adventures in Lestoria/"*.so "release/Adventures in Lestoria" cp -R bin release rm release/*.pdb @@ -30,4 +30,4 @@ if [ \`bin/AdventuresInLestoria | wc -l\` -lt 20 ]; then bin/AdventuresInLestoria nosteam else echo \"Success!\" -fi" > release/runGame.sh \ No newline at end of file +fi" > release/runGame.sh 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