mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-changed wiiflows input, now doesnt reset cursor position
if you click on some button, also if the cursor gets hidden the position doesnt reset anymore if you move it again, you can now use ZL and ZR on classic controller to fast scroll through covers and switch between menu pages -updated spanish.ini (thanks galen)
This commit is contained in:
parent
67b7d853e9
commit
0726c379ff
@ -1,3 +1,4 @@
|
||||
|
||||
#define WBTN_UP (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP)
|
||||
#define WBTN_DOWN (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)
|
||||
#define WBTN_LEFT (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT)
|
||||
@ -9,6 +10,8 @@
|
||||
#define WBTN_B (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B)
|
||||
#define WBTN_1 (WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y)
|
||||
#define WBTN_2 (WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X)
|
||||
#define WBTN_ZL (WPAD_CLASSIC_BUTTON_ZL)
|
||||
#define WBTN_ZR (WPAD_CLASSIC_BUTTON_ZR)
|
||||
|
||||
#define WBTN_UP_PRESSED (wii_btnsPressed & WBTN_UP)
|
||||
#define WBTN_DOWN_PRESSED (wii_btnsPressed & WBTN_DOWN)
|
||||
@ -21,6 +24,8 @@
|
||||
#define WBTN_B_PRESSED (wii_btnsPressed & WBTN_B)
|
||||
#define WBTN_1_PRESSED (wii_btnsPressed & WBTN_1)
|
||||
#define WBTN_2_PRESSED (wii_btnsPressed & WBTN_2)
|
||||
#define WBTN_ZL_PRESSED (wii_btnsPressed & WBTN_ZL)
|
||||
#define WBTN_ZR_PRESSED (wii_btnsPressed & WBTN_ZR)
|
||||
|
||||
#define WBTN_UP_HELD (wii_btnsHeld & WBTN_UP)
|
||||
#define WBTN_DOWN_HELD (wii_btnsHeld & WBTN_DOWN)
|
||||
@ -33,6 +38,8 @@
|
||||
#define WBTN_B_HELD (wii_btnsHeld & WBTN_B)
|
||||
#define WBTN_1_HELD (wii_btnsHeld & WBTN_1)
|
||||
#define WBTN_2_HELD (wii_btnsHeld & WBTN_2)
|
||||
#define WBTN_ZL_HELD (wii_btnsHeld & WBTN_ZL)
|
||||
#define WBTN_ZR_HELD (wii_btnsHeld & WBTN_ZR)
|
||||
|
||||
#define GBTN_UP (PAD_BUTTON_UP)
|
||||
#define GBTN_DOWN (PAD_BUTTON_DOWN)
|
||||
@ -74,8 +81,8 @@
|
||||
#define BTN_DOWN_PRESSED (WBTN_DOWN_PRESSED || GBTN_DOWN_PRESSED)
|
||||
#define BTN_LEFT_PRESSED (WBTN_LEFT_PRESSED || GBTN_LEFT_PRESSED)
|
||||
#define BTN_RIGHT_PRESSED (WBTN_RIGHT_PRESSED || GBTN_RIGHT_PRESSED)
|
||||
#define BTN_MINUS_PRESSED (WBTN_MINUS_PRESSED || GBTN_MINUS_PRESSED)
|
||||
#define BTN_PLUS_PRESSED (WBTN_PLUS_PRESSED || GBTN_PLUS_PRESSED)
|
||||
#define BTN_MINUS_PRESSED (WBTN_ZL_PRESSED || WBTN_MINUS_PRESSED || GBTN_MINUS_PRESSED)
|
||||
#define BTN_PLUS_PRESSED (WBTN_ZR_PRESSED || WBTN_PLUS_PRESSED || GBTN_PLUS_PRESSED)
|
||||
#define BTN_HOME_PRESSED (WBTN_HOME_PRESSED || GBTN_HOME_PRESSED)
|
||||
#define BTN_A_PRESSED (WBTN_A_PRESSED || GBTN_A_PRESSED)
|
||||
#define BTN_B_PRESSED (WBTN_B_PRESSED || GBTN_B_PRESSED)
|
||||
@ -86,8 +93,8 @@
|
||||
#define BTN_DOWN_HELD (WBTN_DOWN_HELD || GBTN_DOWN_HELD)
|
||||
#define BTN_LEFT_HELD (WBTN_LEFT_HELD || GBTN_LEFT_HELD)
|
||||
#define BTN_RIGHT_HELD (WBTN_RIGHT_HELD || GBTN_RIGHT_HELD)
|
||||
#define BTN_MINUS_HELD (WBTN_MINUS_HELD || GBTN_MINUS_HELD)
|
||||
#define BTN_PLUS_HELD (WBTN_PLUS_HELD || GBTN_PLUS_HELD)
|
||||
#define BTN_MINUS_HELD (WBTN_ZL_HELD || WBTN_MINUS_HELD || GBTN_MINUS_HELD)
|
||||
#define BTN_PLUS_HELD (WBTN_ZR_HELD || WBTN_PLUS_HELD || GBTN_PLUS_HELD)
|
||||
#define BTN_HOME_HELD (WBTN_HOME_HELD || GBTN_HOME_HELD)
|
||||
#define BTN_A_HELD (WBTN_A_HELD || GBTN_A_HELD)
|
||||
#define BTN_B_HELD (WBTN_B_HELD || GBTN_B_HELD)
|
||||
@ -212,4 +219,4 @@ WPAD_CLASSIC_BUTTON_DOWN (0x4000<<16)
|
||||
WPAD_GUITAR_HERO_3_BUTTON_STRUM_DOWN (0x4000<<16)
|
||||
|
||||
WPAD_CLASSIC_BUTTON_RIGHT (0x8000<<16)
|
||||
*/
|
||||
*/
|
||||
|
@ -4,40 +4,42 @@
|
||||
|
||||
static const u32 g_repeatDelay = 25;
|
||||
|
||||
void CMenu::SetupInput()
|
||||
void CMenu::SetupInput(bool reset_pos)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
{
|
||||
stickPointer_x[chan] = (m_vid.width() + m_cursor[chan].width())/2;
|
||||
stickPointer_y[chan] = (m_vid.height() + m_cursor[chan].height())/2;
|
||||
if(reset_pos)
|
||||
{
|
||||
stickPointer_x[chan] = (m_vid.width() + m_cursor[chan].width())/2;
|
||||
stickPointer_y[chan] = (m_vid.height() + m_cursor[chan].height())/2;
|
||||
}
|
||||
left_stick_angle[chan] = 0;
|
||||
left_stick_mag[chan] = 0;
|
||||
right_stick_angle[chan] = 0;
|
||||
right_stick_mag[chan] = 0;
|
||||
pointerhidedelay[chan] = 0;
|
||||
right_stick_skip[chan] = 0;
|
||||
wmote_roll[chan] = 0;
|
||||
wmote_roll_skip[chan] = 0;
|
||||
}
|
||||
|
||||
enable_wmote_roll = m_cfg.getBool("GENERAL", "wiimote_gestures", false);
|
||||
}
|
||||
|
||||
static int CalculateRepeatSpeed(float magnitude, int current_value)
|
||||
{
|
||||
if (magnitude < 0) magnitude *= -1;
|
||||
if(magnitude < 0)
|
||||
magnitude *= -1;
|
||||
|
||||
// Calculate frameskips based on magnitude
|
||||
// Max frameskips is 50 (1 sec, or slightly less)
|
||||
if (magnitude < 0.15f)
|
||||
if(magnitude < 0.15f)
|
||||
{
|
||||
return -1; // Force a direct start
|
||||
}
|
||||
else if (current_value > 0)
|
||||
else if(current_value > 0)
|
||||
{
|
||||
return current_value - 1; // Wait another frame
|
||||
}
|
||||
else if (current_value == -1)
|
||||
else if(current_value == -1)
|
||||
{
|
||||
return 0; // Process the input
|
||||
}
|
||||
@ -55,22 +57,22 @@ void CMenu::ScanInput()
|
||||
m_show_zone_main3 = false;
|
||||
m_show_zone_prev = false;
|
||||
m_show_zone_next = false;
|
||||
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
|
||||
WPAD_ScanPads();
|
||||
PAD_ScanPads();
|
||||
|
||||
ButtonsPressed();
|
||||
ButtonsHeld();
|
||||
LeftStick();
|
||||
|
||||
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
{
|
||||
wd[chan] = WPAD_Data(chan);
|
||||
left_stick_angle[chan] = 0;
|
||||
left_stick_mag[chan] = 0;
|
||||
left_stick_mag[chan] = 0;
|
||||
right_stick_angle[chan] = 0;
|
||||
right_stick_mag[chan] = 0;
|
||||
switch (wd[chan]->exp.type)
|
||||
switch(wd[chan]->exp.type)
|
||||
{
|
||||
case WPAD_EXP_NUNCHUK:
|
||||
right_stick_mag[chan] = wd[chan]->exp.nunchuk.js.mag;
|
||||
@ -89,7 +91,7 @@ void CMenu::ScanInput()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (enable_wmote_roll)
|
||||
if(enable_wmote_roll)
|
||||
{
|
||||
wmote_roll[chan] = wd[chan]->orient.roll; // Use wd[chan]->ir.angle if you only want this to work when pointing at the screen
|
||||
wmote_roll_skip[chan] = CalculateRepeatSpeed(wmote_roll[chan] / 45.f, wmote_roll_skip[chan]);
|
||||
@ -99,13 +101,12 @@ void CMenu::ScanInput()
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
{
|
||||
m_btnMgr.setRumble(chan, WPadIR_Valid(chan), PAD_StickX(chan) < -20 || PAD_StickX(chan) > 20 || PAD_StickY(chan) < -20 || PAD_StickY(chan) > 20);
|
||||
|
||||
if (WPadIR_Valid(chan))
|
||||
if(WPadIR_Valid(chan))
|
||||
{
|
||||
m_cursor[chan].draw(wd[chan]->ir.x, wd[chan]->ir.y, wd[chan]->ir.angle);
|
||||
m_btnMgr.mouse(chan, wd[chan]->ir.x - m_cursor[chan].width() / 2, wd[chan]->ir.y - m_cursor[chan].height() / 2);
|
||||
}
|
||||
else if (m_show_pointer[chan])
|
||||
else if(m_show_pointer[chan])
|
||||
{
|
||||
m_cursor[chan].draw(stickPointer_x[chan], stickPointer_y[chan], 0);
|
||||
m_btnMgr.mouse(chan, stickPointer_x[chan] - m_cursor[chan].width() / 2, stickPointer_y[chan] - m_cursor[chan].height() / 2);
|
||||
@ -126,9 +127,9 @@ void CMenu::ButtonsPressed()
|
||||
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
{
|
||||
wii_btnsPressed |= WPAD_ButtonsDown(chan);
|
||||
gc_btnsPressed |= PAD_ButtonsDown(chan);
|
||||
}
|
||||
wii_btnsPressed |= WPAD_ButtonsDown(chan);
|
||||
gc_btnsPressed |= PAD_ButtonsDown(chan);
|
||||
}
|
||||
}
|
||||
|
||||
void CMenu::ButtonsHeld()
|
||||
@ -138,74 +139,66 @@ void CMenu::ButtonsHeld()
|
||||
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
{
|
||||
wii_btnsHeld |= WPAD_ButtonsHeld(chan);
|
||||
gc_btnsHeld |= PAD_ButtonsHeld(chan);
|
||||
}
|
||||
wii_btnsHeld |= WPAD_ButtonsHeld(chan);
|
||||
gc_btnsHeld |= PAD_ButtonsHeld(chan);
|
||||
}
|
||||
}
|
||||
|
||||
void CMenu::LeftStick()
|
||||
{
|
||||
u8 speed = 0,pSpeed = 0;
|
||||
u8 speed = 0, pSpeed = 0;
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
{
|
||||
|
||||
if (left_stick_mag[chan] > 0.15 || abs(PAD_StickX(chan)) > 20 || abs(PAD_StickY(chan)) > 20)
|
||||
if(left_stick_mag[chan] > 0.15 || abs(PAD_StickX(chan)) > 20 || abs(PAD_StickY(chan)) > 20)
|
||||
{
|
||||
m_show_pointer[chan] = true;
|
||||
if (LEFT_STICK_LEFT)
|
||||
if(LEFT_STICK_LEFT)
|
||||
{
|
||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||
pSpeed = (u8)abs(PAD_StickX(chan))/10;
|
||||
if (stickPointer_x[chan] > m_cursor[chan].width()/2) stickPointer_x[chan] = stickPointer_x[chan]-speed-pSpeed;
|
||||
if(stickPointer_x[chan] > m_cursor[chan].width()/2)
|
||||
stickPointer_x[chan] = stickPointer_x[chan]-speed-pSpeed;
|
||||
pointerhidedelay[chan] = 150;
|
||||
}
|
||||
if (LEFT_STICK_DOWN)
|
||||
if(LEFT_STICK_DOWN)
|
||||
{
|
||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||
pSpeed = (u8)abs(PAD_StickY(chan))/10;
|
||||
if (stickPointer_y[chan] < (m_vid.height() + (m_cursor[chan].height()/2))) stickPointer_y[chan] = stickPointer_y[chan]+speed+pSpeed;
|
||||
if(stickPointer_y[chan] < (m_vid.height() + (m_cursor[chan].height()/2)))
|
||||
stickPointer_y[chan] = stickPointer_y[chan]+speed+pSpeed;
|
||||
pointerhidedelay[chan] = 150;
|
||||
}
|
||||
if (LEFT_STICK_RIGHT)
|
||||
if(LEFT_STICK_RIGHT)
|
||||
{
|
||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||
pSpeed = (u8)abs(PAD_StickX(chan))/10;
|
||||
if (stickPointer_x[chan] < (m_vid.width() + (m_cursor[chan].width()/2))) stickPointer_x[chan] = stickPointer_x[chan]+speed+pSpeed;
|
||||
if(stickPointer_x[chan] < (m_vid.width() + (m_cursor[chan].width()/2)))
|
||||
stickPointer_x[chan] = stickPointer_x[chan]+speed+pSpeed;
|
||||
pointerhidedelay[chan] = 150;
|
||||
}
|
||||
if (LEFT_STICK_UP)
|
||||
if(LEFT_STICK_UP)
|
||||
{
|
||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||
pSpeed = (u8)abs(PAD_StickY(chan))/10;
|
||||
if (stickPointer_y[chan] > m_cursor[chan].height()/2) stickPointer_y[chan] = stickPointer_y[chan]-speed-pSpeed;
|
||||
if(stickPointer_y[chan] > m_cursor[chan].height()/2)
|
||||
stickPointer_y[chan] = stickPointer_y[chan]-speed-pSpeed;
|
||||
pointerhidedelay[chan] = 150;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if(pointerhidedelay[chan] > 0 && !wii_btnsHeld && !wii_btnsPressed && !gc_btnsHeld && !gc_btnsPressed)
|
||||
pointerhidedelay[chan]--;
|
||||
else
|
||||
{
|
||||
if (!wii_btnsHeld && !wii_btnsPressed)
|
||||
{
|
||||
pointerhidedelay[chan] = 0;
|
||||
stickPointer_x[chan] = (m_vid.width() + m_cursor[chan].width())/2;
|
||||
stickPointer_y[chan] = (m_vid.height() + m_cursor[chan].height())/2;
|
||||
}
|
||||
else if (pointerhidedelay[chan] > 0)
|
||||
pointerhidedelay[chan] = 150;
|
||||
}
|
||||
}
|
||||
if (pointerhidedelay[chan] == 0)
|
||||
m_show_pointer[chan] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CMenu::WPadIR_Valid(int chan)
|
||||
{
|
||||
wd[chan] = WPAD_Data(chan);
|
||||
if (wd[chan]->ir.valid)
|
||||
if(wd[chan]->ir.valid)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@ -219,62 +212,62 @@ bool CMenu::wii_btnRepeat(s64 btn)
|
||||
{
|
||||
bool b = false;
|
||||
|
||||
if (btn == WBTN_UP)
|
||||
if(btn == WBTN_UP)
|
||||
{
|
||||
if(wii_btnsHeld & WBTN_UP)
|
||||
{
|
||||
if (m_wpadUpDelay == 0 || m_wpadUpDelay >= g_repeatDelay)
|
||||
if(m_wpadUpDelay == 0 || m_wpadUpDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_wpadUpDelay < g_repeatDelay)
|
||||
if(m_wpadUpDelay < g_repeatDelay)
|
||||
++m_wpadUpDelay;
|
||||
}
|
||||
else
|
||||
m_wpadUpDelay = 0;
|
||||
}
|
||||
else if (btn == WBTN_RIGHT)
|
||||
else if(btn == WBTN_RIGHT)
|
||||
{
|
||||
if(wii_btnsHeld & WBTN_RIGHT)
|
||||
{
|
||||
if (m_wpadRightDelay == 0 || m_wpadRightDelay >= g_repeatDelay)
|
||||
if(m_wpadRightDelay == 0 || m_wpadRightDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_wpadRightDelay < g_repeatDelay)
|
||||
if(m_wpadRightDelay < g_repeatDelay)
|
||||
++m_wpadRightDelay;
|
||||
}
|
||||
else
|
||||
m_wpadRightDelay = 0;
|
||||
}
|
||||
else if (btn == WBTN_DOWN)
|
||||
else if(btn == WBTN_DOWN)
|
||||
{
|
||||
if(wii_btnsHeld & WBTN_DOWN)
|
||||
{
|
||||
if (m_wpadDownDelay == 0 || m_wpadDownDelay >= g_repeatDelay)
|
||||
if(m_wpadDownDelay == 0 || m_wpadDownDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_wpadDownDelay < g_repeatDelay)
|
||||
if(m_wpadDownDelay < g_repeatDelay)
|
||||
++m_wpadDownDelay;
|
||||
}
|
||||
else
|
||||
m_wpadDownDelay = 0;
|
||||
}
|
||||
else if (btn == WBTN_LEFT)
|
||||
else if(btn == WBTN_LEFT)
|
||||
{
|
||||
if(wii_btnsHeld & WBTN_LEFT)
|
||||
{
|
||||
if (m_wpadLeftDelay == 0 || m_wpadLeftDelay >= g_repeatDelay)
|
||||
if(m_wpadLeftDelay == 0 || m_wpadLeftDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_wpadLeftDelay < g_repeatDelay)
|
||||
if(m_wpadLeftDelay < g_repeatDelay)
|
||||
++m_wpadLeftDelay;
|
||||
}
|
||||
else
|
||||
m_wpadLeftDelay = 0;
|
||||
}
|
||||
else if (btn == WBTN_A)
|
||||
else if(btn == WBTN_A)
|
||||
{
|
||||
if(wii_btnsHeld & WBTN_A)
|
||||
{
|
||||
m_btnMgr.noClick(true);
|
||||
if (m_wpadADelay == 0 || m_wpadADelay >= g_repeatDelay)
|
||||
if(m_wpadADelay == 0 || m_wpadADelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_wpadADelay < g_repeatDelay)
|
||||
if(m_wpadADelay < g_repeatDelay)
|
||||
++m_wpadADelay;
|
||||
}
|
||||
else
|
||||
@ -283,35 +276,19 @@ bool CMenu::wii_btnRepeat(s64 btn)
|
||||
m_btnMgr.noClick();
|
||||
}
|
||||
}
|
||||
/* else if (btn == WBTN_B)
|
||||
{
|
||||
if(wii_btnsHeld & WBTN_B)
|
||||
{
|
||||
m_btnMgr.noClick(true);
|
||||
if (m_wpadBDelay == 0 || m_wpadBDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_wpadBDelay < g_repeatDelay)
|
||||
++m_wpadBDelay;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_wpadBDelay = 0;
|
||||
m_btnMgr.noClick();
|
||||
}
|
||||
} */
|
||||
return b;
|
||||
}
|
||||
|
||||
bool CMenu::gc_btnRepeat(s64 btn)
|
||||
{
|
||||
bool b = false;
|
||||
if (btn == GBTN_UP)
|
||||
if(btn == GBTN_UP)
|
||||
{
|
||||
if(gc_btnsHeld & GBTN_UP)
|
||||
{
|
||||
if (m_padUpDelay == 0 || m_padUpDelay >= g_repeatDelay)
|
||||
if(m_padUpDelay == 0 || m_padUpDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_padUpDelay < g_repeatDelay)
|
||||
if(m_padUpDelay < g_repeatDelay)
|
||||
++m_padUpDelay;
|
||||
}
|
||||
else
|
||||
@ -321,9 +298,9 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
||||
{
|
||||
if(gc_btnsHeld & GBTN_RIGHT)
|
||||
{
|
||||
if (m_padRightDelay == 0 || m_padRightDelay >= g_repeatDelay)
|
||||
if(m_padRightDelay == 0 || m_padRightDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_padRightDelay < g_repeatDelay)
|
||||
if(m_padRightDelay < g_repeatDelay)
|
||||
++m_padRightDelay;
|
||||
}
|
||||
else
|
||||
@ -333,9 +310,9 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
||||
{
|
||||
if(gc_btnsHeld & GBTN_DOWN)
|
||||
{
|
||||
if (m_padDownDelay == 0 || m_padDownDelay >= g_repeatDelay)
|
||||
if(m_padDownDelay == 0 || m_padDownDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_padDownDelay < g_repeatDelay)
|
||||
if(m_padDownDelay < g_repeatDelay)
|
||||
++m_padDownDelay;
|
||||
}
|
||||
else
|
||||
@ -345,10 +322,9 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
||||
{
|
||||
if(gc_btnsHeld & GBTN_LEFT)
|
||||
{
|
||||
|
||||
if (m_padLeftDelay == 0 || m_padLeftDelay >= g_repeatDelay)
|
||||
if(m_padLeftDelay == 0 || m_padLeftDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_padLeftDelay < g_repeatDelay)
|
||||
if(m_padLeftDelay < g_repeatDelay)
|
||||
++m_padLeftDelay;
|
||||
}
|
||||
else
|
||||
@ -359,9 +335,9 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
||||
if(gc_btnsHeld & GBTN_A)
|
||||
{
|
||||
m_btnMgr.noClick(true);
|
||||
if (m_padADelay == 0 || m_padADelay >= g_repeatDelay)
|
||||
if(m_padADelay == 0 || m_padADelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_padADelay < g_repeatDelay)
|
||||
if(m_padADelay < g_repeatDelay)
|
||||
++m_padADelay;
|
||||
}
|
||||
else
|
||||
@ -370,94 +346,106 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
||||
m_btnMgr.noClick();
|
||||
}
|
||||
}
|
||||
/* else if (btn == GBTN_B)
|
||||
{
|
||||
if(gc_btnsHeld & GBTN_B)
|
||||
{
|
||||
m_btnMgr.noClick(true);
|
||||
if (m_padBDelay == 0 || m_padBDelay >= g_repeatDelay)
|
||||
b = true;
|
||||
if (m_padBDelay < g_repeatDelay)
|
||||
++m_padBDelay;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_padBDelay = 0;
|
||||
m_btnMgr.noClick();
|
||||
}
|
||||
} */
|
||||
return b;
|
||||
}
|
||||
|
||||
bool CMenu::lStick_Up(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((LEFT_STICK_ANG_UP && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) > 20)
|
||||
{
|
||||
if((LEFT_STICK_ANG_UP && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) > 20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::lStick_Right(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((LEFT_STICK_ANG_RIGHT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) > 20)
|
||||
{
|
||||
if((LEFT_STICK_ANG_RIGHT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) > 20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::lStick_Down(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((LEFT_STICK_ANG_DOWN && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) < -20)
|
||||
{
|
||||
if((LEFT_STICK_ANG_DOWN && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) < -20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::lStick_Left(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((LEFT_STICK_ANG_LEFT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) < -20)
|
||||
{
|
||||
if((LEFT_STICK_ANG_LEFT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) < -20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::rStick_Up(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((RIGHT_STICK_ANG_UP && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) > 20)
|
||||
{
|
||||
if((RIGHT_STICK_ANG_UP && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) > 20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::rStick_Right(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((RIGHT_STICK_ANG_RIGHT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) > 20)
|
||||
{
|
||||
if((RIGHT_STICK_ANG_RIGHT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) > 20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::rStick_Down(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((RIGHT_STICK_ANG_DOWN && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) < -20)
|
||||
{
|
||||
if((RIGHT_STICK_ANG_DOWN && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) < -20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::rStick_Left(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((RIGHT_STICK_ANG_LEFT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) < -20)
|
||||
{
|
||||
if((RIGHT_STICK_ANG_LEFT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) < -20)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::wRoll_Left(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if (WBTN_B_HELD && (wmote_roll[chan] < -5) && wmote_roll_skip[chan] == 0)
|
||||
{
|
||||
if(WBTN_B_HELD && (wmote_roll[chan] < -5) && wmote_roll_skip[chan] == 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CMenu::wRoll_Right(void)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if (WBTN_B_HELD && (wmote_roll[chan] > 5) && wmote_roll_skip[chan] == 0)
|
||||
{
|
||||
if(WBTN_B_HELD && (wmote_roll[chan] > 5) && wmote_roll_skip[chan] == 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -475,33 +463,19 @@ void CMenu::_getGrabStatus(void)
|
||||
{
|
||||
wGrabStatus[chan] = WBTN_B & WPAD_ButtonsHeld(chan);
|
||||
gGrabStatus[chan] = GBTN_B & PAD_ButtonsHeld(chan);
|
||||
|
||||
if((wGrabStatus[chan] && wX[chan] > 0 && wd[chan]->ir.x < wX[chan] - 30)
|
||||
|| (gGrabStatus[chan] && gX[chan] > 0 && stickPointer_x[chan] < gX[chan]))
|
||||
{
|
||||
//for(int i = 0; i != (wX[chan] - wd[chan]->ir.x)/30 && i != (gX[chan] - stickPointer_x[chan])/30; i++)
|
||||
m_cf.left();
|
||||
}
|
||||
m_cf.left();
|
||||
if((wGrabStatus[chan] && wX[chan] > 0 && wd[chan]->ir.x > wX[chan] + 30)
|
||||
|| (gGrabStatus[chan] && gX[chan] > 0 && stickPointer_x[chan] > gX[chan]))
|
||||
{
|
||||
//for(int i = 0; i != (wd[chan]->ir.x - wX[chan])/30 && i != (gX[chan] - stickPointer_x[chan])/30; i++)
|
||||
m_cf.right();
|
||||
}
|
||||
m_cf.right();
|
||||
if((wGrabStatus[chan] && wY[chan] > 0 && wd[chan]->ir.y < wY[chan] - 30)
|
||||
|| (gGrabStatus[chan] && gY[chan] > 0 && stickPointer_y[chan] < gY[chan]))
|
||||
{
|
||||
//for(int i = 0; i != (wY[chan] - wd[chan]->ir.y)/30 && i != (gY[chan] - stickPointer_y[chan])/30; i++)
|
||||
m_cf.up();
|
||||
}
|
||||
m_cf.up();
|
||||
if((wGrabStatus[chan] && wY[chan] > 0 && wd[chan]->ir.y > wY[chan] + 30)
|
||||
|| (gGrabStatus[chan] && gY[chan] > 0 && stickPointer_y[chan] > gY[chan]))
|
||||
{
|
||||
//for(int i = 0; i != (wd[chan]->ir.y - wY[chan])/30 && i != (stickPointer_y[chan] - gY[chan])/30; i++)
|
||||
m_cf.down();
|
||||
}
|
||||
|
||||
if (wGrabStatus[chan])
|
||||
m_cf.down();
|
||||
if(wGrabStatus[chan])
|
||||
{
|
||||
wX[chan] = wd[chan]->ir.x;
|
||||
wY[chan] = wd[chan]->ir.y;
|
||||
@ -511,7 +485,6 @@ void CMenu::_getGrabStatus(void)
|
||||
wX[chan] = 0;
|
||||
wY[chan] = 0;
|
||||
}
|
||||
|
||||
if(gGrabStatus[chan])
|
||||
{
|
||||
gX[chan] = stickPointer_x[chan];
|
||||
@ -527,13 +500,15 @@ void CMenu::_getGrabStatus(void)
|
||||
|
||||
void CMenu::ShowZone(SZone zone, bool &showZone)
|
||||
{
|
||||
if (zone.hide)
|
||||
if(zone.hide)
|
||||
{
|
||||
showZone = false;
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
if ((WPadIR_Valid(chan) || m_show_pointer[chan]) && m_cursor[chan].x() >= zone.x && m_cursor[chan].y() >= zone.y
|
||||
{
|
||||
if((WPadIR_Valid(chan) || m_show_pointer[chan]) && m_cursor[chan].x() >= zone.x && m_cursor[chan].y() >= zone.y
|
||||
&& m_cursor[chan].x() < zone.x + zone.w && m_cursor[chan].y() < zone.y + zone.h)
|
||||
showZone = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
showZone = true;
|
||||
@ -567,4 +542,4 @@ void CMenu::ShowNextZone()
|
||||
void CMenu::ShowGameZone()
|
||||
{
|
||||
ShowZone(m_gameButtonsZone, m_show_zone_game);
|
||||
}
|
||||
}
|
||||
|
@ -212,8 +212,10 @@ lngspa=Español
|
||||
lngsys=Sistema
|
||||
lngtch=Chino T.
|
||||
main1=Instalar Juego
|
||||
main2=Bienvenido a WiiFlow.\nNo se ha encontrado ningún juego.\nPulse Instalar juegos para instalar un juego o Seleccionar partición para elegir la partición.
|
||||
main3=Selecione Partición
|
||||
main2=Bienvenido a WiiFlow. No se ha encontrado ningún juego. Pulsa Instalar juegos para instalar un juego o Seleccionar partición para elegir la partición.
|
||||
main3=Seleccione Partición
|
||||
main4=Bienvenido a WiiFlow. No se ha encontrado ningúna aplicación Homebrew. Pulsa seleccionar partición para elegir la partición.
|
||||
main5=Bienvenido a WiiFlow. No se ha encontrado ningún Plugin. Pulsa seleccionar partición para elegir la partición.
|
||||
mastersystem=Sega Master System
|
||||
menu=Menú del Sistema
|
||||
NANDfull=Completa
|
||||
|
Loading…
Reference in New Issue
Block a user