comparison mm7_6.cpp @ 1936:68f2d9d3a1d9

MSVS 2010 project file
author Ritor1
date Thu, 24 Oct 2013 15:24:14 +0600
parents af38275939cc
children 4ed7d18abe93
comparison
equal deleted inserted replaced
1930:df4e27f2a541 1936:68f2d9d3a1d9
1070 pIconsFrameTable->InitializeAnimation(uIconID_TurnStop); 1070 pIconsFrameTable->InitializeAnimation(uIconID_TurnStop);
1071 pIconsFrameTable->InitializeAnimation(uIconID_TurnStart); 1071 pIconsFrameTable->InitializeAnimation(uIconID_TurnStart);
1072 pIconsFrameTable->InitializeAnimation(uIconID_CharacterFrame); 1072 pIconsFrameTable->InitializeAnimation(uIconID_CharacterFrame);
1073 } 1073 }
1074 1074
1075 //----- (0042F4DA) --------------------------------------------------------
1076 int _42F4DA_check_actor_proximity()
1077 {
1078 signed int v0; // edi@1
1079 Actor *v1; // esi@4
1080 int v2; // ebx@5
1081 int v3; // eax@5
1082 int v4; // ebx@5
1083 unsigned int v5; // ecx@5
1084 int v6; // edx@6
1085 unsigned int v7; // edx@8
1086 unsigned int v8; // edx@10
1087 __int16 v9; // ax@12
1088 signed int result; // eax@20
1089 int v11; // [sp+Ch] [bp-10h]@5
1090 int v12; // [sp+10h] [bp-Ch]@5
1091 signed int v13; // [sp+14h] [bp-8h]@3
1092
1093 v0 = 5120;
1094 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
1095 v0 = 2560;
1096 v13 = 0;
1097 if ( (signed int)uNumActors <= 0 )
1098 {
1099 result = 0;
1100 }
1101 else
1102 {
1103 v1 = pActors.data();
1104 while ( 1 )
1105 {
1106 v2 = abs(v1->vInitialPosition.x - pParty->vPosition.x);
1107 v11 = abs(v1->vInitialPosition.y - pParty->vPosition.y);
1108 v12 = abs(v1->vInitialPosition.z - pParty->vPosition.z);
1109 v3 = v2;
1110 v4 = v11;
1111 v5 = v12;
1112 if ( v3 < v11 )
1113 {
1114 v6 = v3;
1115 v3 = v11;
1116 v4 = v6;
1117 }
1118 if ( v3 < v12 )
1119 {
1120 v7 = v3;
1121 v3 = v12;
1122 v5 = v7;
1123 }
1124 if ( v4 < (signed int)v5 )
1125 {
1126 v8 = v5;
1127 v5 = v4;
1128 v4 = v8;
1129 }
1130 if ( (signed int)(((unsigned int)(11 * v4) >> 5) + (v5 >> 2) + v3) < v0 )
1131 {
1132 v9 = v1->uAIState;
1133 if ( v1->uAIState != 5 )
1134 {
1135 if ( v9 != 4
1136 && v9 != 11
1137 && v9 != 19
1138 && v9 != 17
1139 && (BYTE2(v1->uAttributes) & 8 || ((Actor *)nullptr)->GetActorsRelation( v1)) )
1140 break;
1141 }
1142 }
1143 ++v13;
1144 ++v1;
1145 if ( v13 >= (signed int)uNumActors )
1146 return 0;
1147 }
1148 result = 1;
1149 }
1150 return result;
1151 }
1152
1153 //----- (0042F7EB) -------------------------------------------------------- 1075 //----- (0042F7EB) --------------------------------------------------------
1154 bool __fastcall sub_42F7EB_DropItemAt(unsigned int uSpriteID, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9) 1076 bool __fastcall sub_42F7EB_DropItemAt(unsigned int uSpriteID, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9)
1155 { 1077 {
1156 unsigned __int16 pObjectDescID; // ax@7 1078 unsigned __int16 pObjectDescID; // ax@7
1157 SpriteObject pSpellObject; // [sp+Ch] [bp-78h]@1 1079 SpriteObject pSpellObject; // [sp+Ch] [bp-78h]@1