|
|
|
@ -1,12 +1,19 @@ |
|
|
|
|
package sig; |
|
|
|
|
|
|
|
|
|
import javax.sound.midi.ControllerEventListener; |
|
|
|
|
import javax.sound.midi.ShortMessage; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
|
|
|
|
|
import net.java.games.input.Component; |
|
|
|
|
import net.java.games.input.Controller; |
|
|
|
|
import net.java.games.input.ControllerEnvironment; |
|
|
|
|
import net.java.games.input.ControllerEvent; |
|
|
|
|
import net.java.games.input.ControllerListener; |
|
|
|
|
import net.java.games.input.DirectAndRawInputEnvironmentPlugin; |
|
|
|
|
import net.java.games.input.DirectInputEnvironmentPlugin; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import sig.engine.Panel; |
|
|
|
@ -33,7 +40,6 @@ public class RabiClone{ |
|
|
|
|
public static JFrame f; |
|
|
|
|
|
|
|
|
|
public static List<Object> OBJ = new ArrayList<Object>(); |
|
|
|
|
boolean newSizeSet=false; |
|
|
|
|
|
|
|
|
|
public static int BASE_WIDTH=512; |
|
|
|
|
public static int BASE_HEIGHT=288; |
|
|
|
@ -47,6 +53,8 @@ public class RabiClone{ |
|
|
|
|
|
|
|
|
|
public static Maps CURRENT_MAP = Maps.WORLD1; |
|
|
|
|
public static Controller[] CONTROLLERS = new Controller[]{}; |
|
|
|
|
|
|
|
|
|
public static long lastControllerScan = System.currentTimeMillis(); |
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
|
|
|
|
|
Key.InitializeKeyConversionMap(); |
|
|
|
@ -83,6 +91,7 @@ public class RabiClone{ |
|
|
|
|
double updateMult = Math.min(1/60d,timePassed/1000000000d); |
|
|
|
|
|
|
|
|
|
CONTROLLERS = ControllerEnvironment.getDefaultEnvironment().getControllers(); |
|
|
|
|
//System.out.println(CONTROLLERS.length);
|
|
|
|
|
for (int i=0;i<CONTROLLERS.length;i++) { |
|
|
|
|
if (CONTROLLERS[i].poll()) { |
|
|
|
|
//System.out.println(CONTROLLERS[i].getPortType()+" // "+CONTROLLERS[i].getType());
|
|
|
|
|