Linux build fixes. Public declaration for game controllers array, properly initialize dynamic counters and their display values, fix story script to have capital I's, renamed images to be uppercase for case-sensitivity in Linux.

This commit is contained in:
sigonasr2 2024-02-11 21:48:03 -06:00
parent bacd879e12
commit 5788123ab5
8 changed files with 19 additions and 7 deletions

1
.gitignore vendored
View File

@ -395,3 +395,4 @@ build/CMakeFiles/3.16.3/CMakeSystem.cmake
build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c
build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
test.cpp
/Adventures in Lestoria/Adventures in Lestoria

View File

@ -231,9 +231,6 @@ bool AiL::OnUserCreate(){
InitializeLevels();
healthCounter.Initialize(&player->hp,"Interface.HUD Health Tick Rate"_F,"Interface.HUD Health Display Color"_Pixel,"Interface.HUD Heal Damage Color"_Pixel,"Interface.HUD Take Damage Color"_Pixel,"Interface.HUD Health Change Time"_F);
manaCounter.Initialize(&player->mana,"Interface.HUD Mana Tick Rate"_F,"Interface.HUD Mana Display Color"_Pixel,"Interface.HUD Restore Mana Color"_Pixel,"Interface.HUD Reduce Mana Color"_Pixel,"Interface.HUD Mana Change Time"_F);
//Initialize Camera.
camera=Camera2D{WINDOW_SIZE};
camera.SetMode(olc::utils::Camera2D::Mode::LazyFollow);
@ -247,6 +244,9 @@ bool AiL::OnUserCreate(){
player=std::make_unique<Warrior>();
healthCounter.Initialize(&player->hp,"Interface.HUD Health Tick Rate"_F,"Interface.HUD Health Display Color"_Pixel,"Interface.HUD Heal Damage Color"_Pixel,"Interface.HUD Take Damage Color"_Pixel,"Interface.HUD Health Change Time"_F);
manaCounter.Initialize(&player->mana,"Interface.HUD Mana Tick Rate"_F,"Interface.HUD Mana Display Color"_Pixel,"Interface.HUD Restore Mana Color"_Pixel,"Interface.HUD Reduce Mana Color"_Pixel,"Interface.HUD Mana Change Time"_F);
InitializePlayerLevelCap();
InitializeGraphics();

View File

@ -46,6 +46,7 @@ DynamicCounter::DynamicCounter(){}
void DynamicCounter::Initialize(const int*number,float tickRate,Pixel originalCol,Pixel increaseCol,Pixel decreaseCol,float colorChangeTime){
this->targetNumber=number;
this->displayNumber=*number;
this->tickRate=tickRate;
this->originalCol=originalCol;
this->increaseCol=increaseCol;

View File

@ -152,7 +152,7 @@ Since you're doing Slime hunting anyways, might as well search for the Stone in
[You]
I am on my way to the Forest anyways. I can check any cave I come across and if I find any #FFBF00Red Stone#FFFFFF i will report back.
I am on my way to the Forest anyways. I can check any cave I come across and if I find any #FFBF00Red Stone#FFFFFF I will report back.
No promises though. My main goal is slime hunting, but I will see what I can do to help.
@ -168,7 +168,7 @@ Have your memories returned?
[Sherman]
Well, I definitely remember a few things but i still need to sort myself out. I can't really tell you more than what I've said yesterday.
Well, I definitely remember a few things but I still need to sort myself out. I can't really tell you more than what I've said yesterday.
[You]
@ -263,7 +263,7 @@ Maybe I'll leave the forest for now and think up a plan before I explore again.
{PAUSE}
Hey, If you're looking for me, i will be at #00FFD0Merchant Crossing#FFFFFF. Offering my skills as a #ADADADBlacksmith#FFFFFF to Merchants.
Hey, If you're looking for me, I will be at #00FFD0Merchant Crossing#FFFFFF. Offering my skills as a #ADADADBlacksmith#FFFFFF to Merchants.
[You]
@ -275,7 +275,7 @@ You explain to Greg what happened at the crossing.
[Greg]
That's not good. You said you built a small camp nearby? Guess i will go there for now then.
That's not good. You said you built a small camp nearby? Guess I will go there for now then.
If you need any weapons or armour, you can find me there.

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -240,11 +240,17 @@ namespace olc {
bool ff = false;
#ifdef __EMSCRIPTEN__
public:
#endif
#ifdef __linux__
public:
#endif
bool availableButtons[GP_BUTTON_COUNT] = {false};
bool availableAxes[GP_AXIS_COUNT] = {false};
#ifdef __EMSCRIPTEN__
private:
#endif
#ifdef __linux__
private:
#endif
float deadZone=0.2f;
float deadZoneOuter=0.2f;

4
debugGame.sh Executable file
View File

@ -0,0 +1,4 @@
cd "Adventures in Lestoria"
mkdir "Adventures in Lestoria"
cp "discord_game_sdk.so" "Adventures in Lestoria"
gdb ../bin/AdventuresInLestoria