diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index 81734dbb..11defbfa 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -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(GPButtons::L1)}); Player::KEY_ABILITY1.AddKeybind({CONTROLLER,static_cast(GPButtons::FACE_L)}); Player::KEY_ABILITY2.AddKeybind({KEY,E}); - Player::KEY_ABILITY2.AddKeybind({CONTROLLER,static_cast(GPButtons::R1)}); Player::KEY_ABILITY2.AddKeybind({CONTROLLER,static_cast(GPButtons::FACE_U)}); Player::KEY_ABILITY3.AddKeybind({KEY,R}); - Player::KEY_ABILITY3.AddKeybind({CONTROLLER,static_cast(GPButtons::FACE_R)}); + Player::KEY_ABILITY3.AddKeybind({CONTROLLER,static_cast(GPButtons::R1)}); Player::KEY_ABILITY4.AddKeybind({KEY,F}); - Player::KEY_ABILITY4.AddKeybind({CONTROLLER,static_cast(GPButtons::FACE_D)}); + Player::KEY_ABILITY4.AddKeybind({CONTROLLER,static_cast(GPButtons::R2)}); Player::KEY_DEFENSIVE.AddKeybind({MOUSE,Mouse::RIGHT}); Player::KEY_DEFENSIVE.AddKeybind({KEY,SPACE}); - Player::KEY_DEFENSIVE.AddKeybind({CONTROLLER,static_cast(GPButtons::R2)}); + Player::KEY_DEFENSIVE.AddKeybind({CONTROLLER,static_cast(GPButtons::FACE_D)}); Player::KEY_ITEM1.AddKeybind({KEY,K1}); - Player::KEY_ITEM1.AddKeybind({CONTROLLER,static_cast(GPButtons::SELECT)}); + Player::KEY_ITEM1.AddKeybind({CONTROLLER,static_cast(GPButtons::L1)}); Player::KEY_ITEM2.AddKeybind({KEY,K2}); - Player::KEY_ITEM2.AddKeybind({CONTROLLER,static_cast(GPButtons::L3)}); + Player::KEY_ITEM2.AddKeybind({CONTROLLER,static_cast(GPButtons::L2)}); Player::KEY_ITEM3.AddKeybind({KEY,K3}); - Player::KEY_ITEM3.AddKeybind({CONTROLLER,static_cast(GPButtons::R3)}); + Player::KEY_ITEM3.AddKeybind({CONTROLLER,static_cast(GPButtons::R2)}); KEY_ATTACK.AddKeybind({KEY,SHIFT}); KEY_ATTACK.AddKeybind({MOUSE,Mouse::LEFT}); - KEY_ATTACK.AddKeybind({CONTROLLER,static_cast(GPButtons::L2)}); + KEY_ATTACK.AddKeybind({CONTROLLER,static_cast(GPButtons::FACE_R)}); KEY_LEFT.AddKeybind({KEY,Key::A}); KEY_LEFT.AddKeybind({KEY,LEFT}); KEY_LEFT.AddKeybind({CONTROLLER,static_cast(GPButtons::DPAD_L)}); diff --git a/Adventures in Lestoria/GameSettings.cpp b/Adventures in Lestoria/GameSettings.cpp index 931bd2d3..d134d20e 100644 --- a/Adventures in Lestoria/GameSettings.cpp +++ b/Adventures in Lestoria/GameSettings.cpp @@ -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; diff --git a/Adventures in Lestoria/GameSettings.h b/Adventures in Lestoria/GameSettings.h index d995c2f4..58dd890b 100644 --- a/Adventures in Lestoria/GameSettings.h +++ b/Adventures in Lestoria/GameSettings.h @@ -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(); diff --git a/Adventures in Lestoria/Key.cpp b/Adventures in Lestoria/Key.cpp index 0116d3f1..ed719a7b 100644 --- a/Adventures in Lestoria/Key.cpp +++ b/Adventures in Lestoria/Key.cpp @@ -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){ diff --git a/Adventures in Lestoria/Key.h b/Adventures in Lestoria/Key.h index 6fbb6e79..b10e9fb2 100644 --- a/Adventures in Lestoria/Key.h +++ b/Adventures in Lestoria/Key.h @@ -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; diff --git a/Adventures in Lestoria/LevelCompleteWindow.cpp b/Adventures in Lestoria/LevelCompleteWindow.cpp index 796872e3..fa275e64 100644 --- a/Adventures in Lestoria/LevelCompleteWindow.cpp +++ b/Adventures in Lestoria/LevelCompleteWindow.cpp @@ -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; }; diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 81240e98..becfea05 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -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(LEVEL_COMPLETE,"Stage Complete Label")->SetLabel("Stage Completed"); + if(Unlock::IsUnlocked("HUB")){ + Component(LEVEL_COMPLETE,"Next Button")->SetLabel("Proceed\nto Camp"); + }else{ + Component(LEVEL_COMPLETE,"Next Button")->SetLabel("Proceed"); + } GameState::ChangeState(States::LEVEL_COMPLETE); } return; diff --git a/Adventures in Lestoria/SettingsWindow.cpp b/Adventures in Lestoria/SettingsWindow.cpp index f5b8d605..94b584f0 100644 --- a/Adventures in Lestoria/SettingsWindow.cpp +++ b/Adventures in Lestoria/SettingsWindow.cpp @@ -101,8 +101,8 @@ void Menu::InitializeSettingsWindow(){ settingsWindow->ADD("Controller Rumble Checkbox",Checkbox)(geom2d::rect{{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(); diff --git a/Adventures in Lestoria/State_MainMenu.cpp b/Adventures in Lestoria/State_MainMenu.cpp index bc8bf673..a72b5d63 100644 --- a/Adventures in Lestoria/State_MainMenu.cpp +++ b/Adventures in Lestoria/State_MainMenu.cpp @@ -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(); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index ff30aac1..2bcda6c3 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -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 diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 3d50173e..6bfc7964 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ