Mercurial > mm7
comparison UICharacter.cpp @ 948:5a2dbb00c399
Code cleaning.
author | Nomad |
---|---|
date | Wed, 01 May 2013 17:31:10 +0200 |
parents | 9be9afdbeac3 |
children | c0d0656aa662 |
comparison
equal
deleted
inserted
replaced
947:99aa9c8464cf | 948:5a2dbb00c399 |
---|---|
148 v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem; | 148 v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem; |
149 v86 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); | 149 v86 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0); |
150 v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); | 150 v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); |
151 pPlayer = &pParty->pPlayers[v1-1]; | 151 pPlayer = &pParty->pPlayers[v1-1]; |
152 v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE); | 152 v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE); |
153 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0)); | 153 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(v3)); |
154 v4 = v79; | 154 v4 = v79; |
155 if ( !pPlayer->uSkillPoints ) | 155 if ( !pPlayer->uSkillPoints ) |
156 v4 = 65535; | 156 v4 = 65535; |
157 sprintf( | 157 sprintf( |
158 pTmpBuf, | 158 pTmpBuf, |
577 | 577 |
578 auto player = &pParty->pPlayers[uPlayerID - 1]; | 578 auto player = &pParty->pPlayers[uPlayerID - 1]; |
579 //v1 = uPlayerID; | 579 //v1 = uPlayerID; |
580 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 580 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
581 award_texture_id = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); | 581 award_texture_id = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); |
582 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(award_texture_id != -1 ? &pIcons_LOD->pTextures[award_texture_id] : 0)); | 582 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(award_texture_id)); |
583 sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], v2); | 583 sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], v2); |
584 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); | 584 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); |
585 strcat(pTmpBuf, Source); | 585 strcat(pTmpBuf, Source); |
586 strcat(pTmpBuf, "\f00000"); | 586 strcat(pTmpBuf, "\f00000"); |
587 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); | 587 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0); |
769 | 769 |
770 v23 = pRenderer->pActiveZBuffer; | 770 v23 = pRenderer->pActiveZBuffer; |
771 pPlayer = pPlayers[uPlayerID]; | 771 pPlayer = pPlayers[uPlayerID]; |
772 v3 = a2; | 772 v3 = a2; |
773 pPlayer2 = pPlayers[uPlayerID]; | 773 pPlayer2 = pPlayers[uPlayerID]; |
774 pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_507958 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507958] : 0)); | 774 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507958)); |
775 if ( v3 ) | 775 if ( v3 ) |
776 { | 776 { |
777 v4 = pIcons_LOD->LoadTexture("fr_strip", TEXTURE_16BIT_PALETTE); | 777 v4 = pIcons_LOD->LoadTexture("fr_strip", TEXTURE_16BIT_PALETTE); |
778 pRenderer->DrawTextureIndexed(8u, 0x131u, (Texture *)(v4 != -1 ? (int)&pIcons_LOD->pTextures[v4] : 0)); | 778 pRenderer->DrawTextureIndexed(8u, 0x131u, pIcons_LOD->GetTexture(v4)); |
779 } | 779 } |
780 uCellID = 0; | 780 uCellID = 0; |
781 v26 = (int)pPlayer->pInventoryIndices; | 781 v26 = (int)pPlayer->pInventoryIndices; |
782 do | 782 do |
783 { | 783 { |
790 pItem2 = pItem; | 790 pItem2 = pItem; |
791 if ( pItem->uItemID ) | 791 if ( pItem->uItemID ) |
792 { | 792 { |
793 v6 = pIcons_LOD->LoadTexture(pItemsTable->pItems[pItem->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 793 v6 = pIcons_LOD->LoadTexture(pItemsTable->pItems[pItem->uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
794 uTextureId = v6; | 794 uTextureId = v6; |
795 v7 = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); | 795 v7 = pIcons_LOD->GetTexture(v6); |
796 v8 = (v6 != -1 ? pIcons_LOD->pTextures[v6].uTextureWidth : 24); | 796 v8 = v7->uTextureWidth; |
797 v9 = v7->uTextureHeight; | 797 v9 = v7->uTextureHeight; |
798 v10 = v7->uTextureWidth; | 798 v10 = v7->uTextureWidth; |
799 v11 = v7->uTextureWidth; | 799 v11 = v7->uTextureWidth; |
800 if ( v10 < 14 ) | 800 if ( v10 < 14 ) |
801 v11 = 14; | 801 v11 = 14; |
835 if ( (unsigned __int8)(v16 & 0xF0) != 16 ) | 835 if ( (unsigned __int8)(v16 & 0xF0) != 16 ) |
836 { | 836 { |
837 if ( (unsigned __int8)(v16 & 0xF0) == 32 ) | 837 if ( (unsigned __int8)(v16 & 0xF0) == 32 ) |
838 { | 838 { |
839 v20 = "sp28a"; | 839 v20 = "sp28a"; |
840 pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; | 840 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); |
841 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 841 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
842 if ( dword_50C9A8 <= 0 ) | 842 if ( dword_50C9A8 <= 0 ) |
843 { | 843 { |
844 dword_50C9A8 = 0; | 844 dword_50C9A8 = 0; |
845 LOBYTE(pItem2->uAttributes) &= 0xFu; | 845 LOBYTE(pItem2->uAttributes) &= 0xFu; |
855 continue; | 855 continue; |
856 } | 856 } |
857 if ( (unsigned __int8)(v16 & 0xF0) == 64 ) | 857 if ( (unsigned __int8)(v16 & 0xF0) == 64 ) |
858 { | 858 { |
859 v20 = "sp30a"; | 859 v20 = "sp30a"; |
860 pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; | 860 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); |
861 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 861 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
862 if ( dword_50C9A8 <= 0 ) | 862 if ( dword_50C9A8 <= 0 ) |
863 { | 863 { |
864 dword_50C9A8 = 0; | 864 dword_50C9A8 = 0; |
865 LOBYTE(pItem2->uAttributes) &= 0xFu; | 865 LOBYTE(pItem2->uAttributes) &= 0xFu; |
875 continue; | 875 continue; |
876 } | 876 } |
877 if ( (unsigned __int8)(v16 & 0xF0) == 128 ) | 877 if ( (unsigned __int8)(v16 & 0xF0) == 128 ) |
878 { | 878 { |
879 v20 = "sp91a"; | 879 v20 = "sp91a"; |
880 pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; | 880 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); |
881 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 881 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
882 if ( dword_50C9A8 <= 0 ) | 882 if ( dword_50C9A8 <= 0 ) |
883 { | 883 { |
884 dword_50C9A8 = 0; | 884 dword_50C9A8 = 0; |
885 LOBYTE(pItem2->uAttributes) &= 0xFu; | 885 LOBYTE(pItem2->uAttributes) &= 0xFu; |
894 v26 += 4; | 894 v26 += 4; |
895 continue; | 895 continue; |
896 } | 896 } |
897 } | 897 } |
898 v20 = "sptext01"; | 898 v20 = "sptext01"; |
899 pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; | 899 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); |
900 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 900 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
901 if ( dword_50C9A8 <= 0 ) | 901 if ( dword_50C9A8 <= 0 ) |
902 { | 902 { |
903 dword_50C9A8 = 0; | 903 dword_50C9A8 = 0; |
904 LOBYTE(pItem2->uAttributes) &= 0xFu; | 904 LOBYTE(pItem2->uAttributes) &= 0xFu; |
1130 case WINDOW_CharacterWindow_Stats: // stats | 1130 case WINDOW_CharacterWindow_Stats: // stats |
1131 sub_4196A0(); | 1131 sub_4196A0(); |
1132 sub_419379(); | 1132 sub_419379(); |
1133 CharacterUI_StatsTab_Draw(uPlayerIdx); | 1133 CharacterUI_StatsTab_Draw(uPlayerIdx); |
1134 v7 = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); | 1134 v7 = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); |
1135 pTexture = (Texture *)(v7 != -1 ? (int)&pIcons_LOD->pTextures[v7] : 0); | 1135 pTexture = pIcons_LOD->GetTexture(v7); |
1136 pButton = pCharacterScreen_StatsBtn; | 1136 pButton = pCharacterScreen_StatsBtn; |
1137 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); | 1137 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); |
1138 break; | 1138 break; |
1139 case WINDOW_CharacterWindow_Skills: // skills | 1139 case WINDOW_CharacterWindow_Skills: // skills |
1140 if ( dword_507CC0 != uActiveCharacter ) | 1140 if ( dword_507CC0 != uActiveCharacter ) |
1143 CharacterUI_SkillScreen_Draw(); | 1143 CharacterUI_SkillScreen_Draw(); |
1144 } | 1144 } |
1145 sub_419379(); | 1145 sub_419379(); |
1146 CharacterUI_SkillsTab_Draw(uPlayerIdx); | 1146 CharacterUI_SkillsTab_Draw(uPlayerIdx); |
1147 v6 = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); | 1147 v6 = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); |
1148 pTexture = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); | 1148 pTexture = pIcons_LOD->GetTexture(v6); |
1149 pButton = pCharacterScreen_SkillsBtn; | 1149 pButton = pCharacterScreen_SkillsBtn; |
1150 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); | 1150 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); |
1151 break; | 1151 break; |
1152 case WINDOW_CharacterWindow_Awards: // awards | 1152 case WINDOW_CharacterWindow_Awards: // awards |
1153 sub_4196A0(); | 1153 sub_4196A0(); |
1154 sub_419379(); | 1154 sub_419379(); |
1155 sub_419220(); | 1155 sub_419220(); |
1156 CharacterUI_AwardsTab_Draw(uPlayerIdx); | 1156 CharacterUI_AwardsTab_Draw(uPlayerIdx); |
1157 v5 = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); | 1157 v5 = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); |
1158 pTexture = (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0); | 1158 pTexture = pIcons_LOD->GetTexture(v5); |
1159 pButton = pCharacterScreen_AwardsBtn; | 1159 pButton = pCharacterScreen_AwardsBtn; |
1160 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); | 1160 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); |
1161 break; | 1161 break; |
1162 case WINDOW_CharacterWindow_Inventory: // inventory and other | 1162 case WINDOW_CharacterWindow_Inventory: // inventory and other |
1163 sub_4196A0(); | 1163 sub_4196A0(); |
1164 sub_419379(); | 1164 sub_419379(); |
1165 CharacterUI_InventoryTab_Draw(uPlayerIdx, 0); | 1165 CharacterUI_InventoryTab_Draw(uPlayerIdx, 0); |
1166 v2 = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); | 1166 v2 = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); |
1167 pTexture = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); | 1167 pTexture = pIcons_LOD->GetTexture(v2); |
1168 pButton = pCharacterScreen_InventoryBtn; | 1168 pButton = pCharacterScreen_InventoryBtn; |
1169 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); | 1169 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); |
1170 break; | 1170 break; |
1171 default: | 1171 default: |
1172 break; | 1172 break; |
1345 } | 1345 } |
1346 pRenderer->ResetTextureClipRect(); | 1346 pRenderer->ResetTextureClipRect(); |
1347 pRenderer->DrawTextureIndexed(0x1D3u, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Подложка | 1347 pRenderer->DrawTextureIndexed(0x1D3u, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Подложка |
1348 if ( IsPlayerWearingWatersuit[uPlayerID] )//акваланг | 1348 if ( IsPlayerWearingWatersuit[uPlayerID] )//акваланг |
1349 { | 1349 { |
1350 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, | 1350 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
1351 (Texture *)(papredoll_dbods[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbods[uPlayerID - 1]] : 0)); | |
1352 if ( !bRingsShownInCharScreen ) | 1351 if ( !bRingsShownInCharScreen ) |
1353 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, | 1352 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), pPlayers[uPlayerID]->pEquipment.uArmor); |
1354 (Texture *)(papredoll_dbods[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbods[uPlayerID - 1]] : 0), | |
1355 pPlayers[uPlayerID]->pEquipment.uArmor); | |
1356 v6 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1353 v6 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1357 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) | 1354 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) |
1358 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) | 1355 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) |
1359 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], | 1356 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], |
1360 (Texture *)(papredoll_dlads[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlads[uPlayerID - 1]] : 0)); | 1357 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
1361 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1358 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1362 if ( pMainHandNum4 ) | 1359 if ( pMainHandNum4 ) |
1363 { | 1360 { |
1364 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum4 - 1]; | 1361 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum4 - 1]; |
1365 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX; | 1362 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX; |
1370 v166 = pItemsTable->pItems[item_MainHand4->uItemID].pIconName; | 1367 v166 = pItemsTable->pItems[item_MainHand4->uItemID].pIconName; |
1371 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE); | 1368 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE); |
1372 if ( !( item_MainHand4->uAttributes & 0xF0 ) ) | 1369 if ( !( item_MainHand4->uAttributes & 0xF0 ) ) |
1373 { | 1370 { |
1374 v18 = v14 + 1; | 1371 v18 = v14 + 1; |
1375 v19 = (char *)&pIcons_LOD->pTextures[v14]; | 1372 v19 = (char *)pIcons_LOD->GetTexture(v14); |
1376 if ( item_MainHand4->uAttributes & 2 ) | 1373 if ( item_MainHand4->uAttributes & 2 ) |
1377 pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0)); | 1374 pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)v19); |
1378 else | 1375 else |
1379 { | 1376 { |
1380 if ( item_MainHand4->uAttributes & 1 ) | 1377 if ( item_MainHand4->uAttributes & 1 ) |
1381 pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0)); | 1378 pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)v19); |
1382 else | 1379 else |
1383 pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0)); | 1380 pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)v19); |
1384 } | 1381 } |
1385 } | 1382 } |
1386 if ( item_MainHand4->uAttributes & 0xF0 ) | 1383 if ( item_MainHand4->uAttributes & 0xF0 ) |
1387 { | 1384 { |
1388 if ( ( item_MainHand4->uAttributes & 0xF0) == 16 ) | 1385 if ( ( item_MainHand4->uAttributes & 0xF0) == 16 ) |
1391 v167 = "sp28a"; | 1388 v167 = "sp28a"; |
1392 if ( (item_MainHand4->uAttributes & 0xF0) == 64 ) | 1389 if ( (item_MainHand4->uAttributes & 0xF0) == 64 ) |
1393 v167 = "sp30a"; | 1390 v167 = "sp30a"; |
1394 if ( (item_MainHand4->uAttributes & 0xF0) == 128 ) | 1391 if ( (item_MainHand4->uAttributes & 0xF0) == 128 ) |
1395 v167 = "sp91a"; | 1392 v167 = "sp91a"; |
1396 v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)]; | 1393 v16 = pIcons_LOD->LoadTexturePtr(v167, TEXTURE_16BIT_PALETTE); |
1397 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1394 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1398 if ( dword_50C9A8 <= 0 ) | 1395 if ( dword_50C9A8 <= 0 ) |
1399 { | 1396 { |
1400 dword_50C9A8 = 0; | 1397 dword_50C9A8 = 0; |
1401 item_MainHand4->uAttributes &= 0xFu; | 1398 item_MainHand4->uAttributes &= 0xFu; |
1402 ptr_50C9A4 = 0; | 1399 ptr_50C9A4 = 0; |
1403 } | 1400 } |
1404 v17 = (double)GetTickCount() * 0.1; | 1401 v17 = (double)GetTickCount() * 0.1; |
1405 pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0), v16, (signed __int64)v17, 0, 255); | 1402 pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, pIcons_LOD->GetTexture(v14), v16, (signed __int64)v17, 0, 255); |
1406 } | 1403 } |
1407 if ( !bRingsShownInCharScreen ) | 1404 if ( !bRingsShownInCharScreen ) |
1408 pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0), pMainHandNum4); | 1405 pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)v19, pMainHandNum4); |
1409 } | 1406 } |
1410 } | 1407 } |
1411 else// без акваланга | 1408 else// без акваланга |
1412 { | 1409 { |
1413 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; //сначала рисуется лук | 1410 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; //сначала рисуется лук |
1418 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY; | 1415 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY; |
1419 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 1416 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
1420 if ( !(itemBow->uAttributes & 0xF0) )// если не применён закл | 1417 if ( !(itemBow->uAttributes & 0xF0) )// если не применён закл |
1421 { | 1418 { |
1422 if ( itemBow->uAttributes & 2 ) | 1419 if ( itemBow->uAttributes & 2 ) |
1423 pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pBowTextureNum] : 0)); | 1420 pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum)); |
1424 else | 1421 else |
1425 { | 1422 { |
1426 v30 = (char *)&pIcons_LOD->pTextures[pBowTextureNum]; | 1423 v30 = (char *)pIcons_LOD->GetTexture(pBowTextureNum); |
1427 if ( !(itemBow->uAttributes & 1) )//не опознанный лук зелёный | 1424 if ( !(itemBow->uAttributes & 1) )//не опознанный лук зелёный |
1428 pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)v30 : 0)); | 1425 pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)v30); |
1429 else // опознанный лук | 1426 else // опознанный лук |
1430 pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)v30 : 0)); | 1427 pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)v30); |
1431 } | 1428 } |
1432 } | 1429 } |
1433 else | 1430 else |
1434 { | 1431 { |
1435 if ( (itemBow->uAttributes & 0xF0) == 16 ) | 1432 if ( (itemBow->uAttributes & 0xF0) == 16 ) |
1438 v168 = "sp28a"; | 1435 v168 = "sp28a"; |
1439 if ( (itemBow->uAttributes & 0xF0) == 64 ) | 1436 if ( (itemBow->uAttributes & 0xF0) == 64 ) |
1440 v168 = "sp30a"; | 1437 v168 = "sp30a"; |
1441 if ( (itemBow->uAttributes & 0xF0) == 128 ) | 1438 if ( (itemBow->uAttributes & 0xF0) == 128 ) |
1442 v168 = "sp91a"; | 1439 v168 = "sp91a"; |
1443 a2b = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; | 1440 a2b = pIcons_LOD->LoadTexturePtr(v168, TEXTURE_16BIT_PALETTE); |
1444 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1441 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1445 if ( dword_50C9A8 <= 0 ) | 1442 if ( dword_50C9A8 <= 0 ) |
1446 { | 1443 { |
1447 dword_50C9A8 = 0; | 1444 dword_50C9A8 = 0; |
1448 itemBow->uAttributes &= 0xFu; | 1445 itemBow->uAttributes &= 0xFu; |
1449 ptr_50C9A4 = 0; | 1446 ptr_50C9A4 = 0; |
1450 } | 1447 } |
1451 v28 = (double)GetTickCount() * 0.1; | 1448 v28 = (double)GetTickCount() * 0.1; |
1452 pRenderer->_4A63E6(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pBowTextureNum] : 0), a2b, (signed __int64)v28, 0, 255); | 1449 pRenderer->_4A63E6(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), a2b, (signed __int64)v28, 0, 255); |
1453 } | 1450 } |
1454 if ( !bRingsShownInCharScreen ) | 1451 if ( !bRingsShownInCharScreen ) |
1455 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pBowTextureNum] : 0), pBowNum); | 1452 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum); |
1456 } | 1453 } |
1457 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// потом плащ | 1454 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// потом плащ |
1458 if ( pCloakNum ) | 1455 if ( pCloakNum ) |
1459 { | 1456 { |
1460 item_Cloak = &pPlayers[uPlayerID]->pInventoryItems[pCloakNum - 1]; | 1457 item_Cloak = &pPlayers[uPlayerID]->pInventoryItems[pCloakNum - 1]; |
1486 pY_Cloak = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][v33][1]; | 1483 pY_Cloak = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][v33][1]; |
1487 if ( !(item_Cloak->uAttributes & 0xF0) ) | 1484 if ( !(item_Cloak->uAttributes & 0xF0) ) |
1488 { | 1485 { |
1489 v41 = v35 + 1; | 1486 v41 = v35 + 1; |
1490 if ( item_Cloak->uAttributes & 2 ) | 1487 if ( item_Cloak->uAttributes & 2 ) |
1491 pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0)); | 1488 pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35)); |
1492 else | 1489 else |
1493 pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0)); | 1490 pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35)); |
1494 } | 1491 } |
1495 else | 1492 else |
1496 { | 1493 { |
1497 if ( (item_Cloak->uAttributes & 0xF0) == 16 ) | 1494 if ( (item_Cloak->uAttributes & 0xF0) == 16 ) |
1498 v169 = "sptext01"; | 1495 v169 = "sptext01"; |
1500 v169 = "sp28a"; | 1497 v169 = "sp28a"; |
1501 if ( (item_Cloak->uAttributes & 0xF0) != 64 ) | 1498 if ( (item_Cloak->uAttributes & 0xF0) != 64 ) |
1502 v169 = "sp30a"; | 1499 v169 = "sp30a"; |
1503 if ( (item_Cloak->uAttributes & 0xF0) == 128 ) | 1500 if ( (item_Cloak->uAttributes & 0xF0) == 128 ) |
1504 v169 = "sp91a"; | 1501 v169 = "sp91a"; |
1505 v39 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; | 1502 v39 = pIcons_LOD->LoadTexturePtr(v169, TEXTURE_16BIT_PALETTE); |
1506 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1503 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1507 if ( dword_50C9A8 <= 0 ) | 1504 if ( dword_50C9A8 <= 0 ) |
1508 { | 1505 { |
1509 dword_50C9A8 = 0; | 1506 dword_50C9A8 = 0; |
1510 item_Cloak->uAttributes &= 0xFu; | 1507 item_Cloak->uAttributes &= 0xFu; |
1511 ptr_50C9A4 = 0; | 1508 ptr_50C9A4 = 0; |
1512 } | 1509 } |
1513 v40 = (double)GetTickCount() * 0.1; | 1510 v40 = (double)GetTickCount() * 0.1; |
1514 pRenderer->_4A63E6(pX_Cloak, pY_Cloak, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, (signed __int64)v40, 0, 255); | 1511 pRenderer->_4A63E6(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), v39, (signed __int64)v40, 0, 255); |
1515 } | 1512 } |
1516 if ( !bRingsShownInCharScreen ) | 1513 if ( !bRingsShownInCharScreen ) |
1517 pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0), pCloakNum); | 1514 pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), pCloakNum); |
1518 } | 1515 } |
1519 } | 1516 } |
1520 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//рисуется кукла | 1517 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//рисуется кукла |
1521 (Texture *)(papredoll_dbods[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbods[uPlayerID - 1]] : 0)); | 1518 pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
1522 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// потом броня | 1519 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// потом броня |
1523 if ( pArmorNum ) | 1520 if ( pArmorNum ) |
1524 { | 1521 { |
1525 item_Armor = &pPlayers[uPlayerID]->pInventoryItems[pArmorNum - 1]; | 1522 item_Armor = &pPlayers[uPlayerID]->pInventoryItems[pArmorNum - 1]; |
1526 switch ( item_Armor->uItemID ) | 1523 switch ( item_Armor->uItemID ) |
1548 v48 = paperdoll_armor_texture[pBodyComplection][v45][0]; | 1545 v48 = paperdoll_armor_texture[pBodyComplection][v45][0]; |
1549 if ( !(item_Armor->uAttributes & 0xF0) ) | 1546 if ( !(item_Armor->uAttributes & 0xF0) ) |
1550 { | 1547 { |
1551 v53 = v48 + 1; | 1548 v53 = v48 + 1; |
1552 if ( item_Armor->uAttributes & 2 ) | 1549 if ( item_Armor->uAttributes & 2 ) |
1553 pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0)); | 1550 pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48)); |
1554 else | 1551 else |
1555 { | 1552 { |
1556 v55 = (char *)&pIcons_LOD->pTextures[v48]; | 1553 v55 = (char *)&pIcons_LOD->pTextures[v48]; |
1557 if ( !(item_Armor->uAttributes & 1) ) | 1554 if ( !(item_Armor->uAttributes & 1) ) |
1558 pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)v55 : 0)); | 1555 pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)v55); |
1559 else | 1556 else |
1560 pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)v55 : 0)); | 1557 pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)v55); |
1561 } | 1558 } |
1562 } | 1559 } |
1563 else | 1560 else |
1564 { | 1561 { |
1565 if ( (item_Armor->uAttributes & 0xF0) == 16 ) | 1562 if ( (item_Armor->uAttributes & 0xF0) == 16 ) |
1568 v170 = "sp28a"; | 1565 v170 = "sp28a"; |
1569 if ( (item_Armor->uAttributes & 0xF0) == 64 ) | 1566 if ( (item_Armor->uAttributes & 0xF0) == 64 ) |
1570 v170 = "sp30a"; | 1567 v170 = "sp30a"; |
1571 if ( (item_Armor->uAttributes & 0xF0) == 128 ) | 1568 if ( (item_Armor->uAttributes & 0xF0) == 128 ) |
1572 v170 = "sp91a"; | 1569 v170 = "sp91a"; |
1573 v51 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v170, TEXTURE_16BIT_PALETTE)]; | 1570 v51 = pIcons_LOD->LoadTexturePtr(v170, TEXTURE_16BIT_PALETTE); |
1574 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1571 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1575 if ( dword_50C9A8 <= 0 ) | 1572 if ( dword_50C9A8 <= 0 ) |
1576 { | 1573 { |
1577 dword_50C9A8 = 0; | 1574 dword_50C9A8 = 0; |
1578 item_Armor->uAttributes &= 0xFu; | 1575 item_Armor->uAttributes &= 0xFu; |
1579 ptr_50C9A4 = 0; | 1576 ptr_50C9A4 = 0; |
1580 } | 1577 } |
1581 v52 = (double)GetTickCount() * 0.1; | 1578 v52 = (double)GetTickCount() * 0.1; |
1582 pRenderer->_4A63E6(pX_Armor, pY_Armor, (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0), v51, (signed __int64)v52, 0, 255); | 1579 pRenderer->_4A63E6(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48), v51, (signed __int64)v52, 0, 255); |
1583 } | 1580 } |
1584 if ( pPlayers[uPlayerID]->pEquipment.uMainHand //далее плечи брони | 1581 if ( pPlayers[uPlayerID]->pEquipment.uMainHand //далее плечи брони |
1585 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND || | 1582 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND || |
1586 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD && | 1583 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD && |
1587 !pPlayers[uPlayerID]->pEquipment.uShield) ) | 1584 !pPlayers[uPlayerID]->pEquipment.uShield) ) |
1599 pY_shoulder = pPaperdoll_BodyY + dword_4E5270[v45][1]; | 1596 pY_shoulder = pPaperdoll_BodyY + dword_4E5270[v45][1]; |
1600 } | 1597 } |
1601 if ( !(item_Armor->uAttributes & 0xF0) ) | 1598 if ( !(item_Armor->uAttributes & 0xF0) ) |
1602 { | 1599 { |
1603 v98 = v94 + 1; | 1600 v98 = v94 + 1; |
1604 v99 = (char *)&pIcons_LOD->pTextures[v94]; | 1601 v99 = (char *)pIcons_LOD->GetTexture(v94); |
1605 if ( item_Armor->uAttributes & 2 ) | 1602 if ( item_Armor->uAttributes & 2 ) |
1606 pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)(v98 != 0 ? (int)v99 : 0)); | 1603 pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)v99); |
1607 else | 1604 else |
1608 { | 1605 { |
1609 if ( item_Armor->uAttributes & 1 ) | 1606 if ( item_Armor->uAttributes & 1 ) |
1610 pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)(v98 != 0 ? (int)v99 : 0)); | 1607 pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)v99); |
1611 else | 1608 else |
1612 pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)(v98 != 0 ? (int)v99 : 0)); | 1609 pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)v99); |
1613 } | 1610 } |
1614 } | 1611 } |
1615 else | 1612 else |
1616 { | 1613 { |
1617 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) | 1614 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) |
1624 v173 = "sp28a"; | 1621 v173 = "sp28a"; |
1625 if ( ( item_Armor->uAttributes & 0xF0) == 64 ) | 1622 if ( ( item_Armor->uAttributes & 0xF0) == 64 ) |
1626 v173 = "sp30a"; | 1623 v173 = "sp30a"; |
1627 if ( (item_Armor->uAttributes & 0xF0) == 128 ) | 1624 if ( (item_Armor->uAttributes & 0xF0) == 128 ) |
1628 v173 = "sp91a"; | 1625 v173 = "sp91a"; |
1629 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; | 1626 v96 = (char *)pIcons_LOD->LoadTexturePtr(v173, TEXTURE_16BIT_PALETTE); |
1630 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1627 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1631 if ( dword_50C9A8 <= 0 ) | 1628 if ( dword_50C9A8 <= 0 ) |
1632 { | 1629 { |
1633 dword_50C9A8 = 0; | 1630 dword_50C9A8 = 0; |
1634 item_Armor->uAttributes &= 0xFu; | 1631 item_Armor->uAttributes &= 0xFu; |
1635 ptr_50C9A4 = 0; | 1632 ptr_50C9A4 = 0; |
1636 } | 1633 } |
1637 v97 = (double)GetTickCount(); | 1634 v97 = (double)GetTickCount(); |
1638 pRenderer->_4A63E6(pX_shoulder, pY_shoulder, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); | 1635 pRenderer->_4A63E6(pX_shoulder, pY_shoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); |
1639 } | 1636 } |
1640 } | 1637 } |
1641 } | 1638 } |
1642 } | 1639 } |
1643 else | 1640 else |
1648 pX_ArmorShoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0]; | 1645 pX_ArmorShoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0]; |
1649 pY_ArmorShoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1]; | 1646 pY_ArmorShoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1]; |
1650 if ( !(item_Armor->uAttributes & 0xF0) ) | 1647 if ( !(item_Armor->uAttributes & 0xF0) ) |
1651 { | 1648 { |
1652 v109 = v94 + 1; | 1649 v109 = v94 + 1; |
1653 v110 = (char *)&pIcons_LOD->pTextures[v94]; | 1650 v110 = (char *)pIcons_LOD->GetTexture(v94); |
1654 if ( item_Armor->uAttributes & 2 ) | 1651 if ( item_Armor->uAttributes & 2 ) |
1655 pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v109 != 0 ? (int)v110 : 0)); | 1652 pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); |
1656 else | 1653 else |
1657 { | 1654 { |
1658 if ( item_Armor->uAttributes & 1 ) | 1655 if ( item_Armor->uAttributes & 1 ) |
1659 pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v109 != 0 ? (int)v110 : 0)); | 1656 pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); |
1660 else | 1657 else |
1661 pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v109 != 0 ? (int)v110 : 0)); | 1658 pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); |
1662 } | 1659 } |
1663 } | 1660 } |
1664 else | 1661 else |
1665 { | 1662 { |
1666 if ( (item_Armor->uAttributes & 0xF0) == 16 ) | 1663 if ( (item_Armor->uAttributes & 0xF0) == 16 ) |
1669 v178 = "sp28a"; | 1666 v178 = "sp28a"; |
1670 if ( (item_Armor->uAttributes & 0xF0) == 64 ) | 1667 if ( (item_Armor->uAttributes & 0xF0) == 64 ) |
1671 v178 = "sp30a"; | 1668 v178 = "sp30a"; |
1672 if ( (item_Armor->uAttributes & 0xF0) == 128 ) | 1669 if ( (item_Armor->uAttributes & 0xF0) == 128 ) |
1673 v178 = "sp91a"; | 1670 v178 = "sp91a"; |
1674 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; | 1671 v96 = (char *)pIcons_LOD->LoadTexturePtr(v178, TEXTURE_16BIT_PALETTE); |
1675 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1672 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1676 if ( dword_50C9A8 <= 0 ) | 1673 if ( dword_50C9A8 <= 0 ) |
1677 { | 1674 { |
1678 dword_50C9A8 = 0; | 1675 dword_50C9A8 = 0; |
1679 item_Armor->uAttributes &= 0xFu; | 1676 item_Armor->uAttributes &= 0xFu; |
1680 ptr_50C9A4 = 0; | 1677 ptr_50C9A4 = 0; |
1681 } | 1678 } |
1682 v97 = (double)GetTickCount(); | 1679 v97 = (double)GetTickCount(); |
1683 pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); | 1680 pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); |
1684 } | 1681 } |
1685 } | 1682 } |
1686 } | 1683 } |
1687 if ( !bRingsShownInCharScreen ) | 1684 if ( !bRingsShownInCharScreen ) |
1688 pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)v55 : 0), pArmorNum); | 1685 pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)v55, pArmorNum); |
1689 } | 1686 } |
1690 } | 1687 } |
1691 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//далее обувь | 1688 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//далее обувь |
1692 if ( pBootNum ) | 1689 if ( pBootNum ) |
1693 { | 1690 { |
1712 pX_Boot = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][v60][0]; | 1709 pX_Boot = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][v60][0]; |
1713 pY_Boot = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][v60][1]; | 1710 pY_Boot = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][v60][1]; |
1714 if ( !(item_Boot->uAttributes & 0xF0) ) | 1711 if ( !(item_Boot->uAttributes & 0xF0) ) |
1715 { | 1712 { |
1716 v65 = v59 + 1; | 1713 v65 = v59 + 1; |
1717 v66 = (char *)&pIcons_LOD->pTextures[v59]; | 1714 v66 = (char *)pIcons_LOD->GetTexture(v59); |
1718 if ( item_Boot->uAttributes & 2 ) | 1715 if ( item_Boot->uAttributes & 2 ) |
1719 pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0)); | 1716 pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)v66); |
1720 else | 1717 else |
1721 { | 1718 { |
1722 if ( item_Boot->uAttributes & 1 ) | 1719 if ( item_Boot->uAttributes & 1 ) |
1723 pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0)); | 1720 pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)v66); |
1724 else | 1721 else |
1725 pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0)); | 1722 pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)v66); |
1726 } | 1723 } |
1727 } | 1724 } |
1728 else | 1725 else |
1729 { | 1726 { |
1730 if ( (item_Boot->uAttributes & 0xF0) == 16 ) | 1727 if ( (item_Boot->uAttributes & 0xF0) == 16 ) |
1733 v171 = "sp28a"; | 1730 v171 = "sp28a"; |
1734 if ( (item_Boot->uAttributes & 0xF0) == 64 ) | 1731 if ( (item_Boot->uAttributes & 0xF0) == 64 ) |
1735 v171 = "sp30a"; | 1732 v171 = "sp30a"; |
1736 if ( (item_Boot->uAttributes & 0xF0) == 128 ) | 1733 if ( (item_Boot->uAttributes & 0xF0) == 128 ) |
1737 v171 = "sp91a"; | 1734 v171 = "sp91a"; |
1738 v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)]; | 1735 v63 = pIcons_LOD->LoadTexturePtr(v171, TEXTURE_16BIT_PALETTE); |
1739 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1736 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1740 if ( dword_50C9A8 <= 0 ) | 1737 if ( dword_50C9A8 <= 0 ) |
1741 { | 1738 { |
1742 dword_50C9A8 = 0; | 1739 dword_50C9A8 = 0; |
1743 item_Boot->uAttributes &= 0xFu; | 1740 item_Boot->uAttributes &= 0xFu; |
1744 ptr_50C9A4 = 0; | 1741 ptr_50C9A4 = 0; |
1745 } | 1742 } |
1746 v64 = (double)GetTickCount() * 0.1; | 1743 v64 = (double)GetTickCount() * 0.1; |
1747 pRenderer->_4A63E6(pX_Boot, pY_Boot, (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0), v63, (signed __int64)v64, 0, 255); | 1744 pRenderer->_4A63E6(pX_Boot, pY_Boot, pIcons_LOD->GetTexture(v59), v63, (signed __int64)v64, 0, 255); |
1748 } | 1745 } |
1749 if ( !bRingsShownInCharScreen ) | 1746 if ( !bRingsShownInCharScreen ) |
1750 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0), pBootNum); | 1747 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum); |
1751 } | 1748 } |
1752 } | 1749 } |
1753 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1750 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1754 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1) | 1751 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1) |
1755 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) | 1752 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) |
1756 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], | 1753 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], |
1757 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], | 1754 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], |
1758 (Texture *)(papredoll_dlads[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlads[uPlayerID - 1]] : 0)); | 1755 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
1759 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// далее пояс | 1756 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// далее пояс |
1760 if ( pBeltNum ) | 1757 if ( pBeltNum ) |
1761 { | 1758 { |
1762 item_Belt = &pPlayers[uPlayerID]->pInventoryItems[pBeltNum - 1]; | 1759 item_Belt = &pPlayers[uPlayerID]->pInventoryItems[pBeltNum - 1]; |
1763 switch ( item_Belt->uItemID ) | 1760 switch ( item_Belt->uItemID ) |
1781 else | 1778 else |
1782 v75 = paperdoll_belt_texture[pBodyComplection - 2][v73]; | 1779 v75 = paperdoll_belt_texture[pBodyComplection - 2][v73]; |
1783 if ( !(item_Belt->uAttributes & 0xF0) ) | 1780 if ( !(item_Belt->uAttributes & 0xF0) ) |
1784 { | 1781 { |
1785 v79 = v75 + 1; | 1782 v79 = v75 + 1; |
1786 v80 = (char *)&pIcons_LOD->pTextures[v75]; | 1783 v80 = (char *)pIcons_LOD->GetTexture(v75); |
1787 if ( item_Belt->uAttributes & 2 ) | 1784 if ( item_Belt->uAttributes & 2 ) |
1788 pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0)); | 1785 pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)v80); |
1789 else | 1786 else |
1790 { | 1787 { |
1791 if ( item_Belt->uAttributes & 1 ) | 1788 if ( item_Belt->uAttributes & 1 ) |
1792 pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0)); | 1789 pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)v80); |
1793 else | 1790 else |
1794 pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0)); | 1791 pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)v80); |
1795 } | 1792 } |
1796 if ( !bRingsShownInCharScreen ) | 1793 if ( !bRingsShownInCharScreen ) |
1797 pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0), pBeltNum); | 1794 pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)v80, pBeltNum); |
1798 } | 1795 } |
1799 else | 1796 else |
1800 { | 1797 { |
1801 if ( (item_Belt->uAttributes & 0xF0) == 16 ) | 1798 if ( (item_Belt->uAttributes & 0xF0) == 16 ) |
1802 v172 = "sptext01"; | 1799 v172 = "sptext01"; |
1804 v172 = "sp28a"; | 1801 v172 = "sp28a"; |
1805 if ( (item_Belt->uAttributes & 0xF0) == 64 ) | 1802 if ( (item_Belt->uAttributes & 0xF0) == 64 ) |
1806 v172 = "sp30a"; | 1803 v172 = "sp30a"; |
1807 if ( (item_Belt->uAttributes & 0xF0) == 128 ) | 1804 if ( (item_Belt->uAttributes & 0xF0) == 128 ) |
1808 v172 = "sp91a"; | 1805 v172 = "sp91a"; |
1809 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; | 1806 v77 = pIcons_LOD->LoadTexturePtr(v172, TEXTURE_16BIT_PALETTE); |
1810 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1807 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1811 if ( dword_50C9A8 <= 0 ) | 1808 if ( dword_50C9A8 <= 0 ) |
1812 { | 1809 { |
1813 dword_50C9A8 = 0; | 1810 dword_50C9A8 = 0; |
1814 item_Belt->uAttributes &= 0xFu; | 1811 item_Belt->uAttributes &= 0xFu; |
1815 ptr_50C9A4 = 0; | 1812 ptr_50C9A4 = 0; |
1816 } | 1813 } |
1817 v78 = (double)GetTickCount() * 0.1; | 1814 v78 = (double)GetTickCount() * 0.1; |
1818 pRenderer->_4A63E6(pX_Belt, pY_Belt, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); | 1815 pRenderer->_4A63E6(pX_Belt, pY_Belt, pIcons_LOD->GetTexture(v75), v77, (signed __int64)v78, 0, 255); |
1819 } | 1816 } |
1820 } | 1817 } |
1821 } | 1818 } |
1822 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1819 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1823 if ( pMainHandNum2 ) | 1820 if ( pMainHandNum2 ) |
1825 v83 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum2 - 1]; | 1822 v83 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum2 - 1]; |
1826 if ( pItemsTable->pItems[v83].uEquipType == 1 | 1823 if ( pItemsTable->pItems[v83].uEquipType == 1 |
1827 || pItemsTable->pItems[v83].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield ) | 1824 || pItemsTable->pItems[v83].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield ) |
1828 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], | 1825 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
1829 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], | 1826 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], |
1830 (Texture *)(papredoll_dlaus[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlaus[uPlayerID - 1]] : 0)); | 1827 pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); |
1831 } | 1828 } |
1832 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//далее воротник плаща | 1829 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//далее воротник плаща |
1833 if ( pCloakCollarNum ) | 1830 if ( pCloakCollarNum ) |
1834 { | 1831 { |
1835 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItems[pCloakCollarNum - 1]; | 1832 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItems[pCloakCollarNum - 1]; |
1861 if ( v116 != pIcons_LOD->FindTextureByName("pending") ) | 1858 if ( v116 != pIcons_LOD->FindTextureByName("pending") ) |
1862 { | 1859 { |
1863 if ( !(item_CloakCollar->uAttributes & 0xF0) ) | 1860 if ( !(item_CloakCollar->uAttributes & 0xF0) ) |
1864 { | 1861 { |
1865 v119 = v116 + 1; | 1862 v119 = v116 + 1; |
1866 v120 = (char *)&pIcons_LOD->pTextures[v116]; | 1863 v120 = (char *)pIcons_LOD->GetTexture(v116); |
1867 if ( item_CloakCollar->uAttributes & 2 ) | 1864 if ( item_CloakCollar->uAttributes & 2 ) |
1868 pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)(v119 != 0 ? (int)v120 : 0)); | 1865 pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)v120); |
1869 else | 1866 else |
1870 pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)(v119 != 0 ? (int)v120 : 0)); | 1867 pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)v120); |
1871 if ( !bRingsShownInCharScreen ) | 1868 if ( !bRingsShownInCharScreen ) |
1872 pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)(v119 != 0 ? (int)v120 : 0), pCloakCollarNum); | 1869 pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)v120, pCloakCollarNum); |
1873 } | 1870 } |
1874 else | 1871 else |
1875 { | 1872 { |
1876 if ( (item_CloakCollar->uAttributes & 0xF0) == 16 ) | 1873 if ( (item_CloakCollar->uAttributes & 0xF0) == 16 ) |
1877 v179 = "sptext01"; | 1874 v179 = "sptext01"; |
1879 v179 = "sp28a"; | 1876 v179 = "sp28a"; |
1880 if ( (item_CloakCollar->uAttributes & 0xF0) == 64 ) | 1877 if ( (item_CloakCollar->uAttributes & 0xF0) == 64 ) |
1881 v179 = "sp30a"; | 1878 v179 = "sp30a"; |
1882 if ( (item_CloakCollar->uAttributes & 0xF0) == 128 ) | 1879 if ( (item_CloakCollar->uAttributes & 0xF0) == 128 ) |
1883 v179 = "sp91a"; | 1880 v179 = "sp91a"; |
1884 a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)]; | 1881 a2i = pIcons_LOD->LoadTexturePtr(v179, TEXTURE_16BIT_PALETTE); |
1885 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1882 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1886 if ( dword_50C9A8 <= 0 ) | 1883 if ( dword_50C9A8 <= 0 ) |
1887 { | 1884 { |
1888 dword_50C9A8 = 0; | 1885 dword_50C9A8 = 0; |
1889 item_CloakCollar->uAttributes &= 0xFu; | 1886 item_CloakCollar->uAttributes &= 0xFu; |
1890 ptr_50C9A4 = 0; | 1887 ptr_50C9A4 = 0; |
1891 } | 1888 } |
1892 v118 = (double)GetTickCount() * 0.1; | 1889 v118 = (double)GetTickCount() * 0.1; |
1893 pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0), a2i, (signed __int64)v118, 0, 255); | 1890 pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, pIcons_LOD->GetTexture(v116), a2i, (signed __int64)v118, 0, 255); |
1894 } | 1891 } |
1895 } | 1892 } |
1896 } | 1893 } |
1897 } | 1894 } |
1898 if ( pPlayers[uPlayerID]->uFace == 12 || pPlayers[uPlayerID]->uFace == 13 ) | 1895 if ( pPlayers[uPlayerID]->uFace == 12 || pPlayers[uPlayerID]->uFace == 13 ) |
1899 { | 1896 { |
1900 v122 = papredoll_dbrds[pPlayers[uPlayerID]->uFace]; | 1897 v122 = papredoll_dbrds[pPlayers[uPlayerID]->uFace]; |
1901 if ( v122 != pIcons_LOD->FindTextureByName("Pending") ) | 1898 if ( v122 != pIcons_LOD->FindTextureByName("Pending") ) |
1902 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 24], | 1899 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 24], |
1903 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 23], | 1900 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 23], |
1904 (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0)); | 1901 pIcons_LOD->GetTexture(v122)); |
1905 } | 1902 } |
1906 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//далее шлем | 1903 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//далее шлем |
1907 if ( pHelmNum ) | 1904 if ( pHelmNum ) |
1908 { | 1905 { |
1909 item_Helm = &pPlayers[uPlayerID]->pInventoryItems[pHelmNum-1]; | 1906 item_Helm = &pPlayers[uPlayerID]->pInventoryItems[pHelmNum-1]; |
1943 v180 = "sp28a"; | 1940 v180 = "sp28a"; |
1944 if ( (item_Helm->uAttributes & 0xF0) == 64 ) | 1941 if ( (item_Helm->uAttributes & 0xF0) == 64 ) |
1945 v180 = "sp30a"; | 1942 v180 = "sp30a"; |
1946 if ( (item_Helm->uAttributes & 0xF0) == 128 ) | 1943 if ( (item_Helm->uAttributes & 0xF0) == 128 ) |
1947 v180 = "sp91a"; | 1944 v180 = "sp91a"; |
1948 v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)]; | 1945 v129 = pIcons_LOD->LoadTexturePtr(v180, TEXTURE_16BIT_PALETTE); |
1949 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 1946 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
1950 if ( dword_50C9A8 <= 0 ) | 1947 if ( dword_50C9A8 <= 0 ) |
1951 { | 1948 { |
1952 dword_50C9A8 = 0; | 1949 dword_50C9A8 = 0; |
1953 item_Helm->uAttributes &= 0xFu; | 1950 item_Helm->uAttributes &= 0xFu; |
1954 ptr_50C9A4 = 0; | 1951 ptr_50C9A4 = 0; |
1955 } | 1952 } |
1956 v130 = (double)GetTickCount() * 0.1; | 1953 v130 = (double)GetTickCount() * 0.1; |
1957 pRenderer->_4A63E6(pX_Helm, pY_Helm, (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0), v129, (signed __int64)v130, 0, 255); | 1954 pRenderer->_4A63E6(pX_Helm, pY_Helm, pIcons_LOD->GetTexture(v127), v129, (signed __int64)v130, 0, 255); |
1958 } | 1955 } |
1959 else | 1956 else |
1960 { | 1957 { |
1961 v131 = v127 + 1; | 1958 v131 = v127 + 1; |
1962 v132 = (char *)&pIcons_LOD->pTextures[v127]; | 1959 v132 = (char *)pIcons_LOD->GetTexture(v127); |
1963 if ( item_Helm->uAttributes & 2 ) | 1960 if ( item_Helm->uAttributes & 2 ) |
1964 pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0)); | 1961 pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)v132); |
1965 else | 1962 else |
1966 { | 1963 { |
1967 if ( item_Helm->uAttributes & 1 ) | 1964 if ( item_Helm->uAttributes & 1 ) |
1968 pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0)); | 1965 pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)v132); |
1969 else | 1966 else |
1970 pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0)); | 1967 pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)v132); |
1971 } | 1968 } |
1972 } | 1969 } |
1973 if ( !bRingsShownInCharScreen ) | 1970 if ( !bRingsShownInCharScreen ) |
1974 pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0), pHelmNum); | 1971 pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)v132, pHelmNum); |
1975 } | 1972 } |
1976 } | 1973 } |
1977 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand | 1974 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand |
1978 if ( pMainHandNum3 ) | 1975 if ( pMainHandNum3 ) |
1979 { | 1976 { |
1986 v181 = pItemsTable->pItems[item_MainHand3->uItemID].pIconName; | 1983 v181 = pItemsTable->pItems[item_MainHand3->uItemID].pIconName; |
1987 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE); | 1984 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE); |
1988 if ( !(item_MainHand3->uAttributes & 0xF0) ) | 1985 if ( !(item_MainHand3->uAttributes & 0xF0) ) |
1989 { | 1986 { |
1990 v142 = v138 + 1; | 1987 v142 = v138 + 1; |
1991 v143 = (char *)&pIcons_LOD->pTextures[v138]; | 1988 v143 = (char *)pIcons_LOD->GetTexture(v138); |
1992 if ( item_MainHand3->uAttributes & 2 ) | 1989 if ( item_MainHand3->uAttributes & 2 ) |
1993 pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0)); | 1990 pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)v143); |
1994 else | 1991 else |
1995 { | 1992 { |
1996 if ( item_MainHand3->uAttributes & 1 ) | 1993 if ( item_MainHand3->uAttributes & 1 ) |
1997 pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0)); | 1994 pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)v143); |
1998 else | 1995 else |
1999 pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0)); | 1996 pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)v143); |
2000 } | 1997 } |
2001 } | 1998 } |
2002 else | 1999 else |
2003 { | 2000 { |
2004 if ( (item_MainHand3->uAttributes & 0xF0) == 16 ) | 2001 if ( (item_MainHand3->uAttributes & 0xF0) == 16 ) |
2007 v182 = "sp28a"; | 2004 v182 = "sp28a"; |
2008 if ( (item_MainHand3->uAttributes & 0xF0) == 64 ) | 2005 if ( (item_MainHand3->uAttributes & 0xF0) == 64 ) |
2009 v182 = "sp30a"; | 2006 v182 = "sp30a"; |
2010 if ( (item_MainHand3->uAttributes & 0xF0) == 128 ) | 2007 if ( (item_MainHand3->uAttributes & 0xF0) == 128 ) |
2011 v182 = "sp91a"; | 2008 v182 = "sp91a"; |
2012 v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)]; | 2009 v140 = pIcons_LOD->LoadTexturePtr(v182, TEXTURE_16BIT_PALETTE); |
2013 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 2010 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
2014 if ( dword_50C9A8 <= 0 ) | 2011 if ( dword_50C9A8 <= 0 ) |
2015 { | 2012 { |
2016 dword_50C9A8 = 0; | 2013 dword_50C9A8 = 0; |
2017 item_MainHand3->uAttributes &= 0xFu; | 2014 item_MainHand3->uAttributes &= 0xFu; |
2018 ptr_50C9A4 = 0; | 2015 ptr_50C9A4 = 0; |
2019 } | 2016 } |
2020 v141 = (double)GetTickCount() * 0.1; | 2017 v141 = (double)GetTickCount() * 0.1; |
2021 pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0), v140, (signed __int64)v141, 0, 255); | 2018 pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, pIcons_LOD->GetTexture(v138), v140, (signed __int64)v141, 0, 255); |
2022 } | 2019 } |
2023 if ( !bRingsShownInCharScreen ) | 2020 if ( !bRingsShownInCharScreen ) |
2024 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0), pMainHandNum3); | 2021 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3); |
2025 } | 2022 } |
2026 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// далее щит | 2023 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// далее щит |
2027 if ( pShieldNum ) | 2024 if ( pShieldNum ) |
2028 { | 2025 { |
2029 item_Shield = &pPlayers[uPlayerID]->pInventoryItems[pShieldNum - 1]; | 2026 item_Shield = &pPlayers[uPlayerID]->pInventoryItems[pShieldNum - 1]; |
2059 } | 2056 } |
2060 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[item_Shield->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 2057 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[item_Shield->uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
2061 if ( !(item_Shield->uAttributes & 0xF0) ) | 2058 if ( !(item_Shield->uAttributes & 0xF0) ) |
2062 { | 2059 { |
2063 if ( item_Shield->uAttributes & 2 ) | 2060 if ( item_Shield->uAttributes & 2 ) |
2064 pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)&pIcons_LOD->pTextures[v153] : 0)); | 2061 pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153)); |
2065 else | 2062 else |
2066 { | 2063 { |
2067 v160 = (char *)&pIcons_LOD->pTextures[v153]; | 2064 v160 = (char *)pIcons_LOD->GetTexture(v153); |
2068 if ( !(item_Shield->uAttributes & 1) ) | 2065 if ( !(item_Shield->uAttributes & 1) ) |
2069 pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)v160 : 0)); | 2066 pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)v160); |
2070 else | 2067 else |
2071 pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)v160 : 0)); | 2068 pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)v160); |
2072 } | 2069 } |
2073 } | 2070 } |
2074 else | 2071 else |
2075 { | 2072 { |
2076 if ( (item_Shield->uAttributes & 0xF0) == 16 ) | 2073 if ( (item_Shield->uAttributes & 0xF0) == 16 ) |
2079 v183 = "sp28a"; | 2076 v183 = "sp28a"; |
2080 if ( (item_Shield->uAttributes & 0xF0) == 64 ) | 2077 if ( (item_Shield->uAttributes & 0xF0) == 64 ) |
2081 v183 = "sp30a"; | 2078 v183 = "sp30a"; |
2082 if ( (item_Shield->uAttributes & 0xF0) == 128 ) | 2079 if ( (item_Shield->uAttributes & 0xF0) == 128 ) |
2083 v183 = "sp91a"; | 2080 v183 = "sp91a"; |
2084 v157 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v183, TEXTURE_16BIT_PALETTE)]; | 2081 v157 = pIcons_LOD->LoadTexturePtr(v183, TEXTURE_16BIT_PALETTE); |
2085 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 2082 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
2086 if ( dword_50C9A8 <= 0 ) | 2083 if ( dword_50C9A8 <= 0 ) |
2087 { | 2084 { |
2088 dword_50C9A8 = 0; | 2085 dword_50C9A8 = 0; |
2089 item_Shield->uAttributes &= 0xFu; | 2086 item_Shield->uAttributes &= 0xFu; |
2090 ptr_50C9A4 = 0; | 2087 ptr_50C9A4 = 0; |
2091 } | 2088 } |
2092 v158 = (double)GetTickCount() * 0.1; | 2089 v158 = (double)GetTickCount() * 0.1; |
2093 pRenderer->_4A63E6(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)&pIcons_LOD->pTextures[v153] : 0), v157, (signed __int64)v158, 0, 255); | 2090 pRenderer->_4A63E6(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), v157, (signed __int64)v158, 0, 255); |
2094 if ( v245 ) | 2091 if ( v245 ) |
2095 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], | 2092 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], |
2096 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], | 2093 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1])); |
2097 (Texture *)(papredoll_dlhs[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlhs[uPlayerID - 1]] : 0)); | |
2098 } | 2094 } |
2099 if ( !bRingsShownInCharScreen ) | 2095 if ( !bRingsShownInCharScreen ) |
2100 pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)&pIcons_LOD->pTextures[v153] : 0), pShieldNum); | 2096 pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), pShieldNum); |
2101 } | 2097 } |
2102 } | 2098 } |
2103 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], | 2099 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); |
2104 (Texture *)(papredoll_drhs[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_drhs[uPlayerID - 1]] : 0)); | |
2105 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 2100 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
2106 if ( pMainHandNum5 ) | 2101 if ( pMainHandNum5 ) |
2107 { | 2102 { |
2108 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum5 - 1]; | 2103 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum5 - 1]; |
2109 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield ) | 2104 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield ) |
2110 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], | 2105 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); |
2111 (Texture *)(papredoll_dlhus[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlhus[uPlayerID - 1]] : 0)); | |
2112 } | 2106 } |
2113 if ( !bRingsShownInCharScreen )//рисование лупы | 2107 if ( !bRingsShownInCharScreen )//рисование лупы |
2114 pRenderer->DrawTextureTransparent(603, 299, (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0)); | 2108 pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B)); |
2115 pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0));//обрамление | 2109 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//обрамление |
2116 } | 2110 } |
2117 | 2111 |
2118 //----- (0043E825) -------------------------------------------------------- | 2112 //----- (0043E825) -------------------------------------------------------- |
2119 void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID) | 2113 void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID) |
2120 { | 2114 { |
2121 int v3; // ecx@1 | 2115 int v3; // ecx@1 |
2122 unsigned int pItemTextureNum; // ebx@3 | 2116 unsigned int pItemTextureNum; // ebx@3 |
2123 int v9; // edi@17 | 2117 //int v9; // edi@17 |
2124 char v13; // sf@24 | 2118 char v13; // sf@24 |
2125 unsigned __int8 v14; // of@24 | 2119 unsigned __int8 v14; // of@24 |
2126 unsigned int pItemNum; // eax@25 | 2120 unsigned int pItemNum; // eax@25 |
2127 int v20; // edi@40 | 2121 //int v20; // edi@40 |
2128 int v21; // eax@41 | 2122 //int v21; // eax@41 |
2129 int v33; // esi@61 | 2123 //int v33; // esi@61 |
2130 const char *spell_texture_name; // [sp-8h] [bp-38h]@8 | 2124 const char *spell_texture_name; // [sp-8h] [bp-38h]@8 |
2131 Texture *spell_texture; // [sp+10h] [bp-20h]@14 | 2125 Texture *spell_texture; // [sp+10h] [bp-20h]@14 |
2132 int v41; // [sp+10h] [bp-20h]@26 | 2126 int v41; // [sp+10h] [bp-20h]@26 |
2133 unsigned int pY_Ring; // [sp+14h] [bp-1Ch]@3 | 2127 unsigned int pY_Ring; // [sp+14h] [bp-1Ch]@3 |
2134 unsigned int pX_Ring; // [sp+18h] [bp-18h]@3 | 2128 unsigned int pX_Ring; // [sp+18h] [bp-18h]@3 |
2135 int v48; // [sp+24h] [bp-Ch]@1 | 2129 int v48; // [sp+24h] [bp-Ch]@1 |
2136 ItemGen *item; | 2130 ItemGen *item; |
2137 | 2131 |
2138 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); | 2132 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); |
2139 CharacterUI_DrawPaperdoll(uPlayerID); | 2133 CharacterUI_DrawPaperdoll(uPlayerID); |
2140 pRenderer->DrawTextureTransparent(0x1D9u, 0, (Texture *)(uTextureID_BACKHAND != -1 ? &pIcons_LOD->pTextures[uTextureID_BACKHAND] : 0)); | 2134 pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND)); |
2141 pRenderer->DrawTextureTransparent(0x1D4u, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); | 2135 pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop)); |
2142 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, | 2136 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)); |
2143 (Texture *)(uTextureID_detaliz_close_button != -1 ? &pIcons_LOD->pTextures[uTextureID_detaliz_close_button] : 0)); | |
2144 v3 = 0; | 2137 v3 = 0; |
2145 v48 = 0; | 2138 v48 = 0; |
2146 do | 2139 do |
2147 { | 2140 { |
2148 pItemNum = pPlayers[uPlayerID]->pEquipment.uRings[v3]; | 2141 pItemNum = pPlayers[uPlayerID]->pEquipment.uRings[v3]; |
2160 spell_texture_name = "sp28a"; | 2153 spell_texture_name = "sp28a"; |
2161 if ( (item->uAttributes & 0xF0) == 64 ) | 2154 if ( (item->uAttributes & 0xF0) == 64 ) |
2162 spell_texture_name = "sp30a"; | 2155 spell_texture_name = "sp30a"; |
2163 if ( (item->uAttributes & 0xF0) == 128 ) | 2156 if ( (item->uAttributes & 0xF0) == 128 ) |
2164 spell_texture_name = "sp91a"; | 2157 spell_texture_name = "sp91a"; |
2165 spell_texture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(spell_texture_name, TEXTURE_16BIT_PALETTE)]; | 2158 spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE); |
2166 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 2159 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
2167 if ( dword_50C9A8 <= 0 ) | 2160 if ( dword_50C9A8 <= 0 ) |
2168 { | 2161 { |
2169 dword_50C9A8 = 0; | 2162 dword_50C9A8 = 0; |
2170 item->uAttributes &= 0xFu; | 2163 item->uAttributes &= 0xFu; |
2171 ptr_50C9A4 = 0; | 2164 ptr_50C9A4 = 0; |
2172 } | 2165 } |
2173 pRenderer->_4A63E6(pX_Ring, pY_Ring, (Texture *)(pItemTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), spell_texture, GetTickCount() * 0.1, 0, 255); | 2166 pRenderer->_4A63E6(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255); |
2174 } | 2167 } |
2175 else | 2168 else |
2176 { | 2169 { |
2177 v9 = pItemTextureNum + 1; | 2170 if (item->Broken()) |
2178 if ( item->uAttributes & 2 ) | 2171 pRenderer->DrawTransparentRedShade(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum)); |
2179 pRenderer->DrawTransparentRedShade(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); | 2172 else if (!item->Identified()) |
2173 pRenderer->DrawTransparentGreenShade(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum)); | |
2180 else | 2174 else |
2181 { | 2175 pRenderer->DrawTextureTransparent(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum)); |
2182 if ( (item->uAttributes & 1) == 0 ) | 2176 |
2183 pRenderer->DrawTransparentGreenShade(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); | 2177 pRenderer->_4A601E(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum), pItemNum); |
2184 else | |
2185 pRenderer->DrawTextureTransparent(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); | |
2186 } | |
2187 pRenderer->_4A601E(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), pItemNum); | |
2188 } | 2178 } |
2189 } | 2179 } |
2190 v3++; | 2180 v3++; |
2191 pItemNum = pPlayers[uPlayerID]->pEquipment.uRings[v3]; | 2181 pItemNum = pPlayers[uPlayerID]->pEquipment.uRings[v3]; |
2192 v14 = (v48 + 1) > 5; | 2182 v14 = (v48 + 1) > 5; |
2208 spell_texture_name = "sp28a"; | 2198 spell_texture_name = "sp28a"; |
2209 if ( (item->uAttributes & 0xF0) == 64 ) | 2199 if ( (item->uAttributes & 0xF0) == 64 ) |
2210 spell_texture_name = "sp30a"; | 2200 spell_texture_name = "sp30a"; |
2211 if ( (item->uAttributes & 0xF0) == 128 ) | 2201 if ( (item->uAttributes & 0xF0) == 128 ) |
2212 spell_texture_name = "sp91a"; | 2202 spell_texture_name = "sp91a"; |
2213 spell_texture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(spell_texture_name, TEXTURE_16BIT_PALETTE)]; | 2203 spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE); |
2214 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 2204 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
2215 if ( dword_50C9A8 <= 0 ) | 2205 if ( dword_50C9A8 <= 0 ) |
2216 { | 2206 { |
2217 dword_50C9A8 = 0; | 2207 dword_50C9A8 = 0; |
2218 item->uAttributes &= 0xFu; | 2208 item->uAttributes &= 0xFu; |
2219 ptr_50C9A4 = 0; | 2209 ptr_50C9A4 = 0; |
2220 } | 2210 } |
2221 pRenderer->_4A63E6(493, 91, (Texture *)(pItemTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), spell_texture, GetTickCount() * 0.1, 0, 255); | 2211 pRenderer->_4A63E6(493, 91, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255); |
2222 } | 2212 } |
2223 else | 2213 else |
2224 { | 2214 { |
2225 v20 = pItemTextureNum + 1; | 2215 if (item->Broken()) |
2226 if ( item->uAttributes & 2 ) | 2216 pRenderer->DrawTransparentRedShade(493, 91, pIcons_LOD->GetTexture(pItemTextureNum)); |
2227 { | 2217 else if (!item->Identified()) |
2228 v21 = 9 * pItemTextureNum; | 2218 pRenderer->DrawTransparentGreenShade(493, 91, pIcons_LOD->GetTexture(pItemTextureNum)); |
2229 pRenderer->DrawTransparentRedShade(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0)); | |
2230 } | |
2231 else | 2219 else |
2232 { | 2220 pRenderer->DrawTextureTransparent(493, 91, pIcons_LOD->GetTexture(pItemTextureNum)); |
2233 v21 = 9 * pItemTextureNum; | 2221 |
2234 if ( !(item->uAttributes & 1) ) | 2222 pRenderer->_4A601E(493, 91, pIcons_LOD->GetTexture(pItemTextureNum), v41); |
2235 pRenderer->DrawTransparentGreenShade(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0)); | |
2236 else | |
2237 pRenderer->DrawTextureTransparent(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0)); | |
2238 } | |
2239 pRenderer->_4A601E(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0), v41); | |
2240 } | 2223 } |
2241 } | 2224 } |
2242 pItemNum = pPlayers[uPlayerID]->pEquipment.uGlove; | 2225 pItemNum = pPlayers[uPlayerID]->pEquipment.uGlove; |
2243 if ( !pItemNum ) | 2226 if ( !pItemNum ) |
2244 return; | 2227 return; |
2245 item = &pPlayers[uPlayerID]->pInventoryItems[pItemNum - 1]; | 2228 item = &pPlayers[uPlayerID]->pInventoryItems[pItemNum - 1]; |
2246 pItemTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 2229 pItemTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
2247 if ( !(item->uAttributes & 0xF0) ) | 2230 if ( !(item->uAttributes & 0xF0) ) |
2248 { | 2231 { |
2249 v33 = pItemTextureNum + 1; | 2232 if (item->Broken()) |
2250 if ( item->uAttributes & 2 ) | 2233 pRenderer->DrawTransparentRedShade(586, 88, pIcons_LOD->GetTexture(pItemTextureNum)); |
2251 pRenderer->DrawTransparentRedShade(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); | 2234 else if (!item->Identified()) |
2235 pRenderer->DrawTransparentGreenShade(586, 88, pIcons_LOD->GetTexture(pItemTextureNum)); | |
2252 else | 2236 else |
2253 { | 2237 pRenderer->DrawTextureTransparent(586, 88, pIcons_LOD->GetTexture(pItemTextureNum)); |
2254 if ( !(item->uAttributes & 1) ) | 2238 |
2255 pRenderer->DrawTransparentGreenShade(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); | 2239 pRenderer->_4A601E(586, 88,pIcons_LOD->GetTexture(pItemTextureNum), pItemNum); |
2256 else | |
2257 pRenderer->DrawTextureTransparent(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); | |
2258 } | |
2259 pRenderer->_4A601E(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), pItemNum); | |
2260 } | 2240 } |
2261 else | 2241 else |
2262 { | 2242 { |
2263 if ( (item->uAttributes & 0xF0) == 16 ) | 2243 if ( (item->uAttributes & 0xF0) == 16 ) |
2264 spell_texture_name = "sptext01"; | 2244 spell_texture_name = "sptext01"; |
2266 spell_texture_name = "sp28a"; | 2246 spell_texture_name = "sp28a"; |
2267 if ( (item->uAttributes & 0xF0) == 64 ) | 2247 if ( (item->uAttributes & 0xF0) == 64 ) |
2268 spell_texture_name = "sp30a"; | 2248 spell_texture_name = "sp30a"; |
2269 if ( (item->uAttributes & 0xF0) == 128 ) | 2249 if ( (item->uAttributes & 0xF0) == 128 ) |
2270 spell_texture_name = "sp91a"; | 2250 spell_texture_name = "sp91a"; |
2271 spell_texture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(spell_texture_name, TEXTURE_16BIT_PALETTE)]; | 2251 spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE); |
2272 dword_50C9A8 -= pEventTimer->uTimeElapsed; | 2252 dword_50C9A8 -= pEventTimer->uTimeElapsed; |
2273 if ( dword_50C9A8 <= 0 ) | 2253 if ( dword_50C9A8 <= 0 ) |
2274 { | 2254 { |
2275 dword_50C9A8 = 0; | 2255 dword_50C9A8 = 0; |
2276 item->uAttributes &= 0xFu; | 2256 item->uAttributes &= 0xFu; |
2795 int v137; // [sp+1Ch] [bp-4h]@27 | 2775 int v137; // [sp+1Ch] [bp-4h]@27 |
2796 int v138; // [sp+1Ch] [bp-4h]@33 | 2776 int v138; // [sp+1Ch] [bp-4h]@33 |
2797 | 2777 |
2798 pPlayer = &pParty->pPlayers[uPlayerID-1]; | 2778 pPlayer = &pParty->pPlayers[uPlayerID-1]; |
2799 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE); | 2779 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE); |
2800 pRenderer->DrawTextureIndexed(8, 8, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); | 2780 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(v2)); |
2801 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 2781 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
2802 sprintf(pTmpBuf, "\f%05d", v3); | 2782 sprintf(pTmpBuf, "\f%05d", v3); |
2803 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]);//^Pi[%s] %s | 2783 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]);//^Pi[%s] %s |
2804 strcat(pTmpBuf, pTmpBuf2); | 2784 strcat(pTmpBuf, pTmpBuf2); |
2805 if ( pPlayer->uSkillPoints ) | 2785 if ( pPlayer->uSkillPoints ) |