26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-
+
|
#import "OFSet.h"
#import "OFStdIOStream.h"
#import "OFThread.h"
#import "OFValue.h"
#import "OTTestCase.h"
#import "OFGameController.h"
#import "HIDGameController.h"
#import "OTAssertionFailedException.h"
#import "OTTestSkippedException.h"
#ifdef OF_IOS
# include <CoreFoundation/CoreFoundation.h>
#endif
|
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
-
-
+
+
+
+
-
+
-
|
if (status == StatusFailed) {
#if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press A to continue"];
for (;;) {
void *pool = objc_autoreleasePoolPush();
OFGameController *controller =
[[OFGameController controllers] objectAtIndex: 0];
HIDGameController *controller =
[[HIDGameController controllers] objectAtIndex: 0];
HIDGameControllerButton *button =
[controller.buttons objectForKey: @"A"];
[controller retrieveState];
if ([controller.pressedButtons containsObject:
if (button.pressed)
OFGameControllerEastButton])
break;
[OFThread waitForVerticalBlank];
objc_autoreleasePoolPop(pool);
}
#elif defined(OF_NINTENDO_SWITCH)
|
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
|
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
-
-
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
|
[OFStdOut writeLine: @"Press Home button to exit"];
# else
[OFStdOut writeLine: @"Press Start button to exit"];
# endif
for (;;) {
void *pool = objc_autoreleasePoolPush();
OFGameController *controller =
[[OFGameController controllers] objectAtIndex: 0];
HIDGameController *controller =
[[HIDGameController controllers] objectAtIndex: 0];
HIDGameControlelrButton *button =
# ifdef OF_WII
[controller.buttons objectForKey: @"Home"];
# else
[controller.buttons objectForKey: @"Start"];
# endif
[controller retrieveState];
# ifdef OF_WII
if ([controller.pressedButtons containsObject:
if (button.pressed)
OFGameControllerHomeButton])
# else
if ([controller.pressedButtons containsObject:
OFGameControllerStartButton])
# endif
break;
[OFThread waitForVerticalBlank];
objc_autoreleasePoolPop(pool);
}
#elif defined(OF_NINTENDO_SWITCH)
|