Oolite
Loading...
Searching...
No Matches
PlayerEntity(StickMapperInternal) Category Reference

Instance Methods

(void) - resetStickFunctions
(void) - checkCustomEquipButtons:ignore:
(void) - removeFunction:
(NSArray *) - stickFunctionList
(void) - displayFunctionList:skip:
(NSString *) - describeStickDict:
(NSString *) - hwToString:

Detailed Description

Definition at line 33 of file PlayerEntityStickMapper.m.

Method Documentation

◆ checkCustomEquipButtons:ignore:

- (void) checkCustomEquipButtons: (NSDictionary *) stickFn
ignore: (int) idx 

Extends class PlayerEntity.

Definition at line 287 of file PlayerEntityStickMapper.m.

287 :(NSDictionary*)stickFn ignore:(int)idx
288{
289 int i;
290 for (i = 0; i < [customEquipActivation count]; i++) {
291 if (i != idx) {
292 NSMutableDictionary* custEquip = [[customEquipActivation objectAtIndex:i] mutableCopy];
293 NSDictionary* bf = [[customEquipActivation objectAtIndex:i] objectForKey:CUSTOMEQUIP_BUTTONACTIVATE];
294 if ([bf oo_integerForKey:STICK_NUMBER] == [stickFn oo_integerForKey:STICK_NUMBER] &&
295 [bf oo_integerForKey:STICK_AXBUT] == [stickFn oo_integerForKey:STICK_AXBUT] &&
296 [custEquip objectForKey:CUSTOMEQUIP_BUTTONACTIVATE]) {
297 [custEquip removeObjectForKey:CUSTOMEQUIP_BUTTONACTIVATE];
298 }
299 bf = [[customEquipActivation objectAtIndex:i] objectForKey:CUSTOMEQUIP_BUTTONMODE];
300 if ([bf oo_integerForKey:STICK_NUMBER] == [stickFn oo_integerForKey:STICK_NUMBER] &&
301 [bf oo_integerForKey:STICK_AXBUT] == [stickFn oo_integerForKey:STICK_AXBUT] &&
302 [custEquip objectForKey:CUSTOMEQUIP_BUTTONMODE]) {
303 [custEquip removeObjectForKey:CUSTOMEQUIP_BUTTONMODE];
304 }
305 [customEquipActivation replaceObjectAtIndex:i withObject:custEquip];
306 [custEquip release];
307 }
308 }
309}
#define STICK_NUMBER
#define STICK_AXBUT
#define CUSTOMEQUIP_BUTTONACTIVATE
#define CUSTOMEQUIP_BUTTONMODE
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

References CUSTOMEQUIP_BUTTONACTIVATE, CUSTOMEQUIP_BUTTONMODE, STICK_AXBUT, and STICK_NUMBER.

Referenced by PlayerEntity(StickMapper)::updateFunction:.

Here is the caller graph for this function:

◆ describeStickDict:

- (NSString *) describeStickDict: (NSDictionary *) stickDict

Extends class PlayerEntity.

Definition at line 491 of file PlayerEntityStickMapper.m.

491 :(NSDictionary*)stickDict
492{
493 NSString* desc = nil;
494 if (stickDict) {
495 int thingNumber = [(NSNumber*)[stickDict objectForKey:STICK_AXBUT]
496 intValue];
497 int stickNumber = [(NSNumber*)[stickDict objectForKey:STICK_NUMBER]
498 intValue];
499 // Button or axis?
500 if ([(NSNumber*)[stickDict objectForKey:STICK_ISAXIS] boolValue]) {
501 desc = [NSString stringWithFormat:@"%@ %d %@ %d",
502 DESC(@"stickmapper-stick"), stickNumber + 1, DESC(@"stickmapper-axis"), thingNumber + 1];
503 } else if (thingNumber >= MAX_REAL_BUTTONS) {
504 NSString* dir[] = { DESC(@"stickmapper-hat-up"), DESC(@"stickmapper-hat-right"), DESC(@"stickmapper-hat-down"), DESC(@"stickmapper-hat-left") };
505 desc = [NSString stringWithFormat:@"%@ %d %@ %d %@",
506 DESC(@"stickmapper-stick"), stickNumber + 1, DESC(@"stickmapper-hat"), (thingNumber - MAX_REAL_BUTTONS) / 4 + 1,
507 dir[thingNumber & 3]];
508 } else {
509 desc = [NSString stringWithFormat:@"%@ %d %@ %d",
510 DESC(@"stickmapper-stick"), stickNumber + 1, DESC(@"stickmapper-button"), thingNumber + 1];
511 }
512 }
513 return desc;
514}
#define STICK_ISAXIS
#define MAX_REAL_BUTTONS
return nil
#define DESC(key)
Definition Universe.h:832

References DESC, MAX_REAL_BUTTONS, nil, and STICK_ISAXIS.

Referenced by displayFunctionList:skip:.

Here is the caller graph for this function:

◆ displayFunctionList:skip:

- (void) displayFunctionList: (GuiDisplayGen *) gui
skip: (NSUInteger) skip 

Extends class PlayerEntity.

Definition at line 362 of file PlayerEntityStickMapper.m.

362 :(GuiDisplayGen*)gui
363 skip:(NSUInteger)skip
364{
365 OOJoystickManager* stickHandler = [OOJoystickManager sharedStickHandler];
366
367 [gui setColor:[OOColor greenColor] forRow:GUI_ROW_HEADING];
368 [gui setArray:[NSArray arrayWithObjects:
369 DESC(@"stickmapper-column-function"), DESC(@"stickmapper-column-assigned-to"), DESC(@"stickmapper-column-type"), nil]
370 forRow:GUI_ROW_HEADING];
371
372 if (!stickFunctions) {
373 stickFunctions = [[self stickFunctionList] retain];
374 }
375 NSDictionary* assignedAxes = [stickHandler axisFunctions];
376 NSDictionary* assignedButs = [stickHandler buttonFunctions];
377 NSDictionary* assignedGuiButs = [stickHandler guiButtonFunctions];
378
379 NSUInteger i, n_functions = [stickFunctions count];
380 NSInteger n_rows, start_row, previous = 0;
381
382 if (skip >= n_functions)
383 skip = n_functions - 1;
384
385 if (n_functions < MAX_ROWS_FUNCTIONS) {
386 skip = 0;
387 previous = 0;
388 n_rows = MAX_ROWS_FUNCTIONS;
389 start_row = GUI_ROW_FUNCSTART;
390 } else {
391 n_rows = MAX_ROWS_FUNCTIONS - 1;
392 start_row = GUI_ROW_FUNCSTART;
393 if (skip > 0) {
394 n_rows -= 1;
395 start_row += 1;
396 if (skip > MAX_ROWS_FUNCTIONS)
397 previous = skip - (MAX_ROWS_FUNCTIONS - 2);
398 else
399 previous = 0;
400 }
401 }
402
403 if (n_functions > 0) {
404 if (skip > 0) {
405 [gui setColor:[OOColor greenColor] forRow:GUI_ROW_FUNCSTART];
406 [gui setArray:[NSArray arrayWithObjects:DESC(@"gui-back"), @" <-- ", nil] forRow:GUI_ROW_FUNCSTART];
407 [gui setKey:[NSString stringWithFormat:@"More:%zd", previous] forRow:GUI_ROW_FUNCSTART];
408 }
409
410 for (i = 0; i < (n_functions - skip) && (int)i < n_rows; i++) {
411 NSDictionary* entry = [stickFunctions objectAtIndex:i + skip];
412 if ([entry objectForKey:KEY_HEADER]) {
413 NSString* header = [entry objectForKey:KEY_HEADER];
414 [gui setArray:[NSArray arrayWithObjects:header, @"", @"", nil] forRow:i + start_row];
415 [gui setColor:[OOColor cyanColor] forRow:i + start_row];
416 } else {
417 NSString* allowedThings;
418 NSString* assignment;
419 NSString* axFuncKey = [entry oo_stringForKey:KEY_AXISFN];
420 NSString* butFuncKey = [entry oo_stringForKey:KEY_BUTTONFN];
421 int allowable = [entry oo_intForKey:KEY_ALLOWABLE];
422 switch (allowable) {
423 case HW_AXIS:
424 allowedThings = DESC(@"stickmapper-allowed-axis");
425 assignment = [self describeStickDict:
426 [assignedAxes objectForKey:axFuncKey]];
427 break;
428 case HW_BUTTON:
429 allowedThings = DESC(@"stickmapper-allowed-button");
430 int bf = [butFuncKey integerValue];
431 if (bf < 10000) {
432 if (bf >= BUTTON_GUILEFT && bf <= BUTTON_GUISELECT) {
433 assignment = [self describeStickDict:
434 [assignedGuiButs objectForKey:butFuncKey]];
435 } else {
436 assignment = [self describeStickDict:
437 [assignedButs objectForKey:butFuncKey]];
438 }
439 } else {
440 NSString* key = CUSTOMEQUIP_BUTTONACTIVATE;
441 bf -= 10000;
442 if (bf >= 10000) {
443 bf -= 10000;
445 }
446 assignment = [self describeStickDict:
447 [[customEquipActivation objectAtIndex:bf] objectForKey:key]];
448 }
449 break;
450 default:
451 allowedThings = DESC(@"stickmapper-allowed-both");
452
453 // axis has priority
454 assignment = [self describeStickDict:
455 [assignedAxes objectForKey:axFuncKey]];
456 if (!assignment) {
457 int bf = [butFuncKey integerValue];
458 if (bf >= BUTTON_GUILEFT && bf <= BUTTON_GUISELECT) {
459 assignment = [self describeStickDict:
460 [assignedGuiButs objectForKey:butFuncKey]];
461 } else {
462 assignment = [self describeStickDict:
463 [assignedButs objectForKey:butFuncKey]];
464 }
465 }
466 }
467
468 // Find out what's assigned for this function currently.
469 if (assignment == nil) {
470 assignment = @" - ";
471 }
472
473 [gui setArray:[NSArray arrayWithObjects:
474 [entry objectForKey:KEY_GUIDESC], assignment, allowedThings, nil]
475 forRow:i + start_row];
476 //[gui setKey: GUI_KEY_OK forRow: i + start_row];
477 [gui setKey:[NSString stringWithFormat:@"Index:%zu", i + skip] forRow:i + start_row];
478 }
479 }
480 if (i < n_functions - skip) {
481 [gui setColor:[OOColor greenColor] forRow:start_row + i];
482 [gui setArray:[NSArray arrayWithObjects:DESC(@"gui-more"), @" --> ", nil] forRow:start_row + i];
483 [gui setKey:[NSString stringWithFormat:@"More:%zu", n_rows + skip] forRow:start_row + i];
484 i++;
485 }
486
487 [gui setSelectableRange:NSMakeRange(GUI_ROW_STICKPROFILE, i + start_row - GUI_ROW_STICKPROFILE)];
488 }
489}
#define HW_BUTTON
#define HW_AXIS
@ BUTTON_GUILEFT
@ BUTTON_GUISELECT
#define KEY_HEADER
#define MAX_ROWS_FUNCTIONS
#define GUI_ROW_FUNCSTART
void setSelectableRange:(NSRange range)
void setColor:forRow:(OOColor *color,[forRow] OOGUIRow row)
void setArray:forRow:(NSArray *arr,[forRow] OOGUIRow row)
void setKey:forRow:(NSString *str,[forRow] OOGUIRow row)
OOColor * cyanColor()
Definition OOColor.m:274
OOColor * greenColor()
Definition OOColor.m:264
NSDictionary * guiButtonFunctions()
NSDictionary * buttonFunctions()
NSDictionary * axisFunctions()

References OOJoystickManager::axisFunctions, BUTTON_GUILEFT, BUTTON_GUISELECT, OOJoystickManager::buttonFunctions, CUSTOMEQUIP_BUTTONACTIVATE, CUSTOMEQUIP_BUTTONMODE, OOColor::cyanColor, DESC, PlayerEntity::describeStickDict:, OOColor::greenColor, GUI_ROW_FUNCSTART, OOJoystickManager::guiButtonFunctions, HW_AXIS, HW_BUTTON, int(), KEY_HEADER, MAX_ROWS_FUNCTIONS, nil, GuiDisplayGen::setArray:forRow:, GuiDisplayGen::setColor:forRow:, GuiDisplayGen::setKey:forRow:, GuiDisplayGen::setSelectableRange:, OOJoystickManager::sharedStickHandler, and PlayerEntity::stickFunctionList.

Referenced by PlayerEntity(StickMapper)::setGuiToStickMapperScreen:resetCurrentRow:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hwToString:

- (NSString *) hwToString: (int) hwFlags

Extends class PlayerEntity.

Definition at line 516 of file PlayerEntityStickMapper.m.

516 :(int)hwFlags
517{
518 NSString* hwString;
519 switch (hwFlags) {
520 case HW_AXIS:
521 hwString = DESC(@"stickmapper-axis");
522 break;
523 case HW_BUTTON:
524 hwString = DESC(@"stickmapper-button");
525 break;
526 default:
527 hwString = DESC(@"stickmapper-axis-button");
528 }
529 return hwString;
530}

References DESC, HW_AXIS, and HW_BUTTON.

◆ removeFunction:

- (void) removeFunction: (int) selFunctionIdx

Extends class PlayerEntity.

Definition at line 311 of file PlayerEntityStickMapper.m.

311 :(int)idx
312{
313 OOJoystickManager* stickHandler = [OOJoystickManager sharedStickHandler];
314 NSDictionary* entry = [stickFunctions objectAtIndex:idx];
315 NSNumber* butfunc = [entry objectForKey:KEY_BUTTONFN];
316 NSNumber* axfunc = [entry objectForKey:KEY_AXISFN];
317 BOOL custom = NO;
318 selFunctionIdx = idx;
319
320 // Some things can have either axis or buttons - make sure we clear
321 // both!
322 if (butfunc) {
323 // special case for OXP equipment buttons
324 if ([butfunc intValue] >= 10000) {
325 int bf = [butfunc intValue];
326 custom = YES;
327 NSString* key = CUSTOMEQUIP_BUTTONACTIVATE;
328 bf -= 10000;
329 if (bf >= 10000) {
330 bf -= 10000;
332 }
333 NSMutableDictionary* custEquip = [[customEquipActivation objectAtIndex:bf] mutableCopy];
334 if ([key isEqualToString:CUSTOMEQUIP_BUTTONACTIVATE] && [custEquip objectForKey:CUSTOMEQUIP_BUTTONACTIVATE])
335 [custEquip removeObjectForKey:key];
336 if ([key isEqualToString:CUSTOMEQUIP_BUTTONMODE] && [custEquip objectForKey:CUSTOMEQUIP_BUTTONMODE])
337 [custEquip removeObjectForKey:key];
338 [customEquipActivation replaceObjectAtIndex:bf withObject:custEquip];
339 [custEquip release];
340 } else {
341 [stickHandler unsetButtonFunction:[butfunc intValue]];
342 }
343 }
344 if (axfunc) {
345 [stickHandler unsetAxisFunction:[axfunc intValue]];
346 }
347 if (!custom) {
348 [stickHandler saveStickSettings];
349 } else {
350 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
351 [defaults setObject:customEquipActivation forKey:KEYCONFIG_CUSTOMEQUIP];
352 }
353
354 unsigned skip;
355 if (selFunctionIdx < MAX_ROWS_FUNCTIONS - 1)
356 skip = 0;
357 else
358 skip = ((selFunctionIdx - 1) / (MAX_ROWS_FUNCTIONS - 2)) * (MAX_ROWS_FUNCTIONS - 2) + 1;
359 [self setGuiToStickMapperScreen:skip];
360}
void unsetButtonFunction:(int function)
void unsetAxisFunction:(int function)

References CUSTOMEQUIP_BUTTONACTIVATE, CUSTOMEQUIP_BUTTONMODE, MAX_ROWS_FUNCTIONS, OOJoystickManager::saveStickSettings, PlayerEntity::setGuiToStickMapperScreen:, OOJoystickManager::sharedStickHandler, OOJoystickManager::unsetAxisFunction:, and OOJoystickManager::unsetButtonFunction:.

Referenced by PlayerEntity(StickMapper)::stickMapperInputHandler:view:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetStickFunctions

- (void) resetStickFunctions

Extends class PlayerEntity.

Definition at line 54 of file PlayerEntityStickMapper.m.

49{
50 [stickFunctions release];
51 stickFunctions = nil;
52}

References PlayerEntity::setGuiToStickMapperScreen:resetCurrentRow:.

Referenced by PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stickFunctionList

- (NSArray *) stickFunctionList

Extends class PlayerEntity.

Definition at line 534 of file PlayerEntityStickMapper.m.

535{
536 NSMutableArray* funcList = [NSMutableArray array];
537
538 // propulsion
539 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-propulsion")]];
540 [funcList addObject:
541 [self makeStickGuiDict:DESC(@"stickmapper-roll")
542 allowable:HW_AXIS
543 axisfn:AXIS_ROLL
544 butfn:STICK_NOFUNCTION]];
545 [funcList addObject:
546 [self makeStickGuiDict:DESC(@"stickmapper-pitch")
547 allowable:HW_AXIS
548 axisfn:AXIS_PITCH
549 butfn:STICK_NOFUNCTION]];
550 [funcList addObject:
551 [self makeStickGuiDict:DESC(@"stickmapper-yaw")
552 allowable:HW_AXIS
553 axisfn:AXIS_YAW
554 butfn:STICK_NOFUNCTION]];
555 [funcList addObject:
556 [self makeStickGuiDict:DESC(@"stickmapper-increase-thrust")
557 allowable:HW_AXIS | HW_BUTTON
558 axisfn:AXIS_THRUST
559 butfn:BUTTON_INCTHRUST]];
560 [funcList addObject:
561 [self makeStickGuiDict:DESC(@"stickmapper-decrease-thrust")
562 allowable:HW_AXIS | HW_BUTTON
563 axisfn:AXIS_THRUST
564 butfn:BUTTON_DECTHRUST]];
565 [funcList addObject:
566 [self makeStickGuiDict:DESC(@"stickmapper-fuel-injection")
567 allowable:HW_BUTTON
568 axisfn:STICK_NOFUNCTION
569 butfn:BUTTON_FUELINJECT]];
570 [funcList addObject:
571 [self makeStickGuiDict:DESC(@"stickmapper-hyperspeed")
572 allowable:HW_BUTTON
573 axisfn:STICK_NOFUNCTION
574 butfn:BUTTON_HYPERSPEED]];
575 [funcList addObject:
576 [self makeStickGuiDict:DESC(@"stickmapper-hyperdrive")
577 allowable:HW_BUTTON
578 axisfn:STICK_NOFUNCTION
579 butfn:BUTTON_HYPERDRIVE]];
580 [funcList addObject:
581 [self makeStickGuiDict:DESC(@"stickmapper-gal-hyperdrive")
582 allowable:HW_BUTTON
583 axisfn:STICK_NOFUNCTION
584 butfn:BUTTON_GALACTICDRIVE]];
585
586 [funcList addObject:
587 [self makeStickGuiDict:DESC(@"stickmapper-roll/pitch-precision-toggle")
588 allowable:HW_BUTTON
589 axisfn:STICK_NOFUNCTION
590 butfn:BUTTON_PRECISION]];
591
592 // navigation
593 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-navigation")]];
594 [funcList addObject:
595 [self makeStickGuiDict:DESC(@"stickmapper-compass-mode-next")
596 allowable:HW_BUTTON
597 axisfn:STICK_NOFUNCTION
598 butfn:BUTTON_COMPASSMODE]];
599 [funcList addObject:
600 [self makeStickGuiDict:DESC(@"stickmapper-compass-mode-prev")
601 allowable:HW_BUTTON
602 axisfn:STICK_NOFUNCTION
603 butfn:BUTTON_COMPASSMODE_PREV]];
604 [funcList addObject:
605 [self makeStickGuiDict:DESC(@"stickmapper-scanner-zoom")
606 allowable:HW_BUTTON
607 axisfn:STICK_NOFUNCTION
608 butfn:BUTTON_SCANNERZOOM]];
609 [funcList addObject:
610 [self makeStickGuiDict:DESC(@"stickmapper-scanner-unzoom")
611 allowable:HW_BUTTON
612 axisfn:STICK_NOFUNCTION
613 butfn:BUTTON_SCANNERUNZOOM]];
614 [funcList addObject:
615 [self makeStickGuiDict:DESC(@"stickmapper-view-forward")
616 allowable:HW_AXIS | HW_BUTTON
617 axisfn:AXIS_VIEWY
618 butfn:BUTTON_VIEWFORWARD]];
619 [funcList addObject:
620 [self makeStickGuiDict:DESC(@"stickmapper-view-aft")
621 allowable:HW_AXIS | HW_BUTTON
622 axisfn:AXIS_VIEWY
623 butfn:BUTTON_VIEWAFT]];
624 [funcList addObject:
625 [self makeStickGuiDict:DESC(@"stickmapper-view-port")
626 allowable:HW_AXIS | HW_BUTTON
627 axisfn:AXIS_VIEWX
628 butfn:BUTTON_VIEWPORT]];
629 [funcList addObject:
630 [self makeStickGuiDict:DESC(@"stickmapper-view-starboard")
631 allowable:HW_AXIS | HW_BUTTON
632 axisfn:AXIS_VIEWX
633 butfn:BUTTON_VIEWSTARBOARD]];
634 [funcList addObject:
635 [self makeStickGuiDict:DESC(@"stickmapper-ext-view-cycle")
636 allowable:HW_BUTTON
637 axisfn:STICK_NOFUNCTION
638 butfn:BUTTON_EXTVIEWCYCLE]];
639 [funcList addObject:
640 [self makeStickGuiDict:DESC(@"stickmapper-toggle-ID")
641 allowable:HW_BUTTON
642 axisfn:STICK_NOFUNCTION
643 butfn:BUTTON_ID]];
644 [funcList addObject:
645 [self makeStickGuiDict:DESC(@"stickmapper-docking-clearance")
646 allowable:HW_BUTTON
647 axisfn:STICK_NOFUNCTION
648 butfn:BUTTON_DOCKINGCLEARANCE]];
649 [funcList addObject:
650 [self makeStickGuiDict:DESC(@"stickmapper-dockcpu")
651 allowable:HW_BUTTON
652 axisfn:STICK_NOFUNCTION
653 butfn:BUTTON_DOCKCPU]];
654 [funcList addObject:
655 [self makeStickGuiDict:DESC(@"stickmapper-dockcpufast")
656 allowable:HW_BUTTON
657 axisfn:STICK_NOFUNCTION
658 butfn:BUTTON_DOCKCPUFAST]];
659 [funcList addObject:
660 [self makeStickGuiDict:DESC(@"stickmapper-docking-music")
661 allowable:HW_BUTTON
662 axisfn:STICK_NOFUNCTION
663 butfn:BUTTON_DOCKINGMUSIC]];
664
665 // offensive
666 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-offensive")]];
667 [funcList addObject:
668 [self makeStickGuiDict:DESC(@"stickmapper-weapons-online-toggle")
669 allowable:HW_BUTTON
670 axisfn:STICK_NOFUNCTION
671 butfn:BUTTON_WEAPONSONLINETOGGLE]];
672 [funcList addObject:
673 [self makeStickGuiDict:DESC(@"stickmapper-primary-weapon")
674 allowable:HW_BUTTON
675 axisfn:STICK_NOFUNCTION
676 butfn:BUTTON_FIRE]];
677 [funcList addObject:
678 [self makeStickGuiDict:DESC(@"stickmapper-secondary-weapon")
679 allowable:HW_BUTTON
680 axisfn:STICK_NOFUNCTION
681 butfn:BUTTON_LAUNCHMISSILE]];
682 [funcList addObject:
683 [self makeStickGuiDict:DESC(@"stickmapper-arm-secondary")
684 allowable:HW_BUTTON
685 axisfn:STICK_NOFUNCTION
686 butfn:BUTTON_ARMMISSILE]];
687 [funcList addObject:
688 [self makeStickGuiDict:DESC(@"stickmapper-disarm-secondary")
689 allowable:HW_BUTTON
690 axisfn:STICK_NOFUNCTION
691 butfn:BUTTON_UNARM]];
692 [funcList addObject:
693 [self makeStickGuiDict:DESC(@"stickmapper-target-nearest-incoming-missile")
694 allowable:HW_BUTTON
695 axisfn:STICK_NOFUNCTION
696 butfn:BUTTON_TARGETINCOMINGMISSILE]];
697 [funcList addObject:
698 [self makeStickGuiDict:DESC(@"stickmapper-cycle-secondary")
699 allowable:HW_BUTTON
700 axisfn:STICK_NOFUNCTION
701 butfn:BUTTON_CYCLEMISSILE]];
702 [funcList addObject:
703 [self makeStickGuiDict:DESC(@"stickmapper-next-target")
704 allowable:HW_BUTTON
705 axisfn:STICK_NOFUNCTION
706 butfn:BUTTON_NEXTTARGET]];
707 [funcList addObject:
708 [self makeStickGuiDict:DESC(@"stickmapper-previous-target")
709 allowable:HW_BUTTON
710 axisfn:STICK_NOFUNCTION
711 butfn:BUTTON_PREVTARGET]];
712
713 // defensive
714 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-defensive")]];
715 [funcList addObject:
716 [self makeStickGuiDict:DESC(@"stickmapper-ECM")
717 allowable:HW_BUTTON
718 axisfn:STICK_NOFUNCTION
719 butfn:BUTTON_ECM]];
720 [funcList addObject:
721 [self makeStickGuiDict:DESC(@"stickmapper-jettison")
722 allowable:HW_BUTTON
723 axisfn:STICK_NOFUNCTION
724 butfn:BUTTON_JETTISON]];
725 [funcList addObject:
726 [self makeStickGuiDict:DESC(@"stickmapper-rotate-cargo")
727 allowable:HW_BUTTON
728 axisfn:STICK_NOFUNCTION
729 butfn:BUTTON_ROTATECARGO]];
730 [funcList addObject:
731 [self makeStickGuiDict:DESC(@"stickmapper-escape-pod")
732 allowable:HW_BUTTON
733 axisfn:STICK_NOFUNCTION
734 butfn:BUTTON_ESCAPE]];
735
736 // oxp special equip
737 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-special-equip")]];
738 [funcList addObject:
739 [self makeStickGuiDict:DESC(@"stickmapper-mfd-select-next")
740 allowable:HW_BUTTON
741 axisfn:STICK_NOFUNCTION
742 butfn:BUTTON_MFDSELECTNEXT]];
743 [funcList addObject:
744 [self makeStickGuiDict:DESC(@"stickmapper-mfd-select-prev")
745 allowable:HW_BUTTON
746 axisfn:STICK_NOFUNCTION
747 butfn:BUTTON_MFDSELECTPREV]];
748 [funcList addObject:
749 [self makeStickGuiDict:DESC(@"stickmapper-mfd-cycle-next")
750 allowable:HW_BUTTON
751 axisfn:STICK_NOFUNCTION
752 butfn:BUTTON_MFDCYCLENEXT]];
753 [funcList addObject:
754 [self makeStickGuiDict:DESC(@"stickmapper-mfd-cycle-prev")
755 allowable:HW_BUTTON
756 axisfn:STICK_NOFUNCTION
757 butfn:BUTTON_MFDCYCLEPREV]];
758 [funcList addObject:
759 [self makeStickGuiDict:DESC(@"stickmapper-prime-equipment")
760 allowable:HW_BUTTON
761 axisfn:STICK_NOFUNCTION
762 butfn:BUTTON_PRIMEEQUIPMENT]];
763 [funcList addObject:
764 [self makeStickGuiDict:DESC(@"stickmapper-prime-prev-equipment")
765 allowable:HW_BUTTON
766 axisfn:STICK_NOFUNCTION
767 butfn:BUTTON_PRIMEEQUIPMENT]];
768 [funcList addObject:
769 [self makeStickGuiDict:DESC(@"stickmapper-activate-equipment")
770 allowable:HW_BUTTON
771 axisfn:STICK_NOFUNCTION
772 butfn:BUTTON_ACTIVATEEQUIPMENT]];
773 [funcList addObject:
774 [self makeStickGuiDict:DESC(@"stickmapper-mode-equipment")
775 allowable:HW_BUTTON
776 axisfn:STICK_NOFUNCTION
777 butfn:BUTTON_MODEEQUIPMENT]];
778 [funcList addObject:
779 [self makeStickGuiDict:DESC(@"stickmapper-fastactivate-a")
780 allowable:HW_BUTTON
781 axisfn:STICK_NOFUNCTION
782 butfn:BUTTON_CLOAK]];
783 [funcList addObject:
784 [self makeStickGuiDict:DESC(@"stickmapper-fastactivate-b")
785 allowable:HW_BUTTON
786 axisfn:STICK_NOFUNCTION
787 butfn:BUTTON_ENERGYBOMB]];
788
789 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-gui")]];
790 [funcList addObject:
791 [self makeStickGuiDict:DESC(@"stickmapper-gui-left")
792 allowable:HW_BUTTON
793 axisfn:STICK_NOFUNCTION
794 butfn:BUTTON_GUILEFT]];
795 [funcList addObject:
796 [self makeStickGuiDict:DESC(@"stickmapper-gui-right")
797 allowable:HW_BUTTON
798 axisfn:STICK_NOFUNCTION
799 butfn:BUTTON_GUIRIGHT]];
800 [funcList addObject:
801 [self makeStickGuiDict:DESC(@"stickmapper-gui-up")
802 allowable:HW_BUTTON
803 axisfn:STICK_NOFUNCTION
804 butfn:BUTTON_GUIUP]];
805 [funcList addObject:
806 [self makeStickGuiDict:DESC(@"stickmapper-gui-down")
807 allowable:HW_BUTTON
808 axisfn:STICK_NOFUNCTION
809 butfn:BUTTON_GUIDOWN]];
810 [funcList addObject:
811 [self makeStickGuiDict:DESC(@"stickmapper-gui-page-up")
812 allowable:HW_BUTTON
813 axisfn:STICK_NOFUNCTION
814 butfn:BUTTON_GUIPAGEUP]];
815 [funcList addObject:
816 [self makeStickGuiDict:DESC(@"stickmapper-gui-page-down")
817 allowable:HW_BUTTON
818 axisfn:STICK_NOFUNCTION
819 butfn:BUTTON_GUIPAGEDOWN]];
820 [funcList addObject:
821 [self makeStickGuiDict:DESC(@"stickmapper-gui-select")
822 allowable:HW_BUTTON
823 axisfn:STICK_NOFUNCTION
824 butfn:BUTTON_GUISELECT]];
825
826 // misc
827 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-misc")]];
828 [funcList addObject:
829 [self makeStickGuiDict:DESC(@"stickmapper-snapshot")
830 allowable:HW_BUTTON
831 axisfn:STICK_NOFUNCTION
832 butfn:BUTTON_SNAPSHOT]];
833 [funcList addObject:
834 [self makeStickGuiDict:DESC(@"stickmapper-pause")
835 allowable:HW_BUTTON
836 axisfn:STICK_NOFUNCTION
837 butfn:BUTTON_PAUSE]];
838 [funcList addObject:
839 [self makeStickGuiDict:DESC(@"stickmapper-toggle-hud")
840 allowable:HW_BUTTON
841 axisfn:STICK_NOFUNCTION
842 butfn:BUTTON_TOGGLEHUD]];
843 [funcList addObject:
844 [self makeStickGuiDict:DESC(@"stickmapper-comms-log")
845 allowable:HW_BUTTON
846 axisfn:STICK_NOFUNCTION
847 butfn:BUTTON_COMMSLOG]];
848#if OO_FOV_INFLIGHT_CONTROL_ENABLED
849 [funcList addObject:
850 [self makeStickGuiDict:DESC(@"stickmapper-increase-field-of-view")
851 allowable:HW_AXIS | HW_BUTTON
852 axisfn:AXIS_FIELD_OF_VIEW
853 butfn:BUTTON_INC_FIELD_OF_VIEW]];
854 [funcList addObject:
855 [self makeStickGuiDict:DESC(@"stickmapper-decrease-field-of-view")
856 allowable:HW_AXIS | HW_BUTTON
857 axisfn:AXIS_FIELD_OF_VIEW
858 butfn:BUTTON_DEC_FIELD_OF_VIEW]];
859#endif
860 if ([customEquipActivation count] > 0) {
861 [funcList addObject:[self makeStickGuiDictHeader:DESC(@"stickmapper-header-oxp-equip")]];
862 int i;
863 for (i = 0; i < [customEquipActivation count]; i++) {
864 [funcList addObject:
865 [self makeStickGuiDict:[NSString stringWithFormat:@"%@ '%@'", DESC(@"stickmapper-cust-activate"), [[customEquipActivation objectAtIndex:i] oo_stringForKey:CUSTOMEQUIP_EQUIPNAME]]
866 allowable:HW_BUTTON
867 axisfn:STICK_NOFUNCTION
868 butfn:(i + 10000)]];
869 [funcList addObject:
870 [self makeStickGuiDict:[NSString stringWithFormat:@"%@ '%@'", DESC(@"stickmapper-cust-mode"), [[customEquipActivation objectAtIndex:i] oo_stringForKey:CUSTOMEQUIP_EQUIPNAME]]
871 allowable:HW_BUTTON
872 axisfn:STICK_NOFUNCTION
873 butfn:(i + 20000)]];
874 }
875 }
876 return funcList;
877}
unsigned count

References count, PlayerEntity::makeStickGuiDict:allowable:axisfn:butfn:, PlayerEntity::makeStickGuiDictHeader:, and stickFunctionList.

Referenced by displayFunctionList:skip:, and stickFunctionList.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this category was generated from the following file: