Merge branch 'develop' into develop-wiiusej

Conflicts:
	cpp/wiiusej/Debug/wiiusej.dll
This commit is contained in:
2013-07-20 16:38:32 +02:00
47 changed files with 107 additions and 138 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
<<<<<<< HEAD
<<<<<<< HEAD
/cpp/wiipair/.settings
/cpp/wiipair/Release/src
=======
/java/bin
>>>>>>> c9d82ef8e884d27d6c5215d5b2fb851cf81162f8
=======
/cpp/wiiuse/Debug/src
>>>>>>> develop-wiiuse

View File

@@ -1,66 +0,0 @@
#Wed Sep 28 10:46:29 CEST 2011
eclipse.preferences.version=1
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
org.eclipse.cdt.codan.checkers.errnoreturn.params={implicit\=>false}
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
org.eclipse.cdt.codan.checkers.errreturnvalue.params={}
org.eclipse.cdt.codan.checkers.noreturn=Error
org.eclipse.cdt.codan.checkers.noreturn.params={implicit\=>false}
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={}
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={}
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={}
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={}
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={paramNot\=>false}
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={}
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={}
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={exceptions\=>("@(\#)","$Id")}
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}

View File

@@ -1 +1 @@
copy mimis.dll ..\..\Mimis\mimis.dll
copy mimis.dll ..\..\..\java\mimis.dll

View File

@@ -1 +1 @@
copy mimis.dll ..\..\Mimis\mimis.dll
copy mimis.dll ..\..\..\java\mimis.dll

BIN
cpp/mimis/wiiuse.dll Normal file

Binary file not shown.

View File

@@ -1,26 +1,25 @@
#Sun Jul 17 20:05:29 CEST 2011
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.debug.36925639/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.cygwin.so.release.2109617530/appendContributed=true
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/appendContributed=true

View File

@@ -1,14 +0,0 @@
#Sat Oct 15 11:50:13 CEST 2011
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/appendContributed=true

Binary file not shown.

BIN
cpp/wiiuse/Debug/wiiuse.dll Normal file

Binary file not shown.

BIN
cpp/wiiuse/Debug/wiiuse.lib Normal file

Binary file not shown.

View File

@@ -13,7 +13,7 @@
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/WiiuseJ"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/WiiuseJ/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="wiiusej"/>
<entry flags="RESOLVED" kind="libraryFile" name="wiiusej" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
@@ -39,6 +39,7 @@
<option id="gnu.cpp.compiler.option.include.paths.716839450" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${jdk}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.842669563" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@@ -88,7 +89,7 @@
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/WiiuseJ"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/WiiuseJ/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="wiiusej"/>
<entry flags="RESOLVED" kind="libraryFile" name="wiiusej" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
@@ -114,6 +115,7 @@
<option id="gnu.cpp.compiler.option.include.paths.1188267253" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${jdk}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1449486447" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@@ -125,7 +127,7 @@
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
</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"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.227749697" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
<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">
@@ -173,4 +175,5 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>WiiuseJ</name>
<name>WiiuseJ library</name>
<comment></comment>
<projects>
</projects>

Binary file not shown.

13
java/.classpath Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="cfg"/>
<classpathentry kind="src" path="resource"/>
<classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="lib/jacob-1.15-M3.jar"/>
<classpathentry kind="lib" path="lib/jxinput.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/>
<classpathentry kind="lib" path="wiiusej.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

17
java/.project Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Mimis</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

BIN
java/WiiPair.exe Normal file

Binary file not shown.

BIN
java/client.jar Normal file

Binary file not shown.

BIN
java/main.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -35,7 +35,6 @@ public class WiimoteDevice extends Component implements Device, GestureListener
protected static WiimoteService wiimoteService;
protected WiimoteTaskMapCycle taskMapCycle;
protected WiimoteDiscovery wiimoteDiscovery;
protected Wiimote wiimote;
protected boolean connected;
protected GestureDevice gestureDevice;
@@ -52,7 +51,6 @@ public class WiimoteDevice extends Component implements Device, GestureListener
public WiimoteDevice() {
super(TITLE);
taskMapCycle = new WiimoteTaskMapCycle();
wiimoteDiscovery = new WiimoteDiscovery(this);
gestureDevice = new GestureDevice();
gestureDevice.add(this);
motionDevice = new MotionDevice(this);
@@ -62,14 +60,15 @@ public class WiimoteDevice extends Component implements Device, GestureListener
/* Worker */
protected void activate() throws ActivateException {
motionDevice.setRouter(router);
motionDevice.start();
parser(Action.ADD, taskMapCycle.player);
wiimote = null;
if (wiimote == null) {
motionDevice.setRouter(router);
motionDevice.start();
parser(Action.ADD, taskMapCycle.player);
}
try {
connect();
} catch (DeviceNotFoundException e) {
wiimoteDiscovery.start();
log.warn(e);
}
super.activate();
}
@@ -98,13 +97,9 @@ public class WiimoteDevice extends Component implements Device, GestureListener
protected void deactivate() throws DeactivateException {
super.deactivate();
ledWorker.stop();
wiimoteDiscovery.stop();
motionDevice.stop();
if (disconnect) {
if (wiimote != null) {
wiimote.disconnect();
}
wiimoteDiscovery.disconnect();
if (disconnect && wiimote != null) {
wiimote.disconnect();
disconnect = false;
}
}
@@ -117,7 +112,6 @@ public class WiimoteDevice extends Component implements Device, GestureListener
wiimote = null;
}
wiimoteService.exit();
wiimoteDiscovery.exit();
motionDevice.exit();
}
@@ -182,22 +176,24 @@ public class WiimoteDevice extends Component implements Device, GestureListener
public void feedback(Feedback feedback) {
if (wiimote != null && active()) {
//log.debug("Wiimote rumble feedback");
//wiimote.rumble(RUMBLE);
log.debug("Wiimote rumble feedback");
wiimote.rumble(RUMBLE);
}
}
/* Connectivity */
public synchronized void connect() throws DeviceNotFoundException {
wiimote = wiimoteService.getDevice(this);
//wiimote.activateContinuous();
wiimote.activateContinuous();
wiimote.activateMotionSensing();
wiimoteDiscovery.stop();
ledWorker.start();
}
/* Listeners */
public void onButtonsEvent(WiimoteButtonsEvent event) {
if (!active) {
return;
}
int pressed = event.getButtonsJustPressed() - event.getButtonsHeld();
int released = event.getButtonsJustReleased();
try {
@@ -214,6 +210,9 @@ public class WiimoteDevice extends Component implements Device, GestureListener
}
public void onMotionSensingEvent(MotionSensingEvent event) {
if (!active) {
return;
}
gestureDevice.add(event.getGforce());
motionDevice.add(event);
}

View File

@@ -30,12 +30,12 @@ import wiiusej.wiiusejevents.wiiuseapievents.StatusEvent;
public class WiimoteService extends WiiUseApiManager implements WiimoteListener {
protected Log log = LogFactory.getLog(getClass());
public static void main(String[] args) {
/*public static void main(String[] args) {
Log log = LogFactory.getLog(WiimoteService.class);
for (Wiimote wm : WiiUseApiManager.getWiimotes(1, false)) {
log.debug(wm);
}
}
}*/
protected final boolean RUMBLE = false;
@@ -81,10 +81,11 @@ public class WiimoteService extends WiiUseApiManager implements WiimoteListener
}
public void onButtonsEvent(WiimoteButtonsEvent event) {
getWiimoteDevice(event).onButtonsEvent(event);
getWiimoteDevice(event).onButtonsEvent(event);
}
public void onMotionSensingEvent(MotionSensingEvent event) {
getWiimoteDevice(event).onMotionSensingEvent(event);
}

View File

@@ -12,24 +12,31 @@ public abstract class Worker implements Runnable {
protected static final boolean THREAD = false;
protected static final int SLEEP = 100;
protected boolean thread = true;
protected boolean interrupt;
protected boolean run = false;
protected boolean active = false;
protected boolean activate = false;
protected boolean deactivate = false;
public final void start(boolean thread) {
public Worker() {}
public Worker(boolean thread) {
this.thread = thread;
}
public synchronized final void start(boolean thread) {
if (!active) {
activate = true;
}
if (!run) {
run = true;
if (thread) {
log.debug("Run directly");
run();
} else {
log.debug("Start thread");
new Thread(this, getClass().getName()).start();
} else {
log.debug("Run directly");
run();
}
} else {
notifyAll();
@@ -37,7 +44,7 @@ public abstract class Worker implements Runnable {
}
public synchronized final void start() {
start(THREAD);
start(thread);
}
public synchronized final void stop() {