-Removed LibWUPC now that Libogc supports WiiU Pro controller.

This commit is contained in:
fledge68 2018-07-16 14:14:38 +00:00
parent 2133c1d89a
commit 580f98fac5
9 changed files with 20 additions and 86 deletions

View File

@ -57,7 +57,7 @@ ios := 249
#---------------------------------------------------------------------------------
CFLAGS = -g -ggdb -Os -Wall -Wextra $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE -DHAVE_CONFIG_H
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80620000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,wiiuse_register
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80620000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size
ifeq ($(BUILDMODE),channel)
CFLAGS += -DFULLCHANNEL
@ -67,7 +67,7 @@ endif
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lwupc -lbte -lasnd -logc -lfreetype -lvorbisidec -lmad -lsicksaxis
LIBS := -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lbte -lasnd -logc -lfreetype -lvorbisidec -lmad -lsicksaxis
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -1,49 +0,0 @@
/****************************************************************************
* Copyright (C) 2014 FIX94
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#ifndef _WUPC_H_
#define _WUPC_H_
#ifdef __cplusplus
extern "C" {
#endif
struct WUPCData {
s16 xAxisL;
s16 xAxisR;
s16 yAxisL;
s16 yAxisR;
u32 button;
};
void WUPC_Init();
void WUPC_Shutdown();
struct WUPCData *WUPC_Data(u8 chan);
void WUPC_Rumble(u8 chan, bool rumble);
u32 WUPC_UpdateButtonStats();
u32 WUPC_ButtonsUp(u8 chan);
u32 WUPC_ButtonsDown(u8 chan);
u32 WUPC_ButtonsHeld(u8 chan);
s16 WUPC_lStickX(u8 chan);
s16 WUPC_lStickY(u8 chan);
s16 WUPC_rStickX(u8 chan);
s16 WUPC_rStickY(u8 chan);
#ifdef __cplusplus
}
#endif
#endif

Binary file not shown.

View File

@ -413,11 +413,10 @@ void CButtonsMgr::setSoundVolume(int vol)
m_soundVolume = min(max(0, vol), 0xFF);
}
void CButtonsMgr::setRumble(int chan, bool wii, bool gc, bool wupc)
void CButtonsMgr::setRumble(int chan, bool wii, bool gc)
{
wii_rumble[chan] = wii;
gc_rumble[chan] = gc;
wupc_rumble[chan] = wupc;
}
void CButtonsMgr::setMouse(bool enable)
@ -460,7 +459,6 @@ void CButtonsMgr::click(s16 id)
{
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
{
WUPC_Rumble(chan, 0);
WPAD_Rumble(chan, 0);
PAD_ControlMotor(chan, 0);
@ -519,7 +517,6 @@ void CButtonsMgr::mouse(int chan, int x, int y)
if(m_rumbleEnabled)
{
m_rumble[chan] = 4;
if(wupc_rumble[chan]) WUPC_Rumble(chan, 1);
if(wii_rumble[chan]) WPAD_Rumble(chan, 1);
if(gc_rumble[chan]) PAD_ControlMotor(chan, 1);
}
@ -603,7 +600,6 @@ void CButtonsMgr::tick(void)
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
if (m_rumble[chan] > 0 && --m_rumble[chan] == 0)
{
WUPC_Rumble(chan, 0);
WPAD_Rumble(chan, 0);
PAD_ControlMotor(chan, 0);
}

View File

@ -6,7 +6,6 @@
#include <ogc/pad.h>
#include "wiiuse/wpad.h"
#include "wupc/wupc.h"
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
#include "video.hpp"
@ -64,7 +63,7 @@ public:
void noHover(bool nohover = false);
void click(s16 id = -1);
bool selected(s16 button = -1);
void setRumble(int, bool wii = false, bool gc = false, bool wupc = false);
void setRumble(int, bool wii = false, bool gc = false);
void deselect(void){ for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--) m_selected[chan] = -1; }
void stopSounds(void);
void setSoundVolume(int vol);
@ -148,7 +147,6 @@ private:
u8 m_rumble[WPAD_MAX_WIIMOTES];
bool wii_rumble[WPAD_MAX_WIIMOTES];
bool gc_rumble[WPAD_MAX_WIIMOTES];
bool wupc_rumble[WPAD_MAX_WIIMOTES];
GuiSound *m_sndHover;
GuiSound *m_sndClick;
u8 m_soundVolume;

View File

@ -16,7 +16,6 @@
#include "memory/mem2.hpp"
#include "memory/memory.h"
#include "wiiuse/wpad.h"
#include "wupc/wupc.h"
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
/* Variables */
@ -36,7 +35,6 @@ void Open_Inputs(void)
{
/* Initialize Wiimote subsystem */
PAD_Init();
WUPC_Init();
WPAD_Init();
DS3_Init();
//drc
@ -49,8 +47,6 @@ void Open_Inputs(void)
void Close_Inputs(void)
{
WUPC_Shutdown();
u32 cnt;
/* Disconnect Wiimotes */

View File

@ -27,7 +27,6 @@
#include "music/MusicPlayer.hpp"
#include "plugin/plugin.hpp"
#include "wiiuse/wpad.h"
#include "wupc/wupc.h"
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
using namespace std;
@ -667,8 +666,6 @@ private:
bool wBtn_HeldChan(int btn, u8 ext, int &chan);
u32 gc_btnsPressed;
u32 gc_btnsHeld;
u32 wupc_btnsPressed[WPAD_MAX_WIIMOTES];
u32 wupc_btnsHeld[WPAD_MAX_WIIMOTES];
bool ds3_btnRepeat(s64 btn);
bool m_show_pointer[WPAD_MAX_WIIMOTES];
float left_stick_angle[WPAD_MAX_WIIMOTES];

View File

@ -65,7 +65,6 @@ void CMenu::ScanInput()
m_show_zone_prev = false;
m_show_zone_next = false;
WUPC_UpdateButtonStats();
WPAD_ScanPads();
PAD_ScanPads();
DS3_ScanPads();
@ -110,8 +109,7 @@ 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,
WUPC_lStickX(chan) < -160 || WUPC_lStickX(chan) > 160 || WUPC_lStickY(chan) < -160 || WUPC_lStickY(chan) > 160);
m_btnMgr.setRumble(chan, WPadIR_Valid(chan), PAD_StickX(chan) < -20 || PAD_StickX(chan) > 20 || PAD_StickY(chan) < -20 || PAD_StickY(chan) > 20);
m_btnMgr.setMouse(WPadIR_Valid(chan) || m_show_pointer[chan]);
if(WPadIR_Valid(chan))
{
@ -151,7 +149,6 @@ void CMenu::ButtonsPressed()
{
wii_btnsPressed[chan] = WPAD_ButtonsDown(chan);
gc_btnsPressed |= PAD_ButtonsDown(chan);
wupc_btnsPressed[chan] = WUPC_ButtonsDown(chan);
//drc
}
}
@ -164,14 +161,13 @@ void CMenu::ButtonsHeld()
{
wii_btnsHeld[chan] = WPAD_ButtonsHeld(chan);
gc_btnsHeld |= PAD_ButtonsHeld(chan);
wupc_btnsHeld[chan] = WUPC_ButtonsHeld(chan);
//drc
}
}
bool CMenu::wBtn_PressedChan(int btn, u8 ext, int &chan)
{
return ((wii_btnsPressed[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type)) || ((wupc_btnsPressed[chan] & btn) && (ext == WPAD_EXP_CLASSIC));
return ((wii_btnsPressed[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type));
}
bool CMenu::wBtn_Pressed(int btn, u8 ext)
@ -186,7 +182,7 @@ bool CMenu::wBtn_Pressed(int btn, u8 ext)
bool CMenu::wBtn_HeldChan(int btn, u8 ext, int &chan)
{
return ((wii_btnsHeld[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type)) || ((wupc_btnsHeld[chan] & btn) && (ext == WPAD_EXP_CLASSIC));
return ((wii_btnsHeld[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type));
}
bool CMenu::wBtn_Held(int btn, u8 ext)
@ -204,13 +200,13 @@ void CMenu::LeftStick()
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 || (chan == 0 && (abs(DS3_StickX()) > 20 || abs(DS3_StickY()) > 20)) || abs(WUPC_lStickX(chan)) > 160 || abs(WUPC_lStickY(chan)) > 160)
if(left_stick_mag[chan] > 0.15 || abs(PAD_StickX(chan)) > 20 || abs(PAD_StickY(chan)) > 20 || (chan == 0 && (abs(DS3_StickX()) > 20 || abs(DS3_StickY()) > 20)))
{
m_show_pointer[chan] = true;
if(LEFT_STICK_LEFT)
{
speed = (u8)(left_stick_mag[chan] * 10.00);
pSpeed = (u8)(((int)abs(PAD_StickX(chan))/10)|((int)abs(DS3_StickX()/10))|((int)abs(WUPC_lStickX(chan))/80));
pSpeed = (u8)(((int)abs(PAD_StickX(chan))/10)|((int)abs(DS3_StickX()/10)));
if(stickPointer_x[chan] > m_cursor[chan].width()/2)
stickPointer_x[chan] = stickPointer_x[chan]-speed-pSpeed;
pointerhidedelay[chan] = 150;
@ -218,7 +214,7 @@ void CMenu::LeftStick()
if(LEFT_STICK_DOWN)
{
speed = (u8)(left_stick_mag[chan] * 10.00);
pSpeed = (u8)(((int)abs(PAD_StickY(chan))/10)|((int)abs(DS3_StickY()/10))|((int)abs(WUPC_lStickY(chan))/80));
pSpeed = (u8)(((int)abs(PAD_StickY(chan))/10)|((int)abs(DS3_StickY()/10)));
if(stickPointer_y[chan] < (m_vid.height() + (m_cursor[chan].height()/2)))
stickPointer_y[chan] = stickPointer_y[chan]+speed+pSpeed;
pointerhidedelay[chan] = 150;
@ -226,7 +222,7 @@ void CMenu::LeftStick()
if(LEFT_STICK_RIGHT)
{
speed = (u8)(left_stick_mag[chan] * 10.00);
pSpeed = (u8)(((int)abs(PAD_StickX(chan))/10)|((int)abs(DS3_StickX()/10))|((int)abs(WUPC_lStickX(chan))/80));
pSpeed = (u8)(((int)abs(PAD_StickX(chan))/10)|((int)abs(DS3_StickX()/10)));
if(stickPointer_x[chan] < (m_vid.width() + (m_cursor[chan].width()/2)))
stickPointer_x[chan] = stickPointer_x[chan]+speed+pSpeed;
pointerhidedelay[chan] = 150;
@ -234,7 +230,7 @@ void CMenu::LeftStick()
if(LEFT_STICK_UP)
{
speed = (u8)(left_stick_mag[chan] * 10.00);
pSpeed = (u8)(((int)abs(PAD_StickY(chan))/10)|((int)abs(DS3_StickY()/10))|((int)abs(WUPC_lStickY(chan))/80));
pSpeed = (u8)(((int)abs(PAD_StickY(chan))/10)|((int)abs(DS3_StickY()/10)));
if(stickPointer_y[chan] > m_cursor[chan].height()/2)
stickPointer_y[chan] = stickPointer_y[chan]-speed-pSpeed;
pointerhidedelay[chan] = 150;
@ -516,7 +512,7 @@ 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 || DS3_StickY() < -20 || WUPC_lStickY(chan) > 160)
if((LEFT_STICK_ANG_UP && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) > 20 || DS3_StickY() < -20)
return true;
}
return false;
@ -526,7 +522,7 @@ 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 || DS3_StickX() > 20 || WUPC_lStickX(chan) > 160)
if((LEFT_STICK_ANG_RIGHT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) > 20 || DS3_StickX() > 20)
return true;
}
return false;
@ -536,7 +532,7 @@ 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 || DS3_StickY() > 20 || WUPC_lStickY(chan) < -160)
if((LEFT_STICK_ANG_DOWN && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) < -20 || DS3_StickY() > 20)
return true;
}
return false;
@ -546,7 +542,7 @@ 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 || DS3_StickX() < -20 || WUPC_lStickX(chan) < -160)
if((LEFT_STICK_ANG_LEFT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) < -20 || DS3_StickX() < -20)
return true;
}
return false;
@ -556,7 +552,7 @@ 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 || WUPC_rStickY(chan) > 160)
if((RIGHT_STICK_ANG_UP && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) > 20)
return true;
}
return false;
@ -566,7 +562,7 @@ 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 || WUPC_rStickX(chan) > 160)
if((RIGHT_STICK_ANG_RIGHT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) > 20)
return true;
}
return false;
@ -576,7 +572,7 @@ 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 || WUPC_rStickY(chan) < -160)
if((RIGHT_STICK_ANG_DOWN && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) < -20)
return true;
}
return false;
@ -586,7 +582,7 @@ 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 || WUPC_rStickX(chan) < -160)
if((RIGHT_STICK_ANG_LEFT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) < -20)
return true;
}
return false;