Mercurial > mm7
comparison stru6.cpp @ 564:8b77231088d8
Moon Temple doesn't crash
author | Nomad |
---|---|
date | Tue, 05 Mar 2013 01:45:15 +0200 |
parents | cb0ad52d6a26 |
children | f51373466911 |
comparison
equal
deleted
inserted
replaced
562:b23f19fc0d1b | 564:8b77231088d8 |
---|---|
739 } | 739 } |
740 | 740 |
741 //----- (004A81CA) -------------------------------------------------------- | 741 //----- (004A81CA) -------------------------------------------------------- |
742 bool stru6::_4A81CA(SpriteObject *a2) | 742 bool stru6::_4A81CA(SpriteObject *a2) |
743 { | 743 { |
744 stru6 *v2; // ebx@1 | 744 //stru6 *v2; // ebx@1 |
745 int result; // eax@1 | 745 int result; // eax@1 |
746 int v4; // eax@27 | 746 int v4; // eax@27 |
747 unsigned int diffuse; // esi@41 | 747 //unsigned int diffuse; // esi@41 |
748 int v6; // ecx@49 | 748 //int v6; // ecx@49 |
749 int v7; // eax@54 | 749 int v7; // eax@54 |
750 int v8; // eax@55 | 750 int v8; // eax@55 |
751 char v9; // zf@56 | 751 char v9; // zf@56 |
752 int v10; // eax@59 | 752 int v10; // eax@59 |
753 int v11; // eax@61 | 753 int v11; // eax@61 |
758 int v16; // eax@118 | 758 int v16; // eax@118 |
759 int v17; // eax@139 | 759 int v17; // eax@139 |
760 int v18; // eax@140 | 760 int v18; // eax@140 |
761 int v19; // eax@141 | 761 int v19; // eax@141 |
762 int v20; // eax@151 | 762 int v20; // eax@151 |
763 unsigned int v21; // [sp-8h] [bp-20h]@66 | 763 //unsigned int v21; // [sp-8h] [bp-20h]@66 |
764 SpriteObject *v22; // [sp-8h] [bp-20h]@81 | 764 //SpriteObject *v22; // [sp-8h] [bp-20h]@81 |
765 unsigned int v23; // [sp-4h] [bp-1Ch]@4 | 765 //unsigned int v23; // [sp-4h] [bp-1Ch]@4 |
766 unsigned int v24; // [sp-4h] [bp-1Ch]@5 | 766 //unsigned int v24; // [sp-4h] [bp-1Ch]@5 |
767 unsigned int v25; // [sp-4h] [bp-1Ch]@30 | 767 unsigned int v25; // [sp-4h] [bp-1Ch]@30 |
768 unsigned int v26; // [sp-4h] [bp-1Ch]@57 | 768 //unsigned int v26; // [sp-4h] [bp-1Ch]@57 |
769 unsigned int v27; // [sp-4h] [bp-1Ch]@66 | 769 //unsigned int v27; // [sp-4h] [bp-1Ch]@66 |
770 int v28; // [sp-4h] [bp-1Ch]@81 | 770 //int v28; // [sp-4h] [bp-1Ch]@81 |
771 unsigned int v29; // [sp+0h] [bp-18h]@4 | 771 //unsigned int v29; // [sp+0h] [bp-18h]@4 |
772 unsigned int v30; // [sp+0h] [bp-18h]@5 | 772 //unsigned int v30; // [sp+0h] [bp-18h]@5 |
773 int v31; // [sp+0h] [bp-18h]@30 | 773 //int v31; // [sp+0h] [bp-18h]@30 |
774 unsigned int v32; // [sp+0h] [bp-18h]@45 | 774 //unsigned int v32; // [sp+0h] [bp-18h]@45 |
775 float v33; // [sp+0h] [bp-18h]@57 | 775 //float v33; // [sp+0h] [bp-18h]@57 |
776 float v34; // [sp+0h] [bp-18h]@66 | 776 //float v34; // [sp+0h] [bp-18h]@66 |
777 signed int v35; // [sp+0h] [bp-18h]@81 | 777 //signed int v35; // [sp+0h] [bp-18h]@81 |
778 char pContainer[7]; // [sp+10h] [bp-8h]@81 | 778 char pContainer[7]; // [sp+10h] [bp-8h]@81 |
779 | 779 |
780 __debugbreak(); // need to refactor carefully & collect data | 780 //__debugbreak(); // need to refactor carefully & collect data |
781 v2 = this; | 781 //v2 = this; |
782 result = a2->uType; | 782 result = a2->uType; |
783 | |
784 switch (a2->uType) | |
785 { | |
786 case 550: | |
787 case 555: return true; | |
788 | |
789 case 556: | |
790 AddMobileLight(a2, 0xFF0000, 256); | |
791 return false; | |
792 | |
793 case 600: | |
794 AddMobileLight(a2, 0xFF3C1E, 256); | |
795 return true; | |
796 | |
797 case 1010: // Fire Bolt | |
798 { | |
799 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1); | |
800 AddMobileLight(a2, 0xFF3C1E, 256); | |
801 } | |
802 return false; | |
803 | |
804 case 1011: // Fire Bolt impact | |
805 { | |
806 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); | |
807 AddMobileLight(a2, 0xFF3C1E, 256); | |
808 } | |
809 return false; | |
810 | |
811 case 1050: // Fireball | |
812 { | |
813 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1); | |
814 AddMobileLight(a2, 0xFF3C1E, 256); | |
815 } | |
816 return false; | |
817 | |
818 case 1051: // Fireball hit | |
819 { | |
820 AddMobileLight(a2, 0xFF3C1E, 256); | |
821 if (pRenderer->pRenderD3D) | |
822 { | |
823 result = a2->field_58_pid & 7; | |
824 if ((a2->field_58_pid & 7) != OBJECT_Actor && | |
825 (a2->field_58_pid & 7) != OBJECT_Item) | |
826 { | |
827 if (field_204 != 4) | |
828 { | |
829 field_204++; | |
830 _4A7688_fireball_collision_particle(a2); | |
831 } | |
832 return false; | |
833 } | |
834 } | |
835 } | |
836 return true; | |
837 | |
838 case 1081: | |
839 { | |
840 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 300.0); | |
841 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 250.0); | |
842 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 200.0); | |
843 AddMobileLight(a2, 0xFF3C1E, 256); | |
844 } | |
845 return false; | |
846 | |
847 case 2101: | |
848 { | |
849 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xC8C814, uTextureID_effpar1, 200.0); | |
850 AddMobileLight(a2, 0xC8C814, 256); | |
851 } | |
852 return false; | |
853 | |
854 case 3060: // Acid Burst | |
855 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0AB450, uTextureID_effpar1); | |
856 AddMobileLight(a2, 0x0AB450, 256); | |
857 return false; | |
858 | |
859 case 9000: return true; | |
860 } | |
861 | |
783 if ( result <= 545 ) | 862 if ( result <= 545 ) |
784 { | 863 { |
864 __debugbreak(); // find out what kind of spells are these | |
785 if ( result != 545 ) | 865 if ( result != 545 ) |
786 { | 866 { |
787 result -= 500; | 867 result -= 500; |
788 switch ( result ) | 868 switch ( result ) |
789 { | 869 { |
790 case 0: | 870 case 0: |
791 case 30: | 871 case 30: |
792 v29 = this->uTextureID_effpar1; | 872 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xAAAFF, uTextureID_effpar1); |
793 v23 = 0xAAAFFu; | 873 return false; |
794 goto LABEL_8; | |
795 case 1: | 874 case 1: |
796 case 31: | 875 case 31: |
797 v30 = this->uTextureID_effpar1; | 876 _4A75CC_single_spell_collision_particle(a2, 0xAAAFF, uTextureID_effpar1); |
798 v24 = 0xAAAFFu; | 877 return true; |
799 goto LABEL_32; | |
800 case 5: | 878 case 5: |
801 v29 = this->uTextureID_effpar1; | 879 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x5C310E, uTextureID_effpar1); |
802 v23 = 0x5C310Eu; | 880 return false; |
803 goto LABEL_8; | |
804 case 10: | 881 case 10: |
805 v29 = this->uTextureID_effpar1; | 882 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1); |
806 v23 = 0xFF3C1Eu; | 883 return false; |
807 goto LABEL_8; | |
808 case 15: | 884 case 15: |
809 v29 = this->uTextureID_effpar1; | 885 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0062D0, uTextureID_effpar1); |
810 v23 = 0x62D0u; | 886 return false; |
811 goto LABEL_8; | |
812 case 16: | 887 case 16: |
813 v30 = this->uTextureID_effpar1; | 888 _4A75CC_single_spell_collision_particle(a2, 0x0062D0, uTextureID_effpar1); |
814 v24 = 0x62D0u; | 889 return false; |
815 goto LABEL_32; | |
816 case 20: | 890 case 20: |
817 v29 = this->uTextureID_effpar1; | 891 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0AB450, uTextureID_effpar1); |
818 v23 = 0xAB450u; | 892 return false; |
819 goto LABEL_8; | |
820 case 21: | 893 case 21: |
821 v30 = this->uTextureID_effpar1; | 894 _4A75CC_single_spell_collision_particle(a2, 0x0AB450, uTextureID_effpar1); |
822 v24 = 0xAB450u; | 895 return false; |
823 goto LABEL_32; | |
824 case 25: | 896 case 25: |
825 v29 = this->uTextureID_effpar1; | 897 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xC8C805, uTextureID_effpar1); |
826 v23 = 0xC8C805u; | 898 return false; |
827 goto LABEL_8; | |
828 case 26: | 899 case 26: |
829 v30 = this->uTextureID_effpar1; | 900 _4A75CC_single_spell_collision_particle(a2, 0xC8C805, uTextureID_effpar1); |
830 v24 = 0xC8C805u; | 901 return false; |
831 goto LABEL_32; | |
832 case 35: | 902 case 35: |
833 v29 = this->uTextureID_effpar1; | 903 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFFFFFF, uTextureID_effpar1); |
834 v23 = 0xFFFFFFu; | 904 return false; |
835 goto LABEL_8; | |
836 case 36: | 905 case 36: |
837 v30 = this->uTextureID_effpar1; | 906 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar1); |
838 goto LABEL_154; | 907 return false; |
908 | |
839 case 40: | 909 case 40: |
840 goto LABEL_17; | 910 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1); |
911 return false; | |
912 | |
841 case 11: | 913 case 11: |
842 goto LABEL_31; | 914 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); |
915 return false; | |
843 case 6: | 916 case 6: |
844 goto LABEL_115; | 917 _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1); |
918 return false; | |
919 | |
845 case 41: | 920 case 41: |
846 goto LABEL_164; | 921 _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1); |
922 return false; | |
847 default: | 923 default: |
848 goto LABEL_168; | 924 return false; |
849 } | 925 } |
850 goto LABEL_168; | 926 return false; |
851 } | 927 } |
852 goto LABEL_34; | 928 return true; |
853 } | 929 } |
930 | |
854 if ( result <= 4051 ) | 931 if ( result <= 4051 ) |
855 { | 932 { |
856 if ( result != 4051 ) | 933 if ( result != 4051 ) |
857 { | 934 { |
858 if ( result <= 2031 ) | 935 if ( result <= 2031 ) |
859 { | 936 { |
860 if ( result != 2031 ) | 937 if ( result != 2031 ) |
861 { | 938 { |
862 if ( result <= 1051 ) | 939 if ( result < 1051 ) |
863 { | 940 { |
864 if ( result == 1051 ) | 941 if ( result < 600 ) |
865 { | 942 { |
866 result = AddMobileLight(a2, 0xFF3C1Eu, 256);// fireball hit | 943 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); |
867 if ( pRenderer->pRenderD3D ) | 944 return false; |
868 { | |
869 result = a2->field_58_pid & 7; | |
870 if ( result != 3 ) | |
871 { | |
872 if ( result != 2 ) | |
873 { | |
874 result = (bool)&v2->field_204; | |
875 v6 = v2->field_204; | |
876 if ( v6 != 4 ) | |
877 { | |
878 *(int *)result = v6 + 1; | |
879 _4A7688_fireball_collision_particle(a2); | |
880 } | |
881 goto LABEL_168; | |
882 } | |
883 } | |
884 } | |
885 goto LABEL_34; | |
886 } | |
887 if ( result <= 600 ) | |
888 { | |
889 if ( result == 600 ) | |
890 { | |
891 result = AddMobileLight(a2, 0xFF3C1Eu, 256); | |
892 goto LABEL_34; | |
893 } | |
894 result -= 550; | |
895 if ( !result ) | |
896 { | |
897 LABEL_34: | |
898 LOBYTE(result) = 1; | |
899 return result; | |
900 } | |
901 v4 = result - 1; | |
902 if ( v4 ) | |
903 { | |
904 result = v4 - 4; | |
905 if ( !result ) | |
906 goto LABEL_34; | |
907 --result; | |
908 if ( !result ) | |
909 { | |
910 v31 = 256; | |
911 v25 = 0xFF0000u; | |
912 LABEL_144: | |
913 result = AddMobileLight(a2, v25, v31); | |
914 goto LABEL_168; | |
915 } | |
916 goto LABEL_168; | |
917 } | |
918 goto LABEL_31; | |
919 } | 945 } |
920 if ( result < 811 ) | 946 if ( result < 811 ) |
921 goto LABEL_168; | 947 return false; |
922 if ( result <= 814 ) | 948 if ( result <= 814 ) |
923 goto LABEL_34; | 949 return true; |
924 if ( result == 1010 ) | 950 return false; |
925 goto LABEL_41; // fire strike | 951 |
926 if ( result != 1011 ) | |
927 { | |
928 if ( result != 1050 ) | |
929 goto LABEL_168; | |
930 LABEL_41: | |
931 diffuse = 0xFF3C1Eu; | |
932 LABEL_42: | |
933 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc( | |
934 a2, | |
935 diffuse, | |
936 this->uTextureID_effpar1); | |
937 LABEL_43: | |
938 v31 = 256; | |
939 LABEL_44: | |
940 v25 = diffuse; | |
941 goto LABEL_144; | |
942 } | |
943 v32 = this->uTextureID_effpar1; | |
944 diffuse = 0xFF3C1Eu; | |
945 LABEL_146: | |
946 _4A75CC_single_spell_collision_particle(a2, diffuse, v32); | |
947 goto LABEL_43; | |
948 } | 952 } |
949 if ( result <= 1081 ) | 953 if ( result <= 1081 ) |
950 { | 954 { |
951 if ( result == 1081 ) | 955 if (result != 1081) |
952 { | |
953 diffuse = 0xFF3C1Eu; | |
954 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning( | |
955 a2, | |
956 0xFF3C1Eu, | |
957 this->uTextureID_effpar1, | |
958 300.0); | |
959 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning( | |
960 a2, | |
961 0xFF3C1Eu, | |
962 v2->uTextureID_effpar1, | |
963 250.0); | |
964 v33 = 200.0; | |
965 v26 = v2->uTextureID_effpar1; | |
966 } | |
967 else | |
968 { | 956 { |
969 result -= 1060; | 957 result -= 1060; |
970 if ( !result ) | 958 if ( !result ) |
971 goto LABEL_34; | 959 return true; |
972 v7 = result - 1; | 960 v7 = result - 1; |
973 if ( v7 ) | 961 if ( v7 ) |
974 { | 962 { |
975 v8 = v7 - 9; | 963 v8 = v7 - 9; |
976 if ( !v8 ) | 964 if ( !v8 ) |
977 { | 965 { |
978 LABEL_31: | 966 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); |
979 v30 = this->uTextureID_effpar1; | 967 return false; |
980 v24 = 0xFF3C1Eu; | |
981 goto LABEL_32; | |
982 } | 968 } |
983 result = v8 - 10; | 969 result = v8 - 10; |
984 v9 = result == 0; | 970 v9 = result == 0; |
985 LABEL_129: | 971 //LABEL_129: |
986 if ( v9 ) | 972 if ( v9 ) |
987 goto LABEL_34; | 973 return true; |
988 goto LABEL_168; | 974 return false; |
989 } | 975 } |
990 diffuse = 0xFF3C1Eu; | 976 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 250.0); |
991 v33 = 250.0; | 977 AddMobileLight(a2, 0xFF3C1E, 256); |
992 v26 = this->uTextureID_effpar1; | 978 return false; |
993 } | 979 } |
994 LABEL_84: | 980 //LABEL_84: |
995 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, diffuse, v26, v33); | 981 // _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, diffuse, v26, v33); |
996 goto LABEL_43; | 982 //goto LABEL_43; |
983 return false; | |
997 } | 984 } |
998 v10 = result - 1090; | 985 v10 = result - 1090; |
999 if ( v10 ) | 986 if ( v10 ) |
1000 { | 987 { |
1001 result = v10 - 10; | 988 result = v10 - 10; |
1002 if ( !result ) | 989 if ( !result ) |
1003 goto LABEL_34; | 990 return true; |
1004 v11 = result - 1; | 991 v11 = result - 1; |
1005 if ( !v11 ) | 992 if ( !v11 ) |
1006 { | 993 { |
1007 diffuse = 0xFF3C1Eu; | 994 //diffuse = 0xFF3C1E; |
1008 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1Eu, this->uTextureID_effpar1); | 995 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); |
1009 v32 = v2->uTextureID_effpar1; | 996 //v32 = v2->uTextureID_effpar1; |
1010 goto LABEL_146; | 997 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); |
998 //goto LABEL_43; | |
999 AddMobileLight(a2, 0xFF3C1E, 256); | |
1000 return false; | |
1011 } | 1001 } |
1012 result = v11 - 929; | 1002 result = v11 - 929; |
1013 if ( result ) | 1003 if ( result ) |
1014 goto LABEL_168; | 1004 return false; |
1015 LABEL_63: | 1005 //LABEL_63: |
1016 if ( !pRenderer->pRenderD3D ) | 1006 if ( !pRenderer->pRenderD3D ) |
1017 goto LABEL_34; | 1007 return true; |
1018 _4A78AE_sparks_spell(a2); | 1008 _4A78AE_sparks_spell(a2); |
1019 v31 = 128; | 1009 AddMobileLight(a2, 0x64640F, 128); |
1020 v25 = 0x64640Fu; | 1010 return false; |
1021 goto LABEL_144; | |
1022 } | 1011 } |
1023 v34 = 250.0; | 1012 |
1024 v27 = this->uTextureID_effpar1; | 1013 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1Eu, uTextureID_effpar1, 250.0); |
1025 v21 = 0xFF3C1Eu; | 1014 return false; |
1026 LABEL_117: | |
1027 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, v21, v27, v34); | |
1028 goto LABEL_168; | |
1029 } | 1015 } |
1030 goto LABEL_67; | 1016 //goto LABEL_67; |
1031 } | 1017 } |
1032 if ( result <= 3060 ) | 1018 if ( result < 3060 ) |
1033 { | 1019 { |
1034 if ( result == 3060 ) | 1020 if ( result < 2101 ) |
1035 goto LABEL_171; // acid burst | |
1036 if ( result <= 2101 ) | |
1037 { | 1021 { |
1038 if ( result == 2101 ) | |
1039 { | |
1040 v33 = 200.0; | |
1041 v26 = this->uTextureID_effpar1; | |
1042 goto LABEL_83; | |
1043 } | |
1044 if ( result != 2060 ) | 1022 if ( result != 2060 ) |
1045 { | 1023 { |
1046 if ( result != 2061 ) | 1024 if ( result != 2061 ) |
1047 { | 1025 { |
1048 if ( result <= 2079 ) | 1026 if ( result <= 2079 ) |
1049 goto LABEL_168; | 1027 return false; |
1050 if ( result <= 2081 ) | 1028 if ( result <= 2081 ) |
1051 { | 1029 { |
1052 if ( pRenderer->pRenderD3D ) | 1030 if ( pRenderer->pRenderD3D ) |
1053 _4A77FD_some_stuff_d3d(a2); | 1031 _4A77FD_some_stuff_d3d(a2); |
1054 else | 1032 else |
1055 _4A80DC_some_stuff_sw(a2); | 1033 _4A80DC_some_stuff_sw(a2); |
1056 goto LABEL_168; | 1034 return false; |
1057 } | 1035 } |
1058 v9 = result == 2100; | 1036 v9 = result == 2100; |
1059 goto LABEL_129; | 1037 if ( v9 ) |
1038 return true; | |
1039 return false; | |
1060 } | 1040 } |
1061 LABEL_67: | 1041 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xC8C814, uTextureID_effpar2, 200.0); |
1062 v33 = 200.0; | 1042 AddMobileLight(a2, 0xC8C814, 256); |
1063 v26 = this->uTextureID_effpar2; | 1043 return false; |
1064 LABEL_83: | |
1065 diffuse = (unsigned int)&pDecalBuilder->std__vector_pDecals[557].pVertices[57].vWorldViewPosition.y; | |
1066 goto LABEL_84; | |
1067 } | 1044 } |
1068 if ( !pRenderer->pRenderD3D ) | 1045 if ( !pRenderer->pRenderD3D ) |
1069 goto LABEL_34; | 1046 return true; |
1070 memcpy(pContainer, "sp18h1", 7); | 1047 memcpy(pContainer, "sp18h1", 7); |
1071 pRnd->SetRange(1, 6); | 1048 pRnd->SetRange(1, 6); |
1072 pContainer[5] = pRnd->GetInRange() + '0'; | 1049 pContainer[5] = pRnd->GetInRange() + '0'; |
1073 v35 = pBitmaps_LOD->LoadTexture(pContainer, TEXTURE_DEFAULT); | 1050 AddProjectile(a2, 100, pBitmaps_LOD->LoadTexture(pContainer)); |
1074 v28 = 100; | 1051 return false; |
1075 v22 = a2; | |
1076 LABEL_157: | |
1077 AddProjectile(v22, v28, v35); | |
1078 goto LABEL_168; | |
1079 } | 1052 } |
1080 v12 = result - 3010; | 1053 v12 = result - 3010; |
1081 if ( !v12 ) | 1054 if ( !v12 ) |
1082 { | 1055 { |
1083 LABEL_171: | 1056 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xAB450, uTextureID_effpar1); |
1084 diffuse = 0xAB450u; | 1057 AddMobileLight(a2, 0xAB450, 256); |
1085 goto LABEL_42; | 1058 return false; |
1086 } | 1059 } |
1087 v13 = v12 - 1; | 1060 v13 = v12 - 1; |
1088 if ( !v13 ) | 1061 if ( !v13 ) |
1089 { | 1062 { |
1090 v32 = this->uTextureID_effpar1; | 1063 _4A75CC_single_spell_collision_particle(a2, 0xAB450, uTextureID_effpar1); |
1091 diffuse = 0xAB450u; | 1064 AddMobileLight(a2, 0xAB450, 256); |
1092 goto LABEL_146; | 1065 return false; |
1093 } | 1066 } |
1094 result = v13 - 19; | 1067 result = v13 - 19; |
1095 if ( !result ) | 1068 if ( !result ) |
1096 goto LABEL_34; | 1069 return true; |
1097 --result; | 1070 --result; |
1098 if ( result ) | 1071 if ( result ) |
1099 goto LABEL_168; | 1072 return false; |
1100 LABEL_89: | 1073 |
1101 v32 = this->uTextureID_effpar1; | 1074 _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1); |
1102 diffuse = 0x9EB9F1u; | 1075 AddMobileLight(a2, 0x9EB9F1, 256); |
1103 goto LABEL_146; | 1076 return false; |
1104 } | 1077 } |
1105 if ( result > 4000 ) | 1078 if ( result > 4000 ) |
1106 { | 1079 { |
1107 result -= 4030; | 1080 result -= 4030; |
1108 if ( !result || (--result, !result) ) | 1081 if ( !result || (--result, !result) ) |
1109 goto LABEL_34; | 1082 return true; |
1110 result -= 19; | 1083 result -= 19; |
1111 v9 = result == 0; | 1084 v9 = result == 0; |
1112 goto LABEL_129; | 1085 if ( v9 ) |
1086 return true; | |
1087 return false; | |
1113 } | 1088 } |
1114 if ( result == 4000 ) | 1089 if ( result == 4000 ) |
1115 { | 1090 { |
1116 if ( !pRenderer->pRenderD3D ) | 1091 if ( !pRenderer->pRenderD3D ) |
1117 goto LABEL_34; | 1092 return true; |
1118 _4A7C07(a2); | 1093 _4A7C07(a2); |
1119 goto LABEL_168; | 1094 return false; |
1120 } | 1095 } |
1121 result -= 3061; | 1096 result -= 3061; |
1122 if ( !result || (result -= 29) == 0 ) | 1097 if ( !result || (result -= 29) == 0 ) |
1123 goto LABEL_34; | 1098 return true; |
1124 v14 = result - 1; | 1099 v14 = result - 1; |
1125 if ( !v14 ) | 1100 if ( !v14 ) |
1126 goto LABEL_89; | 1101 { |
1102 _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1); | |
1103 AddMobileLight(a2, 0x9EB9F1, 256); | |
1104 return false; | |
1105 } | |
1127 result = v14 - 1; | 1106 result = v14 - 1; |
1128 if ( result ) | 1107 if ( result ) |
1129 goto LABEL_168; | 1108 return false; |
1130 v29 = this->uTextureID_effpar1; | 1109 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x9EB9F1, uTextureID_effpar1); |
1131 v23 = 0x9EB9F1u; | 1110 return false; |
1132 LABEL_8: | 1111 } |
1133 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, v23, v29); | 1112 _4A7948_mind_blast_after_effect(a2); |
1134 goto LABEL_168; | 1113 return false; |
1135 } | |
1136 goto LABEL_122; | |
1137 } | 1114 } |
1138 if ( result <= 7090 ) | 1115 if ( result <= 7090 ) |
1139 { | 1116 { |
1140 if ( result == 7090 ) | 1117 if ( result == 7090 ) |
1141 goto LABEL_34; | 1118 return true; |
1142 if ( result > 6030 ) | 1119 if ( result > 6030 ) |
1143 { | 1120 { |
1144 if ( result > 6091 ) | 1121 if ( result > 6091 ) |
1145 { | 1122 { |
1146 result -= 6100; | 1123 result -= 6100; |
1147 if ( !result ) | 1124 if ( !result ) |
1148 goto LABEL_34; | 1125 return true; |
1149 result -= 930; | 1126 result -= 930; |
1150 if ( result ) | 1127 if ( result ) |
1151 { | 1128 { |
1152 --result; | 1129 --result; |
1153 if ( result ) | 1130 if (!result) |
1154 goto LABEL_168; | 1131 _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1); |
1155 v30 = this->uTextureID_effpar1; | 1132 return false; |
1156 v24 = 0xF00000u; | |
1157 goto LABEL_32; | |
1158 } | 1133 } |
1159 goto LABEL_63; | 1134 if ( !pRenderer->pRenderD3D ) |
1135 return true; | |
1136 _4A78AE_sparks_spell(a2); | |
1137 AddMobileLight(a2, 0x64640F, 128); | |
1138 return false; | |
1160 } | 1139 } |
1161 if ( result != 6091 ) | 1140 if ( result != 6091 ) |
1162 { | 1141 { |
1163 result -= 6040; | 1142 result -= 6040; |
1164 if ( !result || (result -= 20) == 0 || (result -= 10) == 0 ) | 1143 if ( !result || (result -= 20) == 0 || (result -= 10) == 0 ) |
1165 goto LABEL_34; | 1144 return true; |
1166 result -= 20; | 1145 result -= 20; |
1167 v9 = result == 0; | 1146 v9 = result == 0; |
1168 goto LABEL_129; | 1147 if ( v9 ) |
1148 return true; | |
1149 return false; | |
1169 } | 1150 } |
1170 } | 1151 } |
1171 else | 1152 else |
1172 { | 1153 { |
1173 if ( result == 6030 ) | 1154 if ( result == 6030 ) |
1174 goto LABEL_34; | 1155 return true; |
1175 if ( result <= 4091 ) | 1156 if ( result <= 4091 ) |
1176 { | 1157 { |
1177 if ( result != 4091 ) | 1158 if ( result != 4091 ) |
1178 { | 1159 { |
1179 result -= 4070; | 1160 result -= 4070; |
1180 if ( !result ) | 1161 if ( !result ) |
1181 goto LABEL_34; | 1162 return true; |
1182 v15 = result - 1; | 1163 v15 = result - 1; |
1183 if ( v15 ) | 1164 if ( v15 ) |
1184 { | 1165 { |
1185 result = v15 - 9; | 1166 result = v15 - 9; |
1186 if ( !result ) | 1167 if ( !result ) |
1187 goto LABEL_34; | 1168 return true; |
1188 result -= 10; | 1169 result -= 10; |
1189 if ( !result ) | 1170 if ( !result ) |
1190 { | 1171 { |
1191 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc( | 1172 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1); |
1192 a2, | 1173 return true; |
1193 0x7E7E7Eu, | |
1194 this->uTextureID_effpar1); | |
1195 goto LABEL_34; | |
1196 } | 1174 } |
1197 goto LABEL_168; | 1175 return false; |
1198 } | 1176 } |
1199 LABEL_115: | 1177 _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1); |
1200 v30 = this->uTextureID_effpar1; | 1178 return false; |
1201 v24 = 0x5C310Eu; | |
1202 LABEL_32: | |
1203 _4A75CC_single_spell_collision_particle(a2, v24, v30); | |
1204 goto LABEL_168; | |
1205 } | 1179 } |
1206 v34 = 200.0; | 1180 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0x7E7E7E, uTextureID_effpar1, 200.0); |
1207 v27 = this->uTextureID_effpar1; | 1181 return false; |
1208 v21 = 0x7E7E7Eu; | |
1209 goto LABEL_117; | |
1210 } | 1182 } |
1211 v16 = result - 4092; | 1183 v16 = result - 4092; |
1212 if ( !v16 ) | 1184 if ( !v16 ) |
1213 { | 1185 { |
1214 LABEL_17: | 1186 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1); |
1215 v29 = this->uTextureID_effpar1; | 1187 return false; |
1216 v23 = 0x7E7E7Eu; | |
1217 goto LABEL_8; | |
1218 } | 1188 } |
1219 result = v16 - 8; | 1189 result = v16 - 8; |
1220 if ( !result ) | 1190 if ( !result ) |
1221 goto LABEL_168; | 1191 return false; |
1222 result -= 1910; | 1192 result -= 1910; |
1223 if ( !result ) | 1193 if ( !result ) |
1224 goto LABEL_34; | 1194 return true; |
1225 --result; | 1195 --result; |
1226 if ( result ) | 1196 if ( result ) |
1227 goto LABEL_168; | 1197 return false; |
1228 } | 1198 } |
1229 LABEL_122: | 1199 //LABEL_122: |
1230 _4A7948_mind_blast_after_effect(a2); | 1200 _4A7948_mind_blast_after_effect(a2); |
1231 goto LABEL_168; | 1201 return false; |
1232 } | 1202 } |
1233 if ( result <= 9000 ) | 1203 if ( result <= 9000 ) |
1234 { | 1204 { |
1235 if ( result == 9000 ) | |
1236 goto LABEL_34; | |
1237 if ( result <= 8030 ) | 1205 if ( result <= 8030 ) |
1238 { | 1206 { |
1239 if ( result == 8030 ) | 1207 if ( result == 8030 ) |
1240 goto LABEL_34; | 1208 return true; |
1241 v17 = result - 7091; | 1209 v17 = result - 7091; |
1242 if ( v17 ) | 1210 if ( v17 ) |
1243 { | 1211 { |
1244 v18 = v17 - 909; | 1212 v18 = v17 - 909; |
1245 if ( !v18 ) | 1213 if ( !v18 ) |
1246 { | 1214 { |
1247 diffuse = 0xFFFFFFu; | 1215 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFFFFFF, uTextureID_effpar3); |
1248 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc( | 1216 AddMobileLight(a2, 0xFFFFFF, 128); |
1249 a2, | 1217 return false; |
1250 0xFFFFFFu, | |
1251 this->uTextureID_effpar3); | |
1252 v31 = 128; | |
1253 goto LABEL_44; | |
1254 } | 1218 } |
1255 v19 = v18 - 1; | 1219 v19 = v18 - 1; |
1256 if ( v19 ) | 1220 if ( v19 ) |
1257 { | 1221 { |
1258 result = v19 - 9; | 1222 result = v19 - 9; |
1259 if ( !result ) | 1223 if ( !result ) |
1260 { | 1224 { |
1261 v31 = 64; | 1225 AddMobileLight(a2, 0xFFFFFF, 64); |
1262 v25 = 0xFFFFFFu; | 1226 return false; |
1263 goto LABEL_144; | |
1264 } | 1227 } |
1265 goto LABEL_168; | 1228 return false; |
1266 } | 1229 } |
1267 v32 = this->uTextureID_effpar2; | 1230 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar2); |
1268 diffuse = 0xFFFFFFu; | 1231 AddMobileLight(a2, 0xFFFFFF, 256); |
1232 return false; | |
1269 } | 1233 } |
1270 else | 1234 else |
1271 { | 1235 { |
1272 v32 = this->uTextureID_effpar1; | 1236 _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1); |
1273 diffuse = 0xF00000u; | 1237 AddMobileLight(a2, 0xF00000, 256); |
1238 return false; | |
1274 } | 1239 } |
1275 goto LABEL_146; | |
1276 } | 1240 } |
1277 result -= 8040; | 1241 result -= 8040; |
1278 if ( !result || (result -= 20) == 0 ) | 1242 if ( !result || (result -= 20) == 0 ) |
1279 goto LABEL_34; | 1243 return true; |
1280 v20 = result - 30; | 1244 v20 = result - 30; |
1281 if ( v20 ) | 1245 if ( v20 ) |
1282 { | 1246 { |
1283 result = v20 - 1; | 1247 result = v20 - 1; |
1284 if ( result ) | 1248 if ( result ) |
1285 goto LABEL_168; | 1249 return false; |
1286 v30 = this->uTextureID_effpar3; | 1250 |
1287 LABEL_154: | 1251 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar3); |
1288 v24 = 16777215; | 1252 return false; |
1289 goto LABEL_32; | 1253 } |
1290 } | 1254 AddMobileLight(a2, 0xFFFFFFu, 128); |
1291 result = AddMobileLight(a2, 0xFFFFFFu, 128); | |
1292 if ( !pRenderer->pRenderD3D ) | 1255 if ( !pRenderer->pRenderD3D ) |
1293 goto LABEL_34; | 1256 return true; |
1294 v35 = -1; | 1257 AddProjectile(a2, 100, -1); |
1295 v28 = 100; | 1258 return false; |
1296 v22 = a2; | |
1297 goto LABEL_157; | |
1298 } | 1259 } |
1299 if ( result > 9050 ) | 1260 if ( result > 9050 ) |
1300 { | 1261 { |
1301 result -= 9070; | 1262 result -= 9070; |
1302 if ( !result || (result -= 10) == 0 || (--result, !result) ) | 1263 if ( !result || (result -= 10) == 0 || (--result, !result) ) |
1303 goto LABEL_34; | 1264 return true; |
1304 goto LABEL_168; | 1265 return false; |
1305 } | 1266 } |
1306 if ( result == 9050 || (result -= 9010) == 0 || (result -= 20) == 0 || (result -= 10) == 0 ) | 1267 if ( result == 9050 || (result -= 9010) == 0 || (result -= 20) == 0 || (result -= 10) == 0 ) |
1307 goto LABEL_34; | 1268 return true; |
1308 --result; | 1269 --result; |
1309 if ( !result ) | 1270 if ( !result ) |
1310 { | 1271 { |
1311 LABEL_164: | 1272 //LABEL_164: |
1312 v30 = this->uTextureID_effpar1; | 1273 _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1); |
1313 v24 = 0x7E7E7Eu; | 1274 return false; |
1314 goto LABEL_32; | 1275 } |
1315 } | 1276 //LABEL_168: |
1316 LABEL_168: | 1277 return false; |
1317 LOBYTE(result) = 0; | |
1318 return result; | |
1319 } | 1278 } |
1320 | 1279 |
1321 //----- (004A89BD) -------------------------------------------------------- | 1280 //----- (004A89BD) -------------------------------------------------------- |
1322 void stru6::SetPlayerBuffAnim(unsigned __int16 uSpellID, unsigned __int16 uPlayerID) | 1281 void stru6::SetPlayerBuffAnim(unsigned __int16 uSpellID, unsigned __int16 uPlayerID) |
1323 { | 1282 { |