Fix language of executable being Germany. Corrected internal process name for windows executable. Properly update discord status state on Main Menu.

This commit is contained in:
sigonasr2 2024-01-06 03:30:00 -06:00
parent e132eeab4e
commit c4edc3f178
13 changed files with 78 additions and 32 deletions

View File

@ -28,21 +28,21 @@ VS_VERSION_INFO VERSIONINFO
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
BLOCK "040704b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Sig" VALUE "CompanyName", "Sig Productions"
VALUE "FileDescription", "Crawler Game" VALUE "FileDescription", "Adventures in Lestoria"
VALUE "FileVersion", "0.2.1.5299" VALUE "FileVersion", "0.2.1.5299"
VALUE "InternalName", "Crawler.exe" VALUE "InternalName", "Crawler.exe"
VALUE "LegalCopyright", "Copyright 2023" VALUE "LegalCopyright", "Copyright © 2023-2024"
VALUE "OriginalFilename", "Crawler.exe" VALUE "OriginalFilename", "Adventures in Lestoria.exe"
VALUE "ProductName", "Crawler" VALUE "ProductName", "Adventures in Lestoria"
VALUE "ProductVersion", "0.2.1.5299" VALUE "ProductVersion", "0.2.1.5299"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x407, 1200 VALUE "Translation", 0x409, 1200
END END
END END

View File

@ -683,6 +683,7 @@
<Text Include="TODO.txt" /> <Text Include="TODO.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="assets\AiL_512.png" />
<Image Include="assets\heart.ico" /> <Image Include="assets\heart.ico" />
<Image Include="assets\menus\Character_Info.png" /> <Image Include="assets\menus\Character_Info.png" />
</ItemGroup> </ItemGroup>

View File

@ -408,6 +408,9 @@
<ClInclude Include="TitleScreen.h"> <ClInclude Include="TitleScreen.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Audio.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Player.cpp"> <ClCompile Include="Player.cpp">
@ -686,6 +689,9 @@
<ClCompile Include="TitleScreen.cpp"> <ClCompile Include="TitleScreen.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Audio.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="cpp.hint" /> <None Include="cpp.hint" />
@ -799,6 +805,8 @@
</Text> </Text>
<Text Include="Adventures in Lestoria_Story_Chapter_1 (2).txt" /> <Text Include="Adventures in Lestoria_Story_Chapter_1 (2).txt" />
<Text Include="Adventures in Lestoria_System_Overview.txt" /> <Text Include="Adventures in Lestoria_System_Overview.txt" />
<Text Include="assets\config\bgm\bgm.txt" />
<Text Include="assets\config\bgm\events.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="assets\heart.ico"> <Image Include="assets\heart.ico">
@ -807,6 +815,9 @@
<Image Include="assets\menus\Character_Info.png"> <Image Include="assets\menus\Character_Info.png">
<Filter>Documentation\Menus</Filter> <Filter>Documentation\Menus</Filter>
</Image> </Image>
<Image Include="assets\AiL_512.png">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="Adventures in Lestoria.rc"> <ResourceCompile Include="Adventures in Lestoria.rc">

View File

@ -2517,16 +2517,16 @@ void AiL::UpdateDiscordStatus(std::string levelName,std::string className){
if(Discord){ if(Discord){
::discord::Activity newActivity{}; ::discord::Activity newActivity{};
newActivity.SetDetails(levelName.c_str()); newActivity.SetDetails(levelName.c_str());
newActivity.SetState(std::format("Level {} {}",player->Level(),className).c_str());
discord::ActivityTimestamps&timestamps=newActivity.GetTimestamps(); discord::ActivityTimestamps&timestamps=newActivity.GetTimestamps();
timestamps.SetStart(gameStarted); timestamps.SetStart(gameStarted);
newActivity.SetType(discord::ActivityType::Playing); newActivity.SetType(discord::ActivityType::Playing);
discord::ActivityAssets&assets=newActivity.GetAssets(); discord::ActivityAssets&assets=newActivity.GetAssets();
assets.SetLargeImage("ail_512"); assets.SetLargeImage("ail_512");
assets.SetLargeText(game->sAppName.c_str()); assets.SetLargeText(game->sAppName.c_str());
assets.SetSmallText(std::format("Level {} {}",player->Level(),className).c_str());
if(levelName!="Main Menu"){ if(levelName!="Main Menu"){
newActivity.SetState(std::format("Level {} {}",player->Level(),className).c_str());
assets.SetSmallText(std::format("Level {} {}",player->Level(),className).c_str());
std::for_each(className.begin(),className.end(),[](char&c){c=std::tolower(c);}); std::for_each(className.begin(),className.end(),[](char&c){c=std::tolower(c);});
assets.SetSmallImage(("nico-"+className+"_512").c_str()); assets.SetSmallImage(("nico-"+className+"_512").c_str());
} }

View File

@ -45,6 +45,7 @@ INCLUDE_DATA
float Audio::defaultFadeTime; float Audio::defaultFadeTime;
void Audio::Initialize(){ void Audio::Initialize(){
Engine().SetBackgroundPlay(true);
Self().events.insert("Default Volume"); Self().events.insert("Default Volume");
for(auto&[key,data]:DATA["Events"]){ for(auto&[key,data]:DATA["Events"]){
Self().events.insert(key); Self().events.insert(key);
@ -229,3 +230,7 @@ void Audio::SetAudioEvent(const Event&eventName){
std::string operator""_SFX(const char*key,size_t length){ std::string operator""_SFX(const char*key,size_t length){
return "sfx_directory"_S+std::string(key,length); return "sfx_directory"_S+std::string(key,length);
} }
const SongName&Audio::GetTrackName(){
return Self().currentBGM;
}

View File

@ -58,6 +58,7 @@ public:
static void PlayBGM(const std::string_view sound,const bool loop=true); static void PlayBGM(const std::string_view sound,const bool loop=true);
static void StopBGM(); static void StopBGM();
static const Event&GetAudioEvent(); static const Event&GetAudioEvent();
static const SongName&GetTrackName();
static void SetAudioEvent(const Event&eventName); static void SetAudioEvent(const Event&eventName);
static const bool BGMIsPlaying(); static const bool BGMIsPlaying();
private: private:

View File

@ -41,8 +41,11 @@ All rights reserved.
#include "TitleScreen.h" #include "TitleScreen.h"
#include "Key.h" #include "Key.h"
INCLUDE_game
void State_MainMenu::OnStateChange(GameState*prevState){ void State_MainMenu::OnStateChange(GameState*prevState){
TitleScreen::Reset(); TitleScreen::Reset();
game->UpdateDiscordStatus("Main Menu","");
}; };
void State_MainMenu::OnUserUpdate(AiL*game){ void State_MainMenu::OnUserUpdate(AiL*game){
TitleScreen::Update(); TitleScreen::Update();

View File

@ -106,27 +106,38 @@ void State_OverworldMap::OnUserUpdate(AiL*game){
Menu::OpenMenu(CRAFT_CONSUMABLE); Menu::OpenMenu(CRAFT_CONSUMABLE);
} }
if(game->GetKey(K1).bPressed){ #pragma region Audio Test
Audio::Play("sfx100v2_loop_water_01.mp3"_SFX); if(game->GetKey(K1).bPressed){
} Audio::Play("sfx100v2_loop_water_01.mp3"_SFX);
if(game->GetKey(F1).bPressed){ }
Audio::PlayBGM("foresty1_1"); if(game->GetKey(F1).bPressed){
}else Audio::PlayBGM("foresty1_1");
if(game->GetKey(F2).bPressed){ lastAudioTime=0.f;
Audio::PlayBGM("foresty0"); }else
} if(game->GetKey(F2).bPressed){
if(game->GetKey(K2).bPressed){ Audio::PlayBGM("foresty0");
Audio::SetAudioEvent("Default Volume"); lastAudioTime=0.f;
} }
if(game->GetKey(K3).bPressed){ if(game->GetKey(K2).bPressed){
Audio::SetAudioEvent("LowHealth"); Audio::SetAudioEvent("Default Volume");
} lastEventTime=0.f;
if(game->GetKey(K4).bPressed){ }
Audio::SetAudioEvent("InCombat"); if(game->GetKey(K3).bPressed){
} Audio::SetAudioEvent("LowHealth");
if(game->GetKey(K5).bPressed){ lastEventTime=0.f;
Audio::SetAudioEvent("Underwater"); }
} if(game->GetKey(K4).bPressed){
Audio::SetAudioEvent("InCombat");
lastEventTime=0.f;
}
if(game->GetKey(K5).bPressed){
Audio::SetAudioEvent("Underwater");
lastEventTime=0.f;
}
lastEventTime=std::clamp(lastEventTime+game->GetElapsedTime(),0.f,5.0f);
lastAudioTime=std::clamp(lastAudioTime+game->GetElapsedTime(),0.f,5.0f);
#pragma endregion
#pragma region Handle Connection Point Clicking and Movement #pragma region Handle Connection Point Clicking and Movement
for(ConnectionPoint&cp:connections){ for(ConnectionPoint&cp:connections){
@ -169,6 +180,16 @@ void State_OverworldMap::Draw(AiL*game){
break; break;
} }
} }
#pragma region Audio Test
std::stringstream eventText;
eventText<<"Event Set to: ";
eventText<<std::quoted(Audio::GetAudioEvent());
std::stringstream audioText;
audioText<<"Audio Track Set to: ";
audioText<<std::quoted(Audio::GetTrackName());
if(lastEventTime!=5.0f)game->DrawShadowStringPropDecal({2,game->ScreenHeight()-36.f},eventText.str(),{255,255,255,uint8_t(util::lerp(255,0,lastEventTime/5.0f))},{0,0,0,uint8_t(util::lerp(255,0,lastEventTime/5.0f))});
if(lastAudioTime!=5.0f)game->DrawShadowStringPropDecal({2,game->ScreenHeight()-20.f},audioText.str(),{255,255,255,uint8_t(util::lerp(255,0,lastAudioTime/5.0f))},{0,0,0,uint8_t(util::lerp(255,0,lastAudioTime/5.0f))});
#pragma endregion
}; };
void State_OverworldMap::SetStageMarker(std::string connectionName){ void State_OverworldMap::SetStageMarker(std::string connectionName){
for(ConnectionPoint&connection:connections){ for(ConnectionPoint&connection:connections){

View File

@ -46,6 +46,8 @@ class State_OverworldMap:public GameState{
float currentTime=0; float currentTime=0;
vf2d playerTargetPos; vf2d playerTargetPos;
const float playerMoveSpd=48.0; const float playerMoveSpd=48.0;
float lastEventTime=0.f;
float lastAudioTime=0.f;
public: public:
State_OverworldMap(); State_OverworldMap();
static std::vector<ConnectionPoint>connections; static std::vector<ConnectionPoint>connections;

View File

@ -14,6 +14,7 @@ Audio Engine
Settings Menu Settings Menu
- Any settings should be saved to the save file! - Any settings should be saved to the save file!
- Volume Controls - Volume Controls
- Play Sound in Background
- Key Configuration - Key Configuration
-Upon pressing a key, check if the key is bound to another option, if so, -Upon pressing a key, check if the key is bound to another option, if so,
remove that bind from the list. Up to two keys may be binded per action. remove that bind from the list. Up to two keys may be binded per action.

View File

@ -66,6 +66,7 @@ void TitleScreen::Initialize(){
Reset(); Reset();
} }
void TitleScreen::Reset(){ void TitleScreen::Reset(){
state=BUILDING;
for(Particle&p:particles){ for(Particle&p:particles){
switch(util::random()%4){ switch(util::random()%4){
case 0:{ //Top Edge case 0:{ //Top Edge

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_PATCH 1 #define VERSION_PATCH 1
#define VERSION_BUILD 5379 #define VERSION_BUILD 5389
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

View File

@ -24,7 +24,7 @@ BGM
Events Events
{ {
LowHealth = 50%,60%,20%,20% LowHealth = 50%,100%,20%,20%
InCombat = 90%,100%,0%,0% InCombat = 90%,100%,0%,0%
Underwater = 0%,0%,100%,100% Underwater = 0%,0%,100%,100%
} }