diff --git a/binding-mri/input-binding.cpp b/binding-mri/input-binding.cpp index a9e0582..a2838e8 100644 --- a/binding-mri/input-binding.cpp +++ b/binding-mri/input-binding.cpp @@ -115,6 +115,8 @@ static buttonCodes[] = { { "ITEMS", Input::Items }, { "RUN", Input::Run }, { "DEACTIVATE", Input::Deactivate }, + + { "DEBUGACTION",Input::DebugAction}, { "L", Input::L }, { "R", Input::R }, diff --git a/scripts/Game_Character_1.rb b/scripts/Game_Character_1.rb index fae8d62..c6c076a 100644 --- a/scripts/Game_Character_1.rb +++ b/scripts/Game_Character_1.rb @@ -125,6 +125,9 @@ class Game_Character # * 0 = Determines if all directions are impassable (for jumping) #-------------------------------------------------------------------------- def passable?(x, y, d) + if Window_Settings.DebugIsEnabled && Input.press?(Input::DEBUGACTION) + return true + end # Get new coordinates new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) diff --git a/src/input.h b/src/input.h index 9051f4c..8b454dc 100644 --- a/src/input.h +++ b/src/input.h @@ -44,7 +44,9 @@ public: F5 = 25, F6 = 26, F7 = 27, F8 = 28, F9 = 29, /* Non-standard extensions */ - MouseLeft = 38, MouseMiddle = 39, MouseRight = 40 + MouseLeft = 38, MouseMiddle = 39, MouseRight = 40, + + DebugAction = 41 }; void update(); diff --git a/src/keybindings.cpp b/src/keybindings.cpp index 88c27c1..75aa3ce 100644 --- a/src/keybindings.cpp +++ b/src/keybindings.cpp @@ -92,6 +92,7 @@ static const KbBindingData defaultKbBindings[] ={ { SDL_SCANCODE_S, Input::Items }, { SDL_SCANCODE_LSHIFT, Input::Run }, { SDL_SCANCODE_C, Input::Deactivate }, + { SDL_SCANCODE_LCTRL, Input::DebugAction}, { SDL_SCANCODE_Q, Input::L }, { SDL_SCANCODE_W, Input::R }, }; @@ -207,6 +208,7 @@ static bool verifyDesc(const BindingDesc &desc){ Input::Items, Input::Run, Input::Deactivate, + Input::DebugAction, Input::L, Input::R, Input::F5, Input::F6, Input::F7, Input::F8, Input::F9 }; diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index b71de96..3c24f5c 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -70,6 +70,7 @@ struct VButton{ BTN_STRING(Right, TRSTR_KEYBIND_RIGHT), BTN_STRING(Run, TRSTR_KEYBIND_RUN), BTN_STRING(Deactivate, TRSTR_KEYBIND_DEACTIVATE), + BTN_STRING(DebugAction, TRSTR_KEYBIND_DEBUGACTION), BTN_STRING(Items, TRSTR_KEYBIND_ITEMS), BTN_STRING(R, TRSTR_KEYBIND_R), }; diff --git a/src/trstr.h b/src/trstr.h index 6028363..1d018b5 100644 --- a/src/trstr.h +++ b/src/trstr.h @@ -50,3 +50,4 @@ #define TRSTR_KEYBIND_DEACTIVATE 49 #define TRSTR_KEYBIND_ITEMS 50 #define TRSTR_KEYBIND_R 51 +#define TRSTR_KEYBIND_DEBUGACTION 50