summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2010-04-19 03:39:26 +0000
committerGlenn Rice <glennricster@gmail.com>2010-04-19 03:39:26 +0000
commit63d296fcbac2e34cdfe7305ea4f789a3bcf836a2 (patch)
tree197513f22301a782bc503dc8139856695c8cae6e /Source
parentd93cebf84b4d417930b8b50278faafe1318e7fd3 (diff)
Take care of a few more compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5388 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp7
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.cpp52
-rw-r--r--Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/EmuSubroutines.cpp2
-rw-r--r--Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp4
4 files changed, 32 insertions, 33 deletions
diff --git a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp
index f1de8e4610..a54eb23914 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp
@@ -442,10 +442,9 @@ void FillReportAcc(wm_accel& _acc)
int acc_y = _acc.y;
int acc_z = _acc.z;
- if (((WiiMapping[g_ID].UDPWM.instance)&&
- (WiiMapping[g_ID].UDPWM.enableButtons)&&
- (WiiMapping[g_ID].UDPWM.instance->getButtons()&UDPWM_SK))
- ||(IsKey(EWM_SHAKE))&& !WiiMapping[g_ID].Motion.TiltWM.Shake)
+ if ((WiiMapping[g_ID].UDPWM.instance && WiiMapping[g_ID].UDPWM.enableButtons
+ && (WiiMapping[g_ID].UDPWM.instance->getButtons() & UDPWM_SK))
+ || (IsKey(EWM_SHAKE) && !WiiMapping[g_ID].Motion.TiltWM.Shake))
WiiMapping[g_ID].Motion.TiltWM.Shake = 1;
// Step the shake simulation one step
diff --git a/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.cpp b/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.cpp
index c7fef02fc1..ed5fb65818 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/UDPWiimote.cpp
@@ -49,7 +49,7 @@ struct UDPWiimote::_d
int UDPWiimote::noinst=0;
-UDPWiimote::UDPWiimote(const char *port) : d(new _d) ,x(0),y(0),z(0),nunX(0),nunY(0),mask(0),nunMask(0),pointerX(-0.1),pointerY(-0.1)
+UDPWiimote::UDPWiimote(const char *port) : d(new _d) ,x(0),y(0),z(0),nunX(0),nunY(0),pointerX(-0.1),pointerY(-0.1),nunMask(0),mask(0)
{
#ifdef _WIN32
u_long iMode = 1;
@@ -77,7 +77,7 @@ UDPWiimote::UDPWiimote(const char *port) : d(new _d) ,x(0),y(0),z(0),nunX(0),nun
if ((rv = getaddrinfo(NULL, port, &hints, &servinfo)) != 0) {
// fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
cleanup;
- this->err=-1;
+ err=-1;
return;
}
@@ -97,13 +97,13 @@ UDPWiimote::UDPWiimote(const char *port) : d(new _d) ,x(0),y(0),z(0),nunX(0),nun
if (p == NULL) {
cleanup;
- this->err=-2;
+ err=-2;
return;
}
freeaddrinfo(servinfo);
blockingoff(d->sockfd);
- this->err=0;
+ err=0;
return;
}
@@ -161,9 +161,9 @@ void UDPWiimote::update()
ux=(double)((s32)ntohl(*p)); p++;
uy=(double)((s32)ntohl(*p)); p++;
uz=(double)((s32)ntohl(*p)); p++;
- this->x=ux/1048576; //packet accel data
- this->y=uy/1048576;
- this->z=uz/1048576;
+ x=ux/1048576; //packet accel data
+ y=uy/1048576;
+ z=uz/1048576;
}
if (bf[2]&BUTT_FLAG)
{
@@ -171,14 +171,14 @@ void UDPWiimote::update()
}
if (bf[2]&IR_FLAG)
{
- this->pointerX=((double)((s32)ntohl(*p)))/1048576; p++;
- this->pointerY=((double)((s32)ntohl(*p)))/1048576; p++;
+ pointerX=((double)((s32)ntohl(*p)))/1048576; p++;
+ pointerY=((double)((s32)ntohl(*p)))/1048576; p++;
}
if (bf[2]&NUN_FLAG)
{
- this->nunMask=*((u8*)p); p=(u32*)(((u8*)p)+1);
- this->nunX=((double)((s32)ntohl(*p)))/1048576; p++;
- this->nunY=((double)((s32)ntohl(*p)))/1048576; p++;
+ nunMask=*((u8*)p); p=(u32*)(((u8*)p)+1);
+ nunX=((double)((s32)ntohl(*p)))/1048576; p++;
+ nunY=((double)((s32)ntohl(*p)))/1048576; p++;
}
}
}
@@ -189,18 +189,18 @@ void UDPWiimote::update()
}
}
//NOTICE_LOG(WIIMOTE,"UDPWii update result:np:%d x:%f y:%f z:%f nx:%f ny:%f px:%f py:%f bmask:%x nmask:%x",
- // nopack,this->x,this->y,this->z,this->nunX, this->nunY,this->pointerX,this->pointerY, this->mask, this->nunMask);
+ // nopack, x, y, z, nunX, nunY, pointerX, pointerY, mask, nunMask);
}
-void UDPWiimote::getAccel(int &x, int &y, int &z)
+void UDPWiimote::getAccel(int &_x, int &_y, int &_z)
{
- //NOTICE_LOG(WIIMOTE,"%lf %lf %lf",this->x, this-y, this->z);
+ //NOTICE_LOG(WIIMOTE,"%lf %lf %lf",_x, _y, _z);
float xg = WiiMoteEmu::g_wm.cal_g.x;
float yg = WiiMoteEmu::g_wm.cal_g.y;
float zg = WiiMoteEmu::g_wm.cal_g.z;
- x = WiiMoteEmu::g_wm.cal_zero.x + (int)(xg * this->x);
- y = WiiMoteEmu::g_wm.cal_zero.y + (int)(yg * this->y);
- z = WiiMoteEmu::g_wm.cal_zero.z + (int)(zg * this->z);
+ _x = WiiMoteEmu::g_wm.cal_zero.x + (int)(xg * x);
+ _y = WiiMoteEmu::g_wm.cal_zero.y + (int)(yg * y);
+ _z = WiiMoteEmu::g_wm.cal_zero.z + (int)(zg * z);
}
u32 UDPWiimote::getButtons()
@@ -208,15 +208,15 @@ u32 UDPWiimote::getButtons()
return mask;
}
-void UDPWiimote::getIR(float &x, float &y)
+void UDPWiimote::getIR(float &_x, float &_y)
{
- x=(float)this->pointerX;
- y=(float)this->pointerY;
+ _x=(float)pointerX;
+ _y=(float)pointerY;
}
-void UDPWiimote::getNunchuck(float &x, float &y, u8 &mask)
+void UDPWiimote::getNunchuck(float &_x, float &_y, u8 &_mask)
{
- x=(float)this->nunX;
- y=(float)this->nunY;
- mask=this->nunMask;
-} \ No newline at end of file
+ _x=(float)nunX;
+ _y=(float)nunY;
+ _mask=nunMask;
+}
diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/EmuSubroutines.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/EmuSubroutines.cpp
index d30e2a759b..4e2737fded 100644
--- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/EmuSubroutines.cpp
+++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/EmuSubroutines.cpp
@@ -195,7 +195,7 @@ void Wiimote::SendAck(u16 _channelID, u8 _reportID)
the status request rs and all its eventual instructions it may include (for
example turn off rumble or something else) and just send the status
report. */
-void Wiimote::RequestStatus(u16 _channelID, wm_request_status* rs, int Extension)
+void Wiimote::RequestStatus(u16 _channelID, wm_request_status* rs, int _Extension)
{
// handle switch extension
if ( m_extension->active_extension != m_extension->switch_extension )
diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp
index f39205e24f..e4c303b454 100644
--- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp
+++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp
@@ -110,8 +110,8 @@ void Wiimote::Reset()
}
Wiimote::Wiimote( const unsigned int index, SWiimoteInitialize* const wiimote_initialize )
- : m_index(index)
- , m_wiimote_init( wiimote_initialize )
+ : m_wiimote_init( wiimote_initialize )
+ , m_index(index)
{
// ---- set up all the controls ----