comparison arogue7/rogue.c @ 300:0250220d8cdd

Fix an assortment of compiler warnings. A few potential bugs were removed in the process. Much code cleanup remains to be done.
author John "Elwin" Edwards
date Fri, 22 Nov 2019 21:18:27 -0500
parents d3968e9cb98d
children 827441d05b3e
comparison
equal deleted inserted replaced
299:74351bf23e5e 300:0250220d8cdd
623 "Grand Master" 623 "Grand Master"
624 } 624 }
625 } ; 625 } ;
626 626
627 struct h_list helpstr[] = { 627 struct h_list helpstr[] = {
628 '?', " prints help", 628 { '?', " prints help" },
629 '/', " identify object", 629 { '/', " identify object" },
630 '=', " identify screen character", 630 { '=', " identify screen character" },
631 'h', " left", 631 { 'h', " left" },
632 'j', " down", 632 { 'j', " down" },
633 'k', " up", 633 { 'k', " up" },
634 'l', " right", 634 { 'l', " right" },
635 'y', " up & left", 635 { 'y', " up & left" },
636 'u', " up & right", 636 { 'u', " up & right" },
637 'b', " down & left", 637 { 'b', " down & left" },
638 'n', " down & right", 638 { 'n', " down & right" },
639 'H', " run left", 639 { 'H', " run left" },
640 'J', " run down", 640 { 'J', " run down" },
641 'K', " run up", 641 { 'K', " run up" },
642 'L', " run right", 642 { 'L', " run right" },
643 'Y', " run up & left", 643 { 'Y', " run up & left" },
644 'U', " run up & right", 644 { 'U', " run up & right" },
645 'B', " run down & left", 645 { 'B', " run down & left" },
646 'N', " run down & right", 646 { 'N', " run down & right" },
647 't', "<dir> throw something", 647 { 't', "<dir> throw something" },
648 'f', "<dir> forward until find something", 648 { 'f', "<dir> forward until find something" },
649 'z', "<dir> zap a wand or staff", 649 { 'z', "<dir> zap a wand or staff" },
650 '>', " go down a staircase", 650 { '>', " go down a staircase" },
651 '<', " go up a staircase", 651 { '<', " go up a staircase" },
652 's', " search for trap/secret door", 652 { 's', " search for trap/secret door" },
653 '.', " rest for a while", 653 { '.', " rest for a while" },
654 'i', " inventory", 654 { 'i', " inventory" },
655 'I', " inventory single item", 655 { 'I', " inventory single item" },
656 'q', " quaff potion", 656 { 'q', " quaff potion" },
657 'r', " read paper", 657 { 'r', " read paper" },
658 'e', " eat food", 658 { 'e', " eat food" },
659 'w', " wield a weapon", 659 { 'w', " wield a weapon" },
660 'W', " wear something", 660 { 'W', " wear something" },
661 'T', " take off something", 661 { 'T', " take off something" },
662 'd', " drop object", 662 { 'd', " drop object" },
663 'P', " pick up object(s)", 663 { 'P', " pick up object(s)" },
664 CTRL('N'), " name object or monster", 664 { CTRL('N'), " name object or monster" },
665 'm', " mark object (specific)", 665 { 'm', " mark object (specific)" },
666 'o', " examine/set options", 666 { 'o', " examine/set options" },
667 'c', " chant", 667 { 'c', " chant" },
668 'C', " cast a spell", 668 { 'C', " cast a spell" },
669 'p', " pray", 669 { 'p', " pray" },
670 'a', " affect the undead", 670 { 'a', " affect the undead" },
671 '^', " set a trap", 671 { '^', " set a trap" },
672 'G', " sense gold", 672 { 'G', " sense gold" },
673 'D', " dip something (into a pool)", 673 { 'D', " dip something (into a pool)" },
674 '*', " count up gold pieces", 674 { '*', " count up gold pieces" },
675 CTRL('T'), "<dir> take (steal) from (direction)", 675 { CTRL('T'), "<dir> take (steal) from (direction)" },
676 CTRL('U'), " use miscellaneous magic item", 676 { CTRL('U'), " use miscellaneous magic item" },
677 CTRL('L'), " redraw screen", 677 { CTRL('L'), " redraw screen" },
678 CTRL('R'), " repeat last message", 678 { CTRL('R'), " repeat last message" },
679 ESCAPE, " cancel command", 679 { ESCAPE, " cancel command" },
680 'v', " print program version number", 680 { 'v', " print program version number" },
681 '!', " shell escape", 681 { '!', " shell escape" },
682 'S', " save game", 682 { 'S', " save game" },
683 'Q', " quit", 683 { 'Q', " quit" },
684 0, 0 684 { 0, 0 }
685 } ; 685 } ;
686 686
687 struct h_list wiz_help[] = { 687 struct h_list wiz_help[] = {
688 CTRL('A'), " system activity", 688 { CTRL('A'), " system activity" },
689 CTRL('C'), " move to another dungeon level", 689 { CTRL('C'), " move to another dungeon level" },
690 CTRL('D'), " down 1 dungeon level", 690 { CTRL('D'), " down 1 dungeon level" },
691 CTRL('E'), " food remaining", 691 { CTRL('E'), " food remaining" },
692 CTRL('F'), " display entire level", 692 { CTRL('F'), " display entire level" },
693 CTRL('H'), " jump 9 experience levels", 693 { CTRL('H'), " jump 9 experience levels" },
694 CTRL('I'), " inventory of level", 694 { CTRL('I'), " inventory of level" },
695 CTRL('J'), " teleport", 695 { CTRL('J'), " teleport" },
696 CTRL('M'), " recharge staff", 696 { CTRL('M'), " recharge staff" },
697 CTRL('P'), " toggle wizard status", 697 { CTRL('P'), " toggle wizard status" },
698 CTRL('U'), " up 1 dungeon level", 698 { CTRL('U'), " up 1 dungeon level" },
699 CTRL('X'), " detect monsters", 699 { CTRL('X'), " detect monsters" },
700 CTRL('Z'), " identify", 700 { CTRL('Z'), " identify" },
701 'M', " make object", 701 { 'M', " make object" },
702 0, 0 702 { 0, 0 }
703 }; 703 };
704 704
705 705
706 #define HPT(x) x 706 #define HPT(x) x
707 struct monster monsters[NUMMONST+1] = { 707 struct monster monsters[NUMMONST+1] = {