44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
-
+
+
|
OHGameControllerButton *up, *down, *left, *right;
buttons =
[OFMutableDictionary dictionaryWithCapacity: numButtons];
for (size_t i = 0; i < numButtons; i++) {
OHGameControllerButton *button =
[[[OHGameControllerButton alloc]
initWithName: buttonNames[i]] autorelease];
initWithName: buttonNames[i]
analog: false] autorelease];
[buttons setObject: button forKey: buttonNames[i]];
}
[buttons makeImmutable];
_buttons = [buttons retain];
up = [[[OHGameControllerButton alloc]
initWithName: @"D-Pad Up"] autorelease];
initWithName: @"D-Pad Up"
analog: false] autorelease];
down = [[[OHGameControllerButton alloc]
initWithName: @"D-Pad Down"] autorelease];
initWithName: @"D-Pad Down"
analog: false] autorelease];
left = [[[OHGameControllerButton alloc]
initWithName: @"D-Pad Left"] autorelease];
initWithName: @"D-Pad Left"
analog: false] autorelease];
right = [[[OHGameControllerButton alloc]
initWithName: @"D-Pad Right"] autorelease];
initWithName: @"D-Pad Right"
analog: false] autorelease];
dPad = [[[OHGameControllerDirectionalPad alloc]
initWithName: @"D-Pad"
up: up
down: down
left: left
right: right] autorelease];
right: right
analog: false] autorelease];
_directionalPads = [[OFDictionary alloc]
initWithObject: dPad
forKey: @"D-Pad"];
objc_autoreleasePoolPop(pool);
} @catch (id e) {
|