Ant buildfile aan Mimis toegevoegd om uitvoerbare jar te maken. Begonnen aan implementatie van Wii Balance Board in WiiuseJ.
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
<listOptionValue builtIn="false" value=""${jdk}/include/win32""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1057877516" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.820612620" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.so.debug.424942675" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.so.debug">
|
||||
@@ -103,7 +104,7 @@
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.so.release.582624041" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.so.release">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.so.release.852849225" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.so.release"/>
|
||||
<builder buildPath="${workspace_loc:/WiiuseJ/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1667515887" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.so.release.1955417593" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.so.release">
|
||||
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.assembler.mingw.so.release.1955417593" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.so.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.204782274" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.2134712739" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
|
||||
@@ -124,6 +125,7 @@
|
||||
<listOptionValue builtIn="false" value=""${jdk}/include/win32""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/include}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.227749697" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.839631863" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.so.release.901924366" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.so.release">
|
||||
@@ -143,6 +145,7 @@
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
<outputType id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.release.output.543131979" outputPrefix="" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.release.output"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
|
||||
Binary file not shown.
BIN
lib/wiiuse.lib
BIN
lib/wiiuse.lib
Binary file not shown.
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "wiiusej_WiiUseApi.h"
|
||||
#include "wiiuse.h"
|
||||
#include <jni.h>
|
||||
/*
|
||||
* These are some identifiers for wiimotes
|
||||
*
|
||||
@@ -511,8 +510,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll
|
||||
nc->js.max.x,nc->js.max.y,
|
||||
nc->js.min.x,nc->js.min.y,
|
||||
nc->js.center.x,nc->js.center.y);
|
||||
}
|
||||
else if (wiimotes[i]->exp.type == EXP_GUITAR_HERO_3) {
|
||||
} else if (wiimotes[i]->exp.type == EXP_GUITAR_HERO_3) {
|
||||
/* put guitar hero values in wiimote generic event */
|
||||
mid = (*env)->GetMethodID(env, cls,
|
||||
"addGuitarHeroEventToPreparedWiimoteEvent", "(SSSFFFSSSSSS)V");
|
||||
@@ -531,7 +529,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll
|
||||
gh->js.max.x,gh->js.max.y,
|
||||
gh->js.min.x,gh->js.min.y,
|
||||
gh->js.center.x,gh->js.center.y);
|
||||
}if (wiimotes[i]->exp.type == EXP_CLASSIC) {
|
||||
} else if (wiimotes[i]->exp.type == EXP_CLASSIC) {
|
||||
/* put classic controller values in wiimote generic event */
|
||||
mid = (*env)->GetMethodID(env, cls,
|
||||
"addClassicControllerEventToPreparedWiimoteEvent", "(SSSFFFFSSSSSSFFSSSSSS)V");
|
||||
@@ -555,12 +553,25 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll
|
||||
cl->rjs.max.x,cl->rjs.max.y,
|
||||
cl->rjs.min.x,cl->rjs.min.y,
|
||||
cl->rjs.center.x,cl->rjs.center.y);
|
||||
} else if (wiimotes[i]->exp.type == EXP_BALANCE_BOARD) {
|
||||
/* put balance board values in wiimote generic event */
|
||||
mid = (*env)->GetMethodID(env, cls,
|
||||
"addBalanceBoardEventToPreparedWiimoteEvent", "(FFFF)V");
|
||||
if (mid == 0) {
|
||||
return;
|
||||
}
|
||||
struct balance_board_t* bb = (balance_board_t*)&wiimotes[i]->exp.bb;
|
||||
(*env)->CallVoidMethod(env, gath, mid,
|
||||
/* weight */
|
||||
bb->tr,
|
||||
bb->br,
|
||||
bb->bl,
|
||||
bb->tl);
|
||||
}
|
||||
}
|
||||
|
||||
/* add generic event to java object used to gather events in c environment */
|
||||
mid = (*env)->GetMethodID(env, cls, "addWiimoteEvent",
|
||||
"()V");
|
||||
mid = (*env)->GetMethodID(env, cls, "addWiimoteEvent", "()V");
|
||||
if (mid == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -639,6 +650,24 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll
|
||||
(*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid);
|
||||
break;
|
||||
|
||||
case WIIUSE_BALANCE_BOARD_CTRL_INSERTED:
|
||||
/* the balance board was just connected */
|
||||
mid = (*env)->GetMethodID(env, cls, "addBalanceBoardInsertedEvent", "(I)V");
|
||||
if (mid == 0) {
|
||||
return;
|
||||
}
|
||||
(*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid);
|
||||
break;
|
||||
|
||||
case WIIUSE_BALANCE_BOARD_CTRL_REMOVED:
|
||||
/* the balance board disconnected */
|
||||
mid = (*env)->GetMethodID(env, cls, "addBalanceBoardRemovedEvent", "(I)V");
|
||||
if (mid == 0) {
|
||||
return;
|
||||
}
|
||||
(*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid);
|
||||
break;
|
||||
|
||||
case WIIUSE_STATUS:
|
||||
/* a status event occured */
|
||||
mid = (*env)->GetMethodID(env, cls, "addStatusEvent", "(IZFSZIZZZZ)V");
|
||||
@@ -736,5 +765,4 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_streamSpeakerData(JNIEnv *env, job
|
||||
}*/
|
||||
wiiuse_speaker_data(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), (byte*) jbData, len);
|
||||
(*env)->ReleaseByteArrayElements(env, jbArray, jbData, JNI_FALSE);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class wiiusej_WiiUseApi */
|
||||
|
||||
/* Header for class wiiusej_WiiUseApi */
|
||||
#ifndef _Included_wiiusej_WiiUseApi
|
||||
#define _Included_wiiusej_WiiUseApi
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user