mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-20 13:59:57 +00:00
Bypass the walls!
This commit is contained in:
parent
ae1bee2523
commit
8d9568bd5f
3 changed files with 17 additions and 18 deletions
|
|
@ -127,7 +127,10 @@ static buttonCodes[] = {
|
|||
|
||||
{ "MOUSELEFT", Input::MouseLeft },
|
||||
{ "MOUSEMIDDLE", Input::MouseMiddle },
|
||||
{ "MOUSERIGHT", Input::MouseRight }
|
||||
{ "MOUSERIGHT", Input::MouseRight },
|
||||
|
||||
{ "LCTRL", Input::LCTRL },
|
||||
{ "RCTRL", Input::RCTRL },
|
||||
};
|
||||
|
||||
static elementsN(buttonCodes);
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ class Game_Player < Game_Character
|
|||
return false
|
||||
end
|
||||
# If debug mode is ON and ctrl key was pressed
|
||||
#if $debug and Input.press?(Input::CTRL)
|
||||
# # Passable
|
||||
# return true
|
||||
#end
|
||||
if Window_Settings.DebugIsEnabled and Input.press?(Input::LCTRL)
|
||||
# Passable
|
||||
return true
|
||||
end
|
||||
super
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -234,7 +234,9 @@ static const KbBindingData staticKbBindings[] ={
|
|||
{ SDL_SCANCODE_F6, Input::F6 },
|
||||
{ SDL_SCANCODE_F7, Input::F7 },
|
||||
{ SDL_SCANCODE_F8, Input::F8 },
|
||||
{ SDL_SCANCODE_F9, Input::F9 }
|
||||
{ SDL_SCANCODE_F9, Input::F9 },
|
||||
{ SDL_SCANCODE_LCTRL, Input:LCTRL },
|
||||
{ SDL_SCANCODE_RCTRL, Input:RCTRL }
|
||||
};
|
||||
|
||||
static elementsN(staticKbBindings);
|
||||
|
|
@ -302,20 +304,17 @@ struct InputPrivate {
|
|||
|
||||
bool triedExit;
|
||||
|
||||
struct
|
||||
{
|
||||
struct{
|
||||
int active;
|
||||
Input::ButtonCode previous;
|
||||
} dir4Data;
|
||||
|
||||
struct
|
||||
{
|
||||
struct{
|
||||
int active;
|
||||
} dir8Data;
|
||||
|
||||
|
||||
InputPrivate(const RGSSThreadData &rtData)
|
||||
{
|
||||
InputPrivate(const RGSSThreadData &rtData){
|
||||
initStaticKbBindings();
|
||||
initMsBindings();
|
||||
|
||||
|
|
@ -548,10 +547,8 @@ struct InputPrivate {
|
|||
|
||||
if (dir4Data.previous != Input::None){
|
||||
/* Check if prev still pressed */
|
||||
if (getState(dir4Data.previous).pressed)
|
||||
{
|
||||
for (size_t i = 0; i < 3; ++i)
|
||||
{
|
||||
if (getState(dir4Data.previous).pressed){
|
||||
for (size_t i = 0; i < 3; ++i){
|
||||
Input::ButtonCode other =
|
||||
otherDirs[(dir4Data.previous/2)-1][i];
|
||||
|
||||
|
|
@ -577,8 +574,7 @@ struct InputPrivate {
|
|||
dir4Data.previous = Input::None;
|
||||
}
|
||||
|
||||
void updateDir8()
|
||||
{
|
||||
void updateDir8(){
|
||||
static const int combos[4][4] = {
|
||||
{ 2, 1, 3, 0 },
|
||||
{ 1, 4, 0, 7 },
|
||||
|
|
|
|||
Loading…
Reference in a new issue