wiiuseJ 0.12 work in progress.
git-svn-id: http://wiiusej.googlecode.com/svn/trunk@147 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
@@ -53,7 +53,7 @@ public class JoystickEvent extends GenericEvent {
|
||||
* @param center2
|
||||
* center joystick value 2.
|
||||
*/
|
||||
public JoystickEvent(int id, int angle, int magnitude, short max1,
|
||||
public JoystickEvent(int id, float angle, float magnitude, short max1,
|
||||
short max2, short min1, short min2, short center1, short center2) {
|
||||
super(id);
|
||||
this.angle = angle;
|
||||
@@ -74,7 +74,7 @@ public class JoystickEvent extends GenericEvent {
|
||||
*
|
||||
* @return the angle angle the joystick.
|
||||
*/
|
||||
public float getangle() {
|
||||
public float getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class JoystickEvent extends GenericEvent {
|
||||
*
|
||||
* @return the magnitude magnitude of the joystick.
|
||||
*/
|
||||
public float getmagnitude() {
|
||||
public float getMagnitude() {
|
||||
return magnitude;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class NunchukEvent extends ExpansionEvent {
|
||||
float orientationThreshold, int accelerationThreshold,
|
||||
boolean smoothingState, float alphaSmooth, float r, float p,
|
||||
float ya, float ar, float ap, float x, float y, float z, short xx,
|
||||
short yy, short zz, int angle, int magnitude, short max1,
|
||||
short yy, short zz, float angle, float magnitude, short max1,
|
||||
short max2, short min1, short min2, short center1, short center2) {
|
||||
super(id);
|
||||
buttonsEvent = new NunchukButtonsEvent(id, buttonsJustPressed,
|
||||
|
||||
@@ -243,7 +243,7 @@ public class EventsGatherer {
|
||||
float orientationThreshold, int accelerationThreshold,
|
||||
boolean smoothingState, float alphaSmooth, float r, float p,
|
||||
float ya, float ar, float ap, float x, float y, float z, short xx,
|
||||
short yy, short zz, int angle, int magnitude, short max1,
|
||||
short yy, short zz, float angle, float magnitude, short max1,
|
||||
short max2, short min1, short min2, short center1, short center2){
|
||||
if (genericEvent != null) {
|
||||
genericEvent.setNunchukEvent(buttonsJustPressed,
|
||||
|
||||
@@ -242,7 +242,7 @@ public class StatusEvent extends WiiUseApiEvent {
|
||||
* @return true if anything is connected to the wiimote false otherwise.
|
||||
*/
|
||||
public boolean isAttachmentConnected() {
|
||||
return attachment != EXP_NONE;
|
||||
return attachment == EXP_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,7 +251,7 @@ public class StatusEvent extends WiiUseApiEvent {
|
||||
* @return true if a nunchuk is connected to the wiimote false otherwise.
|
||||
*/
|
||||
public boolean isNunchukConnected() {
|
||||
return attachment != EXP_NUNCHUK;
|
||||
return attachment == EXP_NUNCHUK;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,7 +260,7 @@ public class StatusEvent extends WiiUseApiEvent {
|
||||
* @return true if a classic controller is connected to the wiimote false otherwise.
|
||||
*/
|
||||
public boolean isClassicControllerConnected() {
|
||||
return attachment != EXP_CLASSIC;
|
||||
return attachment == EXP_CLASSIC;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -269,7 +269,7 @@ public class StatusEvent extends WiiUseApiEvent {
|
||||
* @return true if a guitar hero controllerr is connected to the wiimote false otherwise.
|
||||
*/
|
||||
public boolean isGuitarHeroConnected() {
|
||||
return attachment != EXP_GUITAR_HERO_3;
|
||||
return attachment == EXP_GUITAR_HERO_3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -295,7 +295,7 @@ public class WiimoteEvent extends WiiUseApiEvent {
|
||||
float orientationThreshold, int accelerationThreshold,
|
||||
boolean smoothingState, float alphaSmooth, float r, float p,
|
||||
float ya, float ar, float ap, float x, float y, float z, short xx,
|
||||
short yy, short zz, int angle, int magnitude, short max1,
|
||||
short yy, short zz, float angle, float magnitude, short max1,
|
||||
short max2, short min1, short min2, short center1, short center2) {
|
||||
expansionEvent = new NunchukEvent(getWiimoteId(), buttonsJustPressed,
|
||||
buttonsJustReleased, buttonsHeld, orientationThreshold,
|
||||
|
||||
Reference in New Issue
Block a user