reorganized files and a part of the architecture.

This version needs to be tested.
Don't forget to add comments.

git-svn-id: http://wiiusej.googlecode.com/svn/trunk@64 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
guilhem.duche
2008-02-29 00:25:40 +00:00
parent 821d9d837e
commit d8b72061eb
15 changed files with 447 additions and 112 deletions

View File

@@ -1,9 +1,8 @@
package wiiusej.wiiuseapievents;
import tests.Tests;
/**
* Gather events in a call to the Wiiuse API.
* Gather events during a call to the Wiiuse API.
*
* @author gduche
*
@@ -12,7 +11,7 @@ public class EventsGatherer {
private WiiUseApiEvent[] events;
private int index = 0;
private WiiMoteEvent genericEvent = null;
private GenericEvent genericEvent = null;
/**
* Create EventsGatherer.
@@ -49,10 +48,11 @@ public class EventsGatherer {
*/
public void prepareWiiMoteEvent(int id, short buttonsJustPressed,
short buttonsJustReleased, short buttonsHeld) {
genericEvent = new WiiMoteEvent(id, buttonsJustPressed,
genericEvent = new GenericEvent(id, buttonsJustPressed,
buttonsJustReleased, buttonsHeld);
}
/**
* Add an IR point to the WiiMoteEvent prepared
*
@@ -61,8 +61,8 @@ public class EventsGatherer {
* @param y
* y coordinates
*/
public void addIRPointToPreparedWiiMoteEvent(int x, int y) {
if (genericEvent != null) {
public void addIRPointToPreparedWiiMoteEvent(int x, int y) {
if (genericEvent != null) {
genericEvent.addIRpoint(x, y);
}
}
@@ -86,7 +86,7 @@ public class EventsGatherer {
public void addMotionSensingValues(float r, float p, float ya, float x,
float y, float z) {
if (genericEvent != null) {
genericEvent.setOrientationAndGforce(r, p, ya, x, y, z);
genericEvent.setMotionSensingEvent(r, p, ya, x, y, z);
}
}