GCPadEmu/WiimoteEmu: Make some arrays static
This commit is contained in:
parent
ef1520eab0
commit
5a321d31dd
|
@ -8,7 +8,7 @@
|
||||||
// TODO: Move to header file when VS supports constexpr.
|
// TODO: Move to header file when VS supports constexpr.
|
||||||
const ControlState GCPad::DEFAULT_PAD_STICK_RADIUS = 1.0;
|
const ControlState GCPad::DEFAULT_PAD_STICK_RADIUS = 1.0;
|
||||||
|
|
||||||
const u16 button_bitmasks[] =
|
static const u16 button_bitmasks[] =
|
||||||
{
|
{
|
||||||
PAD_BUTTON_A,
|
PAD_BUTTON_A,
|
||||||
PAD_BUTTON_B,
|
PAD_BUTTON_B,
|
||||||
|
@ -19,18 +19,18 @@ const u16 button_bitmasks[] =
|
||||||
0 // MIC HAX
|
0 // MIC HAX
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 trigger_bitmasks[] =
|
static const u16 trigger_bitmasks[] =
|
||||||
{
|
{
|
||||||
PAD_TRIGGER_L,
|
PAD_TRIGGER_L,
|
||||||
PAD_TRIGGER_R,
|
PAD_TRIGGER_R,
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 dpad_bitmasks[] =
|
static const u16 dpad_bitmasks[] =
|
||||||
{
|
{
|
||||||
PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT, PAD_BUTTON_RIGHT
|
PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT, PAD_BUTTON_RIGHT
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* const named_buttons[] =
|
static const char* const named_buttons[] =
|
||||||
{
|
{
|
||||||
"A",
|
"A",
|
||||||
"B",
|
"B",
|
||||||
|
@ -41,7 +41,7 @@ const char* const named_buttons[] =
|
||||||
"Mic"
|
"Mic"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* const named_triggers[] =
|
static const char* const named_triggers[] =
|
||||||
{
|
{
|
||||||
// i18n: Left
|
// i18n: Left
|
||||||
_trans("L"),
|
_trans("L"),
|
||||||
|
|
|
@ -171,7 +171,7 @@ void EmulateSwing(AccelData* const accel
|
||||||
(&accel->x)[axis_map[i]] += swing[i] * g_dir[i] * SWING_INTENSITY;
|
(&accel->x)[axis_map[i]] += swing[i] * g_dir[i] * SWING_INTENSITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u16 button_bitmasks[] =
|
static const u16 button_bitmasks[] =
|
||||||
{
|
{
|
||||||
Wiimote::BUTTON_A,
|
Wiimote::BUTTON_A,
|
||||||
Wiimote::BUTTON_B,
|
Wiimote::BUTTON_B,
|
||||||
|
@ -182,16 +182,16 @@ const u16 button_bitmasks[] =
|
||||||
Wiimote::BUTTON_HOME
|
Wiimote::BUTTON_HOME
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 dpad_bitmasks[] =
|
static const u16 dpad_bitmasks[] =
|
||||||
{
|
{
|
||||||
Wiimote::PAD_UP, Wiimote::PAD_DOWN, Wiimote::PAD_LEFT, Wiimote::PAD_RIGHT
|
Wiimote::PAD_UP, Wiimote::PAD_DOWN, Wiimote::PAD_LEFT, Wiimote::PAD_RIGHT
|
||||||
};
|
};
|
||||||
const u16 dpad_sideways_bitmasks[] =
|
static const u16 dpad_sideways_bitmasks[] =
|
||||||
{
|
{
|
||||||
Wiimote::PAD_RIGHT, Wiimote::PAD_LEFT, Wiimote::PAD_UP, Wiimote::PAD_DOWN
|
Wiimote::PAD_RIGHT, Wiimote::PAD_LEFT, Wiimote::PAD_UP, Wiimote::PAD_DOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* const named_buttons[] =
|
static const char* const named_buttons[] =
|
||||||
{
|
{
|
||||||
"A", "B", "1", "2", "-", "+", "Home",
|
"A", "B", "1", "2", "-", "+", "Home",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue