comparison UI/UICharacter.cpp @ 1466:ec79ee6d44ce

Paperdoll shoulder fix
author Ritor1
date Mon, 26 Aug 2013 15:05:15 +0600
parents 090ff42290c4
children 3cda66022a77
comparison
equal deleted inserted replaced
1465:090ff42290c4 1466:ec79ee6d44ce
281 0x7B, 0xD8, 281 0x7B, 0xD8,
282 }; 282 };
283 283
284 int pPaperdoll_BodyX = 481; // 004E4C28 284 int pPaperdoll_BodyX = 481; // 004E4C28
285 int pPaperdoll_BodyY = 0; // 004E4C2C 285 int pPaperdoll_BodyY = 0; // 004E4C2C
286 const int paperdoll_Armor[4][17][2] = //4E4E30 286 const int paperdoll_Armor_Coord[4][17][2] = //4E4E30
287 { 287 {
288 // X Y 288 // X Y
289 0x2C, 0x67, 0x30, 0x69, 0x2D, 0x67, 0x2C, 0x64, 0x14, 0x66, 0x22, 0x67, 0x20, 0x66, 0x25, 0x66, 0x12, 0x66,//Human 289 0x2C, 0x67, 0x30, 0x69, 0x2D, 0x67, 0x2C, 0x64, 0x14, 0x66, 0x22, 0x67, 0x20, 0x66, 0x25, 0x66, 0x12, 0x66,//Human
290 0x0A, 0x66, 0x13, 0x64, 0x0E, 0x64, 0x0A, 0x63, 0x14, 0x66, 0x0A, 0x63, 0x0A, 0x66, 0x25, 0x66, 290 0x0A, 0x66, 0x13, 0x64, 0x0E, 0x64, 0x0A, 0x63, 0x14, 0x66, 0x0A, 0x63, 0x0A, 0x66, 0x25, 0x66,
291 291
296 0x12, 0x8B, 0x11, 0x8A, 0x15, 0x87, 0x09, 0x89, 0x12, 0x87, 0x09, 0x89, 0x12, 0x8B, 0x25, 0x87, 296 0x12, 0x8B, 0x11, 0x8A, 0x15, 0x87, 0x09, 0x89, 0x12, 0x87, 0x09, 0x89, 0x12, 0x8B, 0x25, 0x87,
297 297
298 0x33, 0x90, 0x32, 0x90, 0x34, 0x91, 0x32, 0x8E, 0x21, 0x8B, 0x31, 0x8B, 0x33, 0x8E, 0x2F, 0x8F, 0x16, 0x8D, 298 0x33, 0x90, 0x32, 0x90, 0x34, 0x91, 0x32, 0x8E, 0x21, 0x8B, 0x31, 0x8B, 0x33, 0x8E, 0x2F, 0x8F, 0x16, 0x8D,
299 0x18, 0x8C, 0x19, 0x8C, 0x1B, 0x8E, 0x0C, 0x8C, 0x21, 0x8B, 0x0C, 0x8C, 0x18, 0x8C, 0x2F, 0x8F, 299 0x18, 0x8C, 0x19, 0x8C, 0x1B, 0x8E, 0x0C, 0x8C, 0x21, 0x8B, 0x0C, 0x8C, 0x18, 0x8C, 0x2F, 0x8F,
300 }; 300 };
301 const int paperdoll_shoulder[4][17][2] = //4E5050 301 const int paperdoll_shoulder_coord[4][17][2] = //4E5050
302 { 302 {
303 0x64, 0x67, 0x61, 0x67, 0x65, 0x68, 0x6E, 0x74, 0x6C, 0x68, 0x61, 0x67, 0x66, 0x68, 0x6C, 0x6A, 0x6E, 0x6D, 303 0x64, 0x67, 0x61, 0x67, 0x65, 0x68, 0x6E, 0x74, 0x6C, 0x68, 0x61, 0x67, 0x66, 0x68, 0x6C, 0x6A, 0x6E, 0x6D,
304 0x67, 0x69, 0x70, 0x67, 0x6E, 0x6D, 0x6C, 0x6F, 0x6C, 0x68, 0x6C, 0x6F, 0x67, 0x69, 0x6C, 0x6A, 304 0x67, 0x69, 0x70, 0x67, 0x6E, 0x6D, 0x6C, 0x6F, 0x6C, 0x68, 0x6C, 0x6F, 0x67, 0x69, 0x6C, 0x6A,
305 305
306 0x60, 0x6B, 0x60, 0x6C, 0x60, 0x6B, 0x61, 0x6A, 0x60, 0x69, 0x60, 0x6A, 0x60, 0x6A, 0x61, 0x69, 0x63, 0x6A, 306 0x60, 0x6B, 0x60, 0x6C, 0x60, 0x6B, 0x61, 0x6A, 0x60, 0x69, 0x60, 0x6A, 0x60, 0x6A, 0x61, 0x69, 0x63, 0x6A,
310 0x71, 0x8D, 0x70, 0x8D, 0x72, 0x8D, 0x74, 0x8E, 0x6A, 0x89, 0x74, 0x8E, 0x71, 0x8D, 0x69, 0x8C, 310 0x71, 0x8D, 0x70, 0x8D, 0x72, 0x8D, 0x74, 0x8E, 0x6A, 0x89, 0x74, 0x8E, 0x71, 0x8D, 0x69, 0x8C,
311 311
312 0x72, 0x91, 0x72, 0x91, 0, 0, 0x6E, 0x92, 0x6F, 0x91, 0, 0, 0, 0, 0x6E, 0x91, 0x71, 0x90, 312 0x72, 0x91, 0x72, 0x91, 0, 0, 0x6E, 0x92, 0x6F, 0x91, 0, 0, 0, 0, 0x6E, 0x91, 0x71, 0x90,
313 0x72, 0x8D, 0x72, 0x90, 0x73, 0x93, 0x73, 0x90, 0x6F, 0x91, 0x73, 0x90, 0x72, 0x8D, 0x6E, 0x91, 313 0x72, 0x8D, 0x72, 0x90, 0x73, 0x93, 0x73, 0x90, 0x6F, 0x91, 0x73, 0x90, 0x72, 0x8D, 0x6E, 0x91,
314 }; 314 };
315 const int dword_4E5270[4][2] = 315 const int paperdoll_shoulder_second_coord[4][17][2] = //dword_4E5270
316 { 316 {
317 0, 0, 317 0, 0, 0x61, 0x67, 0, 0, 0x64, 0x69, 0x64, 0x68, 0, 0, 0, 0, 0x5E, 0x66, 0x5F, 0x69,
318 0x61, 0x67, 318 0x55, 0x69, 0x5F, 0x67, 0x5F, 0x68, 0x32, 0x69, 0x64, 0x68, 0x32, 0x69, 0x55, 0x69, 0x5E, 0x66,
319 0, 0, 319
320 0x64, 0x69, 320 0, 0, 0x60, 0x6C, 0, 0, 0x60, 0x6C, 0x5E, 0x69, 0, 0, 0, 0, 0x5D, 0x6A, 0x5B, 0x6A,
321 0x5B, 0x6A, 0x59, 0x69, 0x56, 0x68, 0x38, 0x6E, 0x5E, 0x69, 0x38, 0x6E, 0x5B, 0x6A, 0x5D, 0x6A,
322
323 0, 0, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x62, 0x89, 0, 0, 0, 0, 0x69, 0x8C, 0x5E, 0x8D,
324 0x61, 0x8D, 0x5F, 0x8D, 0x60, 0x8D, 0x2E, 0x8C, 0x62, 0x89, 0x2E, 0x8C, 0x61, 0x8D, 0x69, 0x8C,
325
326 0, 0, 0x72, 0x91, 0, 0, 0x72, 0x91, 0x67, 0x8F, 0, 0, 0, 0, 0x6E, 0x91, 0x64, 0x93,
327 0x65, 0x8C, 0x65, 0x91, 0x67, 0x91, 0x36, 0x90, 0x67, 0x8F, 0x36, 0x90, 0x65, 0x8C, 0x6E, 0x91,
321 }; 328 };
322 329
323 const char *dlad_texnames_by_face[25] = 330 const char *dlad_texnames_by_face[25] =
324 { 331 {
325 "pc01lad", "pc02lad", "pc03lad", "pc04lad", "pc05lad", "pc06lad", 332 "pc01lad", "pc02lad", "pc03lad", "pc04lad", "pc05lad", "pc06lad",
954 index = item->uItemID - 66; 961 index = item->uItemID - 66;
955 break; 962 break;
956 } 963 }
957 if ( index >= 0 && index < 17 ) 964 if ( index >= 0 && index < 17 )
958 { 965 {
959 item_X = pPaperdoll_BodyX + paperdoll_Armor[pBodyComplection][index][0]; 966 item_X = pPaperdoll_BodyX + paperdoll_Armor_Coord[pBodyComplection][index][0];
960 item_Y = pPaperdoll_BodyY + paperdoll_Armor[pBodyComplection][index][1]; 967 item_Y = pPaperdoll_BodyY + paperdoll_Armor_Coord[pBodyComplection][index][1];
961 if ( !(item->uAttributes & 0xF0) ) 968 if ( !(item->uAttributes & 0xF0) )
962 { 969 {
963 if ( item->uAttributes & 2 ) 970 if ( item->uAttributes & 2 )
964 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0])); 971 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]));
965 else 972 else
987 item->uAttributes &= 0xFFFFFF0Fu; 994 item->uAttributes &= 0xFFFFFF0Fu;
988 ptr_50C9A4 = 0; 995 ptr_50C9A4 = 0;
989 } 996 }
990 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]), 997 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]),
991 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); 998 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
992 }
993 //--------------------------------(Shoulder/Плечи)---------------------------------------------
994 if ( pPlayers[uPlayerID]->pEquipment.uMainHand
995 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND ||
996 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD &&
997 !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита
998 {
999 v94 = paperdoll_armor_texture[pBodyComplection][index][2];
1000 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
1001 {
1002 v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1003 item_X = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][index][0];
1004 item_Y = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][index][1];
1005 }
1006 else
1007 {
1008 item_X = pPaperdoll_BodyX + dword_4E5270[index][0];
1009 item_Y = pPaperdoll_BodyY + dword_4E5270[index][1];
1010 }
1011 if ( !(item->uAttributes & 0xF0) )
1012 {
1013 //v98 = v94 + 1;
1014 if ( item->uAttributes & 2 )
1015 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1016 else
1017 {
1018 if ( item->uAttributes & 1 )
1019 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1020 else
1021 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1022 }
1023 }
1024 else
1025 {
1026 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") )
1027 {
1028 if ( item->uAttributes & 0xF0 )
1029 {
1030 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1031 container = "sptext01";
1032 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1033 container = "sp28a";
1034 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1035 container = "sp30a";
1036 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1037 container = "sp91a";
1038 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1039 if ( _50C9A8_item_enchantment_timer <= 0 )
1040 {
1041 _50C9A8_item_enchantment_timer = 0;
1042 item->uAttributes &= 0xFFFFFF0Fu;
1043 ptr_50C9A4 = 0;
1044 }
1045 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
1046 GetTickCount() * 0.1, 0, 255);
1047 }
1048 }
1049 }
1050 }
1051 else//с щитом
1052 {
1053 //v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1054 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
1055 {
1056 item_X = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][index][0];
1057 item_Y = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][index][1];
1058 if ( !(item->uAttributes & 0xF0) )
1059 {
1060 if ( item->uAttributes & 2 )
1061 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][2]));
1062 else
1063 {
1064 if ( item->uAttributes & 1 )
1065 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][2]));
1066 else
1067 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][2]));
1068 }
1069 }
1070 else
1071 {
1072 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1073 container = "sptext01";
1074 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1075 container = "sp28a";
1076 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1077 container = "sp30a";
1078 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1079 container = "sp91a";
1080 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1081 if ( _50C9A8_item_enchantment_timer <= 0 )
1082 {
1083 _50C9A8_item_enchantment_timer = 0;
1084 item->uAttributes &= 0xFFFFFF0Fu;
1085 ptr_50C9A4 = 0;
1086 }
1087 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
1088 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
1089 }
1090 }
1091 } 999 }
1092 1000
1093 if ( !bRingsShownInCharScreen ) 1001 if ( !bRingsShownInCharScreen )
1094 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]], 1002 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]],
1095 pPlayers[uPlayerID]->pEquipment.uArmor); 1003 pPlayers[uPlayerID]->pEquipment.uArmor);
1229 || pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].uItemID].uSkillType == PLAYER_SKILL_SPEAR 1137 || pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].uItemID].uSkillType == PLAYER_SKILL_SPEAR
1230 && !pPlayers[uPlayerID]->pEquipment.uShield ) 1138 && !pPlayers[uPlayerID]->pEquipment.uShield )
1231 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 1139 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
1232 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); 1140 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
1233 } 1141 }
1142 //--------------------------------(Shoulder/Плечи)---------------------------------------------
1143 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uArmor - 1];
1144 switch ( item->uItemID )
1145 {
1146 case ITEM_ARTICACT_GOVERNONS_ARMOR:
1147 index = 15;
1148 break;
1149 case ITEM_ARTIFACT_YORUBA:
1150 index = 14;
1151 break;
1152 case ITEM_RELIC_HARECS_LEATHER:
1153 index = 13;
1154 break;
1155 case ITEM_ELVEN_CHAINMAIL:
1156 index = 16;
1157 break;
1158 default:
1159 index = item->uItemID - 66;
1160 break;
1161 }
1162 if ( index >= 0 && index < 17 )
1163 {
1164 if ( pPlayers[uPlayerID]->pEquipment.uMainHand
1165 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND
1166 || pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD
1167 && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита
1168 {
1169 v94 = paperdoll_armor_texture[pBodyComplection][index][2];
1170 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
1171 {
1172 v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1173 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
1174 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
1175 }
1176 else
1177 {
1178 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0];
1179 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1];
1180 }
1181 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
1182 {
1183 if ( !(item->uAttributes & 0xF0) )
1184 {
1185 if ( item->uAttributes & 2 )
1186 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1187 else
1188 {
1189 if ( item->uAttributes & 1 )
1190 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1191 else
1192 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1193 }
1194 }
1195 else
1196 {
1197 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") )
1198 {
1199 if ( item->uAttributes & 0xF0 )
1200 {
1201 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1202 container = "sptext01";
1203 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1204 container = "sp28a";
1205 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1206 container = "sp30a";
1207 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1208 container = "sp91a";
1209 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1210 if ( _50C9A8_item_enchantment_timer <= 0 )
1211 {
1212 _50C9A8_item_enchantment_timer = 0;
1213 item->uAttributes &= 0xFFFFFF0Fu;
1214 ptr_50C9A4 = 0;
1215 }
1216 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
1217 GetTickCount() * 0.1, 0, 255);
1218 }
1219 }
1220 }
1221 }
1222 }
1223 else//без ничего или с щитом
1224 {
1225 //v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1226 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
1227 {
1228 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
1229 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
1230 if ( !(item->uAttributes & 0xF0) )
1231 {
1232 if ( item->uAttributes & 2 )
1233 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
1234 else
1235 {
1236 if ( item->uAttributes & 1 )
1237 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
1238 else
1239 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
1240 }
1241 }
1242 else
1243 {
1244 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1245 container = "sptext01";
1246 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1247 container = "sp28a";
1248 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1249 container = "sp30a";
1250 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1251 container = "sp91a";
1252 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1253 if ( _50C9A8_item_enchantment_timer <= 0 )
1254 {
1255 _50C9A8_item_enchantment_timer = 0;
1256 item->uAttributes &= 0xFFFFFF0Fu;
1257 ptr_50C9A4 = 0;
1258 }
1259 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
1260 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
1261 }
1262 }
1263 }
1264
1265 }
1234 //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- 1266 //----------------------------------------------(Cloak collar/воротник плаща)-------------------------------------
1235 if ( pPlayers[uPlayerID]->pEquipment.uCloak ) 1267 if ( pPlayers[uPlayerID]->pEquipment.uCloak )
1236 { 1268 {
1237 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1]; 1269 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1];
1238 switch ( item->uItemID ) 1270 switch ( item->uItemID )
1510 } 1542 }
1511 1543
1512 //----- (0041A2D1) -------------------------------------------------------- 1544 //----- (0041A2D1) --------------------------------------------------------
1513 void CharacterUI_InventoryTab_Draw(Player *player, bool a2) 1545 void CharacterUI_InventoryTab_Draw(Player *player, bool a2)
1514 { 1546 {
1515 Texture *v7; // esi@6 1547 Texture *pTexture; // esi@6
1516 signed int v11; // edx@6 1548 int v13; // eax@13
1517 int v13; // eax@13 1549 int v15; // eax@13
1518 signed int v14; // edx@13 1550 unsigned int v17; // edi@15
1519 int v15; // eax@13 1551 unsigned int uCellX; // [sp+30h] [bp-8h]@5
1520 unsigned int v17; // edi@15 1552 unsigned int uCellY; // [sp+34h] [bp-4h]@5
1521 Texture *pTexture; // ebx@24
1522 unsigned int uCellX; // [sp+30h] [bp-8h]@5
1523 unsigned int uCellY; // [sp+34h] [bp-4h]@5
1524 1553
1525 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground)); 1554 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground));
1526 if (a2) 1555 if (a2)
1527 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE)); 1556 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE));
1528
1529 int i = 0;
1530 for (uint i = 0; i < 126; ++i) 1557 for (uint i = 0; i < 126; ++i)
1531 { 1558 {
1532 int v26 = (int)(player->pInventoryMatrix + i); 1559 if ( player->pInventoryMatrix[i] <= 0 )
1533
1534 if (player->pInventoryMatrix[i] <= 0)
1535 continue; 1560 continue;
1536 1561 if ( !player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uItemID )
1537 int item_idx = player->pInventoryMatrix[i];
1538 auto item = &player->pInventoryItemList[item_idx - 1];
1539 if (!item->uItemID)
1540 continue; 1562 continue;
1541
1542 uCellY = 32 * (i / 14) + 17; 1563 uCellY = 32 * (i / 14) + 17;
1543 uCellX = 32 * (i % 14) + 14; 1564 uCellX = 32 * (i % 14) + 14;
1544 uint item_texture_id = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); 1565 uint item_texture_id = pIcons_LOD->LoadTexture(pItemsTable->pItems[player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uItemID].pIconName, TEXTURE_16BIT_PALETTE);
1545 v7 = pIcons_LOD->GetTexture(item_texture_id); 1566 pTexture = pIcons_LOD->GetTexture(item_texture_id);
1546 1567 if (pTexture->uTextureWidth < 14)
1547 v11 = v7->uTextureWidth; 1568 pTexture->uTextureWidth = 14;
1548 if (v11 < 14) 1569 if ( (pTexture->uTextureWidth - 14) / 32 == 0 && pTexture->uTextureWidth < 32)
1549 v11 = 14; 1570 uCellX += (32 - pTexture->uTextureWidth) / 2;
1550 1571 v13 = pTexture->uTextureWidth - 14;
1551 if ( (v11 - 14) / 32 == 0 && v7->uTextureWidth < 32) 1572 LOBYTE(v13) = v13 & 0xE0;
1552 uCellX += (32 - v7->uTextureWidth) / 2; 1573 v15 = v13 + 32;
1553 v13 = v11 - 14; 1574 if (pTexture->uTextureHeight < 14 )
1554 LOBYTE(v13) = v13 & 0xE0; 1575 pTexture->uTextureHeight = 14;
1555 v15 = v13 + 32; 1576 v17 = uCellX + ((v15 - pTexture->uTextureWidth) >> 1) + pSRZBufferLineOffsets[uCellY + (( (int)((pTexture->uTextureHeight - 14) & 0xFFFFFFE0) - pTexture->uTextureHeight + 32) >> 1)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up
1556 v14 = v7->uTextureHeight; 1577 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & 0xF0)
1557 if (v14 < 14 ) 1578 {
1558 v14 = 14; 1579 switch (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & 0xF0)
1559 v17 = uCellX + ((v15 - v7->uTextureWidth) >> 1) + pSRZBufferLineOffsets[uCellY + (( (int)((v14 - 14) & 0xFFFFFFE0) - v7->uTextureHeight + 32) >> 1)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up
1560
1561 if (item->uAttributes & 0xF0)
1562 {
1563 switch (item->uAttributes & 0xF0)
1564 { 1580 {
1565 case ITEM_AURA_EFFECT_RED: pTexture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break; 1581 case ITEM_AURA_EFFECT_RED: pTexture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break;
1566 case ITEM_AURA_EFFECT_BLUE: pTexture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break; 1582 case ITEM_AURA_EFFECT_BLUE: pTexture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break;
1567 case ITEM_AURA_EFFECT_GREEN: pTexture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break; 1583 case ITEM_AURA_EFFECT_GREEN: pTexture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break;
1568 case ITEM_AURA_EFFECT_PURPLE: pTexture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break; 1584 case ITEM_AURA_EFFECT_PURPLE: pTexture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break;
1569 } 1585 }
1570
1571 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; 1586 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1572 if (_50C9A8_item_enchantment_timer <= 0) 1587 if (_50C9A8_item_enchantment_timer <= 0)
1573 { 1588 {
1574 _50C9A8_item_enchantment_timer = 0; 1589 _50C9A8_item_enchantment_timer = 0;
1575 LOBYTE(item->uAttributes) &= 0xF; 1590 LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF;
1576 ptr_50C9A4 = 0; 1591 ptr_50C9A4 = 0;
1577 } 1592 }
1578 1593 pRenderer->DrawAura(uCellX, uCellY, pTexture, pTexture, GetTickCount() * 0.1, 0, 255);
1579 pRenderer->DrawAura(uCellX, uCellY, v7, pTexture, GetTickCount() * 0.1, 0, 255); 1594 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]);
1580 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, item_idx);
1581 } 1595 }
1582 else 1596 else
1583 { 1597 {
1584 if (item->Identified() || pCurrentScreen != SCREEN_HOUSE) 1598 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].Identified() || pCurrentScreen != SCREEN_HOUSE)
1585 { 1599 {
1586 if (item->Broken()) 1600 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].Broken())
1587 pRenderer->DrawTransparentRedShade(uCellX, uCellY, v7); 1601 pRenderer->DrawTransparentRedShade(uCellX, uCellY, pTexture);
1588 else 1602 else
1589 pRenderer->DrawTextureTransparent(uCellX, uCellY, v7); 1603 pRenderer->DrawTextureTransparent(uCellX, uCellY, pTexture);
1590 } 1604 }
1591 else 1605 else
1592 pRenderer->DrawTransparentGreenShade(uCellX, uCellY, v7); 1606 pRenderer->DrawTransparentGreenShade(uCellX, uCellY, pTexture);
1593 1607 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]);
1594 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, item_idx);
1595 continue; 1608 continue;
1596 } 1609 }
1597 } 1610 }
1598 } 1611 }
1599
1600
1601 1612
1602 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id) 1613 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id)
1603 { 1614 {
1604 auto item_texture = pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); 1615 auto item_texture = pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
1605 1616
1634 1645
1635 pRenderer->ZBuffer_Fill_2(x, y, item_texture, id); 1646 pRenderer->ZBuffer_Fill_2(x, y, item_texture, id);
1636 } 1647 }
1637 } 1648 }
1638 1649
1639
1640 //----- (0043E825) -------------------------------------------------------- 1650 //----- (0043E825) --------------------------------------------------------
1641 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player) 1651 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player)
1642 { 1652 {
1643 CharacterUI_DrawPaperdoll(player); 1653 CharacterUI_DrawPaperdoll(player);
1644
1645 pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND)); 1654 pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND));
1646 pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop)); 1655 pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));
1647 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, 1656 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY,
1648 pCharacterScreen_DetalizBtn->uY,
1649 pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)); 1657 pIcons_LOD->GetTexture(uTextureID_detaliz_close_button));
1650
1651 for (uint i = 0; i < 6; ++i) 1658 for (uint i = 0; i < 6; ++i)
1652 { 1659 {
1653 if (!player->pEquipment.uRings[i]) 1660 if (!player->pEquipment.uRings[i])
1654 continue; 1661 continue;
1655
1656 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248}; 1662 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248};
1657 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA}; 1663 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA};
1658 1664 CharacterUI_DrawItem(pPaperdollRingsX[i], pPaperdollRingsY[i], &player->pInventoryItemList[player->pEquipment.uRings[i] - 1],
1659 CharacterUI_DrawItem(pPaperdollRingsX[i],
1660 pPaperdollRingsY[i],
1661 &player->pInventoryItemList[player->pEquipment.uRings[i] - 1],
1662 player->pEquipment.uRings[i]); 1665 player->pEquipment.uRings[i]);
1663 } 1666 }
1664
1665
1666 if (player->pEquipment.uAmulet) 1667 if (player->pEquipment.uAmulet)
1667 { 1668 CharacterUI_DrawItem(493, 91, &player->pInventoryItemList[player->pEquipment.uAmulet - 1], player->pEquipment.uAmulet);
1668 CharacterUI_DrawItem(493, 91,
1669 &player->pInventoryItemList[player->pEquipment.uAmulet - 1],
1670 player->pEquipment.uAmulet);
1671 }
1672
1673 if (player->pEquipment.uGlove) 1669 if (player->pEquipment.uGlove)
1674 { 1670 CharacterUI_DrawItem(586, 88, &player->pInventoryItemList[player->pEquipment.uGlove - 1], player->pEquipment.uGlove);
1675 CharacterUI_DrawItem(586, 88,
1676 &player->pInventoryItemList[player->pEquipment.uGlove - 1],
1677 player->pEquipment.uGlove);
1678 }
1679 } 1671 }
1680 1672
1681 //----- (0043BCA7) -------------------------------------------------------- 1673 //----- (0043BCA7) --------------------------------------------------------
1682 void CharacterUI_LoadPaperdollTextures() 1674 void CharacterUI_LoadPaperdollTextures()
1683 { 1675 {
1684 int v0; // edi@7 1676 //enum CHARACTER_RACE pRace; // ebx@7
1685 enum CHARACTER_RACE pRace; // ebx@7 1677 //signed int pSex; // eax@7
1686 signed int pSex; // eax@7
1687 int v3; // ebx@10 1678 int v3; // ebx@10
1688 Player *pPlayer; // edi@12 1679 Player *pPlayer; // edi@12
1689 unsigned __int8 v5; // cl@12 1680 //unsigned __int8 v5; // cl@12
1690 int v6; // edi@16 1681 int v6; // edi@16
1691 unsigned int v7; // eax@16 1682 unsigned int v7; // eax@16
1692 Player *pPlayer2; // ebx@16 1683 Player *pPlayer2; // ebx@16
1693 char *v9; // ebx@16 1684 char *v9; // ebx@16
1694 char v10; // al@16 1685 //char v10; // al@16
1695 signed int v11; // edi@21 1686 //signed int v11; // edi@21
1696 unsigned int v22; // eax@76 1687 unsigned int v22; // eax@76
1697 int v23; // ecx@76 1688 int v23; // ecx@76
1698 unsigned int v24; // eax@78 1689 unsigned int v24; // eax@78
1699 int v25; // ecx@78 1690 int v25; // ecx@78
1700 int v26; // ebx@79 1691 //int v26; // ebx@79
1701 unsigned int v27; // eax@80 1692 unsigned int v27; // eax@80
1702 int v28; // ecx@80 1693 int v28; // ecx@80
1703 int v30; // [sp+10h] [bp-28h]@5
1704 signed int v32; // [sp+10h] [bp-28h]@75 1694 signed int v32; // [sp+10h] [bp-28h]@75
1705 signed int v33; // [sp+10h] [bp-28h]@77 1695 signed int v33; // [sp+10h] [bp-28h]@77
1706 int v34; // [sp+10h] [bp-28h]@79 1696 int v34; // [sp+10h] [bp-28h]@79
1707 int pItemTXTNum; // [sp+14h] [bp-24h]@75 1697 int pItemTXTNum; // [sp+14h] [bp-24h]@75
1708 int v37; // [sp+14h] [bp-24h]@77 1698 int v37; // [sp+14h] [bp-24h]@77
1709 signed int v38; // [sp+14h] [bp-24h]@79 1699 signed int v38; // [sp+14h] [bp-24h]@79
1710 int v42; // [sp+20h] [bp-18h]@6 1700 //int v43; // [sp+20h] [bp-18h]@73
1711 int v43; // [sp+20h] [bp-18h]@73
1712 char pContainer[128]; // [sp+24h] [bp-14h]@12 1701 char pContainer[128]; // [sp+24h] [bp-14h]@12
1713 1702
1714 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE); 1703 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
1715 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 ) 1704 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
1716 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE); 1705 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
1717 uTextureID_right_panel_loop = uTextureID_right_panel; 1706 uTextureID_right_panel_loop = uTextureID_right_panel;
1718 v30 = 0;
1719 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE); 1707 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE);
1720 uTextureID_detaliz_close_button = uExitCancelTextureId; 1708 uTextureID_detaliz_close_button = uExitCancelTextureId;
1721 do 1709 for ( uint i = 0; i < 4; ++i )
1722 { 1710 {
1723 v42 = v30 + 1; 1711 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(i + 1) )
1724 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(v30 + 1) ) 1712 {
1725 { 1713 if ( pPlayers[i + 1]->GetRace() == CHARACTER_RACE_DWARF )
1726 v0 = v30; 1714 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 3;
1727 pRace = pPlayers[v30 + 1]->GetRace();
1728 pSex = pPlayers[v30 + 1]->GetSexByVoice();
1729 if ( pRace && pRace != 1 && pRace != 2 )//race == 3
1730 v3 = (pSex != 0) + 3;
1731 else 1715 else
1732 v3 = (pSex != 0) + 1; 1716 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 1;
1733 wsprintfA(pContainer, "pc23v%dBod", v3); 1717 wsprintfA(pContainer, "pc23v%dBod", v3);
1734 papredoll_dbods[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture 1718 papredoll_dbods[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture
1735 wsprintfA(pContainer, "pc23v%dlad", v3); 1719 wsprintfA(pContainer, "pc23v%dlad", v3);
1736 papredoll_dlads[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand 1720 papredoll_dlads[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand
1737 wsprintfA(pContainer, "pc23v%dlau", v3); 1721 wsprintfA(pContainer, "pc23v%dlau", v3);
1738 papredoll_dlaus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2 1722 papredoll_dlaus[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2
1739 wsprintfA(pContainer, "pc23v%drh", v3); 1723 wsprintfA(pContainer, "pc23v%drh", v3);
1740 papredoll_drhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand 1724 papredoll_drhs[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand
1741 wsprintfA(pContainer, "pc23v%dlh", v3); 1725 wsprintfA(pContainer, "pc23v%dlh", v3);
1742 papredoll_dlhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist 1726 papredoll_dlhs[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist
1743 wsprintfA(pContainer, "pc23v%dlhu", v3); 1727 wsprintfA(pContainer, "pc23v%dlhu", v3);
1744 papredoll_dlhus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2 1728 papredoll_dlhus[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2
1745 pPlayer = pPlayers[v0 + 1]; 1729 pPlayer = pPlayers[i + 1];
1746 v5 = pPlayer->uCurrentFace; 1730 if ( pPlayer->uCurrentFace == 12 || pPlayer->uCurrentFace == 13 )
1747 if ( v5 == 12 || v5 == 13 ) 1731 papredoll_dbrds[(char)pPlayer->uCurrentFace] = 0;
1748 papredoll_dbrds[(char)v5] = 0;
1749 papredoll_flying_feet[pPlayer->uCurrentFace] = 0; 1732 papredoll_flying_feet[pPlayer->uCurrentFace] = 0;
1750 IsPlayerWearingWatersuit[v30 + 1] = 1; 1733 IsPlayerWearingWatersuit[i + 1] = 1;
1751 } 1734 }
1752 else 1735 else
1753 { 1736 {
1754 papredoll_dbods[v30] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); 1737 papredoll_dbods[i] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
1755 papredoll_dlads[v30] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); 1738 papredoll_dlads[i] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
1756 papredoll_dlaus[v30] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); 1739 papredoll_dlaus[i] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
1757 papredoll_drhs[v30] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); 1740 papredoll_drhs[i] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
1758 papredoll_dlhs[v30] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); 1741 papredoll_dlhs[i] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
1759 papredoll_dlhus[v30] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); 1742 papredoll_dlhus[i] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
1760 v10 = pPlayers[v30 + 1]->uCurrentFace; 1743 if ( pPlayers[i + 1]->uCurrentFace == 12 || pPlayers[i + 1]->uCurrentFace == 13 )
1761 if ( v10 == 12 || v10 == 13 ) 1744 {
1762 { 1745 wsprintfA(pContainer, "pc%02dbrd", pPlayers[i + 1]->uCurrentFace + 1);
1763 wsprintfA(pContainer, "pc%02dbrd", v10 + 1); 1746 papredoll_dbrds[pPlayers[i + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
1764 papredoll_dbrds[v10] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1747 }
1765 } 1748 wsprintfA(pContainer, "item281pc%02d", pPlayers[i + 1]->uCurrentFace + 1);
1766 wsprintfA(pContainer, "item281pc%02d", v10 + 1); 1749 papredoll_flying_feet[pPlayers[i + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
1767 papredoll_flying_feet[pPlayers[v30 + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1750 IsPlayerWearingWatersuit[i + 1] = 0;
1768 IsPlayerWearingWatersuit[v30 + 1] = 0; 1751 }
1769 }
1770 ++v30;
1771 } 1752 }
1772 while ( v42 < 4 ); 1753
1773 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE); 1754 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE);
1774 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE); 1755 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE);
1775 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE); 1756 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE);
1776 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE); 1757 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE);
1777 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); 1758 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
1778 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); 1759 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
1779 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); 1760 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
1780 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); 1761 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
1781 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE); 1762 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE);
1782 for ( v11 = 0; v11 < 54; ++v11 )// test equipment 1763 for ( uint i = 0; i < 54; ++i )// test equipment
1783 { 1764 {
1784 party_has_equipment[v11] = 0; 1765 party_has_equipment[i] = 0;
1785 if ( pParty->pPickedItem.uItemID != v11 + 66 ) 1766 if ( pParty->pPickedItem.uItemID != i + 66 )
1786 { 1767 {
1787 for ( uint i = 0; i < 4; ++i) 1768 for ( uint j = 0; j < 4; ++j)
1788 { 1769 {
1789 if ( Player_has_item(v11 + 66, &pParty->pPlayers[i], 0) ) 1770 if ( Player_has_item(i + 66, &pParty->pPlayers[j], 0) )
1790 party_has_equipment[v11] = 1; 1771 party_has_equipment[i] = 1;
1791 } 1772 }
1792 } 1773 }
1793 } 1774 }
1794 memset(byte_5111F6.data(), 0, 16); 1775 memset(byte_5111F6.data(), 0, 16);
1795 for (uint i = 0; i < 4; ++i) 1776 for (uint i = 0; i < 4; ++i)
1813 if (Player_has_item(ITEM_RARE_MOON_CLOAK, player, 1)) byte_5111F6[14] = 1; 1794 if (Player_has_item(ITEM_RARE_MOON_CLOAK, player, 1)) byte_5111F6[14] = 1;
1814 if (Player_has_item(ITEM_RARE_VAMPIRES_CAPE, player, 1)) byte_5111F6[15] = 1; 1795 if (Player_has_item(ITEM_RARE_VAMPIRES_CAPE, player, 1)) byte_5111F6[15] = 1;
1815 if (Player_has_item(ITEM_ELVEN_CHAINMAIL, player, 1)) byte_5111F6[16] = 1; 1796 if (Player_has_item(ITEM_ELVEN_CHAINMAIL, player, 1)) byte_5111F6[16] = 1;
1816 } 1797 }
1817 1798
1818
1819 for (uint i = 0; i < 2; ++i) 1799 for (uint i = 0; i < 2; ++i)
1820 { 1800 {
1821 for ( uint j = 0; j < 5; ++j )//Belt 1801 for ( uint j = 0; j < 5; ++j )//Belt
1822 { 1802 {
1823 GetItemTextureFilename(pContainer, j + 100, i + 1, 0); 1803 GetItemTextureFilename(pContainer, j + 100, i + 1, 0);
1841 GetItemTextureFilename(pContainer, 544, i + 1, 0); 1821 GetItemTextureFilename(pContainer, 544, i + 1, 0);
1842 paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1822 paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
1843 if ( _43ED6F_check_party_races(true) ) 1823 if ( _43ED6F_check_party_races(true) )
1844 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); 1824 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE);
1845 } 1825 }
1846 v43 = 0; 1826 //v43 = 0;
1847 for (uint i = 0; i < 4; ++i) 1827 for (uint i = 0; i < 4; ++i)
1848 { 1828 {
1849 if ( sub_43EDB9_get_some_race_sex_relation_2(i) ) 1829 if ( sub_43EDB9_get_some_race_sex_relation_2(i) )
1850 { 1830 {
1851 GetItemTextureFilename(pContainer, 524, i + 1, 0); 1831 GetItemTextureFilename(pContainer, 524, i + 1, 0);
1852 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt 1832 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt
1853 pItemTXTNum = 66; 1833 pItemTXTNum = 66;
1854 for ( v32 = 0; v32 < 13; ++v32 )//simple armor 1834 for ( v32 = 0; v32 < 13; ++v32 )//simple armor
1855 { 1835 {
1856 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0); 1836 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0);
1857 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1837 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// armor
1858 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1); 1838 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1);
1859 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1839 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// shoulder 1
1860 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2); 1840 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2);
1861 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1841 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// shoulder 2
1862 pItemTXTNum++; 1842 pItemTXTNum++;
1863 } 1843 }
1864 GetItemTextureFilename(pContainer, 516, i + 1, 0);//artefacts 1844 GetItemTextureFilename(pContainer, 516, i + 1, 0);//artefacts
1865 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1845 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
1866 GetItemTextureFilename(pContainer, 516, i + 1, 1); 1846 GetItemTextureFilename(pContainer, 516, i + 1, 1);
1918 GetItemTextureFilename(pContainer, 548, i + 1, 1); 1898 GetItemTextureFilename(pContainer, 548, i + 1, 1);
1919 paperdoll_cloak_collar_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1899 paperdoll_cloak_collar_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
1920 GetItemTextureFilename(pContainer, 550, i + 1, 1); 1900 GetItemTextureFilename(pContainer, 550, i + 1, 1);
1921 paperdoll_cloak_collar_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 1901 paperdoll_cloak_collar_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
1922 } 1902 }
1923 else 1903 //else
1924 { 1904 //{
1925 v26 = v43; 1905 //v26 = v43;
1926 } 1906 //}
1927 v43 = v26 + 40; 1907 //v43 = v26 + 40;
1928 } 1908 }
1929 } 1909 }
1930 1910
1931 //----- (00419401) -------------------------------------------------------- 1911 //----- (00419401) --------------------------------------------------------
1932 void CharacterUI_SkillsTab_CreateButtons() 1912 void CharacterUI_SkillsTab_CreateButtons()