Bypass the walls!
This commit is contained in:
parent
ae1bee2523
commit
8d9568bd5f
|
|
@ -127,7 +127,10 @@ static buttonCodes[] = {
|
||||||
|
|
||||||
{ "MOUSELEFT", Input::MouseLeft },
|
{ "MOUSELEFT", Input::MouseLeft },
|
||||||
{ "MOUSEMIDDLE", Input::MouseMiddle },
|
{ "MOUSEMIDDLE", Input::MouseMiddle },
|
||||||
{ "MOUSERIGHT", Input::MouseRight }
|
{ "MOUSERIGHT", Input::MouseRight },
|
||||||
|
|
||||||
|
{ "LCTRL", Input::LCTRL },
|
||||||
|
{ "RCTRL", Input::RCTRL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static elementsN(buttonCodes);
|
static elementsN(buttonCodes);
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@ class Game_Player < Game_Character
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
# If debug mode is ON and ctrl key was pressed
|
# If debug mode is ON and ctrl key was pressed
|
||||||
#if $debug and Input.press?(Input::CTRL)
|
if Window_Settings.DebugIsEnabled and Input.press?(Input::LCTRL)
|
||||||
# # Passable
|
# Passable
|
||||||
# return true
|
return true
|
||||||
#end
|
end
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,9 @@ static const KbBindingData staticKbBindings[] ={
|
||||||
{ SDL_SCANCODE_F6, Input::F6 },
|
{ SDL_SCANCODE_F6, Input::F6 },
|
||||||
{ SDL_SCANCODE_F7, Input::F7 },
|
{ SDL_SCANCODE_F7, Input::F7 },
|
||||||
{ SDL_SCANCODE_F8, Input::F8 },
|
{ 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);
|
static elementsN(staticKbBindings);
|
||||||
|
|
@ -302,20 +304,17 @@ struct InputPrivate {
|
||||||
|
|
||||||
bool triedExit;
|
bool triedExit;
|
||||||
|
|
||||||
struct
|
struct{
|
||||||
{
|
|
||||||
int active;
|
int active;
|
||||||
Input::ButtonCode previous;
|
Input::ButtonCode previous;
|
||||||
} dir4Data;
|
} dir4Data;
|
||||||
|
|
||||||
struct
|
struct{
|
||||||
{
|
|
||||||
int active;
|
int active;
|
||||||
} dir8Data;
|
} dir8Data;
|
||||||
|
|
||||||
|
|
||||||
InputPrivate(const RGSSThreadData &rtData)
|
InputPrivate(const RGSSThreadData &rtData){
|
||||||
{
|
|
||||||
initStaticKbBindings();
|
initStaticKbBindings();
|
||||||
initMsBindings();
|
initMsBindings();
|
||||||
|
|
||||||
|
|
@ -548,10 +547,8 @@ struct InputPrivate {
|
||||||
|
|
||||||
if (dir4Data.previous != Input::None){
|
if (dir4Data.previous != Input::None){
|
||||||
/* Check if prev still pressed */
|
/* Check if prev still pressed */
|
||||||
if (getState(dir4Data.previous).pressed)
|
if (getState(dir4Data.previous).pressed){
|
||||||
{
|
for (size_t i = 0; i < 3; ++i){
|
||||||
for (size_t i = 0; i < 3; ++i)
|
|
||||||
{
|
|
||||||
Input::ButtonCode other =
|
Input::ButtonCode other =
|
||||||
otherDirs[(dir4Data.previous/2)-1][i];
|
otherDirs[(dir4Data.previous/2)-1][i];
|
||||||
|
|
||||||
|
|
@ -577,8 +574,7 @@ struct InputPrivate {
|
||||||
dir4Data.previous = Input::None;
|
dir4Data.previous = Input::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateDir8()
|
void updateDir8(){
|
||||||
{
|
|
||||||
static const int combos[4][4] = {
|
static const int combos[4][4] = {
|
||||||
{ 2, 1, 3, 0 },
|
{ 2, 1, 3, 0 },
|
||||||
{ 1, 4, 0, 7 },
|
{ 1, 4, 0, 7 },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue