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:
guilhem.duche
2008-05-25 21:13:03 +00:00
parent c683a7d0b2
commit 1511bbf186
14 changed files with 770 additions and 212 deletions

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -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

View File

@@ -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,