Change default controller keybinds for new characters. Player proceeds back to overworld if the camp has not been unlocked yet. Buttons adjusted accordingly. Rumble only occurs on the main menu while in the settings menu and only when toggling the rumble button. Cause iframes to continuously refresh on the main menu so the invisible player doesn't "die" if they view the main menu for too long. Release Build 7700.

pull/35/head
sigonasr2 11 months ago
parent 3261ddf6f5
commit fa8dfd3c6f
  1. 16
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 5
      Adventures in Lestoria/GameSettings.cpp
  3. 4
      Adventures in Lestoria/GameSettings.h
  4. 4
      Adventures in Lestoria/Key.cpp
  5. 2
      Adventures in Lestoria/Key.h
  6. 6
      Adventures in Lestoria/LevelCompleteWindow.cpp
  7. 6
      Adventures in Lestoria/Player.cpp
  8. 4
      Adventures in Lestoria/SettingsWindow.cpp
  9. 1
      Adventures in Lestoria/State_MainMenu.cpp
  10. 2
      Adventures in Lestoria/Version.h
  11. BIN
      x64/Release/Adventures in Lestoria.exe

@ -2784,27 +2784,25 @@ void AiL::DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col){
void AiL::InitializeDefaultKeybinds(){
Player::KEY_ABILITY1.AddKeybind({KEY,Q});
Player::KEY_ABILITY1.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::L1)});
Player::KEY_ABILITY1.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_L)});
Player::KEY_ABILITY2.AddKeybind({KEY,E});
Player::KEY_ABILITY2.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::R1)});
Player::KEY_ABILITY2.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_U)});
Player::KEY_ABILITY3.AddKeybind({KEY,R});
Player::KEY_ABILITY3.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_R)});
Player::KEY_ABILITY3.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::R1)});
Player::KEY_ABILITY4.AddKeybind({KEY,F});
Player::KEY_ABILITY4.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_D)});
Player::KEY_ABILITY4.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::R2)});
Player::KEY_DEFENSIVE.AddKeybind({MOUSE,Mouse::RIGHT});
Player::KEY_DEFENSIVE.AddKeybind({KEY,SPACE});
Player::KEY_DEFENSIVE.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::R2)});
Player::KEY_DEFENSIVE.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_D)});
Player::KEY_ITEM1.AddKeybind({KEY,K1});
Player::KEY_ITEM1.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::SELECT)});
Player::KEY_ITEM1.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::L1)});
Player::KEY_ITEM2.AddKeybind({KEY,K2});
Player::KEY_ITEM2.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::L3)});
Player::KEY_ITEM2.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::L2)});
Player::KEY_ITEM3.AddKeybind({KEY,K3});
Player::KEY_ITEM3.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::R3)});
Player::KEY_ITEM3.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::R2)});
KEY_ATTACK.AddKeybind({KEY,SHIFT});
KEY_ATTACK.AddKeybind({MOUSE,Mouse::LEFT});
KEY_ATTACK.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::L2)});
KEY_ATTACK.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::FACE_R)});
KEY_LEFT.AddKeybind({KEY,Key::A});
KEY_LEFT.AddKeybind({KEY,LEFT});
KEY_LEFT.AddKeybind({CONTROLLER,static_cast<int>(GPButtons::DPAD_L)});

@ -49,14 +49,15 @@ bool GameSettings::screenShake=true;
bool GameSettings::rumble=true;
bool GameSettings::terrainCollisionBoxes=true;
bool GameSettings::keyboardAutoAim=false;
const bool GameSettings::OVERRIDE=true;
vi2d GameSettings::windowPos{30,30};
IconType GameSettings::iconType=IconType::XB;
const bool GameSettings::ScreenShakeEnabled(){
return screenShake;
}
const bool GameSettings::RumbleEnabled(){
return rumble;
const bool GameSettings::RumbleEnabled(const bool override){
return rumble&&(override||GameState::STATE!=GameState::states[States::MAIN_MENU]);
}
const bool GameSettings::TerrainCollisionBoxesEnabled(){
return terrainCollisionBoxes;

@ -48,8 +48,10 @@ class GameSettings{
static vi2d windowPos;
static IconType iconType;
public:
static const bool OVERRIDE;
static const bool ScreenShakeEnabled();
static const bool RumbleEnabled();
static const bool RumbleEnabled(const bool override=false);
static const bool TerrainCollisionBoxesEnabled();
static const bool KeyboardAutoAimEnabled();
static const vi2d GetWindowPos();

@ -612,8 +612,8 @@ const bool Input::AxesActive(){
return xAxis!=0.f||yAxis!=0.f;
}
void Input::StartVibration(){
if(!GameSettings::RumbleEnabled())return;
void Input::StartVibration(const bool override){
if(!GameSettings::RumbleEnabled(override))return;
if(UsingGamepad()){
for(GamePad*gamepad:GamePad::getGamepads()){
if(gamepad->stillConnected){

@ -77,7 +77,7 @@ public:
}
static const bool UsingGamepad();
static const bool AxesActive();
static void StartVibration();
static void StartVibration(const bool override=false);
static void StopVibration();
const InputType GetType()const;
const std::string str()const;

@ -70,7 +70,11 @@ void Menu::InitializeLevelCompleteWindow(){
auto nextButtonAction=[](MenuFuncData data){
Unlock::UnlockArea(State_OverworldMap::GetCurrentConnectionPoint().map);
Merchant::RandomizeTravelingMerchant();
GameState::ChangeState(States::GAME_HUB,0.25f);
if(Unlock::IsUnlocked("HUB")){
GameState::ChangeState(States::GAME_HUB,0.25f);
}else{
GameState::ChangeState(States::OVERWORLD_MAP,0.25f);
}
return true;
};

@ -55,6 +55,7 @@ All rights reserved.
#include "ProgressBar.h"
#include "MenuLabel.h"
#include "GameSettings.h"
#include "Unlock.h"
INCLUDE_MONSTER_DATA
INCLUDE_MONSTER_LIST
@ -982,6 +983,11 @@ void Player::CheckEndZoneCollision(){
endZoneStandTime+=game->GetElapsedTime();
if(endZoneStandTime>="Player.End Zone Wait Time"_F){
Component<MenuLabel>(LEVEL_COMPLETE,"Stage Complete Label")->SetLabel("Stage Completed");
if(Unlock::IsUnlocked("HUB")){
Component<MenuComponent>(LEVEL_COMPLETE,"Next Button")->SetLabel("Proceed\nto Camp");
}else{
Component<MenuComponent>(LEVEL_COMPLETE,"Next Button")->SetLabel("Proceed");
}
GameState::ChangeState(States::LEVEL_COMPLETE);
}
return;

@ -101,8 +101,8 @@ void Menu::InitializeSettingsWindow(){
settingsWindow->ADD("Controller Rumble Checkbox",Checkbox)(geom2d::rect<float>{{4.f,92},{16.f,16.f}},[](ToggleFuncData data){
if(Menu::IsCurrentlyActive(SETTINGS)){
GameSettings::SetRumble(data.checked);
if(GameSettings::RumbleEnabled()){
Input::StartVibration();
if(GameSettings::RumbleEnabled(GameSettings::OVERRIDE)){
Input::StartVibration(GameSettings::OVERRIDE);
data.component.lock()->F(A::RUMBLE_TIMER)=0.3f;
}else{
Input::StopVibration();

@ -57,6 +57,7 @@ void State_MainMenu::OnLevelLoad(){
SelectAndMoveToNewFocusArea();
}
void State_MainMenu::OnUserUpdate(AiL*game){
game->GetPlayer()->SetIframes(999999.f);
game->GetPlayer()->ForceSetPos(game->GetPlayer()->GetPos()+cameraMoveDir*8*game->GetElapsedTime());
lastMoveTime+=game->GetElapsedTime();
if(lastMoveTime>8.f)SelectAndMoveToNewFocusArea();

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 7690
#define VERSION_BUILD 7700
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save