Changeset 11068 for code/branches/cpp11_v3/src/modules
- Timestamp:
- Jan 17, 2016, 6:41:22 PM (9 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
/code/branches/cpp11_v2 merged: 10996-11008,11010
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/modules/gametypes/OldRaceCheckPoint.cc
r10624 r11068 49 49 50 50 this->setRadarObjectColour(ColourValue::Blue); 51 this->setRadarObjectShape(RadarViewable:: Triangle);51 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 52 52 this->setRadarVisibility(false); 53 53 } -
code/branches/cpp11_v3/src/modules/gametypes/RaceCheckPoint.cc
r11054 r11068 53 53 54 54 this->setRadarObjectColour(ColourValue::Blue); 55 this->setRadarObjectShape(RadarViewable:: Triangle);55 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 56 56 this->setRadarVisibility(false); 57 57 this->settingsChanged(); -
code/branches/cpp11_v3/src/modules/jump/Jump.cc
r11054 r11068 610 610 const int numJ = 4; 611 611 612 enum PlatformType613 { 614 PLATFORM_EMPTY, PLATFORM_STATIC, PLATFORM_HMOVE, PLATFORM_VMOVE, PLATFORM_DISAPPEAR, PLATFORM_TIMER, PLATFORM_FAKE612 enum class PlatformType 613 { 614 EMPTY, STATIC, HMOVE, VMOVE, DISAPPEAR, TIMER, FAKE 615 615 }; 616 616 617 enum ItemType618 { 619 ITEM_NOTHING, ITEM_SPRING, ITEM_PROPELLER, ITEM_ROCKET, ITEM_BOOTS, ITEM_SHIELD617 enum class ItemType 618 { 619 NOTHING, SPRING, PROPELLER, ROCKET, BOOTS, SHIELD 620 620 }; 621 621 … … 631 631 for (int j = 0; j < numJ; ++j) 632 632 { 633 matrix[i][j].type = P LATFORM_EMPTY;633 matrix[i][j].type = PlatformType::EMPTY; 634 634 matrix[i][j].done = false; 635 635 } … … 637 637 PlatformType platformtype1; 638 638 PlatformType platformtype2; 639 ItemType itemType = I TEM_NOTHING;639 ItemType itemType = ItemType::NOTHING; 640 640 641 641 if (rand()%2 == 0) 642 642 { 643 itemType = I TEM_SPRING;643 itemType = ItemType::SPRING; 644 644 } 645 645 else if (rand()%2 == 0 && sectionNumber_ > 3) … … 648 648 { 649 649 case 0: 650 itemType = I TEM_PROPELLER;650 itemType = ItemType::PROPELLER; 651 651 break; 652 652 case 1: 653 itemType = I TEM_ROCKET;653 itemType = ItemType::ROCKET; 654 654 break; 655 655 case 2: 656 itemType = I TEM_BOOTS;656 itemType = ItemType::BOOTS; 657 657 break; 658 658 case 3: 659 itemType = I TEM_SHIELD;659 itemType = ItemType::SHIELD; 660 660 break; 661 661 default: … … 667 667 { 668 668 case 0: 669 platformtype1 = P LATFORM_STATIC;670 platformtype2 = P LATFORM_STATIC;669 platformtype1 = PlatformType::STATIC; 670 platformtype2 = PlatformType::STATIC; 671 671 break; 672 672 case 1: 673 platformtype1 = P LATFORM_STATIC;674 platformtype2 = P LATFORM_STATIC;673 platformtype1 = PlatformType::STATIC; 674 platformtype2 = PlatformType::STATIC; 675 675 break; 676 676 case 2: 677 platformtype1 = P LATFORM_STATIC;678 platformtype2 = P LATFORM_HMOVE;677 platformtype1 = PlatformType::STATIC; 678 platformtype2 = PlatformType::HMOVE; 679 679 break; 680 680 case 3: 681 platformtype1 = P LATFORM_STATIC;682 platformtype2 = P LATFORM_DISAPPEAR;681 platformtype1 = PlatformType::STATIC; 682 platformtype2 = PlatformType::DISAPPEAR; 683 683 break; 684 684 case 4: 685 platformtype1 = P LATFORM_STATIC;686 platformtype2 = P LATFORM_VMOVE;685 platformtype1 = PlatformType::STATIC; 686 platformtype2 = PlatformType::VMOVE; 687 687 break; 688 688 case 5: 689 platformtype1 = P LATFORM_STATIC;690 platformtype2 = P LATFORM_TIMER;689 platformtype1 = PlatformType::STATIC; 690 platformtype2 = PlatformType::TIMER; 691 691 break; 692 692 case 6: 693 platformtype1 = P LATFORM_HMOVE;694 platformtype2 = P LATFORM_STATIC;693 platformtype1 = PlatformType::HMOVE; 694 platformtype2 = PlatformType::STATIC; 695 695 break; 696 696 case 7: 697 platformtype1 = P LATFORM_HMOVE;698 platformtype2 = P LATFORM_HMOVE;697 platformtype1 = PlatformType::HMOVE; 698 platformtype2 = PlatformType::HMOVE; 699 699 break; 700 700 case 8: 701 platformtype1 = P LATFORM_HMOVE;702 platformtype2 = P LATFORM_HMOVE;701 platformtype1 = PlatformType::HMOVE; 702 platformtype2 = PlatformType::HMOVE; 703 703 break; 704 704 case 9: 705 platformtype1 = P LATFORM_HMOVE;706 platformtype2 = P LATFORM_DISAPPEAR;705 platformtype1 = PlatformType::HMOVE; 706 platformtype2 = PlatformType::DISAPPEAR; 707 707 break; 708 708 case 10: 709 platformtype1 = P LATFORM_HMOVE;710 platformtype2 = P LATFORM_VMOVE;709 platformtype1 = PlatformType::HMOVE; 710 platformtype2 = PlatformType::VMOVE; 711 711 break; 712 712 case 11: 713 platformtype1 = P LATFORM_HMOVE;714 platformtype2 = P LATFORM_TIMER;713 platformtype1 = PlatformType::HMOVE; 714 platformtype2 = PlatformType::TIMER; 715 715 break; 716 716 case 12: 717 platformtype1 = P LATFORM_DISAPPEAR;718 platformtype2 = P LATFORM_STATIC;717 platformtype1 = PlatformType::DISAPPEAR; 718 platformtype2 = PlatformType::STATIC; 719 719 break; 720 720 case 13: 721 platformtype1 = P LATFORM_DISAPPEAR;722 platformtype2 = P LATFORM_HMOVE;721 platformtype1 = PlatformType::DISAPPEAR; 722 platformtype2 = PlatformType::HMOVE; 723 723 break; 724 724 case 14: 725 platformtype1 = P LATFORM_DISAPPEAR;726 platformtype2 = P LATFORM_DISAPPEAR;725 platformtype1 = PlatformType::DISAPPEAR; 726 platformtype2 = PlatformType::DISAPPEAR; 727 727 break; 728 728 case 15: 729 platformtype1 = P LATFORM_DISAPPEAR;730 platformtype2 = P LATFORM_DISAPPEAR;729 platformtype1 = PlatformType::DISAPPEAR; 730 platformtype2 = PlatformType::DISAPPEAR; 731 731 break; 732 732 case 16: 733 platformtype1 = P LATFORM_DISAPPEAR;734 platformtype2 = P LATFORM_VMOVE;733 platformtype1 = PlatformType::DISAPPEAR; 734 platformtype2 = PlatformType::VMOVE; 735 735 break; 736 736 case 17: 737 platformtype1 = P LATFORM_DISAPPEAR;738 platformtype2 = P LATFORM_TIMER;737 platformtype1 = PlatformType::DISAPPEAR; 738 platformtype2 = PlatformType::TIMER; 739 739 break; 740 740 case 18: 741 platformtype1 = P LATFORM_VMOVE;742 platformtype2 = P LATFORM_STATIC;741 platformtype1 = PlatformType::VMOVE; 742 platformtype2 = PlatformType::STATIC; 743 743 break; 744 744 case 19: 745 platformtype1 = P LATFORM_VMOVE;746 platformtype2 = P LATFORM_HMOVE;745 platformtype1 = PlatformType::VMOVE; 746 platformtype2 = PlatformType::HMOVE; 747 747 break; 748 748 case 20: 749 platformtype1 = P LATFORM_VMOVE;750 platformtype2 = P LATFORM_DISAPPEAR;749 platformtype1 = PlatformType::VMOVE; 750 platformtype2 = PlatformType::DISAPPEAR; 751 751 break; 752 752 case 21: 753 platformtype1 = P LATFORM_VMOVE;754 platformtype2 = P LATFORM_VMOVE;753 platformtype1 = PlatformType::VMOVE; 754 platformtype2 = PlatformType::VMOVE; 755 755 break; 756 756 case 22: 757 platformtype1 = P LATFORM_VMOVE;758 platformtype2 = P LATFORM_VMOVE;757 platformtype1 = PlatformType::VMOVE; 758 platformtype2 = PlatformType::VMOVE; 759 759 break; 760 760 case 23: 761 platformtype1 = P LATFORM_VMOVE;762 platformtype2 = P LATFORM_TIMER;761 platformtype1 = PlatformType::VMOVE; 762 platformtype2 = PlatformType::TIMER; 763 763 break; 764 764 case 24: 765 platformtype1 = P LATFORM_TIMER;766 platformtype2 = P LATFORM_STATIC;765 platformtype1 = PlatformType::TIMER; 766 platformtype2 = PlatformType::STATIC; 767 767 break; 768 768 case 25: 769 platformtype1 = P LATFORM_TIMER;770 platformtype2 = P LATFORM_HMOVE;769 platformtype1 = PlatformType::TIMER; 770 platformtype2 = PlatformType::HMOVE; 771 771 break; 772 772 case 26: 773 platformtype1 = P LATFORM_TIMER;774 platformtype2 = P LATFORM_DISAPPEAR;773 platformtype1 = PlatformType::TIMER; 774 platformtype2 = PlatformType::DISAPPEAR; 775 775 break; 776 776 case 27: 777 platformtype1 = P LATFORM_TIMER;778 platformtype2 = P LATFORM_VMOVE;777 platformtype1 = PlatformType::TIMER; 778 platformtype2 = PlatformType::VMOVE; 779 779 break; 780 780 case 28: 781 platformtype1 = P LATFORM_TIMER;782 platformtype2 = P LATFORM_TIMER;781 platformtype1 = PlatformType::TIMER; 782 platformtype2 = PlatformType::TIMER; 783 783 break; 784 784 default: 785 platformtype1 = P LATFORM_TIMER;786 platformtype2 = P LATFORM_TIMER;785 platformtype1 = PlatformType::TIMER; 786 platformtype2 = PlatformType::TIMER; 787 787 break; 788 788 } … … 807 807 if (platformtype1 == platformtype2 && sectionNumber_ > 10 && rand()%2 == 0) 808 808 { 809 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;810 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;809 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 810 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 811 811 } 812 812 … … 816 816 if (rand()%2 == 0) 817 817 { 818 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;819 } 820 else 821 { 822 matrix[rand()%numI][rand()%numJ].type = P LATFORM_FAKE;818 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 819 } 820 else 821 { 822 matrix[rand()%numI][rand()%numJ].type = PlatformType::FAKE; 823 823 } 824 824 } … … 827 827 if (rand()%2 == 0) 828 828 { 829 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;830 } 831 else 832 { 833 matrix[rand()%numI][rand()%numJ].type = P LATFORM_FAKE;829 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 830 } 831 else 832 { 833 matrix[rand()%numI][rand()%numJ].type = PlatformType::FAKE; 834 834 } 835 835 if (rand()%2 == 0) 836 836 { 837 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;838 } 839 else 840 { 841 matrix[rand()%numI][rand()%numJ].type = P LATFORM_FAKE;837 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 838 } 839 else 840 { 841 matrix[rand()%numI][rand()%numJ].type = PlatformType::FAKE; 842 842 } 843 843 } … … 846 846 if (rand()%2 == 0) 847 847 { 848 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;849 } 850 else 851 { 852 matrix[rand()%numI][rand()%numJ].type = P LATFORM_FAKE;848 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 849 } 850 else 851 { 852 matrix[rand()%numI][rand()%numJ].type = PlatformType::FAKE; 853 853 } 854 854 if (rand()%2 == 0) 855 855 { 856 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;857 } 858 else 859 { 860 matrix[rand()%numI][rand()%numJ].type = P LATFORM_FAKE;856 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 857 } 858 else 859 { 860 matrix[rand()%numI][rand()%numJ].type = PlatformType::FAKE; 861 861 } 862 862 if (rand()%2 == 0) 863 863 { 864 matrix[rand()%numI][rand()%numJ].type = P LATFORM_EMPTY;865 } 866 else 867 { 868 matrix[rand()%numI][rand()%numJ].type = P LATFORM_FAKE;864 matrix[rand()%numI][rand()%numJ].type = PlatformType::EMPTY; 865 } 866 else 867 { 868 matrix[rand()%numI][rand()%numJ].type = PlatformType::FAKE; 869 869 } 870 870 } … … 889 889 switch(matrix[i][j].type) 890 890 { 891 case P LATFORM_EMPTY:891 case PlatformType::EMPTY: 892 892 matrix[i][j].done = true; 893 893 break; 894 case P LATFORM_STATIC:894 case PlatformType::STATIC: 895 895 xPosition = randomXPosition(numJ, j); 896 896 zPosition = sectionBegin + i*sectionLength/numI; … … 898 898 matrix[i][j].done = true; 899 899 break; 900 case P LATFORM_FAKE:900 case PlatformType::FAKE: 901 901 xPosition = randomXPosition(numJ, j); 902 902 zPosition = sectionBegin + i*sectionLength/numI; … … 904 904 matrix[i][j].done = true; 905 905 break; 906 case P LATFORM_TIMER:906 case PlatformType::TIMER: 907 907 xPosition = randomXPosition(numJ, j); 908 908 zPosition = sectionBegin + i*sectionLength/numI; … … 910 910 matrix[i][j].done = true; 911 911 break; 912 case P LATFORM_DISAPPEAR:912 case PlatformType::DISAPPEAR: 913 913 xPosition = randomXPosition(numJ, j); 914 914 zPosition = sectionBegin + i*sectionLength/numI; … … 916 916 matrix[i][j].done = true; 917 917 break; 918 case P LATFORM_HMOVE:918 case PlatformType::HMOVE: 919 919 xVelocity = randomSpeed(); 920 if (j <= numJ-3 && matrix[i][j+1].type == P LATFORM_HMOVE && matrix[i][j+2].type == PLATFORM_HMOVE && rand()%2 == 0)920 if (j <= numJ-3 && matrix[i][j+1].type == PlatformType::HMOVE && matrix[i][j+2].type == PlatformType::HMOVE && rand()%2 == 0) 921 921 { 922 922 leftBoundary = randomXPositionLeft(numJ, j); … … 929 929 matrix[i][j+2].done = true; 930 930 } 931 else if (j <= numJ-2 && matrix[i][j+1].type == P LATFORM_HMOVE && rand()%2 == 0)931 else if (j <= numJ-2 && matrix[i][j+1].type == PlatformType::HMOVE && rand()%2 == 0) 932 932 { 933 933 leftBoundary = randomXPositionLeft(numJ, j); … … 949 949 } 950 950 break; 951 case P LATFORM_VMOVE:951 case PlatformType::VMOVE: 952 952 zVelocity = randomSpeed(); 953 if (i <= numI-3 && matrix[i+1][j].type == P LATFORM_VMOVE && matrix[i+2][j].type == PLATFORM_VMOVE && rand()%2 == 0)953 if (i <= numI-3 && matrix[i+1][j].type == PlatformType::VMOVE && matrix[i+2][j].type == PlatformType::VMOVE && rand()%2 == 0) 954 954 { 955 955 lowerBoundary = randomZPositionLower(numI, i, sectionBegin, sectionEnd); … … 962 962 matrix[i+2][j].done = true; 963 963 } 964 else if (i <= numI-2 && matrix[i+1][j].type == P LATFORM_VMOVE && rand()%2 == 0)964 else if (i <= numI-2 && matrix[i+1][j].type == PlatformType::VMOVE && rand()%2 == 0) 965 965 { 966 966 lowerBoundary = randomZPositionLower(numI, i, sectionBegin, sectionEnd); … … 1000 1000 switch (itemType) 1001 1001 { 1002 case I TEM_ROCKET:1002 case ItemType::ROCKET: 1003 1003 addRocket(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0); 1004 1004 break; 1005 case I TEM_PROPELLER:1005 case ItemType::PROPELLER: 1006 1006 addPropeller(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0); 1007 1007 break; 1008 case I TEM_BOOTS:1008 case ItemType::BOOTS: 1009 1009 addBoots(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0); 1010 1010 break; 1011 case I TEM_SHIELD:1011 case ItemType::SHIELD: 1012 1012 addShield(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0); 1013 1013 break; … … 1020 1020 switch (itemType) 1021 1021 { 1022 case I TEM_ROCKET:1022 case ItemType::ROCKET: 1023 1023 addRocket(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed()); 1024 1024 break; 1025 case I TEM_PROPELLER:1025 case ItemType::PROPELLER: 1026 1026 addPropeller(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed()); 1027 1027 break; 1028 case I TEM_BOOTS:1028 case ItemType::BOOTS: 1029 1029 addBoots(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed()); 1030 1030 break; 1031 case I TEM_SHIELD:1031 case ItemType::SHIELD: 1032 1032 addShield(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed()); 1033 1033 break; … … 1045 1045 switch (itemType) 1046 1046 { 1047 case I TEM_SPRING:1047 case ItemType::SPRING: 1048 1048 addSpring(itemPlatform); 1049 1049 break; 1050 case I TEM_ROCKET:1050 case ItemType::ROCKET: 1051 1051 addRocket(itemPlatform); 1052 1052 break; 1053 case I TEM_PROPELLER:1053 case ItemType::PROPELLER: 1054 1054 addPropeller(itemPlatform); 1055 1055 break; 1056 case I TEM_BOOTS:1056 case ItemType::BOOTS: 1057 1057 addBoots(itemPlatform); 1058 1058 break; 1059 case I TEM_SHIELD:1059 case ItemType::SHIELD: 1060 1060 addShield(itemPlatform); 1061 1061 break; -
code/branches/cpp11_v3/src/modules/mini4dgame/Mini4Dgame.h
r11054 r11068 41 41 namespace orxonox 42 42 { 43 44 namespace mini4DgamePlayerColor45 {46 enum color47 {48 none,49 red,50 blue,51 green52 };53 }54 55 43 /** 56 44 @brief -
code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameAI.cc
r11058 r11068 104 104 for(int k=0;k<4;k++){ 105 105 for(int l=0;l<4;l++){ 106 if (this->board_[i][j][k][l]== mini4DgamePlayerColor::none)106 if (this->board_[i][j][k][l]==Mini4DgamePlayerColor::none) 107 107 possibleMoves.push_back(Vector4(i,j,k,l)); 108 108 } -
code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameAI.h
r11058 r11068 83 83 std::list<Vector4> getPossibleMoves(); 84 84 void copyBoard(); 85 mini4DgamePlayerColor::color board_[4][4][4][4];85 Mini4DgamePlayerColor board_[4][4][4][4]; 86 86 }; 87 87 } -
code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameBoard.cc
r11057 r11068 61 61 for(int k=0;k<4;k++){ 62 62 for(int l=0;l<4;l++){ 63 this->board[i][j][k][l]= mini4DgamePlayerColor::none;63 this->board[i][j][k][l]=Mini4DgamePlayerColor::none; 64 64 this->blinkingBillboards[i][j][k][l] = nullptr; 65 65 } … … 79 79 return (move.x<4 && move.y<4 && move.z<4 && move.w<4 80 80 && move.x>=0 && move.y>=0 && move.z>=0 && move.w>=0 81 && this->board[move.x][move.y][move.z][move.w] == mini4DgamePlayerColor::none);81 && this->board[move.x][move.y][move.z][move.w] == Mini4DgamePlayerColor::none); 82 82 } 83 83 … … 86 86 const Mini4DgamePosition& move = moves.back(); 87 87 moves.pop_back(); 88 this->board[move.x][move.y][move.z][move.w] = mini4DgamePlayerColor::none;88 this->board[move.x][move.y][move.z][move.w] = Mini4DgamePlayerColor::none; 89 89 this->blinkingBillboards[move.x][move.y][move.z][move.w]->destroy(); 90 90 this->blinkingBillboards[move.x][move.y][move.z][move.w] = nullptr; … … 115 115 116 116 moves.push_back(move); 117 mini4DgamePlayerColor::color playerColor = mini4DgamePlayerColor::none;117 Mini4DgamePlayerColor playerColor = Mini4DgamePlayerColor::none; 118 118 if(player_toggle_){ 119 playerColor = mini4DgamePlayerColor::blue;119 playerColor = Mini4DgamePlayerColor::blue; 120 120 this->player_toggle_ = false; 121 121 }else{ 122 playerColor = mini4DgamePlayerColor::green;122 playerColor = Mini4DgamePlayerColor::green; 123 123 this->player_toggle_ = true; 124 124 } 125 125 126 this->board[move.x][move.y][move.z][move.w] = (mini4DgamePlayerColor::color)playerColor;126 this->board[move.x][move.y][move.z][move.w] = playerColor; 127 127 128 128 BlinkingBillboard* bb = new BlinkingBillboard(this->getContext()); … … 146 146 147 147 switch(playerColor){ 148 case mini4DgamePlayerColor::red:148 case Mini4DgamePlayerColor::red: 149 149 bb->setColour(ColourValue(1,0,0)); break; 150 case mini4DgamePlayerColor::green:150 case Mini4DgamePlayerColor::green: 151 151 bb->setColour(ColourValue(0,1,0)); break; 152 case mini4DgamePlayerColor::blue:152 case Mini4DgamePlayerColor::blue: 153 153 bb->setColour(ColourValue(0,0,1)); break; 154 154 default: break; … … 160 160 161 161 Mini4DgameWinner winner = this->getWinner(); 162 if(winner.color_ != mini4DgamePlayerColor::none)162 if(winner.color_ != Mini4DgamePlayerColor::none) 163 163 { 164 164 orxout(user_status) << "Mini4Dgame: win!!!!!!!" << endl; … … 188 188 { 189 189 Mini4DgameWinner winner; 190 winner.color_ = mini4DgamePlayerColor::none;190 winner.color_ = Mini4DgamePlayerColor::none; 191 191 192 192 //check diagonals rows-columns-height-numbers 193 193 for(int i=1; i<4; i++) 194 194 { 195 if(this->board[i][i][i][i]== mini4DgamePlayerColor::none || this->board[0][0][0][0] != this->board[i][i][i][i])195 if(this->board[i][i][i][i]==Mini4DgamePlayerColor::none || this->board[0][0][0][0] != this->board[i][i][i][i]) 196 196 break; 197 197 if(i==3) … … 209 209 for(int i=1; i<4; i++) 210 210 { 211 if(this->board[3-i][i][i][i]== mini4DgamePlayerColor::none || this->board[3][0][0][0] != this->board[3-i][i][i][i])211 if(this->board[3-i][i][i][i]==Mini4DgamePlayerColor::none || this->board[3][0][0][0] != this->board[3-i][i][i][i]) 212 212 break; 213 213 if(i==3) … … 225 225 for(int i=1; i<4; i++) 226 226 { 227 if(this->board[i][3-i][i][i]== mini4DgamePlayerColor::none || this->board[0][3][0][0] != this->board[i][3-i][i][i])227 if(this->board[i][3-i][i][i]==Mini4DgamePlayerColor::none || this->board[0][3][0][0] != this->board[i][3-i][i][i]) 228 228 break; 229 229 if(i==3) … … 241 241 for(int i=1; i<4; i++) 242 242 { 243 if(this->board[i][i][3-i][i]== mini4DgamePlayerColor::none || this->board[0][0][3][0] != this->board[i][i][3-i][i])243 if(this->board[i][i][3-i][i]==Mini4DgamePlayerColor::none || this->board[0][0][3][0] != this->board[i][i][3-i][i]) 244 244 break; 245 245 if(i==3) … … 257 257 for(int i=1; i<4; i++) 258 258 { 259 if(this->board[i][i][i][3-i]== mini4DgamePlayerColor::none || this->board[0][0][0][3] != this->board[i][i][i][3-i])259 if(this->board[i][i][i][3-i]==Mini4DgamePlayerColor::none || this->board[0][0][0][3] != this->board[i][i][i][3-i]) 260 260 break; 261 261 if(i==3) … … 273 273 for(int i=1; i<4; i++) 274 274 { 275 if(this->board[3-i][3-i][i][i]== mini4DgamePlayerColor::none || this->board[3][3][0][0] != this->board[3-i][3-i][i][i])275 if(this->board[3-i][3-i][i][i]==Mini4DgamePlayerColor::none || this->board[3][3][0][0] != this->board[3-i][3-i][i][i]) 276 276 break; 277 277 if(i==3) … … 289 289 for(int i=1; i<4; i++) 290 290 { 291 if(this->board[3-i][i][3-i][i]== mini4DgamePlayerColor::none || this->board[3][0][3][0] != this->board[3-i][i][3-i][i])291 if(this->board[3-i][i][3-i][i]==Mini4DgamePlayerColor::none || this->board[3][0][3][0] != this->board[3-i][i][3-i][i]) 292 292 break; 293 293 if(i==3) … … 305 305 for(int i=1; i<4; i++) 306 306 { 307 if(this->board[3-i][i][i][3-i]== mini4DgamePlayerColor::none || this->board[3][0][0][3] != this->board[3-i][i][i][3-i])307 if(this->board[3-i][i][i][3-i]==Mini4DgamePlayerColor::none || this->board[3][0][0][3] != this->board[3-i][i][i][3-i]) 308 308 break; 309 309 if(i==3) … … 325 325 for(int i=1; i<4; i++) 326 326 { 327 if(this->board[i][i][i][l]== mini4DgamePlayerColor::none || this->board[0][0][0][l] != this->board[i][i][i][l])327 if(this->board[i][i][i][l]==Mini4DgamePlayerColor::none || this->board[0][0][0][l] != this->board[i][i][i][l]) 328 328 break; 329 329 if(i==3) … … 341 341 for(int i=1; i<4; i++) 342 342 { 343 if(this->board[3-i][i][i][l]== mini4DgamePlayerColor::none || this->board[3][0][0][l] != this->board[3-i][i][i][l])343 if(this->board[3-i][i][i][l]==Mini4DgamePlayerColor::none || this->board[3][0][0][l] != this->board[3-i][i][i][l]) 344 344 break; 345 345 if(i==3) … … 357 357 for(int i=1; i<4; i++) 358 358 { 359 if(this->board[i][3-i][i][l]== mini4DgamePlayerColor::none || this->board[0][3][0][l] != this->board[i][3-i][i][l])359 if(this->board[i][3-i][i][l]==Mini4DgamePlayerColor::none || this->board[0][3][0][l] != this->board[i][3-i][i][l]) 360 360 break; 361 361 if(i==3) … … 373 373 for(int i=1; i<4; i++) 374 374 { 375 if(this->board[i][i][3-i][l]== mini4DgamePlayerColor::none || this->board[0][0][3][l] != this->board[i][i][3-i][l])375 if(this->board[i][i][3-i][l]==Mini4DgamePlayerColor::none || this->board[0][0][3][l] != this->board[i][i][3-i][l]) 376 376 break; 377 377 if(i==3) … … 394 394 for(int i=1; i<4; i++) 395 395 { 396 if(this->board[i][i][l][i]== mini4DgamePlayerColor::none || this->board[0][0][l][0] != this->board[i][i][l][i])396 if(this->board[i][i][l][i]==Mini4DgamePlayerColor::none || this->board[0][0][l][0] != this->board[i][i][l][i]) 397 397 break; 398 398 if(i==3) … … 410 410 for(int i=1; i<4; i++) 411 411 { 412 if(this->board[3-i][i][l][i]== mini4DgamePlayerColor::none || this->board[3][0][l][0] != this->board[3-i][i][l][i])412 if(this->board[3-i][i][l][i]==Mini4DgamePlayerColor::none || this->board[3][0][l][0] != this->board[3-i][i][l][i]) 413 413 break; 414 414 if(i==3) … … 426 426 for(int i=1; i<4; i++) 427 427 { 428 if(this->board[i][3-i][l][i]== mini4DgamePlayerColor::none || this->board[0][3][l][0] != this->board[i][3-i][l][i])428 if(this->board[i][3-i][l][i]==Mini4DgamePlayerColor::none || this->board[0][3][l][0] != this->board[i][3-i][l][i]) 429 429 break; 430 430 if(i==3) … … 442 442 for(int i=1; i<4; i++) 443 443 { 444 if(this->board[i][i][l][3-i]== mini4DgamePlayerColor::none || this->board[0][0][l][3] != this->board[i][i][l][3-i])444 if(this->board[i][i][l][3-i]==Mini4DgamePlayerColor::none || this->board[0][0][l][3] != this->board[i][i][l][3-i]) 445 445 break; 446 446 if(i==3) … … 463 463 for(int i=1; i<4; i++) 464 464 { 465 if(this->board[i][l][i][i]== mini4DgamePlayerColor::none || this->board[0][l][0][0] != this->board[i][l][i][i])465 if(this->board[i][l][i][i]==Mini4DgamePlayerColor::none || this->board[0][l][0][0] != this->board[i][l][i][i]) 466 466 break; 467 467 if(i==3) … … 479 479 for(int i=1; i<4; i++) 480 480 { 481 if(this->board[3-i][l][i][i]== mini4DgamePlayerColor::none || this->board[3][l][0][0] != this->board[3-i][l][i][i])481 if(this->board[3-i][l][i][i]==Mini4DgamePlayerColor::none || this->board[3][l][0][0] != this->board[3-i][l][i][i]) 482 482 break; 483 483 if(i==3) … … 495 495 for(int i=1; i<4; i++) 496 496 { 497 if(this->board[i][l][3-i][i]== mini4DgamePlayerColor::none || this->board[0][l][3][0] != this->board[i][l][3-i][i])497 if(this->board[i][l][3-i][i]==Mini4DgamePlayerColor::none || this->board[0][l][3][0] != this->board[i][l][3-i][i]) 498 498 break; 499 499 if(i==3) … … 511 511 for(int i=1; i<4; i++) 512 512 { 513 if(this->board[i][l][i][3-i]== mini4DgamePlayerColor::none || this->board[0][l][0][3] != this->board[i][l][i][3-i])513 if(this->board[i][l][i][3-i]==Mini4DgamePlayerColor::none || this->board[0][l][0][3] != this->board[i][l][i][3-i]) 514 514 break; 515 515 if(i==3) … … 532 532 for(int i=1; i<4; i++) 533 533 { 534 if(this->board[l][i][i][i]== mini4DgamePlayerColor::none || this->board[l][0][0][0] != this->board[l][i][i][i])534 if(this->board[l][i][i][i]==Mini4DgamePlayerColor::none || this->board[l][0][0][0] != this->board[l][i][i][i]) 535 535 break; 536 536 if(i==3) … … 548 548 for(int i=1; i<4; i++) 549 549 { 550 if(this->board[l][3-i][i][i]== mini4DgamePlayerColor::none || this->board[l][3][0][0] != this->board[l][3-i][i][i])550 if(this->board[l][3-i][i][i]==Mini4DgamePlayerColor::none || this->board[l][3][0][0] != this->board[l][3-i][i][i]) 551 551 break; 552 552 if(i==3) … … 564 564 for(int i=1; i<4; i++) 565 565 { 566 if(this->board[l][i][3-i][i]== mini4DgamePlayerColor::none || this->board[l][0][3][0] != this->board[l][i][3-i][i])566 if(this->board[l][i][3-i][i]==Mini4DgamePlayerColor::none || this->board[l][0][3][0] != this->board[l][i][3-i][i]) 567 567 break; 568 568 if(i==3) … … 580 580 for(int i=1; i<4; i++) 581 581 { 582 if(this->board[l][i][i][3-i]== mini4DgamePlayerColor::none || this->board[l][0][0][3] != this->board[l][i][i][3-i])582 if(this->board[l][i][i][3-i]==Mini4DgamePlayerColor::none || this->board[l][0][0][3] != this->board[l][i][i][3-i]) 583 583 break; 584 584 if(i==3) … … 602 602 for(int i=1; i<4; i++) 603 603 { 604 if(this->board[i][i][k][l]== mini4DgamePlayerColor::none || this->board[0][0][k][l] != this->board[i][i][k][l])604 if(this->board[i][i][k][l]==Mini4DgamePlayerColor::none || this->board[0][0][k][l] != this->board[i][i][k][l]) 605 605 break; 606 606 if(i==3) … … 618 618 for(int i=1; i<4; i++) 619 619 { 620 if(this->board[3-i][i][k][l]== mini4DgamePlayerColor::none || this->board[3][0][k][l] != this->board[3-i][i][k][l])620 if(this->board[3-i][i][k][l]==Mini4DgamePlayerColor::none || this->board[3][0][k][l] != this->board[3-i][i][k][l]) 621 621 break; 622 622 if(i==3) … … 635 635 for(int i=1; i<4; i++) 636 636 { 637 if(this->board[i][k][i][l]== mini4DgamePlayerColor::none || this->board[0][k][0][l] != this->board[i][k][i][l])637 if(this->board[i][k][i][l]==Mini4DgamePlayerColor::none || this->board[0][k][0][l] != this->board[i][k][i][l]) 638 638 break; 639 639 if(i==3) … … 651 651 for(int i=1; i<4; i++) 652 652 { 653 if(this->board[3-i][k][i][l]== mini4DgamePlayerColor::none || this->board[3][k][0][l] != this->board[3-i][k][i][l])653 if(this->board[3-i][k][i][l]==Mini4DgamePlayerColor::none || this->board[3][k][0][l] != this->board[3-i][k][i][l]) 654 654 break; 655 655 if(i==3) … … 668 668 for(int i=1; i<4; i++) 669 669 { 670 if(this->board[i][k][l][i]== mini4DgamePlayerColor::none || this->board[0][k][l][0] != this->board[i][k][l][i])670 if(this->board[i][k][l][i]==Mini4DgamePlayerColor::none || this->board[0][k][l][0] != this->board[i][k][l][i]) 671 671 break; 672 672 if(i==3) … … 684 684 for(int i=1; i<4; i++) 685 685 { 686 if(this->board[3-i][k][l][i]== mini4DgamePlayerColor::none || this->board[3][k][l][0] != this->board[3-i][k][l][i])686 if(this->board[3-i][k][l][i]==Mini4DgamePlayerColor::none || this->board[3][k][l][0] != this->board[3-i][k][l][i]) 687 687 break; 688 688 if(i==3) … … 701 701 for(int i=1; i<4; i++) 702 702 { 703 if(this->board[k][i][i][l]== mini4DgamePlayerColor::none || this->board[k][0][0][l] != this->board[k][i][i][l])703 if(this->board[k][i][i][l]==Mini4DgamePlayerColor::none || this->board[k][0][0][l] != this->board[k][i][i][l]) 704 704 break; 705 705 if(i==3) … … 717 717 for(int i=1; i<4; i++) 718 718 { 719 if(this->board[k][3-i][i][l]== mini4DgamePlayerColor::none || this->board[k][3][0][l] != this->board[k][3-i][i][l])719 if(this->board[k][3-i][i][l]==Mini4DgamePlayerColor::none || this->board[k][3][0][l] != this->board[k][3-i][i][l]) 720 720 break; 721 721 if(i==3) … … 734 734 for(int i=1; i<4; i++) 735 735 { 736 if(this->board[k][i][l][i]== mini4DgamePlayerColor::none || this->board[k][0][l][0] != this->board[k][i][l][i])736 if(this->board[k][i][l][i]==Mini4DgamePlayerColor::none || this->board[k][0][l][0] != this->board[k][i][l][i]) 737 737 break; 738 738 if(i==3) … … 750 750 for(int i=1; i<4; i++) 751 751 { 752 if(this->board[k][3-i][l][i]== mini4DgamePlayerColor::none || this->board[k][3][l][0] != this->board[k][3-i][l][i])752 if(this->board[k][3-i][l][i]==Mini4DgamePlayerColor::none || this->board[k][3][l][0] != this->board[k][3-i][l][i]) 753 753 break; 754 754 if(i==3) … … 767 767 for(int i=1; i<4; i++) 768 768 { 769 if(this->board[k][l][i][i]== mini4DgamePlayerColor::none || this->board[k][l][0][0] != this->board[k][l][i][i])769 if(this->board[k][l][i][i]==Mini4DgamePlayerColor::none || this->board[k][l][0][0] != this->board[k][l][i][i]) 770 770 break; 771 771 if(i==3) … … 783 783 for(int i=1; i<4; i++) 784 784 { 785 if(this->board[k][l][3-i][i]== mini4DgamePlayerColor::none || this->board[k][l][3][0] != this->board[k][l][3-i][i])785 if(this->board[k][l][3-i][i]==Mini4DgamePlayerColor::none || this->board[k][l][3][0] != this->board[k][l][3-i][i]) 786 786 break; 787 787 if(i==3) … … 804 804 for(int k=0;k<4;k++){ 805 805 for(int l=0;l<4;l++){ 806 if(this->board[0][j][k][l]!= mini4DgamePlayerColor::none806 if(this->board[0][j][k][l]!= Mini4DgamePlayerColor::none 807 807 && this->board[0][j][k][l]==this->board[1][j][k][l] 808 808 && this->board[1][j][k][l]==this->board[2][j][k][l] … … 826 826 for(int k=0;k<4;k++){ 827 827 for(int l=0;l<4;l++){ 828 if(this->board[i][0][k][l]!= mini4DgamePlayerColor::none828 if(this->board[i][0][k][l]!= Mini4DgamePlayerColor::none 829 829 && this->board[i][0][k][l]==this->board[i][1][k][l] 830 830 && this->board[i][1][k][l]==this->board[i][2][k][l] … … 848 848 for(int j=0;j<4;j++){ 849 849 for(int l=0;l<4;l++){ 850 if(this->board[i][j][0][l]!= mini4DgamePlayerColor::none850 if(this->board[i][j][0][l]!= Mini4DgamePlayerColor::none 851 851 && this->board[i][j][0][l]==this->board[i][j][1][l] 852 852 && this->board[i][j][1][l]==this->board[i][j][2][l] … … 870 870 for(int j=0;j<4;j++){ 871 871 for(int k=0;k<4;k++){ 872 if(this->board[i][j][k][0]!= mini4DgamePlayerColor::none872 if(this->board[i][j][k][0]!= Mini4DgamePlayerColor::none 873 873 && this->board[i][j][k][0]==this->board[i][j][k][1] 874 874 && this->board[i][j][k][1]==this->board[i][j][k][2] -
code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameBoard.h
r11057 r11068 42 42 namespace orxonox 43 43 { 44 enum class Mini4DgamePlayerColor 45 { 46 none, 47 red, 48 blue, 49 green 50 }; 44 51 45 52 struct Mini4DgamePosition … … 58 65 int winningHeight[4]; 59 66 int winningNumber[4]; 60 intcolor_;67 Mini4DgamePlayerColor color_; 61 68 }; 62 69 … … 86 93 bool player_toggle_; 87 94 BlinkingBillboard* blinkingBillboards[4][4][4][4]; 88 intboard[4][4][4][4]; //!< The logical board where the game takes place. board[row][column][height][number]95 Mini4DgamePlayerColor board[4][4][4][4]; //!< The logical board where the game takes place. board[row][column][height][number] 89 96 }; 90 97 } -
code/branches/cpp11_v3/src/modules/notifications/NotificationDispatcher.cc
r11054 r11068 113 113 // TODO: Needed? 114 114 const std::string message = this->createNotificationMessage(); 115 NotificationListener::sendNotification(message, this->getSender(), notificationMessageType::info, notificationSendMode::local);115 NotificationListener::sendNotification(message, this->getSender(), NotificationMessageType::info, NotificationSendMode::local); 116 116 117 117 // Broadcast … … 144 144 const std::string message = this->createNotificationMessage(); 145 145 // TODO: Make the type configurable. 146 NotificationListener::sendNotification(message, this->getSender(), notificationMessageType::info, notificationSendMode::network, clientId);146 NotificationListener::sendNotification(message, this->getSender(), NotificationMessageType::info, NotificationSendMode::network, clientId); 147 147 } 148 148 else if(GameMode::isServer()) -
code/branches/cpp11_v3/src/modules/notifications/NotificationManager.cc
r11054 r11068 106 106 Returns true if successful. 107 107 */ 108 bool NotificationManager::registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type)108 bool NotificationManager::registerNotification(const std::string& message, const std::string& sender, NotificationMessageType type) 109 109 { 110 110 // TODO: Do something with the type. … … 124 124 Returns true if the command was successfully executed. 125 125 */ 126 bool NotificationManager::executeCommand( notificationCommand::Valuecommand, const std::string& sender)126 bool NotificationManager::executeCommand(NotificationCommand command, const std::string& sender) 127 127 { 128 128 bool commandExecuted = false; 129 if(command == notificationCommand::clear)129 if(command == NotificationCommand::clear) 130 130 { 131 131 if(this->commandClear(sender)) … … 437 437 438 438 */ 439 Notification::Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type)439 Notification::Notification(const std::string& message, const std::string& sender, NotificationMessageType type) 440 440 { 441 441 this->initialize(); -
code/branches/cpp11_v3/src/modules/notifications/NotificationManager.h
r11054 r11068 62 62 { 63 63 public: 64 Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type);64 Notification(const std::string& message, const std::string& sender, NotificationMessageType type); 65 65 virtual ~Notification(); 66 66 … … 89 89 @return Returns an enum with the type of the Notification. 90 90 */ 91 inline notificationMessageType::Value getType(void) const91 inline NotificationMessageType getType(void) const 92 92 { return this->type_; } 93 93 … … 95 95 std::string message_; //!< The Notification message. 96 96 std::string sender_; //!< The sender of the notification. 97 notificationMessageType::Value type_; //!< The type of the notification.97 NotificationMessageType type_; //!< The type of the notification. 98 98 99 99 void initialize(void); //!< Registers the object and sets some default values. … … 128 128 static NotificationManager& getInstance() { return Singleton<NotificationManager>::getInstance(); } // tolua_export 129 129 130 virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type) override;131 virtual bool executeCommand( notificationCommand::Valuecommand, const std::string& sender) override;130 virtual bool registerNotification(const std::string& message, const std::string& sender, NotificationMessageType type) override; 131 virtual bool executeCommand(NotificationCommand command, const std::string& sender) override; 132 132 133 133 bool registerNotification(Notification* notification); // Registers a Notification within the NotificationManager. -
code/branches/cpp11_v3/src/modules/objects/ForceField.cc
r11054 r11068 67 67 this->setMassDiameter(0); //! We allow point-masses 68 68 this->setLength(2000); 69 this->mode_ = forceFieldMode::tube;69 this->mode_ = ForceFieldMode::tube; 70 70 71 71 this->registerVariables(); … … 115 115 void ForceField::tick(float dt) 116 116 { 117 if(this->mode_ == forceFieldMode::tube)117 if(this->mode_ == ForceFieldMode::tube) 118 118 { 119 119 // Iterate over all objects that could possibly be affected by the ForceField. … … 143 143 } 144 144 } 145 else if(this->mode_ == forceFieldMode::sphere)145 else if(this->mode_ == ForceFieldMode::sphere) 146 146 { 147 147 // Iterate over all objects that could possibly be affected by the ForceField. … … 159 159 } 160 160 } 161 else if(this->mode_ == forceFieldMode::invertedSphere)161 else if(this->mode_ == ForceFieldMode::invertedSphere) 162 162 { 163 163 // Iterate over all objects that could possibly be affected by the ForceField. … … 176 176 } 177 177 } 178 else if(this->mode_ == forceFieldMode::newtonianGravity)178 else if(this->mode_ == ForceFieldMode::newtonianGravity) 179 179 { 180 180 // Iterate over all objects that could possibly be affected by the ForceField. … … 201 201 } 202 202 } 203 else if(this->mode_ == forceFieldMode::homogen)203 else if(this->mode_ == ForceFieldMode::homogen) 204 204 { 205 205 // Iterate over all objects that could possibly be affected by the ForceField. … … 227 227 { 228 228 if(mode == ForceField::modeTube_s) 229 this->mode_ = forceFieldMode::tube;229 this->mode_ = ForceFieldMode::tube; 230 230 else if(mode == ForceField::modeSphere_s) 231 this->mode_ = forceFieldMode::sphere;231 this->mode_ = ForceFieldMode::sphere; 232 232 else if(mode == ForceField::modeInvertedSphere_s) 233 this->mode_ = forceFieldMode::invertedSphere;233 this->mode_ = ForceFieldMode::invertedSphere; 234 234 else if(mode == ForceField::modeNewtonianGravity_s) 235 this->mode_ = forceFieldMode::newtonianGravity;235 this->mode_ = ForceFieldMode::newtonianGravity; 236 236 237 237 else if(mode == ForceField::modeHomogen_s) 238 this->mode_ = forceFieldMode::homogen;238 this->mode_ = ForceFieldMode::homogen; 239 239 240 240 else 241 241 { 242 242 orxout(internal_warning) << "Wrong mode '" << mode << "' in ForceField. Setting to 'tube'." << endl; 243 this->mode_ = forceFieldMode::tube;243 this->mode_ = ForceFieldMode::tube; 244 244 } 245 245 } … … 255 255 switch(this->mode_) 256 256 { 257 case forceFieldMode::tube:257 case ForceFieldMode::tube: 258 258 return ForceField::modeTube_s; 259 case forceFieldMode::sphere:259 case ForceFieldMode::sphere: 260 260 return ForceField::modeSphere_s; 261 case forceFieldMode::invertedSphere:261 case ForceFieldMode::invertedSphere: 262 262 return ForceField::modeInvertedSphere_s; 263 case forceFieldMode::newtonianGravity:263 case ForceFieldMode::newtonianGravity: 264 264 return ForceField::modeNewtonianGravity_s; 265 265 266 case forceFieldMode::homogen:266 case ForceFieldMode::homogen: 267 267 return ForceField::modeHomogen_s; 268 268 -
code/branches/cpp11_v3/src/modules/objects/ForceField.h
r11054 r11068 52 52 @ingroup Objects 53 53 */ 54 namespace forceFieldMode 55 { 56 enum Value { 57 tube, //!< The ForceField has a tube shape. 58 sphere, //!< The ForceField has a spherical shape. 59 invertedSphere, //!< The ForceField has a spherical shape but "inverted" behavior. 60 newtonianGravity, //!< The ForceField imitates Newtonian gravitation for use in stellar bodies. 61 homogen //!< Local homogenous Force field with changeable direction for the Space Station 62 }; 63 } 54 enum class ForceFieldMode { 55 tube, //!< The ForceField has a tube shape. 56 sphere, //!< The ForceField has a spherical shape. 57 invertedSphere, //!< The ForceField has a spherical shape but "inverted" behavior. 58 newtonianGravity, //!< The ForceField imitates Newtonian gravitation for use in stellar bodies. 59 homogen //!< Local homogenous Force field with changeable direction for the Space Station 60 }; 64 61 65 62 /** … … 172 169 float massRadius_; //!< The radius of the stellar body for the Newtonian ForceField. 173 170 float halfLength_; //!< Half of the length of the ForceField. 174 intmode_; //!< The mode of the ForceField.171 ForceFieldMode mode_; //!< The mode of the ForceField. 175 172 176 173 //! Gravitational constant for Newtonian ForceFields. -
code/branches/cpp11_v3/src/modules/objects/Script.h
r11054 r11068 51 51 @brief The mode a specific @ref orxonox::Script "Script" is in. 52 52 */ 53 namespaceScriptMode53 enum class ScriptMode 54 54 { 55 enum Value 56 { 57 normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor". 58 lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua. 59 }; 60 } 55 normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor". 56 lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua. 57 }; 61 58 62 59 /** … … 178 175 179 176 std::string code_; //!< The code that is executed by this Script. 180 ScriptMode ::Valuemode_; //!< The mode the Script is in. Determines whether the code is executed the normal way or in lua.177 ScriptMode mode_; //!< The mode the Script is in. Determines whether the code is executed the normal way or in lua. 181 178 std::string modeStr_; //!< The mode the Script is in, as a string. Is used for networking purposes. 182 179 bool onLoad_; //!< Whether the Scripts code is executed upon loading (creation) of this Script. … … 193 190 @param mode The mode of the Script. 194 191 */ 195 inline void setMode(ScriptMode ::Valuemode)192 inline void setMode(ScriptMode mode) 196 193 { this->mode_ = mode; } 197 194 }; -
code/branches/cpp11_v3/src/modules/objects/Turret.cc
r10622 r11068 278 278 //slower the closer it is to the destination 279 279 Quaternion drot = Quaternion::nlerp(dt*this->rotationThrust_/20.f, Quaternion::IDENTITY, this->rotation_); 280 this->rotate(drot, WorldEntity:: World);280 this->rotate(drot, WorldEntity::TransformSpace::World); 281 281 this->rotation_ = Quaternion::IDENTITY; 282 282 } -
code/branches/cpp11_v3/src/modules/objects/triggers/CheckPoint.cc
r10624 r11068 56 56 57 57 this->setRadarObjectColour(ColourValue::Green); 58 this->setRadarObjectShape(RadarViewable:: Dot);58 this->setRadarObjectShape(RadarViewable::Shape::Dot); 59 59 this->setRadarVisibility(false); 60 60 -
code/branches/cpp11_v3/src/modules/objects/triggers/DistanceMultiTrigger.cc
r11054 r11068 58 58 59 59 this->distance_ = 100.0f; 60 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::off);60 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::off); 61 61 this->targetName_ = ""; 62 62 this->beaconMask_.exclude(Class(BaseObject)); … … 136 136 ClassTreeMask targetMask = this->getTargetMask(); 137 137 // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons. 138 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)138 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::identify) 139 139 targetMask = this->beaconMask_; 140 140 … … 145 145 146 146 // If the DistanceMultiTrigger is in identify-mode and the DistanceTriggerBeacon attached to the object has the wrong name we ignore it. 147 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)147 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::identify) 148 148 { 149 149 if(entity->getName() != this->targetName_) … … 155 155 156 156 // If the DistanceMultiTrigger is in exclude mode and the DistanceTriggerBeacon attached to the object has the right name, we ignore it. 157 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::exclude)157 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::exclude) 158 158 { 159 159 … … 182 182 183 183 // Change the entity to the parent of the DistanceTriggerBeacon (if in identify-mode), which is the entity to which the beacon is attached. 184 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)184 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::identify) 185 185 entity = entity->getParent(); 186 186 … … 206 206 The mode as an enum. 207 207 */ 208 void DistanceMultiTrigger::setBeaconModeDirect( distanceMultiTriggerBeaconMode::Value mode)208 void DistanceMultiTrigger::setBeaconModeDirect(DistanceMultiTriggerBeaconMode mode) 209 209 { 210 210 this->beaconMode_ = mode; … … 221 221 switch(this->getBeaconModeDirect()) 222 222 { 223 case distanceMultiTriggerBeaconMode::off :223 case DistanceMultiTriggerBeaconMode::off : 224 224 return DistanceMultiTrigger::beaconModeOff_s; 225 case distanceMultiTriggerBeaconMode::identify:225 case DistanceMultiTriggerBeaconMode::identify: 226 226 return DistanceMultiTrigger::beaconModeIdentify_s; 227 case distanceMultiTriggerBeaconMode::exclude:227 case DistanceMultiTriggerBeaconMode::exclude: 228 228 return DistanceMultiTrigger::beaconModeExlcude_s; 229 229 default : … … 242 242 { 243 243 if(mode == DistanceMultiTrigger::beaconModeOff_s) 244 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::off);244 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::off); 245 245 else if(mode == DistanceMultiTrigger::beaconModeIdentify_s) 246 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::identify);246 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::identify); 247 247 else if(mode == DistanceMultiTrigger::beaconModeExlcude_s) 248 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::exclude);248 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::exclude); 249 249 else 250 250 orxout(internal_error, context::triggers) << "Invalid beacon mode in DistanceMultiTrigger." << endl; -
code/branches/cpp11_v3/src/modules/objects/triggers/DistanceMultiTrigger.h
r11054 r11068 55 55 @ingroup MultiTrigger 56 56 */ 57 namespace distanceMultiTriggerBeaconMode 58 { 59 enum Value { 60 off, //!< The DistanceMultiTrigger is not in <em>beacon-mode</em>. 61 identify, //!< The DistanceTrigger is in <em>identify-mode</em>. 62 exclude //!< The DistanceTrigger is in <em>exclude-mode</em>. 63 }; 64 } 57 enum class DistanceMultiTriggerBeaconMode { 58 off, //!< The DistanceMultiTrigger is not in <em>beacon-mode</em>. 59 identify, //!< The DistanceTrigger is in <em>identify-mode</em>. 60 exclude //!< The DistanceTrigger is in <em>exclude-mode</em>. 61 }; 65 62 66 63 /** … … 113 110 { return this->distance_; } 114 111 115 void setBeaconModeDirect( distanceMultiTriggerBeaconMode::Value mode); // Set the beacon mode.112 void setBeaconModeDirect(DistanceMultiTriggerBeaconMode mode); // Set the beacon mode. 116 113 /** 117 114 @brief Get the beacon mode. 118 115 @return Returns the mode as an enum. 119 116 */ 120 inline distanceMultiTriggerBeaconMode::Value getBeaconModeDirect(void) const117 inline DistanceMultiTriggerBeaconMode getBeaconModeDirect(void) const 121 118 { return this->beaconMode_; } 122 119 void setBeaconMode(const std::string& mode); // Set the beacon mode. … … 149 146 float distance_; //!< The distance at which the DistanceMultiTrigger triggers. 150 147 151 distanceMultiTriggerBeaconMode::Value beaconMode_; //!< The beacon mode, the DistanceMultiTrigger is in.148 DistanceMultiTriggerBeaconMode beaconMode_; //!< The beacon mode, the DistanceMultiTrigger is in. 152 149 std::string targetName_; //!< The target name, used in <em>single-target</em> mode. 153 150 ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons. -
code/branches/cpp11_v3/src/modules/objects/triggers/DistanceTrigger.cc
r11054 r11068 158 158 ClassTreeMask targetMask = this->targetMask_; 159 159 // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons. 160 if(this->beaconMode_ == distanceTriggerBeaconMode::identify)160 if(this->beaconMode_ == DistanceTriggerBeaconMode::identify) 161 161 targetMask = this->beaconMask_; 162 162 … … 167 167 168 168 // If the DistanceTrigger is in identify-mode and the DistanceTriggerBeacon attached to the object has the wrong name we ignore it. 169 if(this->beaconMode_ == distanceTriggerBeaconMode::identify)169 if(this->beaconMode_ == DistanceTriggerBeaconMode::identify) 170 170 { 171 171 if(entity->getName() != this->targetName_) … … 177 177 178 178 // If the DistanceTrigger is in exclude mode and the DistanceTriggerBeacon attached to the object has the right name, we ignore it. 179 if(this->beaconMode_ == distanceTriggerBeaconMode::exclude)179 if(this->beaconMode_ == DistanceTriggerBeaconMode::exclude) 180 180 { 181 181 … … 202 202 { 203 203 // Change the entity to the parent of the DistanceTriggerBeacon (if in identify-mode), which is the entity to which the beacon is attached. 204 if(this->beaconMode_ == distanceTriggerBeaconMode::identify)204 if(this->beaconMode_ == DistanceTriggerBeaconMode::identify) 205 205 entity = entity->getParent(); 206 206 … … 228 228 The mode as an enum. 229 229 */ 230 void DistanceTrigger::setBeaconModeDirect( distanceTriggerBeaconMode::Value mode)230 void DistanceTrigger::setBeaconModeDirect(DistanceTriggerBeaconMode mode) 231 231 { 232 232 this->beaconMode_ = mode; … … 243 243 switch(this->getBeaconModeDirect()) 244 244 { 245 case distanceTriggerBeaconMode::off :245 case DistanceTriggerBeaconMode::off : 246 246 return DistanceTrigger::beaconModeOff_s; 247 case distanceTriggerBeaconMode::identify:247 case DistanceTriggerBeaconMode::identify: 248 248 return DistanceTrigger::beaconModeIdentify_s; 249 case distanceTriggerBeaconMode::exclude:249 case DistanceTriggerBeaconMode::exclude: 250 250 return DistanceTrigger::beaconModeExlcude_s; 251 251 default : … … 264 264 { 265 265 if(mode == DistanceTrigger::beaconModeOff_s) 266 this->setBeaconModeDirect( distanceTriggerBeaconMode::off);266 this->setBeaconModeDirect(DistanceTriggerBeaconMode::off); 267 267 else if(mode == DistanceTrigger::beaconModeIdentify_s) 268 this->setBeaconModeDirect( distanceTriggerBeaconMode::identify);268 this->setBeaconModeDirect(DistanceTriggerBeaconMode::identify); 269 269 else if(mode == DistanceTrigger::beaconModeExlcude_s) 270 this->setBeaconModeDirect( distanceTriggerBeaconMode::exclude);270 this->setBeaconModeDirect(DistanceTriggerBeaconMode::exclude); 271 271 else 272 272 orxout(internal_error, context::triggers) << "Invalid beacon mode in DistanceTrigger." << endl; … … 282 282 Returns true if it is triggered ,false if not. 283 283 */ 284 bool DistanceTrigger::isTriggered(TriggerMode ::Valuemode)284 bool DistanceTrigger::isTriggered(TriggerMode mode) 285 285 { 286 286 if (Trigger::isTriggered(mode)) -
code/branches/cpp11_v3/src/modules/objects/triggers/DistanceTrigger.h
r9667 r11068 55 55 @ingroup NormalTrigger 56 56 */ 57 namespace distanceTriggerBeaconMode 58 { 59 enum Value { 60 off, 61 identify, 62 exclude 63 }; 64 } 57 enum class DistanceTriggerBeaconMode { 58 off, 59 identify, 60 exclude 61 }; 65 62 66 63 /** … … 118 115 { return this->distance_; } 119 116 120 void setBeaconModeDirect( distanceTriggerBeaconMode::Value mode); // Set the beacon mode.117 void setBeaconModeDirect(DistanceTriggerBeaconMode mode); // Set the beacon mode. 121 118 /** 122 119 @brief Get the beacon mode. 123 120 @return Returns the mode as an enum. 124 121 */ 125 inline distanceTriggerBeaconMode::Value getBeaconModeDirect(void) const122 inline DistanceTriggerBeaconMode getBeaconModeDirect(void) const 126 123 { return this->beaconMode_; } 127 124 void setBeaconMode(const std::string& mode); // Set the beacon mode. … … 144 141 145 142 protected: 146 virtual bool isTriggered(TriggerMode ::Value mode); // Check whether the DistanceTrigger is triggered.143 virtual bool isTriggered(TriggerMode mode) override; // Check whether the DistanceTrigger is triggered. 147 144 /** 148 145 @brief Notifies interested parties about a change of the DistanceTrigger's target mask. … … 160 157 float distance_; //!< The range of the DistanceTrigger. 161 158 162 distanceTriggerBeaconMode::Value beaconMode_; //!< The beacon mode.159 DistanceTriggerBeaconMode beaconMode_; //!< The beacon mode. 163 160 std::string targetName_; //!< The name a DistanceTriggerBeacon needs to have to make the DistanceTrigger react to it if in beacon-mode. 164 161 ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons. -
code/branches/cpp11_v3/src/modules/objects/triggers/EventTrigger.cc
r9667 r11068 79 79 It should be triggered if it is triggered according just to its sub-triggers and if the last event that came in was an event that changed from not triggered to triggered. 80 80 */ 81 bool EventTrigger::isTriggered(TriggerMode ::Valuemode)81 bool EventTrigger::isTriggered(TriggerMode mode) 82 82 { 83 83 if (Trigger::isTriggered(mode)) -
code/branches/cpp11_v3/src/modules/objects/triggers/EventTrigger.h
r9667 r11068 84 84 85 85 protected: 86 virtual bool isTriggered(TriggerMode ::Value mode); // Check whether the EventTrigger should be triggered.86 virtual bool isTriggered(TriggerMode mode) override; // Check whether the EventTrigger should be triggered. 87 87 88 88 private: -
code/branches/cpp11_v3/src/modules/objects/triggers/Trigger.cc
r11057 r11068 193 193 Returns true if the Trigger should be triggered and false if not. 194 194 */ 195 bool Trigger::isTriggered(TriggerMode ::Valuemode)195 bool Trigger::isTriggered(TriggerMode mode) 196 196 { 197 197 // If the trigger has sub-triggers. -
code/branches/cpp11_v3/src/modules/objects/triggers/Trigger.h
r11057 r11068 104 104 inline bool isTriggered() 105 105 { return this->isTriggered(this->mode_); } 106 virtual bool isTriggered(TriggerMode ::Valuemode); // Check whether the Trigger should be triggered, given only its sub-triggers, given a specific mode.106 virtual bool isTriggered(TriggerMode mode); // Check whether the Trigger should be triggered, given only its sub-triggers, given a specific mode. 107 107 virtual void triggered(bool bIsTriggered); // Fires an event with the input triggered state. 108 108 -
code/branches/cpp11_v3/src/modules/objects/triggers/TriggerBase.h
r11058 r11068 52 52 @ingroup Triggers 53 53 */ 54 namespaceTriggerMode54 enum class TriggerMode 55 55 { 56 enum Value 57 { 58 EventTriggerAND, //!< The <em>and</em> mode. The trigger can only trigger if all the children are active. 59 EventTriggerOR, //!< The <em>or</em> mode. The trigger can only trigger if at least one child is active. 60 EventTriggerXOR, //!< The <em>xor</em> mode. The trigger can only trigger if exactly one child is active. 61 }; 62 } 56 EventTriggerAND, //!< The <em>and</em> mode. The trigger can only trigger if all the children are active. 57 EventTriggerOR, //!< The <em>or</em> mode. The trigger can only trigger if at least one child is active. 58 EventTriggerXOR, //!< The <em>xor</em> mode. The trigger can only trigger if exactly one child is active. 59 }; 63 60 64 61 /** … … 157 154 @param mode The mode of the trigger. 158 155 */ 159 inline void setMode(TriggerMode ::Valuemode) //!< Get the mode of the trigger.156 inline void setMode(TriggerMode mode) //!< Get the mode of the trigger. 160 157 { this->mode_ = mode; } 161 158 const std::string& getModeString(void) const; … … 164 161 @return Returns and Enum for the mode of the trigger. 165 162 */ 166 inline TriggerMode ::ValuegetMode(void) const163 inline TriggerMode getMode(void) const 167 164 { return mode_; } 168 165 … … 210 207 211 208 bool bInvertMode_; //!< Bool for the invert-mode, if true the trigger is inverted. 212 TriggerMode ::Valuemode_; //!< The mode of the trigger.209 TriggerMode mode_; //!< The mode of the trigger. 213 210 214 211 TriggerBase* parent_; //!< The parent of this trigger. -
code/branches/cpp11_v3/src/modules/overlays/OverlayText.cc
r11054 r11068 42 42 RegisterClass(OverlayText); 43 43 44 static_assert((int)Ogre::TextAreaOverlayElement::Left == (int)OverlayText:: Left, "check enum");45 static_assert((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText:: Center, "check enum");46 static_assert((int)Ogre::TextAreaOverlayElement::Right == (int)OverlayText:: Right, "check enum");44 static_assert((int)Ogre::TextAreaOverlayElement::Left == (int)OverlayText::Alignment::Left, "check enum"); 45 static_assert((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Alignment::Center, "check enum"); 46 static_assert((int)Ogre::TextAreaOverlayElement::Right == (int)OverlayText::Alignment::Right, "check enum"); 47 47 48 48 OverlayText::OverlayText(Context* context) … … 85 85 { 86 86 if (alignment == "right") 87 this->setAlignment(OverlayText:: Right);87 this->setAlignment(OverlayText::Alignment::Right); 88 88 else if (alignment == "center") 89 this->setAlignment(OverlayText:: Center);89 this->setAlignment(OverlayText::Alignment::Center); 90 90 else // "left" and default 91 this->setAlignment(OverlayText:: Left);91 this->setAlignment(OverlayText::Alignment::Left); 92 92 } 93 93 … … 111 111 void OverlayText::sizeChanged() 112 112 { 113 if (this->rotState_ == Horizontal)113 if (this->rotState_ == RotationState::Horizontal) 114 114 this->overlay_->setScale(size_.y * sizeCorrection_.y, size_.y * sizeCorrection_.y); 115 else if (this->rotState_ == Vertical)115 else if (this->rotState_ == RotationState::Vertical) 116 116 this->overlay_->setScale(size_.y / (sizeCorrection_.y * sizeCorrection_.y), size_.y * sizeCorrection_.y); 117 117 else -
code/branches/cpp11_v3/src/modules/overlays/OverlayText.h
r11054 r11068 42 42 { 43 43 public: 44 enum Alignment44 enum class Alignment 45 45 { 46 46 Left, -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDRadar.cc
r11054 r11068 65 65 this->setMaximumDotSize3D(0.07f); 66 66 67 this->shapeMaterials_[RadarViewable:: Dot] = "RadarDot.png";68 this->shapeMaterials_[RadarViewable:: Triangle] = "RadarTriangle.png";69 this->shapeMaterials_[RadarViewable::S quare] = "RadarSquare.png";67 this->shapeMaterials_[RadarViewable::Shape::Dot] = "RadarDot.png"; 68 this->shapeMaterials_[RadarViewable::Shape::Triangle] = "RadarTriangle.png"; 69 this->shapeMaterials_[RadarViewable::Shape::Square] = "RadarSquare.png"; 70 70 this->owner_ = nullptr; 71 71 -
code/branches/cpp11_v3/src/modules/overlays/stats/CreateLines.h
r5980 r11068 29 29 30 30 #include "overlays/OverlaysPrereqs.h" 31 32 #include <string> 31 33 32 34 namespace orxonox -
code/branches/cpp11_v3/src/modules/pickup/Pickup.cc
r9667 r11068 78 78 void Pickup::initialize(void) 79 79 { 80 this->activationType_ = pickupActivationType::immediate;81 this->durationType_ = pickupDurationType::once;80 this->activationType_ = PickupActivationType::immediate; 81 this->durationType_ = PickupDurationType::once; 82 82 } 83 83 … … 105 105 switch(this->getActivationType()) 106 106 { 107 case pickupActivationType::immediate:107 case PickupActivationType::immediate: 108 108 return activationTypeImmediate_s; 109 case pickupActivationType::onUse:109 case PickupActivationType::onUse: 110 110 return activationTypeOnUse_s; 111 111 default: … … 124 124 switch(this->getDurationType()) 125 125 { 126 case pickupDurationType::once:126 case PickupDurationType::once: 127 127 return durationTypeOnce_s; 128 case pickupDurationType::continuous:128 case PickupDurationType::continuous: 129 129 return durationTypeContinuous_s; 130 130 default: … … 142 142 { 143 143 if(type == Pickup::activationTypeImmediate_s) 144 this->setActivationType( pickupActivationType::immediate);144 this->setActivationType(PickupActivationType::immediate); 145 145 else if(type == Pickup::activationTypeOnUse_s) 146 this->setActivationType( pickupActivationType::onUse);146 this->setActivationType(PickupActivationType::onUse); 147 147 else 148 148 orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl; … … 158 158 { 159 159 if(type == Pickup::durationTypeOnce_s) 160 this->setDurationType( pickupDurationType::once);160 this->setDurationType(PickupDurationType::once); 161 161 else if(type == Pickup::durationTypeContinuous_s) 162 this->setDurationType( pickupDurationType::continuous);162 this->setDurationType(PickupDurationType::continuous); 163 163 else 164 164 orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl; -
code/branches/cpp11_v3/src/modules/pickup/Pickup.h
r11054 r11068 53 53 @ingroup Pickup 54 54 */ 55 namespace pickupActivationType55 enum class PickupActivationType 56 56 { 57 enum Value 58 { 59 immediate, //!< Means that the @ref orxonox::Pickup "Pickup" will be used immediately after pickup. 60 onUse, //!< Means that the @ref orxonox::Pickup "Pickup" will be used at a later point trough some external influence. 61 }; 62 } 57 immediate, //!< Means that the @ref orxonox::Pickup "Pickup" will be used immediately after pickup. 58 onUse, //!< Means that the @ref orxonox::Pickup "Pickup" will be used at a later point trough some external influence. 59 }; 63 60 64 61 /** … … 68 65 @ingroup Pickup 69 66 */ 70 namespace pickupDurationType67 enum class PickupDurationType 71 68 { 72 enum Value 73 { 74 once, //!< Means that the @ref orxonox::Pickup "Pickup" will be used only once at a singular time instant. 75 continuous, //!< Means that the @ref orxonox::Pickup "Pickup" will be used over a continuous timespan. 76 }; 77 } 69 once, //!< Means that the @ref orxonox::Pickup "Pickup" will be used only once at a singular time instant. 70 continuous, //!< Means that the @ref orxonox::Pickup "Pickup" will be used over a continuous timespan. 71 }; 78 72 79 73 /** … … 112 106 @return Returns the activation type of the Pickup. 113 107 */ 114 inline pickupActivationType::Value getActivationType(void) const108 inline PickupActivationType getActivationType(void) const 115 109 { return this->activationType_; } 116 110 /** … … 118 112 @return Returns the duration type of the Pickup. 119 113 */ 120 inline pickupDurationType::Value getDurationType(void) const114 inline PickupDurationType getDurationType(void) const 121 115 { return this->durationType_; } 122 116 … … 129 123 */ 130 124 inline bool isImmediate(void) const 131 { return this->getActivationType() == pickupActivationType::immediate; }125 { return this->getActivationType() == PickupActivationType::immediate; } 132 126 /** 133 127 @brief Get whether the activation type is 'onUse'. … … 135 129 */ 136 130 inline bool isOnUse(void) const 137 { return this->getActivationType() == pickupActivationType::onUse; }131 { return this->getActivationType() == PickupActivationType::onUse; } 138 132 /** 139 133 @brief Get whether the duration type is 'once'. … … 141 135 */ 142 136 inline bool isOnce(void) const 143 { return this->getDurationType() == pickupDurationType::once; }137 { return this->getDurationType() == PickupDurationType::once; } 144 138 /** 145 139 @brief Get whether the duration type is 'continuous'. … … 147 141 */ 148 142 inline bool isContinuous(void) const 149 { return this->getDurationType() == pickupDurationType::continuous; }143 { return this->getDurationType() == PickupDurationType::continuous; } 150 144 151 145 virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around. … … 164 158 @param type The activation type of the Pickup. 165 159 */ 166 inline void setActivationType( pickupActivationType::Value type)160 inline void setActivationType(PickupActivationType type) 167 161 { this->activationType_ = type; } 168 162 /** … … 170 164 @param type The duration type of the Pickup. 171 165 */ 172 inline void setDurationType( pickupDurationType::Value type)166 inline void setDurationType(PickupDurationType type) 173 167 { this->durationType_ = type; } 174 168 … … 180 174 181 175 std::string representationName_; //!< The name of the associated PickupRepresentation. 182 pickupActivationType::Value activationType_; //!< The activation type of the Pickup.183 pickupDurationType::Value durationType_; //!< The duration type of the Pickup.176 PickupActivationType activationType_; //!< The activation type of the Pickup. 177 PickupDurationType durationType_; //!< The duration type of the Pickup. 184 178 185 179 //! Strings for the activation and duration types. -
code/branches/cpp11_v3/src/modules/pickup/items/DronePickup.cc
r11054 r11068 74 74 { 75 75 this->addTarget(ClassIdentifier<Pawn>::getIdentifier()); 76 this->setDurationType( pickupDurationType::once);76 this->setDurationType(PickupDurationType::once); 77 77 this->droneTemplate_ = ""; 78 78 } -
code/branches/cpp11_v3/src/modules/pickup/items/HealthPickup.cc
r11054 r11068 77 77 this->health_ = 0.0f; 78 78 this->healthRate_ = 0.0f; 79 this->healthType_ = pickupHealthType::limited;79 this->healthType_ = PickupHealthType::limited; 80 80 this->maxHealthSave_ = 0.0f; 81 81 this->maxHealthOverwrite_ = 0.0f; … … 127 127 switch(this->getHealthType()) 128 128 { 129 case pickupHealthType::permanent:129 case PickupHealthType::permanent: 130 130 if(pawn->getMaxHealth() < fullHealth) 131 131 pawn->setMaxHealth(fullHealth); 132 case pickupHealthType::limited:132 case PickupHealthType::limited: 133 133 pawn->addHealth(health); 134 134 break; 135 case pickupHealthType::temporary:135 case PickupHealthType::temporary: 136 136 if(pawn->getMaxHealth() > fullHealth) 137 137 { … … 174 174 switch(this->getHealthType()) 175 175 { 176 case pickupHealthType::permanent:176 case PickupHealthType::permanent: 177 177 health = pawn->getHealth()+this->getHealth(); 178 178 if(pawn->getMaxHealth() < health) 179 179 pawn->setMaxHealth(health); 180 case pickupHealthType::limited:180 case PickupHealthType::limited: 181 181 pawn->addHealth(this->getHealth()); 182 182 break; 183 case pickupHealthType::temporary:183 case PickupHealthType::temporary: 184 184 health = pawn->getHealth()+this->getHealth(); 185 185 if(pawn->getMaxHealth() < health) … … 201 201 else 202 202 { 203 if(this->getHealthType() == pickupHealthType::temporary)203 if(this->getHealthType() == PickupHealthType::temporary) 204 204 { 205 205 PickupCarrier* carrier = this->getCarrier(); … … 256 256 switch(this->getHealthType()) 257 257 { 258 case pickupHealthType::limited:258 case PickupHealthType::limited: 259 259 return HealthPickup::healthTypeLimited_s; 260 case pickupHealthType::temporary:260 case PickupHealthType::temporary: 261 261 return HealthPickup::healthTypeTemporary_s; 262 case pickupHealthType::permanent:262 case PickupHealthType::permanent: 263 263 return HealthPickup::healthTypePermanent_s; 264 264 default: … … 308 308 { 309 309 if(type == HealthPickup::healthTypeLimited_s) 310 this->setHealthType( pickupHealthType::limited);310 this->setHealthType(PickupHealthType::limited); 311 311 else if(type == HealthPickup::healthTypeTemporary_s) 312 this->setHealthType( pickupHealthType::temporary);312 this->setHealthType(PickupHealthType::temporary); 313 313 else if(type == HealthPickup::healthTypePermanent_s) 314 this->setHealthType( pickupHealthType::permanent);314 this->setHealthType(PickupHealthType::permanent); 315 315 else 316 316 orxout(internal_error, context::pickups) << "Invalid healthType '" << type << "' in HealthPickup." << endl; -
code/branches/cpp11_v3/src/modules/pickup/items/HealthPickup.h
r9667 r11068 51 51 @ingroup PickupItems 52 52 */ 53 namespace pickupHealthType53 enum class PickupHealthType 54 54 { 55 enum Value 56 { 57 limited, //!< Means that the @ref orxonox::HealthPickup "HealthPickup" only increases the users health to its maximum health. 58 temporary, //!< Means that the @ref orxonox::HealthPickup "HealthPickup" temporarily increases the users health even above its maximum health, but only as long as it is in use. 59 permanent //!< Means that the @ref orxonox::HealthPickup "HealthPickup" increases the users health even above its maximum health and increases the maximum health permanently such that it matches the new health. 60 }; 61 } 55 limited, //!< Means that the @ref orxonox::HealthPickup "HealthPickup" only increases the users health to its maximum health. 56 temporary, //!< Means that the @ref orxonox::HealthPickup "HealthPickup" temporarily increases the users health even above its maximum health, but only as long as it is in use. 57 permanent //!< Means that the @ref orxonox::HealthPickup "HealthPickup" increases the users health even above its maximum health and increases the maximum health permanently such that it matches the new health. 58 }; 62 59 63 60 /** … … 115 112 @return Returns the health type as an enum. 116 113 */ 117 inline pickupHealthType::Value getHealthType(void) const114 inline PickupHealthType getHealthType(void) const 118 115 { return this->healthType_; } 119 116 const std::string& getHealthTypeAsString(void) const; //!< Get the health type of this pickup. … … 127 124 @param type The type of this pickup as an enum. 128 125 */ 129 inline void setHealthType( pickupHealthType::Value type)126 inline void setHealthType(PickupHealthType type) 130 127 { this->healthType_ = type; } 131 128 void setHealthTypeAsString(const std::string& type); //!< Set the type of the HealthPickup. … … 139 136 float maxHealthSave_; //!< Helper to remember what the actual maxHealth of the Pawn was before we changed it. 140 137 float maxHealthOverwrite_; //!< Helper to remember with which value we overwrote the maxHealh, to detect if someone else changed it as well. 141 pickupHealthType::Value healthType_; //!< The type of the HealthPickup.138 PickupHealthType healthType_; //!< The type of the HealthPickup. 142 139 143 140 //! Strings for the health types. -
code/branches/cpp11_v3/src/modules/pickup/items/MetaPickup.cc
r11054 r11068 79 79 this->addTarget(ClassIdentifier<PickupCarrier>::getIdentifier()); 80 80 81 this->setDurationType( pickupDurationType::once);82 this->metaType_ = pickupMetaType::none;81 this->setDurationType(PickupDurationType::once); 82 this->metaType_ = PickupMetaType::none; 83 83 } 84 84 … … 104 104 105 105 // If the MetaPickup transited to used, and the metaType is not none. 106 if(this->isUsed() && this->metaType_ != pickupMetaType::none)106 if(this->isUsed() && this->metaType_ != PickupMetaType::none) 107 107 { 108 108 PickupCarrier* carrier = this->getCarrier(); 109 if(this->getMetaType() != pickupMetaType::none && carrier != nullptr)109 if(this->getMetaType() != PickupMetaType::none && carrier != nullptr) 110 110 { 111 111 // If the metaType is destroyCarrier, then the PickupCarrier is destroyed. 112 if(this->getMetaType() == pickupMetaType::destroyCarrier)112 if(this->getMetaType() == PickupMetaType::destroyCarrier) 113 113 { 114 114 Pawn* pawn = orxonox_cast<Pawn*>(carrier); … … 124 124 125 125 // If the metaType is use, then the Pickupable is set to used. 126 if(this->getMetaType() == pickupMetaType::use && !pickup->isUsed())126 if(this->getMetaType() == PickupMetaType::use && !pickup->isUsed()) 127 127 { 128 128 pickup->setUsed(true); 129 129 } 130 130 // If the metaType is drop, then the Pickupable is dropped. 131 else if(this->getMetaType() == pickupMetaType::drop)131 else if(this->getMetaType() == PickupMetaType::drop) 132 132 { 133 133 pickup->drop(); 134 134 } 135 135 // If the metaType is destroy, then the Pickupable is destroyed. 136 else if(this->getMetaType() == pickupMetaType::destroy)136 else if(this->getMetaType() == PickupMetaType::destroy) 137 137 { 138 138 pickup->Pickupable::destroy(); … … 154 154 switch(this->getMetaType()) 155 155 { 156 case pickupMetaType::none:156 case PickupMetaType::none: 157 157 return MetaPickup::metaTypeNone_s; 158 case pickupMetaType::use:158 case PickupMetaType::use: 159 159 return MetaPickup::metaTypeUse_s; 160 case pickupMetaType::drop:160 case PickupMetaType::drop: 161 161 return MetaPickup::metaTypeDrop_s; 162 case pickupMetaType::destroy:162 case PickupMetaType::destroy: 163 163 return MetaPickup::metaTypeDestroy_s; 164 case pickupMetaType::destroyCarrier:164 case PickupMetaType::destroyCarrier: 165 165 return MetaPickup::metaTypeDestroyCarrier_s; 166 166 default: … … 179 179 if(type == MetaPickup::metaTypeNone_s) 180 180 { 181 this->setMetaType( pickupMetaType::none);181 this->setMetaType(PickupMetaType::none); 182 182 } 183 183 else if(type == MetaPickup::metaTypeUse_s) 184 184 { 185 this->setMetaType( pickupMetaType::use);185 this->setMetaType(PickupMetaType::use); 186 186 } 187 187 else if(type == MetaPickup::metaTypeDrop_s) 188 188 { 189 this->setMetaType( pickupMetaType::drop);189 this->setMetaType(PickupMetaType::drop); 190 190 } 191 191 else if(type == MetaPickup::metaTypeDestroy_s) 192 192 { 193 this->setMetaType( pickupMetaType::destroy);193 this->setMetaType(PickupMetaType::destroy); 194 194 } 195 195 else if(type == MetaPickup::metaTypeDestroyCarrier_s) 196 196 { 197 this->setMetaType( pickupMetaType::destroyCarrier);197 this->setMetaType(PickupMetaType::destroyCarrier); 198 198 } 199 199 else -
code/branches/cpp11_v3/src/modules/pickup/items/MetaPickup.h
r9667 r11068 48 48 @ingroup PickupItems 49 49 */ 50 namespace pickupMetaType50 enum class PickupMetaType 51 51 { 52 enum Value 53 { 54 none, //!< The @ref orxonox::MetaPickup "MetaPickup" does nothing. 55 use, //!< The @ref orxonox::MetaPickup "MetaPickup" uses all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables". 56 drop, //!< The @ref orxonox::MetaPickup "MetaPickup" drops all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables". 57 destroy, //!< The @ref orxonox::MetaPickup "MetaPickup" destroys all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables". 58 destroyCarrier //!< The @ref orxonox::MetaPickup "MetaPickup" destroys the @ref orxonox::PickupCarrier "PickupCarrier". 59 }; 60 } 52 none, //!< The @ref orxonox::MetaPickup "MetaPickup" does nothing. 53 use, //!< The @ref orxonox::MetaPickup "MetaPickup" uses all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables". 54 drop, //!< The @ref orxonox::MetaPickup "MetaPickup" drops all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables". 55 destroy, //!< The @ref orxonox::MetaPickup "MetaPickup" destroys all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables". 56 destroyCarrier //!< The @ref orxonox::MetaPickup "MetaPickup" destroys the @ref orxonox::PickupCarrier "PickupCarrier". 57 }; 61 58 62 59 /** … … 100 97 @return Returns an enum with the meta type of the MetaPickup. 101 98 */ 102 inline pickupMetaType::Value getMetaType(void) const99 inline PickupMetaType getMetaType(void) const 103 100 { return this->metaType_; } 104 101 const std::string& getMetaTypeAsString(void) const; //!< Get the meta type of this MetaPickup. … … 109 106 @param type The meta type as an enum. 110 107 */ 111 inline void setMetaType( pickupMetaType::Value type)108 inline void setMetaType(PickupMetaType type) 112 109 { this->metaType_ = type; } 113 110 void setMetaTypeAsString(const std::string& type); //!< Set the meta type of this MetaPickup. … … 116 113 void initialize(void); //!< Initializes the member variables. 117 114 118 pickupMetaType::Value metaType_; //!< The meta type of the MetaPickup, determines which actions are taken.115 PickupMetaType metaType_; //!< The meta type of the MetaPickup, determines which actions are taken. 119 116 120 117 //! Static strings for the meta types. -
code/branches/cpp11_v3/src/modules/portals/PortalEndPoint.cc
r11054 r11068 57 57 58 58 this->setRadarObjectColour(ColourValue::White); 59 this->setRadarObjectShape(RadarViewable:: Dot);59 this->setRadarObjectShape(RadarViewable::Shape::Dot); 60 60 this->setRadarVisibility(true); 61 61 if( GameMode::isMaster() ) -
code/branches/cpp11_v3/src/modules/questsystem/GlobalQuest.cc
r11054 r11068 177 177 The player. 178 178 */ 179 QuestStatus ::ValueGlobalQuest::getStatus(const PlayerInfo* player) const179 QuestStatus GlobalQuest::getStatus(const PlayerInfo* player) const 180 180 { 181 181 assert(player); … … 200 200 Returns false if player is nullptr. 201 201 */ 202 bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus ::Value& status)202 bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus & status) 203 203 { 204 204 assert(player); -
code/branches/cpp11_v3/src/modules/questsystem/GlobalQuest.h
r11054 r11068 103 103 virtual bool isCompletable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be completed. 104 104 105 virtual QuestStatus ::ValuegetStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player.105 virtual QuestStatus getStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player. 106 106 107 virtual bool setStatus(PlayerInfo* player, const QuestStatus ::Value& status) override; //!< Sets the status for a specific player.107 virtual bool setStatus(PlayerInfo* player, const QuestStatus & status) override; //!< Sets the status for a specific player. 108 108 109 109 private: 110 110 std::set<PlayerInfo*> players_; //!< The set of players which possess this Quest. 111 QuestStatus ::Valuestatus_; //!< The status of this Quest.111 QuestStatus status_; //!< The status of this Quest. 112 112 std::list<QuestEffect*> rewards_; //!< Reward QuestEffects only invoked on the player completing the Quest. 113 113 -
code/branches/cpp11_v3/src/modules/questsystem/LocalQuest.cc
r11054 r11068 168 168 Returns the status of the Quest for the input player. 169 169 */ 170 QuestStatus ::ValueLocalQuest::getStatus(const PlayerInfo* player) const170 QuestStatus LocalQuest::getStatus(const PlayerInfo* player) const 171 171 { 172 172 assert(player); 173 173 174 std::map<const PlayerInfo*, QuestStatus ::Value>::const_iterator it = this->playerStatus_.find(player);174 std::map<const PlayerInfo*, QuestStatus>::const_iterator it = this->playerStatus_.find(player); 175 175 if (it != this->playerStatus_.end()) // If there is a player in the map. 176 176 return it->second; … … 190 190 Returns false if player is nullptr. 191 191 */ 192 bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus ::Value& status)192 bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus & status) 193 193 { 194 194 assert(player); -
code/branches/cpp11_v3/src/modules/questsystem/LocalQuest.h
r11054 r11068 97 97 virtual bool isCompletable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be completed. 98 98 99 virtual QuestStatus ::ValuegetStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player.100 virtual bool setStatus(PlayerInfo* player, const QuestStatus ::Value& status) override; //!< Sets the status for a specific player.99 virtual QuestStatus getStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player. 100 virtual bool setStatus(PlayerInfo* player, const QuestStatus & status) override; //!< Sets the status for a specific player. 101 101 102 102 private: 103 std::map<const PlayerInfo*, QuestStatus ::Value> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.103 std::map<const PlayerInfo*, QuestStatus> playerStatus_; //!< List of the status for each player, with the Player-pointer as key. 104 104 105 105 }; -
code/branches/cpp11_v3/src/modules/questsystem/Quest.h
r11054 r11068 51 51 @ingroup Questsystem 52 52 */ 53 namespaceQuestStatus53 enum class QuestStatus 54 54 { 55 enum Value 56 { 57 Inactive, //!< The @ref orxonox::Quest "Quest" is inactive. 58 Active, //!< The @ref orxonox::Quest "Quest" is active. 59 Failed, //!< The @ref orxonox::Quest "Quest" has been failed. 60 Completed //!< The @ref orxonox::Quest "Quest" has been completed. 61 }; 62 } 55 Inactive, //!< The @ref orxonox::Quest "Quest" is inactive. 56 Active, //!< The @ref orxonox::Quest "Quest" is active. 57 Failed, //!< The @ref orxonox::Quest "Quest" has been failed. 58 Completed //!< The @ref orxonox::Quest "Quest" has been completed. 59 }; 63 60 64 61 /** … … 143 140 { return this->completeEffects_; } 144 141 145 virtual QuestStatus ::ValuegetStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.146 virtual bool setStatus(PlayerInfo* player, const QuestStatus ::Value& status) = 0; //!< Changes the status for a specific player.142 virtual QuestStatus getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player. 143 virtual bool setStatus(PlayerInfo* player, const QuestStatus & status) = 0; //!< Changes the status for a specific player. 147 144 148 145 private: -
code/branches/cpp11_v3/src/modules/questsystem/QuestDescription.cc
r9667 r11068 119 119 } 120 120 121 NotificationListener::sendNotification(message, QuestDescription::SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());121 NotificationListener::sendNotification(message, QuestDescription::SENDER, NotificationMessageType::info, NotificationSendMode::network, player->getClientID()); 122 122 return true; 123 123 } -
code/branches/cpp11_v3/src/modules/questsystem/QuestEffectBeacon.h
r11054 r11068 50 50 @ingroup Questsystem 51 51 */ 52 namespaceQuestEffectBeaconStatus52 enum class QuestEffectBeaconStatus 53 53 { 54 enum Value 55 { 56 Inactive, //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is inactive. 57 Active //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is active. 58 }; 59 } 54 Inactive, //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is inactive. 55 Active //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is active. 56 }; 60 57 61 58 /** … … 125 122 std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player. 126 123 int times_; //!< Number of times the beacon can be exectued. 127 QuestEffectBeaconStatus ::Valuestatus_; //!< The status of the QuestEffectBeacon, Can be eighter active or inactive.124 QuestEffectBeaconStatus status_; //!< The status of the QuestEffectBeacon, Can be eighter active or inactive. 128 125 129 126 bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed. -
code/branches/cpp11_v3/src/modules/questsystem/QuestHint.cc
r11054 r11068 92 92 93 93 // Find the player. 94 std::map<const PlayerInfo*, QuestHintStatus ::Value>::const_iterator it = this->playerStatus_.find(player);94 std::map<const PlayerInfo*, QuestHintStatus>::const_iterator it = this->playerStatus_.find(player); 95 95 if (it != this->playerStatus_.end()) // If the player is in the map. 96 return it->second;96 return (it->second == QuestHintStatus::Active); 97 97 98 return QuestStatus::Inactive;98 return false; 99 99 } 100 100 -
code/branches/cpp11_v3/src/modules/questsystem/QuestHint.h
r11054 r11068 50 50 @ingroup Questsystem 51 51 */ 52 namespaceQuestHintStatus52 enum class QuestHintStatus 53 53 { 54 enum Value 55 { 56 Inactive, //!< The @ref orxonox::QuestHint "QuestHint" is inactive. 57 Active //!< The @ref orxonox::QuestHint "QuestHint" is active. 58 }; 59 } 54 Inactive, //!< The @ref orxonox::QuestHint "QuestHint" is inactive. 55 Active //!< The @ref orxonox::QuestHint "QuestHint" is active. 56 }; 60 57 61 58 /** … … 101 98 private: 102 99 Quest* quest_; //!< The Quest the QuestHint belongs to. 103 std::map<const PlayerInfo*, QuestHintStatus ::Value> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.100 std::map<const PlayerInfo*, QuestHintStatus> playerStatus_; //!< List of the states for each player, with the Player-pointer as key. 104 101 105 102 }; // tolua_export -
code/branches/cpp11_v3/src/modules/questsystem/QuestListener.h
r11054 r11068 50 50 @ingroup Questsystem 51 51 */ 52 namespaceQuestListenerMode52 enum class QuestListenerMode 53 53 { 54 enum Value 55 { 56 All, //!< Listens to all events. 57 Start, //!< Only listens to events pertaining the starting of @ref orxonox::Quest "Quests". 58 Fail, //!< Only listens to events pertaining the failing of @ref orxonox::Quest "Quests". 59 Complete //!< Only listens to events pertaining the completing of @ref orxonox::Quest "Quests". 60 }; 61 } 54 All, //!< Listens to all events. 55 Start, //!< Only listens to events pertaining the starting of @ref orxonox::Quest "Quests". 56 Fail, //!< Only listens to events pertaining the failing of @ref orxonox::Quest "Quests". 57 Complete //!< Only listens to events pertaining the completing of @ref orxonox::Quest "Quests". 58 }; 62 59 63 60 /** … … 103 100 104 101 private: 105 QuestListenerMode ::Valuemode_; //!< The mode of the QuestListener.102 QuestListenerMode mode_; //!< The mode of the QuestListener. 106 103 Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to. 107 104 -
code/branches/cpp11_v3/src/modules/towerdefense/TowerDefense.cc
r11054 r11068 355 355 fields_[i][j]->create(fields.at(pos), fields.at(pos+1)); 356 356 pos += 2; 357 if (fields_[i][j]->getType() == START)357 if (fields_[i][j]->getType() == TowerDefenseFieldType::START) 358 358 { 359 359 startCoord.Set(i,j); … … 379 379 TDCoordinate* nextCoord = new TDCoordinate(0,0); 380 380 381 if (thisField->getType() != STREET && thisField->getType() !=START)381 if (thisField->getType() != TowerDefenseFieldType::STREET && thisField->getType() != TowerDefenseFieldType::START) 382 382 { 383 383 return nullptr; -
code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseEnemy.cc
r11058 r11068 27 27 RegisterObject(TowerDefenseEnemy); 28 28 29 this->setCollisionType(WorldEntity:: Dynamic);29 this->setCollisionType(WorldEntity::CollisionType::Dynamic); 30 30 //needed to keep track of the PlayerStats coded in TowerDefense.h 31 31 this->td = orxonox_cast<TowerDefense*>(this->getGametype()); -
code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseField.cc
r11054 r11068 50 50 51 51 tower_ = nullptr; 52 type_ = FREE;52 type_ = TowerDefenseFieldType::FREE; 53 53 center_ = nullptr; 54 54 upgrade_ = 0; … … 186 186 modelGround_->setMeshSource("TD_F1.mesh"); 187 187 tower_ = nullptr; 188 type_ = FREE;188 type_ = TowerDefenseFieldType::FREE; 189 189 setUpgrade(0); 190 190 setAngle(orientation); … … 195 195 modelGround_->setMeshSource("TD_S5.mesh"); 196 196 tower_ = nullptr; 197 type_ = START;197 type_ = TowerDefenseFieldType::START; 198 198 setUpgrade(0); 199 199 setAngle(orientation); … … 205 205 modelGround_->setMeshSource("TD_S4.mesh"); 206 206 tower_ = nullptr; 207 type_ = END;207 type_ = TowerDefenseFieldType::END; 208 208 setUpgrade(0); 209 209 setAngle(orientation); … … 214 214 modelGround_->setMeshSource("TD_S1.mesh"); 215 215 tower_ = nullptr; 216 type_ = STREET;216 type_ = TowerDefenseFieldType::STREET; 217 217 setUpgrade(0); 218 218 setAngle(orientation); … … 223 223 modelGround_->setMeshSource("TD_S2.mesh"); 224 224 tower_ = nullptr; 225 type_ = STREET;225 type_ = TowerDefenseFieldType::STREET; 226 226 setUpgrade(0); 227 227 setAngle(orientation); … … 232 232 modelGround_->setMeshSource("TD_S3.mesh"); 233 233 tower_ = nullptr; 234 type_ = STREET;234 type_ = TowerDefenseFieldType::STREET; 235 235 setUpgrade(0); 236 236 setAngle(orientation); … … 242 242 modelObject_->setMeshSource("TD_O1.mesh"); 243 243 tower_ = nullptr; 244 type_ = OBSTACLE;244 type_ = TowerDefenseFieldType::OBSTACLE; 245 245 setUpgrade(0); 246 246 setAngle(orientation); … … 254 254 tower_ = new TowerDefenseTower(center_->getContext()); 255 255 attach(tower_); 256 type_ = T OWER;256 type_ = TowerDefenseFieldType::TOWER; 257 257 setUpgrade(upgrade); 258 258 if (upgrade_ > 0 && modelObject_ != nullptr) -
code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseField.h
r11054 r11068 46 46 namespace orxonox 47 47 { 48 enum TowerDefenseFieldType48 enum class TowerDefenseFieldType 49 49 { 50 50 FREE, … … 64 64 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 65 65 const bool isFree() const 66 { return type_== FREE; }66 { return type_==TowerDefenseFieldType::FREE; } 67 67 virtual void create(char object, char param); 68 68 virtual void setCenterpoint(TowerDefenseCenterpoint* center); -
code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseTower.cc
r11054 r11068 26 26 RegisterObject(TowerDefenseTower); 27 27 game_ =nullptr; 28 this->setCollisionType(WorldEntity:: None);28 this->setCollisionType(WorldEntity::CollisionType::None); 29 29 upgrade = 1; 30 30 -
code/branches/cpp11_v3/src/modules/weapons/projectiles/GravityBomb.cc
r10622 r11068 28 28 this->timeToLife_= LIFETIME; 29 29 this->setCollisionResponse(false); 30 this->setCollisionType(WorldEntity:: Dynamic);30 this->setCollisionType(WorldEntity::CollisionType::Dynamic); 31 31 this->enableCollisionCallback(); 32 32 -
code/branches/cpp11_v3/src/modules/weapons/projectiles/GravityBombField.cc
r11054 r11068 41 41 //Make the Field visible on Radar and minimap. 42 42 this->setRadarObjectColour(ColourValue(1.0, 0.0, 0.2,1)); // Red 43 this->setRadarObjectShape(RadarViewable:: Dot);43 this->setRadarObjectShape(RadarViewable::Shape::Dot); 44 44 this->setRadarObjectScale(1.0f); 45 45 -
code/branches/cpp11_v3/src/modules/weapons/projectiles/IceGunProjectile.cc
r11052 r11068 120 120 Vector3 offset = this->getWorldPosition() - otherObject->getWorldPosition(); 121 121 freezer->setPosition(Vector3(0,0,0)); 122 freezer->translate(offset, WorldEntity:: World);122 freezer->translate(offset, WorldEntity::TransformSpace::World); 123 123 // Start the freezing effect. 124 124 freezer->startFreezing(); -
code/branches/cpp11_v3/src/modules/weapons/projectiles/LightningGunProjectile.cc
r10622 r11068 48 48 this->textureIndex_ = 1; 49 49 this->setMass(2); 50 this->setCollisionType( Dynamic);50 this->setCollisionType(CollisionType::Dynamic); 51 51 this->maxTextureIndex_ = 8; 52 52 this->textureTimer_.setTimer(0.01f, true, createExecutor(createFunctor(&LightningGunProjectile::changeTexture, this))); -
code/branches/cpp11_v3/src/modules/weapons/projectiles/Projectile.cc
r11054 r11068 57 57 this->enableCollisionCallback(); 58 58 this->setCollisionResponse(false); 59 this->setCollisionType( Dynamic);59 this->setCollisionType(CollisionType::Dynamic); 60 60 61 61 // Create a sphere collision shape and attach it to the projectile. -
code/branches/cpp11_v3/src/modules/weapons/projectiles/Rocket.cc
r11054 r11068 70 70 if (GameMode::isMaster()) 71 71 { 72 this->setCollisionType(WorldEntity:: Kinematic);72 this->setCollisionType(WorldEntity::CollisionType::Kinematic); 73 73 this->setVelocity(0,0,-100); 74 74 … … 92 92 this->enableCollisionCallback(); 93 93 this->setCollisionResponse(false); 94 this->setCollisionType( Kinematic);94 this->setCollisionType(CollisionType::Kinematic); 95 95 96 96 // Add collision shape … … 128 128 129 129 this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange 130 this->setRadarObjectShape(RadarViewable:: Triangle);130 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 131 131 this->setRadarObjectScale(0.5f); 132 132 } -
code/branches/cpp11_v3/src/modules/weapons/projectiles/RocketOld.cc
r11054 r11068 70 70 if (GameMode::isMaster()) 71 71 { 72 this->setCollisionType(WorldEntity:: Kinematic);72 this->setCollisionType(WorldEntity::CollisionType::Kinematic); 73 73 this->setVelocity(0,0,-100); 74 74 … … 92 92 this->enableCollisionCallback(); 93 93 this->setCollisionResponse(false); 94 this->setCollisionType( Kinematic);94 this->setCollisionType(CollisionType::Kinematic); 95 95 96 96 // Add collision shape … … 128 128 129 129 this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange 130 this->setRadarObjectShape(RadarViewable:: Triangle);130 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 131 131 this->setRadarObjectScale(0.5f); 132 132 } -
code/branches/cpp11_v3/src/modules/weapons/projectiles/SimpleRocket.cc
r11052 r11068 70 70 if (GameMode::isMaster()) 71 71 { 72 this->setCollisionType(WorldEntity:: Kinematic);72 this->setCollisionType(WorldEntity::CollisionType::Kinematic); 73 73 this->fuel_ = true; 74 74 … … 87 87 this->enableCollisionCallback(); 88 88 this->setCollisionResponse(false); 89 this->setCollisionType( Kinematic);89 this->setCollisionType(CollisionType::Kinematic); 90 90 91 91 // Add collision shape. … … 101 101 102 102 this->setRadarObjectColour(ColourValue(1.0, 1.0, 0.0)); // yellow 103 this->setRadarObjectShape(RadarViewable:: Triangle);103 this->setRadarObjectShape(RadarViewable::Shape::Triangle); 104 104 this->setRadarObjectScale(0.5f); 105 105 }
Note: See TracChangeset
for help on using the changeset viewer.