Clean up JoystickController. Modernize more Objective-C syntax. Remove direct public...
[enjoyable.git] / TargetMouseBtn.m
index 857de7b..172f740 100644 (file)
 +(TargetMouseBtn*) unstringifyImpl: (NSArray*) comps {
        NSParameterAssert([comps count] == 2);
        TargetMouseBtn* target = [[TargetMouseBtn alloc] init];
-       [target setWhich: [[comps objectAtIndex:1] integerValue]];
+       [target setWhich: [comps[1] integerValue]];
        return target;
 }
 
--(void) trigger {
+-(void) trigger: (JoystickController *)jc {
     NSRect screenRect = [[NSScreen mainScreen] frame];
     NSInteger height = screenRect.size.height;
     NSPoint mouseLoc = [NSEvent mouseLocation];
@@ -36,7 +36,7 @@
     CFRelease(click);
 }
 
--(void) untrigger {
+-(void) untrigger: (JoystickController *)jc {
     NSRect screenRect = [[NSScreen mainScreen] frame];
     NSInteger height = screenRect.size.height;
     NSPoint mouseLoc = [NSEvent mouseLocation];