diff --git a/Adventures in Lestoria/Adventures in Lestoria.rc b/Adventures in Lestoria/Adventures in Lestoria.rc index 962c1f96..abbefc6f 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.rc +++ b/Adventures in Lestoria/Adventures in Lestoria.rc @@ -34,7 +34,7 @@ BEGIN VALUE "FileDescription", "Adventures in Lestoria" VALUE "FileVersion", "0.2.1.5299" VALUE "InternalName", "Crawler.exe" - VALUE "LegalCopyright", "Copyright © 2023-2024" + VALUE "LegalCopyright", "Copyright © 2024-2024" VALUE "OriginalFilename", "Adventures in Lestoria.exe" VALUE "ProductName", "Adventures in Lestoria" VALUE "ProductVersion", "0.2.1.5299" diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index 18f744d9..2bc43e73 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -3079,5 +3079,21 @@ const uint8_t AiL::BossEncounterMobCount()const{ void AiL::GetAnyKeyPress(Key key){ - GameState::STATE->GetAnyKeyPress(key); + if(key!=0){ + #pragma region New keyboard input binding listener + if(Menu::stack.back()==Menu::menus[NEW_INPUT]){ //We are requesting a brand new input. + if(key==ESCAPE){ //If we hit escape we don't bother with setting the input and leave immediately. + Menu::CloseMenu(); + return; + } + using A=Attribute; + if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){ + InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key}); + Menu::CloseMenu(); + } + } + #pragma endregion + + GameState::STATE->GetAnyKeyPress(key); + } } \ No newline at end of file diff --git a/Adventures in Lestoria/AttributableStat.cpp b/Adventures in Lestoria/AttributableStat.cpp index 3d5fd573..0f5ee368 100644 --- a/Adventures in Lestoria/AttributableStat.cpp +++ b/Adventures in Lestoria/AttributableStat.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Audio.cpp b/Adventures in Lestoria/Audio.cpp index ef5e0fee..034a2a83 100644 --- a/Adventures in Lestoria/Audio.cpp +++ b/Adventures in Lestoria/Audio.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Audio.h b/Adventures in Lestoria/Audio.h index df885661..cd3bf2c9 100644 --- a/Adventures in Lestoria/Audio.h +++ b/Adventures in Lestoria/Audio.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/BitwiseEnum.h b/Adventures in Lestoria/BitwiseEnum.h index f08614ed..33fce7b5 100644 --- a/Adventures in Lestoria/BitwiseEnum.h +++ b/Adventures in Lestoria/BitwiseEnum.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/BuyItemWindow.cpp b/Adventures in Lestoria/BuyItemWindow.cpp index 7c1456fc..d527d8c7 100644 --- a/Adventures in Lestoria/BuyItemWindow.cpp +++ b/Adventures in Lestoria/BuyItemWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/CREDITS b/Adventures in Lestoria/CREDITS index 195c658e..1d684b90 100644 --- a/Adventures in Lestoria/CREDITS +++ b/Adventures in Lestoria/CREDITS @@ -1,7 +1,7 @@ The inspiration that started it all, Pokemon-based Nico Yazawa sprite: https://www.deviantart.com/kirbysmith/art/Nico-Yazawa-Love-Live-Pokemon-Sprites-548007023 -olcPixelGameEngine Copyright 2023 OneLoneCoder.com under the OLC-3 License +olcPixelGameEngine Copyright© 2024 OneLoneCoder.com under the OLC-3 License *** Minifantasy - Tiny Overworld v1.0 *** @@ -27,5 +27,5 @@ Nb Pixel Font Bundle: https://nimblebeastscollective.itch.io/nb-pixel-font-bundl Nb Pixel Font Bundle 2: https://nimblebeastscollective.itch.io/nb-pixel-font-bundle-2 Ogg Vorbis audio decoder - v1.22 - public domain http://nothings.org/stb_vorbis/ -miniaudio library Copyright 2023 by David Reid under the MIT No Attribution License -olcPGEX_MiniAudio Copyright 2023 by Moros Smith under the OLC-3 License \ No newline at end of file +miniaudio library Copyright© 2024 by David Reid under the MIT No Attribution License +olcPGEX_MiniAudio Copyright© 2024 by Moros Smith under the OLC-3 License \ No newline at end of file diff --git a/Adventures in Lestoria/Checkbox.h b/Adventures in Lestoria/Checkbox.h index b4bb7806..04454ccd 100644 --- a/Adventures in Lestoria/Checkbox.h +++ b/Adventures in Lestoria/Checkbox.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/ConsumableCraftItemWindow.cpp b/Adventures in Lestoria/ConsumableCraftItemWindow.cpp index 3e21d1d9..aed7689a 100644 --- a/Adventures in Lestoria/ConsumableCraftItemWindow.cpp +++ b/Adventures in Lestoria/ConsumableCraftItemWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/CraftItemWindow.cpp b/Adventures in Lestoria/CraftItemWindow.cpp index b9f8c2c0..96dd3904 100644 --- a/Adventures in Lestoria/CraftItemWindow.cpp +++ b/Adventures in Lestoria/CraftItemWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/CraftingRequirement.cpp b/Adventures in Lestoria/CraftingRequirement.cpp index 2d91cea0..e65f7d51 100644 --- a/Adventures in Lestoria/CraftingRequirement.cpp +++ b/Adventures in Lestoria/CraftingRequirement.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/CraftingRequirement.h b/Adventures in Lestoria/CraftingRequirement.h index 409880fd..9105cac9 100644 --- a/Adventures in Lestoria/CraftingRequirement.h +++ b/Adventures in Lestoria/CraftingRequirement.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/DynamicCounter.cpp b/Adventures in Lestoria/DynamicCounter.cpp index 37aa18e5..b245b977 100644 --- a/Adventures in Lestoria/DynamicCounter.cpp +++ b/Adventures in Lestoria/DynamicCounter.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/DynamicCounter.h b/Adventures in Lestoria/DynamicCounter.h index f74223d7..870db53d 100644 --- a/Adventures in Lestoria/DynamicCounter.h +++ b/Adventures in Lestoria/DynamicCounter.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/EnhancementStatsLabel.h b/Adventures in Lestoria/EnhancementStatsLabel.h index 153cb42d..9c224bd2 100644 --- a/Adventures in Lestoria/EnhancementStatsLabel.h +++ b/Adventures in Lestoria/EnhancementStatsLabel.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/EnvironmentalAudio.cpp b/Adventures in Lestoria/EnvironmentalAudio.cpp index 8e7f460c..1be2faa0 100644 --- a/Adventures in Lestoria/EnvironmentalAudio.cpp +++ b/Adventures in Lestoria/EnvironmentalAudio.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/EnvironmentalAudio.h b/Adventures in Lestoria/EnvironmentalAudio.h index d3abb9fc..16cb58ca 100644 --- a/Adventures in Lestoria/EnvironmentalAudio.h +++ b/Adventures in Lestoria/EnvironmentalAudio.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Frog.cpp b/Adventures in Lestoria/Frog.cpp index e4c4b865..fa76fa65 100644 --- a/Adventures in Lestoria/Frog.cpp +++ b/Adventures in Lestoria/Frog.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/FrogTongue.cpp b/Adventures in Lestoria/FrogTongue.cpp index 33198fec..5fb5ed5e 100644 --- a/Adventures in Lestoria/FrogTongue.cpp +++ b/Adventures in Lestoria/FrogTongue.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/FunctionPriming.h b/Adventures in Lestoria/FunctionPriming.h index 20e1619c..51bc7b14 100644 --- a/Adventures in Lestoria/FunctionPriming.h +++ b/Adventures in Lestoria/FunctionPriming.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/GameEvent.cpp b/Adventures in Lestoria/GameEvent.cpp index 75ef7e64..4fe1ece6 100644 --- a/Adventures in Lestoria/GameEvent.cpp +++ b/Adventures in Lestoria/GameEvent.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/GameEvent.h b/Adventures in Lestoria/GameEvent.h index b76f7850..87f09fa0 100644 --- a/Adventures in Lestoria/GameEvent.h +++ b/Adventures in Lestoria/GameEvent.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/GameState.h b/Adventures in Lestoria/GameState.h index e6bb62b8..e5ccde7f 100644 --- a/Adventures in Lestoria/GameState.h +++ b/Adventures in Lestoria/GameState.h @@ -39,6 +39,7 @@ All rights reserved. #include #include #include "Error.h" +#include "Key.h" class AiL; diff --git a/Adventures in Lestoria/IT.cpp b/Adventures in Lestoria/IT.cpp index 728a000d..9c45f03c 100644 --- a/Adventures in Lestoria/IT.cpp +++ b/Adventures in Lestoria/IT.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/IT.h b/Adventures in Lestoria/IT.h index c7883680..67cc663a 100644 --- a/Adventures in Lestoria/IT.h +++ b/Adventures in Lestoria/IT.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/InputControllerWindow.cpp b/Adventures in Lestoria/InputControllerWindow.cpp index dfb120d8..f01d4252 100644 --- a/Adventures in Lestoria/InputControllerWindow.cpp +++ b/Adventures in Lestoria/InputControllerWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/InputHelper.cpp b/Adventures in Lestoria/InputHelper.cpp index 200038c0..c9845980 100644 --- a/Adventures in Lestoria/InputHelper.cpp +++ b/Adventures in Lestoria/InputHelper.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/InputHelper.h b/Adventures in Lestoria/InputHelper.h index e143f60a..b18b998e 100644 --- a/Adventures in Lestoria/InputHelper.h +++ b/Adventures in Lestoria/InputHelper.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/InputKeyboardWindow.cpp b/Adventures in Lestoria/InputKeyboardWindow.cpp index c128de23..a978fd5e 100644 --- a/Adventures in Lestoria/InputKeyboardWindow.cpp +++ b/Adventures in Lestoria/InputKeyboardWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ @@ -42,6 +42,8 @@ All rights reserved. #include "Key.h" #include "InputDisplayComponent.h" +using A=Attribute; + INCLUDE_WINDOW_SIZE void Menu::InitializeKeyboardInputWindow(){ @@ -66,9 +68,14 @@ void Menu::InitializeKeyboardInputWindow(){ inputKeyboardWindow->ADD(std::format("Input_{}_{} Background",row,col),MenuLabel)(geom2d::rect{vf2d{4,36}+vf2d{inputWindowWidth/2.f*col,row*12.f},{inputWindowWidth/4.f,11.f}},inputDisplayName,1.f,ComponentAttr::FIT_TO_LABEL|ComponentAttr::SHADOW)END; - inputKeyboardWindow->ADD(std::format("Input_{}_{} Input Displayer",row,col),InputDisplayComponent)(geom2d::rect{vf2d{4,36}+vf2d{inputWindowWidth/2.f*col,row*12.f}+vf2d{inputWindowWidth/4.f,-1.f},vf2d{inputWindowWidth/4.f,11.f}},*InputGroup::menuNamesToInputGroups[inputDisplayName],InputType::KEY,[](MenuFuncData data){ + auto inputChangeButton=inputKeyboardWindow->ADD(std::format("Input_{}_{} Input Displayer",row,col),InputDisplayComponent)(geom2d::rect{vf2d{4,36}+vf2d{inputWindowWidth/2.f*col,row*12.f}+vf2d{inputWindowWidth/4.f,-1.f},vf2d{inputWindowWidth/4.f,11.f}},*InputGroup::menuNamesToInputGroups[inputDisplayName],InputType::KEY,[](MenuFuncData data){ + Menu::menus[NEW_INPUT]->B(A::IS_KEYBOARD)=true; + Menu::menus[NEW_INPUT]->S(A::KEYBIND)=data.component.lock()->S(A::KEYBIND); + Menu::OpenMenu(NEW_INPUT); return true; })END; + + inputChangeButton->S(A::KEYBIND)=inputDisplayName; //Store the keybind in this button to pass along information. } } @@ -82,10 +89,21 @@ void Menu::InitializeKeyboardInputWindow(){ inputKeyboardWindow->ADD(std::format("GameplayInput_{}_{} Background",row,col),MenuLabel)(geom2d::rect{vf2d{4,104}+vf2d{inputWindowWidth/2.f*col,row*12.f},{inputWindowWidth/4.f,11.f}},inputDisplayName,1.f,ComponentAttr::FIT_TO_LABEL|ComponentAttr::SHADOW)END; - inputKeyboardWindow->ADD(std::format("Input_{}_{} Gameplay Input Displayer",row,col),InputDisplayComponent)(geom2d::rect{vf2d{4,104}+vf2d{inputWindowWidth/2.f*col,row*12.f}+vf2d{inputWindowWidth/4.f,-1.f},vf2d{inputWindowWidth/4.f,11.f}},*InputGroup::menuNamesToInputGroups[inputDisplayName],InputType::KEY,[](MenuFuncData data){ + auto inputChangeButton=inputKeyboardWindow->ADD(std::format("Input_{}_{} Gameplay Input Displayer",row,col),InputDisplayComponent)(geom2d::rect{vf2d{4,104}+vf2d{inputWindowWidth/2.f*col,row*12.f}+vf2d{inputWindowWidth/4.f,-1.f},vf2d{inputWindowWidth/4.f,11.f}},*InputGroup::menuNamesToInputGroups[inputDisplayName],InputType::KEY,[](MenuFuncData data){ + Menu::menus[NEW_INPUT]->B(A::IS_KEYBOARD)=true; + std::string keybindName=data.component.lock()->S(A::KEYBIND); + Menu::menus[NEW_INPUT]->S(A::KEYBIND)=keybindName; + Component(NEW_INPUT,"New Keybind Label")->SetLabel(std::format("Press a new key for '{}'\n\nPress Esc to cancel.",keybindName)); Menu::OpenMenu(NEW_INPUT); return true; })END; + + inputChangeButton->S(A::KEYBIND)=inputDisplayName; //Store the keybind in this button to pass along information. } } + + inputKeyboardWindow->ADD("Confirm Button",MenuComponent)(geom2d::rect{{menuSize.x/2-48.f,170.f},{96.f,20.f}},"Back",[](MenuFuncData data){ + Menu::CloseMenu(); + return true; + })END; } \ No newline at end of file diff --git a/Adventures in Lestoria/InputNewKeybindWindow.cpp b/Adventures in Lestoria/InputNewKeybindWindow.cpp index 22d4dc84..10749be7 100644 --- a/Adventures in Lestoria/InputNewKeybindWindow.cpp +++ b/Adventures in Lestoria/InputNewKeybindWindow.cpp @@ -46,5 +46,5 @@ void Menu::InitializeNewKeybindInputWindow(){ newKeybindWindow->B(A::IS_KEYBOARD)=true; newKeybindWindow->S(A::KEYBIND)=""; - newKeybindWindow->ADD("New Keybind Label",MenuLabel)(geom2d::rect{{0.f,24.f},{192.f,96.f}},"Press a new key for '{}'\n\nPress Esc to cancel.",1.5f,ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE|ComponentAttr::SHADOW)END; + newKeybindWindow->ADD("New Keybind Label",MenuLabel)(geom2d::rect{{0.f,0.f},{192.f,96.f}},"",1.5f,ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE|ComponentAttr::SHADOW)END; } \ No newline at end of file diff --git a/Adventures in Lestoria/InventoryCreator.cpp b/Adventures in Lestoria/InventoryCreator.cpp index 2d30063b..0ab86a66 100644 --- a/Adventures in Lestoria/InventoryCreator.cpp +++ b/Adventures in Lestoria/InventoryCreator.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/InventoryCreator.h b/Adventures in Lestoria/InventoryCreator.h index 99d47718..89a4724d 100644 --- a/Adventures in Lestoria/InventoryCreator.h +++ b/Adventures in Lestoria/InventoryCreator.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/ItemMenuLabel.h b/Adventures in Lestoria/ItemMenuLabel.h index c86af792..aa62c242 100644 --- a/Adventures in Lestoria/ItemMenuLabel.h +++ b/Adventures in Lestoria/ItemMenuLabel.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Key.cpp b/Adventures in Lestoria/Key.cpp index 1bca6f30..f4b6fa8f 100644 --- a/Adventures in Lestoria/Key.cpp +++ b/Adventures in Lestoria/Key.cpp @@ -539,8 +539,12 @@ const InputEngageGroup InputEngageGroup::operator=(const InputEngageGroup&rhs){ void InputGroup::RemovePrimaryKeybind(InputType type){ - std::erase(keyOrder.front()); + keyOrder.erase(keyOrder.begin()); } -void InputGroup::AddPrimaryKeybind(InputType type){ - +void InputGroup::AddPrimaryKeybind(Input key){ + keyOrder.insert(keyOrder.begin(),{key.GetType(),key.key}); +} +void InputGroup::SetNewPrimaryKeybind(Input key){ + RemovePrimaryKeybind(key.GetType()); + AddPrimaryKeybind(key); } \ No newline at end of file diff --git a/Adventures in Lestoria/Key.h b/Adventures in Lestoria/Key.h index f6e6e387..2d993be5 100644 --- a/Adventures in Lestoria/Key.h +++ b/Adventures in Lestoria/Key.h @@ -85,16 +85,17 @@ public: class InputGroup{ friend class AiL; friend class Menu; - friend class State_Keybind; + friend class State_OverworldMap; std::setkeys; std::vectorkeyOrder; //A list of keys inserted in order, for primary key mapping. static safemapmenuNamesToInputGroups; + void RemovePrimaryKeybind(InputType type); + void AddPrimaryKeybind(Input key); public: InputGroup(); void AddKeybind(Input bind); void RemoveKeybind(Input bind); - void RemovePrimaryKeybind(InputType type); - void AddPrimaryKeybind(InputType type); + void SetNewPrimaryKeybind(Input key); const bool Pressed()const; const bool Held()const; const bool Released()const; diff --git a/Adventures in Lestoria/LICENSE_OLC-3.txt b/Adventures in Lestoria/LICENSE_OLC-3.txt index dc238400..46dcdb82 100644 --- a/Adventures in Lestoria/LICENSE_OLC-3.txt +++ b/Adventures in Lestoria/LICENSE_OLC-3.txt @@ -1,7 +1,7 @@ License (OLC-3) ~~~~~~~~~~~~~~~ -Copyright 2018 - 2023 OneLoneCoder.com +Copyright 2018 -© 2024 OneLoneCoder.com Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Adventures in Lestoria/LoadFileButton.h b/Adventures in Lestoria/LoadFileButton.h index 98ab7ed6..ada8ba3e 100644 --- a/Adventures in Lestoria/LoadFileButton.h +++ b/Adventures in Lestoria/LoadFileButton.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Merchant.cpp b/Adventures in Lestoria/Merchant.cpp index e28eb7cd..43437107 100644 --- a/Adventures in Lestoria/Merchant.cpp +++ b/Adventures in Lestoria/Merchant.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Merchant.h b/Adventures in Lestoria/Merchant.h index 1d73ff6f..bc35df0e 100644 --- a/Adventures in Lestoria/Merchant.h +++ b/Adventures in Lestoria/Merchant.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/NPC.cpp b/Adventures in Lestoria/NPC.cpp index e921fdfa..55d7d361 100644 --- a/Adventures in Lestoria/NPC.cpp +++ b/Adventures in Lestoria/NPC.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/PlayerMoneyLabel.h b/Adventures in Lestoria/PlayerMoneyLabel.h index 39f2b574..4148790c 100644 --- a/Adventures in Lestoria/PlayerMoneyLabel.h +++ b/Adventures in Lestoria/PlayerMoneyLabel.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/RequiredMaterialsList.h b/Adventures in Lestoria/RequiredMaterialsList.h index bca13f60..e41f8f2b 100644 --- a/Adventures in Lestoria/RequiredMaterialsList.h +++ b/Adventures in Lestoria/RequiredMaterialsList.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright � 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/SaveFileNameButton.h b/Adventures in Lestoria/SaveFileNameButton.h index 44960923..29247653 100644 --- a/Adventures in Lestoria/SaveFileNameButton.h +++ b/Adventures in Lestoria/SaveFileNameButton.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/SellItemWindow.cpp b/Adventures in Lestoria/SellItemWindow.cpp index cc9a2888..3eb22313 100644 --- a/Adventures in Lestoria/SellItemWindow.cpp +++ b/Adventures in Lestoria/SellItemWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/ShermanWindow.cpp b/Adventures in Lestoria/ShermanWindow.cpp index 94cd28b3..056e49b0 100644 --- a/Adventures in Lestoria/ShermanWindow.cpp +++ b/Adventures in Lestoria/ShermanWindow.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Slider.h b/Adventures in Lestoria/Slider.h index 2797a1f1..25ffd845 100644 --- a/Adventures in Lestoria/Slider.h +++ b/Adventures in Lestoria/Slider.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/StatLabel.h b/Adventures in Lestoria/StatLabel.h index 1b9890ea..0b051fff 100644 --- a/Adventures in Lestoria/StatLabel.h +++ b/Adventures in Lestoria/StatLabel.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/State_GameHub.cpp b/Adventures in Lestoria/State_GameHub.cpp index a992748b..dc19b08c 100644 --- a/Adventures in Lestoria/State_GameHub.cpp +++ b/Adventures in Lestoria/State_GameHub.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/State_GameHub.h b/Adventures in Lestoria/State_GameHub.h index d391c6ee..3d70b97b 100644 --- a/Adventures in Lestoria/State_GameHub.h +++ b/Adventures in Lestoria/State_GameHub.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/State_Keybind.cpp b/Adventures in Lestoria/State_Keybind.cpp deleted file mode 100644 index d49c36d1..00000000 --- a/Adventures in Lestoria/State_Keybind.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#pragma region License -/* -License (OLC-3) -~~~~~~~~~~~~~~~ - -Copyright 2024 Joshua Sigona - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions or derivations of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions or derivative works in binary form must reproduce the above -copyright notice. This list of conditions and the following disclaimer must be -reproduced in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may -be used to endorse or promote products derived from this software without specific -prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Portions of this software are copyright © 2024 The FreeType -Project (www.freetype.org). Please see LICENSE_FT.txt for more information. -All rights reserved. -*/ -#pragma endregion -#include "State_Keybind.h" -#include "VisualNovel.h" -#include "Menu.h" -#include "Key.h" - -using A=Attribute; - -void State_Keybind::OnStateChange(GameState*prevState){ - Menu::CloseAllMenus(); -}; -void State_Keybind::OnUserUpdate(AiL*game){ - -}; -void State_Keybind::Draw(AiL*game){ - -}; -void State_Keybind::GetAnyKeyPress(Key key){ - Input previousPrimaryKey=InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT].S(A::KEYBIND)]->keyOrder[0]; - InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT].S(A::KEYBIND)]->RemoveKeybind({KEY,previousPrimaryKey}); - - -} \ No newline at end of file diff --git a/Adventures in Lestoria/State_Keybind.h b/Adventures in Lestoria/State_Keybind.h deleted file mode 100644 index 768d31c9..00000000 --- a/Adventures in Lestoria/State_Keybind.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma region License -/* -License (OLC-3) -~~~~~~~~~~~~~~~ - -Copyright 2024 Joshua Sigona - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions or derivations of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions or derivative works in binary form must reproduce the above -copyright notice. This list of conditions and the following disclaimer must be -reproduced in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may -be used to endorse or promote products derived from this software without specific -prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Portions of this software are copyright © 2024 The FreeType -Project (www.freetype.org). Please see LICENSE_FT.txt for more information. -All rights reserved. -*/ -#pragma endregion -#pragma once -#include "GameState.h" - -class State_Keybind:public GameState{ - virtual void OnStateChange(GameState*prevState)override final; - virtual void OnUserUpdate(AiL*game)override final; - virtual void Draw(AiL*game)override final; - virtual void GetAnyKeyPress(Key key)override final; -}; \ No newline at end of file diff --git a/Adventures in Lestoria/State_OverworldMap.cpp b/Adventures in Lestoria/State_OverworldMap.cpp index f63dff1f..0632e1d2 100644 --- a/Adventures in Lestoria/State_OverworldMap.cpp +++ b/Adventures in Lestoria/State_OverworldMap.cpp @@ -253,4 +253,6 @@ void State_OverworldMap::ResetConnectionPoints(){ for(ConnectionPoint&cp:connections){ cp.visited=false; } -} \ No newline at end of file +} + +void State_OverworldMap::GetAnyKeyPress(Key key){} \ No newline at end of file diff --git a/Adventures in Lestoria/State_OverworldMap.h b/Adventures in Lestoria/State_OverworldMap.h index ad9a46a0..d361ab16 100644 --- a/Adventures in Lestoria/State_OverworldMap.h +++ b/Adventures in Lestoria/State_OverworldMap.h @@ -59,4 +59,5 @@ public: virtual void Draw(AiL*game)override final; static void StartLevel(); static void UpdateCurrentConnectionPoint(const ConnectionPoint&connection); + virtual void GetAnyKeyPress(Key key)override final; }; \ No newline at end of file diff --git a/Adventures in Lestoria/TextEntryLabel.h b/Adventures in Lestoria/TextEntryLabel.h index 92a9f890..ee8d40b3 100644 --- a/Adventures in Lestoria/TextEntryLabel.h +++ b/Adventures in Lestoria/TextEntryLabel.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/TitleScreen.cpp b/Adventures in Lestoria/TitleScreen.cpp index c7420c25..a8d7313d 100644 --- a/Adventures in Lestoria/TitleScreen.cpp +++ b/Adventures in Lestoria/TitleScreen.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/TitleScreen.h b/Adventures in Lestoria/TitleScreen.h index 74cf15a9..37c35bdd 100644 --- a/Adventures in Lestoria/TitleScreen.h +++ b/Adventures in Lestoria/TitleScreen.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/UserIDMenu.cpp b/Adventures in Lestoria/UserIDMenu.cpp index b5172cbf..cf460df7 100644 --- a/Adventures in Lestoria/UserIDMenu.cpp +++ b/Adventures in Lestoria/UserIDMenu.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 04fe698b..588da469 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright ?? 2023 The FreeType +Portions of this software are copyright ??© 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Wisp.cpp b/Adventures in Lestoria/Wisp.cpp index 2eaca037..e3f3e8ed 100644 --- a/Adventures in Lestoria/Wisp.cpp +++ b/Adventures in Lestoria/Wisp.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/Wolf.cpp b/Adventures in Lestoria/Wolf.cpp index 345d898a..b2ff7017 100644 --- a/Adventures in Lestoria/Wolf.cpp +++ b/Adventures in Lestoria/Wolf.cpp @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ diff --git a/Adventures in Lestoria/miniaudio.h b/Adventures in Lestoria/miniaudio.h index a140f7e3..fb516441 100644 --- a/Adventures in Lestoria/miniaudio.h +++ b/Adventures in Lestoria/miniaudio.h @@ -1,5 +1,5 @@ /* -Copyright 2023 David Reid +Copyright© 2024 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -18,7 +18,7 @@ SOFTWARE. */ /* Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file. -miniaudio - v0.11.18 - 2023-08-07 +miniaudio - v0.11.18 -© 2024-08-07 David Reid - mackron@gmail.com diff --git a/Adventures in Lestoria/olcPGEX_MiniAudio.h b/Adventures in Lestoria/olcPGEX_MiniAudio.h index 959274d0..8891c35d 100644 --- a/Adventures in Lestoria/olcPGEX_MiniAudio.h +++ b/Adventures in Lestoria/olcPGEX_MiniAudio.h @@ -20,7 +20,7 @@ for cross-platform. License (OLC-3) ~~~~~~~~~~~~~~~ -Copyright 2023 Moros Smith +Copyright© 2024 Moros Smith Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Adventures in Lestoria/olcPixelGameEngine.h b/Adventures in Lestoria/olcPixelGameEngine.h index 34ce16c5..1de521c0 100644 --- a/Adventures in Lestoria/olcPixelGameEngine.h +++ b/Adventures in Lestoria/olcPixelGameEngine.h @@ -201,7 +201,7 @@ certainly enjoyed my tea and flapjacks :D Author ~~~~~~ -David Barr, aka javidx9, (c) OneLoneCoder 2018, 2019, 2020, 2021, 2022, 2023, 2024 +David Barr, aka javidx9, (c) OneLoneCoder 2018, 2019, 2020, 2021, 2022,© 2024, 2024 */ #pragma endregion @@ -4643,7 +4643,7 @@ namespace olc { pKeys[i].bPressed = !pKeys[i].bHeld; pKeys[i].bHeld = true; - GetAnyKeyPress(i); + GetAnyKeyPress(Key(i)); } else { diff --git a/Adventures in Lestoria/olcUTIL_Geometry2D.h b/Adventures in Lestoria/olcUTIL_Geometry2D.h index 87b0561a..c8fb3c3c 100644 --- a/Adventures in Lestoria/olcUTIL_Geometry2D.h +++ b/Adventures in Lestoria/olcUTIL_Geometry2D.h @@ -49,7 +49,7 @@ Authors ~~~~~~~ - David Barr, aka javidx9, (c) OneLoneCoder 2019, 2020, 2021, 2022, 2023, 2024 + David Barr, aka javidx9, (c) OneLoneCoder 2019, 2020, 2021, 2022,© 2024, 2024 With significant contributions from: