Playing around with a bunch of things
[kaka/rust-sdl-test.git] / src / core / controller.rs
index 23af1b2..1eeb13c 100644 (file)
@@ -83,10 +83,10 @@ impl Stick {
        self.a = Radians(self.y.atan2(self.x) as f64);
     }
 
-    #[inline(always)] #[allow(dead_code)] fn up(&self) -> bool { self.y > 0.99 }
-    #[inline(always)] #[allow(dead_code)] fn down(&self) -> bool { self.y < -0.99 }
-    #[inline(always)] #[allow(dead_code)] fn left(&self) -> bool { self.x < -0.99 }
-    #[inline(always)] #[allow(dead_code)] fn right(&self) -> bool { self.x > 0.99 }
+    #[inline(always)] #[allow(dead_code)] pub fn up(&self) -> bool { self.y < -0.99 }
+    #[inline(always)] #[allow(dead_code)] pub fn down(&self) -> bool { self.y > 0.99 }
+    #[inline(always)] #[allow(dead_code)] pub fn left(&self) -> bool { self.x < -0.99 }
+    #[inline(always)] #[allow(dead_code)] pub fn right(&self) -> bool { self.x > 0.99 }
 
     pub fn to_axis_point(&self) -> Point2D<f64> {
        point!(self.x as f64, self.y as f64)
@@ -216,7 +216,7 @@ fn get_action_mapping() -> HashMap<ActionControls, DeviceControls> {
        ActionControls::MovementY => DeviceControls::AxisLY,
        ActionControls::AimX => DeviceControls::AxisRX,
        ActionControls::AimY => DeviceControls::AxisRY,
-       ActionControls::Jump => DeviceControls::ButtonL1,
+       ActionControls::Jump => DeviceControls::ButtonA,
        ActionControls::Shoot => DeviceControls::ButtonR1,
        ActionControls::Start => DeviceControls::ButtonStart
     )