Linux fixes. Make sure audio doesn't require loading from filesystem (Use resource packs instead)

master
sigonasr2 2 months ago
parent 57cc852033
commit 4d74d803b2
  1. 8
      Adventures in Lestoria/AdventuresInLestoria.h
  2. 10
      Adventures in Lestoria/Audio.cpp
  3. 2
      Adventures in Lestoria/ItemEnchant.h
  4. 2
      Adventures in Lestoria/MonsterSoul.cpp
  5. 1
      debugGame.sh
  6. 2
      release.sh

@ -60,6 +60,12 @@ All rights reserved.
#include "Overlay.h"
#include <variant>
#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::map<MapName,Map>MAP_DATA;
ResourcePack gamepack;
private:
std::vector<std::unique_ptr<Effect>>foregroundEffects,backgroundEffects,foregroundEffectsToBeInserted,backgroundEffectsToBeInserted;
std::vector<TileRenderData*>tilesWithCollision,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;

@ -70,10 +70,12 @@ void Audio::Initialize(){
while(data.HasProperty(std::format("channel[{}]",channelCounter))){
std::string channelName=data[std::format("channel[{}]",channelCounter)].GetString();
if(!std::filesystem::exists("bgm_directory"_S+channelName))ERR(std::format("WARNING! Could not load file {} for track {}",channelName,songFileName));
if(!game->gamepack.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++;
}

@ -117,7 +117,7 @@ public:
std::map<ItemAttribute,float>::const_iterator begin()const;
std::map<ItemAttribute,float>::const_iterator end()const;
const Pixel&DisplayCol()const;
const std::optional<std::reference_wrapper<Ability>>Ability()const;
const std::optional<std::reference_wrapper<::Ability>>Ability()const;
private:
void UpdateDescription();
const ItemEnchantInfo&GetEnchantInfo()const;

@ -38,7 +38,7 @@ All rights reserved.
#include "Effect.h"
#include "util.h"
#include "AdventuresinLestoria.h"
#include "AdventuresInLestoria.h"
#include "SoundEffect.h"
INCLUDE_game

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

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

Loading…
Cancel
Save