Added analog controller precision movement for controllers. Fixed bugs with animation system involving movement velocities not being consistent nor updating correctly for up/down directions. New Steam Controller Configurations. Release Build 8577.
This commit is contained in:
@@ -453,6 +453,7 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
if(KEY_MENU.Released()){
|
if(KEY_MENU.Released()){
|
||||||
Menu::OpenMenu(MenuType::PAUSE);
|
Menu::OpenMenu(MenuType::PAUSE);
|
||||||
}
|
}
|
||||||
|
float animationSpd=0.f;
|
||||||
if(player->GetVelocity().mag()<"Player.Move Allowed Velocity Lower Limit"_F&&player->CanMove()){
|
if(player->GetVelocity().mag()<"Player.Move Allowed Velocity Lower Limit"_F&&player->CanMove()){
|
||||||
auto GetPlayerStaircaseDirection=[&](){
|
auto GetPlayerStaircaseDirection=[&](){
|
||||||
for(LayerTag&layer:MAP_DATA[GetCurrentLevel()].LayerData){
|
for(LayerTag&layer:MAP_DATA[GetCurrentLevel()].LayerData){
|
||||||
@@ -469,20 +470,29 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
std::string staircaseDirection=GetPlayerStaircaseDirection();
|
std::string staircaseDirection=GetPlayerStaircaseDirection();
|
||||||
vf2d newAimingAngle{};
|
vf2d newAimingAngle{};
|
||||||
if(RightHeld()){
|
if(RightHeld()){
|
||||||
player->SetX(player->GetX()+fElapsedTime*"Player.MoveSpd"_F*player->GetMoveSpdMult());
|
float moveAmt="Player.MoveSpd"_F;
|
||||||
player->movementVelocity.x="Player.MoveSpd"_F;
|
if(Input::UsingGamepad()&&KEY_SCROLLHORZ_L.Analog()>=0.2f){
|
||||||
|
float controllerAmt=abs(KEY_SCROLLHORZ_L.Analog());
|
||||||
|
if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone.
|
||||||
|
if(controllerAmt>animationSpd){
|
||||||
|
animationSpd=controllerAmt;
|
||||||
|
}
|
||||||
|
moveAmt*=controllerAmt;
|
||||||
|
}else
|
||||||
|
if(!Input::UsingGamepad()){
|
||||||
|
animationSpd=1.f;
|
||||||
|
}
|
||||||
|
player->SetX(player->GetX()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
|
||||||
|
player->movementVelocity.x=moveAmt*fElapsedTime*player->GetMoveSpdMult();
|
||||||
if(staircaseDirection=="RIGHT"){
|
if(staircaseDirection=="RIGHT"){
|
||||||
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
||||||
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F;
|
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
|
||||||
} else
|
} else
|
||||||
if(staircaseDirection=="LEFT"){
|
if(staircaseDirection=="LEFT"){
|
||||||
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
||||||
player->movementVelocity.y="Player.StaircaseClimbSpd"_F;
|
player->movementVelocity.y="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
|
||||||
}
|
}
|
||||||
player->SetFacingDirection(RIGHT);
|
player->SetFacingDirection(RIGHT);
|
||||||
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
|
|
||||||
player->UpdateWalkingAnimation(RIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
newAimingAngle+=vf2d{1,0};
|
newAimingAngle+=vf2d{1,0};
|
||||||
|
|
||||||
@@ -490,21 +500,27 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
heldDownMovementKey=true;
|
heldDownMovementKey=true;
|
||||||
}
|
}
|
||||||
if(LeftHeld()){
|
if(LeftHeld()){
|
||||||
player->SetX(player->GetX()-fElapsedTime*"Player.MoveSpd"_F*player->GetMoveSpdMult());
|
float moveAmt="Player.MoveSpd"_F;
|
||||||
player->movementVelocity.x=-"Player.MoveSpd"_F;
|
if(Input::UsingGamepad()&&KEY_SCROLLHORZ_L.Analog()<=-0.2f){
|
||||||
|
float controllerAmt=abs(KEY_SCROLLHORZ_L.Analog());
|
||||||
|
if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone.
|
||||||
|
if(controllerAmt>animationSpd){
|
||||||
|
animationSpd=controllerAmt;
|
||||||
|
}
|
||||||
|
moveAmt*=abs(KEY_SCROLLHORZ_L.Analog());
|
||||||
|
}else
|
||||||
|
if(!Input::UsingGamepad()){
|
||||||
|
animationSpd=1.f;
|
||||||
|
}
|
||||||
|
player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
|
||||||
|
player->movementVelocity.x=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
|
||||||
if(staircaseDirection=="RIGHT"){
|
if(staircaseDirection=="RIGHT"){
|
||||||
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
||||||
player->movementVelocity.y="Player.StaircaseClimbSpd"_F;
|
player->movementVelocity.y="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
|
||||||
} else
|
} else
|
||||||
if(staircaseDirection=="LEFT"){
|
if(staircaseDirection=="LEFT"){
|
||||||
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
|
||||||
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F;
|
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
|
||||||
}
|
|
||||||
if(setIdleAnimation){
|
|
||||||
player->SetFacingDirection(LEFT);
|
|
||||||
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
|
|
||||||
player->UpdateWalkingAnimation(LEFT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newAimingAngle-=vf2d{1,0};
|
newAimingAngle-=vf2d{1,0};
|
||||||
@@ -513,14 +529,20 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
heldDownMovementKey=true;
|
heldDownMovementKey=true;
|
||||||
}
|
}
|
||||||
if(UpHeld()){
|
if(UpHeld()){
|
||||||
player->SetY(player->GetY()-fElapsedTime*"Player.MoveSpd"_F*player->GetMoveSpdMult());
|
float moveAmt="Player.MoveSpd"_F;
|
||||||
player->movementVelocity.y=-"Player.MoveSpd"_F*fElapsedTime;
|
if(Input::UsingGamepad()&&KEY_SCROLLVERT_L.Analog()<=-0.2f){
|
||||||
if(setIdleAnimation){
|
float controllerAmt=abs(KEY_SCROLLVERT_L.Analog());
|
||||||
player->SetFacingDirection(UP);
|
if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone.
|
||||||
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
|
if(controllerAmt>animationSpd){
|
||||||
player->UpdateWalkingAnimation(UP);
|
animationSpd=controllerAmt;
|
||||||
}
|
}
|
||||||
|
moveAmt*=abs(KEY_SCROLLVERT_L.Analog());
|
||||||
|
}else
|
||||||
|
if(!Input::UsingGamepad()){
|
||||||
|
animationSpd=1.f;
|
||||||
}
|
}
|
||||||
|
player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
|
||||||
|
player->movementVelocity.y=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
|
||||||
|
|
||||||
newAimingAngle-=vf2d{0,1};
|
newAimingAngle-=vf2d{0,1};
|
||||||
|
|
||||||
@@ -528,14 +550,20 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
heldDownMovementKey=true;
|
heldDownMovementKey=true;
|
||||||
}
|
}
|
||||||
if(DownHeld()){
|
if(DownHeld()){
|
||||||
player->SetY(player->GetY()+fElapsedTime*"Player.MoveSpd"_F*player->GetMoveSpdMult());
|
float moveAmt="Player.MoveSpd"_F;
|
||||||
player->movementVelocity.y="Player.MoveSpd"_F*fElapsedTime;
|
if(Input::UsingGamepad()&&KEY_SCROLLVERT_L.Analog()>=0.2f){
|
||||||
if(setIdleAnimation){
|
float controllerAmt=abs(KEY_SCROLLVERT_L.Analog());
|
||||||
player->SetFacingDirection(DOWN);
|
if(controllerAmt>=0.8f)controllerAmt=1.f; //Edge zone.
|
||||||
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
|
if(controllerAmt>animationSpd){
|
||||||
player->UpdateWalkingAnimation(DOWN);
|
animationSpd=controllerAmt;
|
||||||
}
|
}
|
||||||
|
moveAmt*=abs(KEY_SCROLLVERT_L.Analog());
|
||||||
|
}else
|
||||||
|
if(!Input::UsingGamepad()){
|
||||||
|
animationSpd=1.f;
|
||||||
}
|
}
|
||||||
|
player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
|
||||||
|
player->movementVelocity.y=moveAmt*fElapsedTime*player->GetMoveSpdMult();
|
||||||
|
|
||||||
newAimingAngle+=vf2d{0,1};
|
newAimingAngle+=vf2d{0,1};
|
||||||
|
|
||||||
@@ -546,6 +574,23 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
player->aimingAngle=newAimingAngle.norm().polar();
|
player->aimingAngle=newAimingAngle.norm().polar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(heldDownMovementKey){
|
||||||
|
if(abs(player->movementVelocity.x)>abs(player->movementVelocity.y)){ //Greater Horizontal movement.
|
||||||
|
if(player->movementVelocity.x!=0.f){
|
||||||
|
player->SetFacingDirection(player->movementVelocity.x>0?RIGHT:LEFT);
|
||||||
|
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
|
||||||
|
player->UpdateWalkingAnimation(player->GetFacingDirection(),animationSpd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{ //Greater Vertical movement.
|
||||||
|
if(player->movementVelocity.y!=0.f){
|
||||||
|
player->SetFacingDirection(player->movementVelocity.y>0?DOWN:UP);
|
||||||
|
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
|
||||||
|
player->UpdateWalkingAnimation(player->GetFacingDirection(),animationSpd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if(UpReleased()){
|
if(UpReleased()){
|
||||||
player->SetLastReleasedMovementKey(UP);
|
player->SetLastReleasedMovementKey(UP);
|
||||||
player->movementVelocity.y=0;
|
player->movementVelocity.y=0;
|
||||||
@@ -612,7 +657,7 @@ void AiL::HandleUserInput(float fElapsedTime){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(heldDownMovementKey){
|
if(heldDownMovementKey){
|
||||||
player->footstepTimer+=GetElapsedTime();
|
player->footstepTimer+=GetElapsedTime()*animationSpd;
|
||||||
if(player->footstepTimer>"Player.Footstep Timer"_F){
|
if(player->footstepTimer>"Player.Footstep Timer"_F){
|
||||||
player->footstepTimer-="Player.Footstep Timer"_F;
|
player->footstepTimer-="Player.Footstep Timer"_F;
|
||||||
|
|
||||||
|
|||||||
@@ -61,25 +61,25 @@ void sig::Animation::InitializeAnimations(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
auto SetupClassWalkIdleAnimations=[&](Renderable&sheet,std::string className){
|
auto SetupClassWalkIdleAnimations=[&](Renderable&sheet,std::string className){
|
||||||
Animate2D::FrameSequence pl_walk_s{0.2f};
|
Animate2D::FrameSequence pl_walk_s{"Player.WalkingFrameSpd"_F};
|
||||||
pl_walk_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}});
|
pl_walk_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}});
|
||||||
pl_walk_s.AddFrame({&sheet,{vi2d{1,0}*24,{24,24}}});
|
pl_walk_s.AddFrame({&sheet,{vi2d{1,0}*24,{24,24}}});
|
||||||
pl_walk_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}});
|
pl_walk_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}});
|
||||||
pl_walk_s.AddFrame({&sheet,{vi2d{2,0}*24,{24,24}}});
|
pl_walk_s.AddFrame({&sheet,{vi2d{2,0}*24,{24,24}}});
|
||||||
ANIMATION_DATA[className+"_WALK_S"]=pl_walk_s;
|
ANIMATION_DATA[className+"_WALK_S"]=pl_walk_s;
|
||||||
Animate2D::FrameSequence pl_walk_e{0.2f};
|
Animate2D::FrameSequence pl_walk_e{"Player.WalkingFrameSpd"_F};
|
||||||
pl_walk_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}});
|
pl_walk_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}});
|
||||||
pl_walk_e.AddFrame({&sheet,{vi2d{1,3}*24,{24,24}}});
|
pl_walk_e.AddFrame({&sheet,{vi2d{1,3}*24,{24,24}}});
|
||||||
pl_walk_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}});
|
pl_walk_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}});
|
||||||
pl_walk_e.AddFrame({&sheet,{vi2d{2,3}*24,{24,24}}});
|
pl_walk_e.AddFrame({&sheet,{vi2d{2,3}*24,{24,24}}});
|
||||||
ANIMATION_DATA[className+"_WALK_E"]=pl_walk_e;
|
ANIMATION_DATA[className+"_WALK_E"]=pl_walk_e;
|
||||||
Animate2D::FrameSequence pl_walk_w{0.2f};
|
Animate2D::FrameSequence pl_walk_w{"Player.WalkingFrameSpd"_F};
|
||||||
pl_walk_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}});
|
pl_walk_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}});
|
||||||
pl_walk_w.AddFrame({&sheet,{vi2d{1,2}*24,{24,24}}});
|
pl_walk_w.AddFrame({&sheet,{vi2d{1,2}*24,{24,24}}});
|
||||||
pl_walk_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}});
|
pl_walk_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}});
|
||||||
pl_walk_w.AddFrame({&sheet,{vi2d{2,2}*24,{24,24}}});
|
pl_walk_w.AddFrame({&sheet,{vi2d{2,2}*24,{24,24}}});
|
||||||
ANIMATION_DATA[className+"_WALK_W"]=pl_walk_w;
|
ANIMATION_DATA[className+"_WALK_W"]=pl_walk_w;
|
||||||
Animate2D::FrameSequence pl_walk_n{0.2f};
|
Animate2D::FrameSequence pl_walk_n{"Player.WalkingFrameSpd"_F};
|
||||||
pl_walk_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}});
|
pl_walk_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}});
|
||||||
pl_walk_n.AddFrame({&sheet,{vi2d{1,1}*24,{24,24}}});
|
pl_walk_n.AddFrame({&sheet,{vi2d{1,1}*24,{24,24}}});
|
||||||
pl_walk_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}});
|
pl_walk_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}});
|
||||||
|
|||||||
@@ -780,9 +780,9 @@ void Player::AddAnimation(std::string state){
|
|||||||
animation.AddState(state,ANIMATION_DATA.at(state));
|
animation.AddState(state,ANIMATION_DATA.at(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UpdateAnimation(std::string animState,int specificClass){
|
void Player::UpdateAnimation(std::string animState,int specificClass, const float frameMult){
|
||||||
if(specificClass==ANY||specificClass&GetClass()){
|
if(specificClass==ANY||specificClass&GetClass()){
|
||||||
animation.ChangeState(internal_animState,animState);
|
animation.ChangeState(internal_animState,animState,frameMult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -871,7 +871,7 @@ void Player::Spin(float duration,float spinSpd){
|
|||||||
spin_angle=0;
|
spin_angle=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UpdateWalkingAnimation(Key direction){
|
void Player::UpdateWalkingAnimation(Key direction, const float frameMult){
|
||||||
std::string anim;
|
std::string anim;
|
||||||
switch(direction){
|
switch(direction){
|
||||||
case UP:anim=GetWalkNAnimation();break;
|
case UP:anim=GetWalkNAnimation();break;
|
||||||
@@ -879,7 +879,7 @@ void Player::UpdateWalkingAnimation(Key direction){
|
|||||||
case DOWN:anim=GetWalkSAnimation();break;
|
case DOWN:anim=GetWalkSAnimation();break;
|
||||||
case LEFT:anim=GetWalkWAnimation();break;
|
case LEFT:anim=GetWalkWAnimation();break;
|
||||||
}
|
}
|
||||||
UpdateAnimation(anim);
|
UpdateAnimation(anim,0,frameMult);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UpdateIdleAnimation(Key direction){
|
void Player::UpdateIdleAnimation(Key direction){
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public:
|
|||||||
vf2d GetVelocity();
|
vf2d GetVelocity();
|
||||||
bool HasIframes();
|
bool HasIframes();
|
||||||
void Update(float fElapsedTime);
|
void Update(float fElapsedTime);
|
||||||
void UpdateWalkingAnimation(Key direction);
|
void UpdateWalkingAnimation(Key direction, const float frameMult=1.f);
|
||||||
void UpdateIdleAnimation(Key direction);
|
void UpdateIdleAnimation(Key direction);
|
||||||
//The range is the search range in tiles.
|
//The range is the search range in tiles.
|
||||||
bool CanPathfindTo(vf2d pos,vf2d targetPos,float range=8);
|
bool CanPathfindTo(vf2d pos,vf2d targetPos,float range=8);
|
||||||
@@ -176,9 +176,8 @@ public:
|
|||||||
bool Hurt(int damage,bool onUpperLevel,float z);
|
bool Hurt(int damage,bool onUpperLevel,float z);
|
||||||
//Return false if healing was not possible.
|
//Return false if healing was not possible.
|
||||||
bool Heal(int damage,bool suppressDamageNumber=false);
|
bool Heal(int damage,bool suppressDamageNumber=false);
|
||||||
//specificClass is a bitwise-combination of classes from the Class enum. It makes sure certain animations only play if you are a certain class.
|
//specificClass is a bitwise-combination of classes from the Class enum. It makes sure certain animations only play if you are a certain class.=
|
||||||
//Set force to true to force the animation to restart evne if the animation were already playing.
|
void UpdateAnimation(std::string animState,int specificClass=ANY,const float frameMult=1.f);
|
||||||
void UpdateAnimation(std::string animState,int specificClass=ANY);
|
|
||||||
Animate2D::Frame GetFrame();
|
Animate2D::Frame GetFrame();
|
||||||
Key GetLastReleasedMovementKey();
|
Key GetLastReleasedMovementKey();
|
||||||
float GetSwordSwingTimer();
|
float GetSwordSwingTimer();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ INCLUDE_DATA
|
|||||||
void SteamStatsReceivedHandler::SteamStatsReceived( UserStatsReceived_t* pCallback ){
|
void SteamStatsReceivedHandler::SteamStatsReceived( UserStatsReceived_t* pCallback ){
|
||||||
if(pCallback->m_eResult==k_EResultOK){
|
if(pCallback->m_eResult==k_EResultOK){
|
||||||
SteamUserStats()->GetStat("Achievement.Kill Unlocks.Total Kill API Name"_S.c_str(),&Unlock::monsterKillCount);
|
SteamUserStats()->GetStat("Achievement.Kill Unlocks.Total Kill API Name"_S.c_str(),&Unlock::monsterKillCount);
|
||||||
LOG(std::format("Retried monster kill count: {}",Unlock::monsterKillCount));
|
LOG(std::format("Retrived monster kill count: {}",Unlock::monsterKillCount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -35,6 +35,9 @@ File Hash on Save/Load.
|
|||||||
|
|
||||||
Include a Reset Achievements button in Settings
|
Include a Reset Achievements button in Settings
|
||||||
|
|
||||||
|
Move based on analog stick amount instead of full speed by default
|
||||||
|
Still aiming at a target down below?
|
||||||
|
|
||||||
============================================
|
============================================
|
||||||
Consider a "killed by player" / "marked by player" flag for monsters to determine if a player gets credit for a monster kill (for achievements)
|
Consider a "killed by player" / "marked by player" flag for monsters to determine if a player gets credit for a monster kill (for achievements)
|
||||||
Make another actions config file for the main build (The app # is different)
|
Make another actions config file for the main build (The app # is different)
|
||||||
@@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 8551
|
#define VERSION_BUILD 8577
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ Player
|
|||||||
# Amount of spd to increase/decrease vertically as you climb staircases
|
# Amount of spd to increase/decrease vertically as you climb staircases
|
||||||
StaircaseClimbSpd = 45
|
StaircaseClimbSpd = 45
|
||||||
|
|
||||||
|
# Walking Default Animation Delay per Frame
|
||||||
|
WalkingFrameSpd = 0.2s
|
||||||
|
|
||||||
# How much speed the player loses while no momentum is being added.
|
# How much speed the player loses while no momentum is being added.
|
||||||
Friction = 400
|
Friction = 400
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
"controller_mappings"
|
"controller_mappings"
|
||||||
{
|
{
|
||||||
"version" "3"
|
"version" "3"
|
||||||
"revision" "82"
|
"revision" "87"
|
||||||
"title" "#Title_Config"
|
"title" "Generic Gamepad"
|
||||||
"description" "#Description_Config"
|
"description" "Default Generic Gamepad controls"
|
||||||
"creator" "76561198025675819"
|
"creator" "76561198025675819"
|
||||||
"progenitor" ""
|
"progenitor" ""
|
||||||
"url" "usercloud://2895980/generic gamepad_3"
|
"url" "autosave://C:\\Program Files (x86)\\Steam\\steamapps\\common\\Steam Controller Configs\\65410091\\config\\2895980\\controller_generic.vdf"
|
||||||
"export_type" "personal_cloud"
|
"export_type" "personal_local"
|
||||||
"controller_type" "controller_generic"
|
"controller_type" "controller_generic"
|
||||||
"controller_caps" "1573375"
|
"controller_caps" "1573375"
|
||||||
"major_revision" "0"
|
"major_revision" "0"
|
||||||
"minor_revision" "0"
|
"minor_revision" "0"
|
||||||
"Timestamp" "1711341077"
|
"Timestamp" "1711752971"
|
||||||
"actions"
|
"actions"
|
||||||
{
|
{
|
||||||
"InGameControls"
|
"InGameControls"
|
||||||
@@ -21,6 +21,11 @@
|
|||||||
"legacy_set" "0"
|
"legacy_set" "0"
|
||||||
"StickPadGyro"
|
"StickPadGyro"
|
||||||
{
|
{
|
||||||
|
"Move"
|
||||||
|
{
|
||||||
|
"title" "#Move"
|
||||||
|
"input_mode" "joystick_move"
|
||||||
|
}
|
||||||
"Scroll"
|
"Scroll"
|
||||||
{
|
{
|
||||||
"title" "#Scroll"
|
"title" "#Scroll"
|
||||||
@@ -66,8 +71,8 @@
|
|||||||
{
|
{
|
||||||
"english"
|
"english"
|
||||||
{
|
{
|
||||||
"Title_Config" "Generic Gamepad"
|
"Title_Config" "Adventures in Lestoria Configuration"
|
||||||
"Description_Config" "Generic gamepad configuration."
|
"Description_Config" "The default control set for Adventures in Lestoria."
|
||||||
"Set_Ingame" "Gameplay Controls"
|
"Set_Ingame" "Gameplay Controls"
|
||||||
"BasicAttack" "Basic Attack"
|
"BasicAttack" "Basic Attack"
|
||||||
"Defensive" "Use Defensive"
|
"Defensive" "Use Defensive"
|
||||||
@@ -84,6 +89,7 @@
|
|||||||
"Function1" "Menu Function 1"
|
"Function1" "Menu Function 1"
|
||||||
"Function2" "Menu Function 2"
|
"Function2" "Menu Function 2"
|
||||||
"Menu" "Menu/Pause"
|
"Menu" "Menu/Pause"
|
||||||
|
"Move" "Move"
|
||||||
"Up" "Up"
|
"Up" "Up"
|
||||||
"Down" "Down"
|
"Down" "Down"
|
||||||
"Left" "Left"
|
"Left" "Left"
|
||||||
@@ -614,6 +620,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
"group"
|
"group"
|
||||||
|
{
|
||||||
|
"id" "24"
|
||||||
|
"mode" "joystick_move"
|
||||||
|
"name" ""
|
||||||
|
"description" ""
|
||||||
|
"inputs"
|
||||||
|
{
|
||||||
|
}
|
||||||
|
"settings"
|
||||||
|
{
|
||||||
|
"virtual_mode" "1"
|
||||||
|
}
|
||||||
|
"gameactions"
|
||||||
|
{
|
||||||
|
"InGameControls" "Move"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"group"
|
||||||
{
|
{
|
||||||
"id" "0"
|
"id" "0"
|
||||||
"mode" "switches"
|
"mode" "switches"
|
||||||
@@ -761,7 +785,8 @@
|
|||||||
"2" "left_trigger active"
|
"2" "left_trigger active"
|
||||||
"3" "right_trigger active"
|
"3" "right_trigger active"
|
||||||
"15" "joystick inactive"
|
"15" "joystick inactive"
|
||||||
"23" "joystick active"
|
"23" "joystick inactive"
|
||||||
|
"24" "joystick active"
|
||||||
"16" "right_joystick inactive"
|
"16" "right_joystick inactive"
|
||||||
"22" "right_joystick active"
|
"22" "right_joystick active"
|
||||||
"14" "dpad inactive"
|
"14" "dpad inactive"
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
"controller_mappings"
|
"controller_mappings"
|
||||||
{
|
{
|
||||||
"version" "3"
|
"version" "3"
|
||||||
"revision" "83"
|
"revision" "85"
|
||||||
"title" "#Title_Config"
|
"title" "Switch Pro"
|
||||||
"description" "#Description_Config"
|
"description" "Default Switch Pro configuration."
|
||||||
"creator" "76561198025675819"
|
"creator" "76561198025675819"
|
||||||
"progenitor" ""
|
"progenitor" ""
|
||||||
"url" "usercloud://2895980/switch pro configuration_0"
|
"url" "autosave://C:\\Program Files (x86)\\Steam\\steamapps\\common\\Steam Controller Configs\\65410091\\config\\2895980\\controller_switch_pro.vdf"
|
||||||
"export_type" "personal_cloud"
|
"export_type" "personal_local"
|
||||||
"controller_type" "controller_switch_pro"
|
"controller_type" "controller_switch_pro"
|
||||||
"controller_caps" "613772287"
|
"controller_caps" "613772287"
|
||||||
"major_revision" "0"
|
"major_revision" "0"
|
||||||
"minor_revision" "0"
|
"minor_revision" "0"
|
||||||
"Timestamp" "1711340749"
|
"Timestamp" "1711752483"
|
||||||
"actions"
|
"actions"
|
||||||
{
|
{
|
||||||
"InGameControls"
|
"InGameControls"
|
||||||
@@ -21,6 +21,11 @@
|
|||||||
"legacy_set" "0"
|
"legacy_set" "0"
|
||||||
"StickPadGyro"
|
"StickPadGyro"
|
||||||
{
|
{
|
||||||
|
"Move"
|
||||||
|
{
|
||||||
|
"title" "#Move"
|
||||||
|
"input_mode" "joystick_move"
|
||||||
|
}
|
||||||
"Scroll"
|
"Scroll"
|
||||||
{
|
{
|
||||||
"title" "#Scroll"
|
"title" "#Scroll"
|
||||||
@@ -66,8 +71,8 @@
|
|||||||
{
|
{
|
||||||
"english"
|
"english"
|
||||||
{
|
{
|
||||||
"Title_Config" "Switch Pro"
|
"Title_Config" "Adventures in Lestoria Configuration"
|
||||||
"Description_Config" "Nintendo Switch Pro controller configuration."
|
"Description_Config" "The default control set for Adventures in Lestoria."
|
||||||
"Set_Ingame" "Gameplay Controls"
|
"Set_Ingame" "Gameplay Controls"
|
||||||
"BasicAttack" "Basic Attack"
|
"BasicAttack" "Basic Attack"
|
||||||
"Defensive" "Use Defensive"
|
"Defensive" "Use Defensive"
|
||||||
@@ -84,6 +89,7 @@
|
|||||||
"Function1" "Menu Function 1"
|
"Function1" "Menu Function 1"
|
||||||
"Function2" "Menu Function 2"
|
"Function2" "Menu Function 2"
|
||||||
"Menu" "Menu/Pause"
|
"Menu" "Menu/Pause"
|
||||||
|
"Move" "Move"
|
||||||
"Up" "Up"
|
"Up" "Up"
|
||||||
"Down" "Down"
|
"Down" "Down"
|
||||||
"Left" "Left"
|
"Left" "Left"
|
||||||
@@ -614,6 +620,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
"group"
|
"group"
|
||||||
|
{
|
||||||
|
"id" "25"
|
||||||
|
"mode" "joystick_move"
|
||||||
|
"name" ""
|
||||||
|
"description" ""
|
||||||
|
"inputs"
|
||||||
|
{
|
||||||
|
}
|
||||||
|
"settings"
|
||||||
|
{
|
||||||
|
"virtual_mode" "1"
|
||||||
|
}
|
||||||
|
"gameactions"
|
||||||
|
{
|
||||||
|
"InGameControls" "Move"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"group"
|
||||||
{
|
{
|
||||||
"id" "0"
|
"id" "0"
|
||||||
"mode" "switches"
|
"mode" "switches"
|
||||||
@@ -761,7 +785,8 @@
|
|||||||
"2" "left_trigger active"
|
"2" "left_trigger active"
|
||||||
"3" "right_trigger active"
|
"3" "right_trigger active"
|
||||||
"15" "joystick inactive"
|
"15" "joystick inactive"
|
||||||
"23" "joystick active"
|
"23" "joystick inactive"
|
||||||
|
"25" "joystick active"
|
||||||
"16" "right_joystick inactive"
|
"16" "right_joystick inactive"
|
||||||
"22" "right_joystick active"
|
"22" "right_joystick active"
|
||||||
"14" "dpad inactive"
|
"14" "dpad inactive"
|
||||||
|
|||||||
+33
-8
@@ -1,18 +1,18 @@
|
|||||||
"controller_mappings"
|
"controller_mappings"
|
||||||
{
|
{
|
||||||
"version" "3"
|
"version" "3"
|
||||||
"revision" "76"
|
"revision" "78"
|
||||||
"title" "#Title_Config"
|
"title" "Xbox/Playstation"
|
||||||
"description" "#Description_Config"
|
"description" "Default Xbox/Playstation controls"
|
||||||
"creator" "76561198025675819"
|
"creator" "76561198025675819"
|
||||||
"progenitor" ""
|
"progenitor" ""
|
||||||
"url" "autosave://C:\\Program Files (x86)\\Steam\\steamapps\\common\\Steam Controller Configs\\65410091\\config\\2895980\\controller_xbox360.vdf"
|
"url" "autosave://C:\\Program Files (x86)\\Steam\\steamapps\\common\\Steam Controller Configs\\65410091\\config\\2895980\\controller_xbox360.vdf"
|
||||||
"export_type" "personal_cloud"
|
"export_type" "personal_local"
|
||||||
"controller_type" "controller_xbox360"
|
"controller_type" "controller_xbox360"
|
||||||
"controller_caps" "1590271"
|
"controller_caps" "1590271"
|
||||||
"major_revision" "0"
|
"major_revision" "0"
|
||||||
"minor_revision" "0"
|
"minor_revision" "0"
|
||||||
"Timestamp" "1711340807"
|
"Timestamp" "1711752757"
|
||||||
"actions"
|
"actions"
|
||||||
{
|
{
|
||||||
"InGameControls"
|
"InGameControls"
|
||||||
@@ -21,6 +21,11 @@
|
|||||||
"legacy_set" "0"
|
"legacy_set" "0"
|
||||||
"StickPadGyro"
|
"StickPadGyro"
|
||||||
{
|
{
|
||||||
|
"Move"
|
||||||
|
{
|
||||||
|
"title" "#Move"
|
||||||
|
"input_mode" "joystick_move"
|
||||||
|
}
|
||||||
"Scroll"
|
"Scroll"
|
||||||
{
|
{
|
||||||
"title" "#Scroll"
|
"title" "#Scroll"
|
||||||
@@ -66,8 +71,8 @@
|
|||||||
{
|
{
|
||||||
"english"
|
"english"
|
||||||
{
|
{
|
||||||
"Title_Config" "Xbox/Playstation"
|
"Title_Config" "Adventures in Lestoria Configuration"
|
||||||
"Description_Config" "Xbox/Playstation controller configuration."
|
"Description_Config" "The default control set for Adventures in Lestoria."
|
||||||
"Set_Ingame" "Gameplay Controls"
|
"Set_Ingame" "Gameplay Controls"
|
||||||
"BasicAttack" "Basic Attack"
|
"BasicAttack" "Basic Attack"
|
||||||
"Defensive" "Use Defensive"
|
"Defensive" "Use Defensive"
|
||||||
@@ -84,6 +89,7 @@
|
|||||||
"Function1" "Menu Function 1"
|
"Function1" "Menu Function 1"
|
||||||
"Function2" "Menu Function 2"
|
"Function2" "Menu Function 2"
|
||||||
"Menu" "Menu/Pause"
|
"Menu" "Menu/Pause"
|
||||||
|
"Move" "Move"
|
||||||
"Up" "Up"
|
"Up" "Up"
|
||||||
"Down" "Down"
|
"Down" "Down"
|
||||||
"Left" "Left"
|
"Left" "Left"
|
||||||
@@ -614,6 +620,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
"group"
|
"group"
|
||||||
|
{
|
||||||
|
"id" "24"
|
||||||
|
"mode" "joystick_move"
|
||||||
|
"name" ""
|
||||||
|
"description" ""
|
||||||
|
"inputs"
|
||||||
|
{
|
||||||
|
}
|
||||||
|
"settings"
|
||||||
|
{
|
||||||
|
"virtual_mode" "1"
|
||||||
|
}
|
||||||
|
"gameactions"
|
||||||
|
{
|
||||||
|
"InGameControls" "Move"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"group"
|
||||||
{
|
{
|
||||||
"id" "0"
|
"id" "0"
|
||||||
"mode" "switches"
|
"mode" "switches"
|
||||||
@@ -761,7 +785,8 @@
|
|||||||
"2" "left_trigger active"
|
"2" "left_trigger active"
|
||||||
"3" "right_trigger active"
|
"3" "right_trigger active"
|
||||||
"15" "joystick inactive"
|
"15" "joystick inactive"
|
||||||
"23" "joystick active"
|
"23" "joystick inactive"
|
||||||
|
"24" "joystick active"
|
||||||
"16" "right_joystick inactive"
|
"16" "right_joystick inactive"
|
||||||
"22" "right_joystick active"
|
"22" "right_joystick active"
|
||||||
"14" "dpad inactive"
|
"14" "dpad inactive"
|
||||||
@@ -7,6 +7,11 @@
|
|||||||
"title" "#Set_Ingame"
|
"title" "#Set_Ingame"
|
||||||
"StickPadGyro"
|
"StickPadGyro"
|
||||||
{
|
{
|
||||||
|
"Move"
|
||||||
|
{
|
||||||
|
"title" "#Move"
|
||||||
|
"input_mode" "joystick_move"
|
||||||
|
}
|
||||||
"Scroll"
|
"Scroll"
|
||||||
{
|
{
|
||||||
"title" "#Scroll"
|
"title" "#Scroll"
|
||||||
@@ -64,6 +69,7 @@
|
|||||||
"Function1" "Menu Function 1"
|
"Function1" "Menu Function 1"
|
||||||
"Function2" "Menu Function 2"
|
"Function2" "Menu Function 2"
|
||||||
"Menu" "Menu/Pause"
|
"Menu" "Menu/Pause"
|
||||||
|
"Move" "Move"
|
||||||
"Up" "Up"
|
"Up" "Up"
|
||||||
"Down" "Down"
|
"Down" "Down"
|
||||||
"Left" "Left"
|
"Left" "Left"
|
||||||
@@ -79,7 +85,28 @@
|
|||||||
{
|
{
|
||||||
"0"
|
"0"
|
||||||
{
|
{
|
||||||
"path" "controller_xbox360.vdf"
|
"path" "controller_xboxone.vdf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"controller_xboxone"
|
||||||
|
{
|
||||||
|
"0"
|
||||||
|
{
|
||||||
|
"path" "controller_xboxone.vdf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"controller_ps5"
|
||||||
|
{
|
||||||
|
"0"
|
||||||
|
{
|
||||||
|
"path" "controller_xboxone.vdf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"controller_ps4"
|
||||||
|
{
|
||||||
|
"0"
|
||||||
|
{
|
||||||
|
"path" "controller_xboxone.vdf"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"controller_generic"
|
"controller_generic"
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ namespace olc::utils::Animate2D
|
|||||||
class FrameSequence
|
class FrameSequence
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Style m_nStyle;
|
||||||
|
std::vector<Frame> m_vFrames;
|
||||||
|
float m_fFrameDuration = 0.1f;
|
||||||
|
float m_fFrameRate = 10.0f;
|
||||||
// Constructs a sequence of frames with a duration and a traversal style
|
// Constructs a sequence of frames with a duration and a traversal style
|
||||||
inline FrameSequence(const float fFrameDuration = 0.1f, const Style nStyle = Style::Repeat)
|
inline FrameSequence(const float fFrameDuration = 0.1f, const Style nStyle = Style::Repeat)
|
||||||
{
|
{
|
||||||
@@ -125,10 +129,6 @@ namespace olc::utils::Animate2D
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Style m_nStyle;
|
|
||||||
std::vector<Frame> m_vFrames;
|
|
||||||
float m_fFrameDuration = 0.1f;
|
|
||||||
float m_fFrameRate = 10.0f;
|
|
||||||
|
|
||||||
inline const size_t ConvertTimeToFrame(const float fTime) const
|
inline const size_t ConvertTimeToFrame(const float fTime) const
|
||||||
{
|
{
|
||||||
@@ -170,7 +170,13 @@ namespace olc::utils::Animate2D
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Animation() = default;
|
Animation() = default;
|
||||||
|
float mult = 1.f;
|
||||||
|
|
||||||
|
inline bool ChangeState(AnimationState& state, const StatesEnum& sStateName, const float frameMult)
|
||||||
|
{
|
||||||
|
mult=frameMult;
|
||||||
|
return ChangeState(state,sStateName);
|
||||||
|
}
|
||||||
// Change an animation state token to a new state
|
// Change an animation state token to a new state
|
||||||
inline bool ChangeState(AnimationState& state, const StatesEnum& sStateName) const
|
inline bool ChangeState(AnimationState& state, const StatesEnum& sStateName) const
|
||||||
{
|
{
|
||||||
@@ -188,7 +194,7 @@ namespace olc::utils::Animate2D
|
|||||||
// Update an animation state token
|
// Update an animation state token
|
||||||
inline void UpdateState(AnimationState& state, const float fElapsedTime) const
|
inline void UpdateState(AnimationState& state, const float fElapsedTime) const
|
||||||
{
|
{
|
||||||
state.fTime = std::fmod(state.fTime+fElapsedTime,1000);
|
state.fTime = std::fmod(state.fTime+fElapsedTime*mult,1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user