Adjust (default) keybindings for Freebird Games

This commit is contained in:
Ancurio 2021-09-23 18:30:47 +02:00 committed by Jonas Kulla
parent fb09fa1d0c
commit 7938a07539
2 changed files with 15 additions and 23 deletions

View File

@ -76,19 +76,16 @@ static const KbBindingData defaultKbBindings[] =
{ SDL_SCANCODE_ESCAPE, Input::B }, { SDL_SCANCODE_ESCAPE, Input::B },
{ SDL_SCANCODE_KP_0, Input::B }, { SDL_SCANCODE_KP_0, Input::B },
{ SDL_SCANCODE_LSHIFT, Input::A }, { SDL_SCANCODE_LSHIFT, Input::A },
{ SDL_SCANCODE_X, Input::B },
{ SDL_SCANCODE_D, Input::Z }, { SDL_SCANCODE_W, Input::Up },
{ SDL_SCANCODE_Q, Input::L }, { SDL_SCANCODE_A, Input::Left },
{ SDL_SCANCODE_W, Input::R }, { SDL_SCANCODE_S, Input::Down },
{ SDL_SCANCODE_A, Input::X }, { SDL_SCANCODE_D, Input::Right },
{ SDL_SCANCODE_S, Input::Y }
}; };
/* RGSS1 */ /* RGSS1 */
static const KbBindingData defaultKbBindings1[] = static const KbBindingData defaultKbBindings1[] =
{ {
{ SDL_SCANCODE_Z, Input::A },
{ SDL_SCANCODE_C, Input::C },
}; };
/* RGSS2 and higher */ /* RGSS2 and higher */
@ -106,11 +103,6 @@ static const JsBindingData defaultJsBindings[] =
{ 0, Input::A }, { 0, Input::A },
{ 1, Input::B }, { 1, Input::B },
{ 2, Input::C }, { 2, Input::C },
{ 3, Input::X },
{ 4, Input::Y },
{ 5, Input::Z },
{ 6, Input::L },
{ 7, Input::R }
}; };
static elementsN(defaultJsBindings); static elementsN(defaultJsBindings);

View File

@ -37,7 +37,7 @@
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>
const Vec2i winSize(540, 356); const Vec2i winSize(580, 356);
const uint8_t cBgNorm = 50; const uint8_t cBgNorm = 50;
const uint8_t cBgDark = 20; const uint8_t cBgDark = 20;
@ -63,16 +63,16 @@ struct VButton
{ {
BTN_STRING(Up), BTN_STRING(Up),
BTN_STRING(Down), BTN_STRING(Down),
BTN_STRING(L), { Input::L, "-" },
BTN_STRING(Left), BTN_STRING(Left),
BTN_STRING(Right), BTN_STRING(Right),
BTN_STRING(R), { Input::R, "-" },
BTN_STRING(A), { Input::A, "Sprint" },
BTN_STRING(B), { Input::B, "Cancel" },
BTN_STRING(C), { Input::C, "Action" },
BTN_STRING(X), { Input::X, "-" },
BTN_STRING(Y), { Input::Y, "-" },
BTN_STRING(Z) { Input::Z, "-" },
}; };
static elementsN(vButtons); static elementsN(vButtons);
@ -764,7 +764,7 @@ void Widget::click(int x, int y, uint8_t button)
} }
/* Ratio of cell area to total widget width */ /* Ratio of cell area to total widget width */
#define BW_CELL_R 0.75f #define BW_CELL_R 0.69f
void BindingWidget::drawHandler(SDL_Surface *surf) void BindingWidget::drawHandler(SDL_Surface *surf)
{ {