comparison mm7_5.cpp @ 333:405d0c4dd1b3

Слияние
author Ritor1
date Wed, 20 Feb 2013 20:51:55 +0600
parents e8fcde8ba3fc 8e23edf57e27
children 0cafbae201c8
comparison
equal deleted inserted replaced
332:e8fcde8ba3fc 333:405d0c4dd1b3
929 v153 = (int)pBtn_SliderLeft; 929 v153 = (int)pBtn_SliderLeft;
930 //LABEL_136: 930 //LABEL_136:
931 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); 931 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167);
932 //goto LABEL_143; 932 //goto LABEL_143;
933 if ( uMusicVolimeMultiplier ) 933 if ( uMusicVolimeMultiplier )
934 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, 934 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0);
935 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); 935 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f);
936 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));
937 continue; 936 continue;
938 } 937 }
939 if ( uMessageParam == 5 ) 938 if ( uMessageParam == 5 )
940 { 939 {
941 ++uMusicVolimeMultiplier; 940 ++uMusicVolimeMultiplier;
946 v153 = (int)pBtn_SliderRight; 945 v153 = (int)pBtn_SliderRight;
947 //goto LABEL_136; 946 //goto LABEL_136;
948 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167); 947 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167);
949 //goto LABEL_143; 948 //goto LABEL_143;
950 if ( uMusicVolimeMultiplier ) 949 if ( uMusicVolimeMultiplier )
951 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, 950 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f, 0);
952 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); 951 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0f);
953 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));
954 continue; 952 continue;
955 } 953 }
956 uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17; 954 uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17;
957 if ( (char)uMusicVolimeMultiplier > 9 ) 955 if ( (char)uMusicVolimeMultiplier > 9 )
958 uMusicVolimeMultiplier = 9; 956 uMusicVolimeMultiplier = 9;
959 //LABEL_143: 957 //LABEL_143:
960 if ( uMusicVolimeMultiplier ) 958 if ( uMusicVolimeMultiplier )
961 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, 959 pAudioPlayer->PlaySound(SOUND_Bell, -1, 0, -1, 0, 0, pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f, 0);
962 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0), 0); 960 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f);
963 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));
964 continue; 961 continue;
965 case UIMSG_ChangeSoundVolume: 962 case UIMSG_ChangeSoundVolume:
966 if ( uMessageParam == 4 ) 963 if ( uMessageParam == 4 )//reduce sound level
967 { 964 {
968 --uSoundVolumeMultiplier; 965 --uSoundVolumeMultiplier;
969 if ( (char)uSoundVolumeMultiplier < 1 ) 966 if ( (char)uSoundVolumeMultiplier < 1 )
970 uSoundVolumeMultiplier = 0; 967 uSoundVolumeMultiplier = 0;
968 GUIWindow::Create(243, 162, 0, 0, (enum WindowType)90, (int)pBtn_SliderLeft, v0);
969 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f);
970 pAudioPlayer->PlaySound((SoundID)218, -1, 0, -1, 0, 0, 0, 0);
971 continue;
972 }
973 if ( uMessageParam == 5 )//Increase sound level
974 {
975 ++uSoundVolumeMultiplier;
976 if ( (char)uSoundVolumeMultiplier > 8 )
977 uSoundVolumeMultiplier = 9;
971 v168 = v0; 978 v168 = v0;
972 v24 = 243; 979 v24 = 435;
973 v154 = (int)pBtn_SliderLeft; 980 v154 = (int)pBtn_SliderRight;
974 //LABEL_150: 981 //goto LABEL_150;
975 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168); 982 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168);
976 //goto LABEL_157; 983 //goto LABEL_157;
977 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); 984 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f);
978 v165 = 0; 985 v165 = 0;
979 v151 = 0; 986 v151 = 0;
980 v144 = 0; 987 v144 = 0;
981 v139 = 0; 988 v139 = 0;
982 v135 = -1; 989 v135 = -1;
983 v132 = 0; 990 v132 = 0;
984 v130 = -1; 991 v130 = -1;
985 v127 = 218; 992 v127 = 218;
986 goto _play_sound_and_continue; 993 goto _play_sound_and_continue;
987 } 994 }
988 if ( uMessageParam == 5 )
989 {
990 ++uSoundVolumeMultiplier;
991 if ( (char)uSoundVolumeMultiplier > 8 )
992 uSoundVolumeMultiplier = 9;
993 v168 = v0;
994 v24 = 435;
995 v154 = (int)pBtn_SliderRight;
996 //goto LABEL_150;
997 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168);
998 //goto LABEL_157;
999 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0));
1000 v165 = 0;
1001 v151 = 0;
1002 v144 = 0;
1003 v139 = 0;
1004 v135 = -1;
1005 v132 = 0;
1006 v130 = -1;
1007 v127 = 218;
1008 goto _play_sound_and_continue;
1009 }
1010 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17; 995 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17;
1011 if ( (char)uSoundVolumeMultiplier > 8 ) 996 if ( (char)uSoundVolumeMultiplier > 8 )
1012 uSoundVolumeMultiplier = 9; 997 uSoundVolumeMultiplier = 9;
1013 //LABEL_157: 998 //LABEL_157:
1014 pAudioPlayer->SetMasterVolume((signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0)); 999 pAudioPlayer->SetMasterVolume(pSoundVolumeLevels[uSoundVolumeMultiplier] * 128.0f);
1015 v165 = 0; 1000 v165 = 0;
1016 v151 = 0; 1001 v151 = 0;
1017 v144 = 0; 1002 v144 = 0;
1018 v139 = 0; 1003 v139 = 0;
1019 v135 = -1; 1004 v135 = -1;
1046 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169); 1031 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169);
1047 //goto LABEL_173; 1032 //goto LABEL_173;
1048 if ( !uVoicesVolumeMultiplier ) 1033 if ( !uVoicesVolumeMultiplier )
1049 continue; 1034 continue;
1050 v165 = 0; 1035 v165 = 0;
1051 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); 1036 v151 = pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f;
1052 v144 = 0; 1037 v144 = 0;
1053 v139 = 0; 1038 v139 = 0;
1054 v135 = -1; 1039 v135 = -1;
1055 v132 = 0; 1040 v132 = 0;
1056 v130 = -1; 1041 v130 = -1;
1069 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169); 1054 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169);
1070 //goto LABEL_173; 1055 //goto LABEL_173;
1071 if ( !uVoicesVolumeMultiplier ) 1056 if ( !uVoicesVolumeMultiplier )
1072 continue; 1057 continue;
1073 v165 = 0; 1058 v165 = 0;
1074 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); 1059 v151 = pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f;
1075 v144 = 0; 1060 v144 = 0;
1076 v139 = 0; 1061 v139 = 0;
1077 v135 = -1; 1062 v135 = -1;
1078 v132 = 0; 1063 v132 = 0;
1079 v130 = -1; 1064 v130 = -1;
1085 uVoicesVolumeMultiplier = 9; 1070 uVoicesVolumeMultiplier = 9;
1086 //LABEL_173: 1071 //LABEL_173:
1087 if ( !uVoicesVolumeMultiplier ) 1072 if ( !uVoicesVolumeMultiplier )
1088 continue; 1073 continue;
1089 v165 = 0; 1074 v165 = 0;
1090 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0); 1075 v151 = pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f;
1091 v144 = 0; 1076 v144 = 0;
1092 v139 = 0; 1077 v139 = 0;
1093 v135 = -1; 1078 v135 = -1;
1094 v132 = 0; 1079 v132 = 0;
1095 v130 = -1; 1080 v130 = -1;
2278 pParty->sRotationY = LOWORD(pNPCData4->Location2D); 2263 pParty->sRotationY = LOWORD(pNPCData4->Location2D);
2279 pParty->sRotationX = HIWORD(pNPCData4->Location2D); 2264 pParty->sRotationX = HIWORD(pNPCData4->Location2D);
2280 } 2265 }
2281 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 2266 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
2282 { 2267 {
2283 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; 2268 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape;
2284 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0; 2269 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
2285 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; 2270 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
2286 ++pMessageQueue_50CBD0->uNumMessages; 2271 ++pMessageQueue_50CBD0->uNumMessages;
2287 } 2272 }
2288 //crt_deconstruct_ptr_6A0118(); 2273 //crt_deconstruct_ptr_6A0118();
3501 sprintf(pTmpBuf, "%d:%02d%s %s %d %s %d", pNPCData4, pParty->uCurrentMinute, aAMPMNames[uNumSeconds], aDayNames[pParty->uDaysPlayed % 7], 3486 sprintf(pTmpBuf, "%d:%02d%s %s %d %s %d", pNPCData4, pParty->uCurrentMinute, aAMPMNames[uNumSeconds], aDayNames[pParty->uDaysPlayed % 7],
3502 7 * pParty->uCurrentMonthWeek + pParty->uDaysPlayed % 7 + 1, aMonthNames[pParty->uCurrentMonth], pParty->uCurrentYear); 3487 7 * pParty->uCurrentMonthWeek + pParty->uDaysPlayed % 7 + 1, aMonthNames[pParty->uCurrentMonth], pParty->uCurrentYear);
3503 sub_41C0B8_set_status_string(pTmpBuf); 3488 sub_41C0B8_set_status_string(pTmpBuf);
3504 continue; 3489 continue;
3505 case UIMSG_ShowStatus_Food: 3490 case UIMSG_ShowStatus_Food:
3506 v173 = (char *)pParty->uNumFoodRations; 3491 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[501], pParty->uNumFoodRations); // "You have %lu food"
3507 v157 = pGlobalTXT_LocalizationStrings[501];// You have %lu food" 3492 sub_41C0B8_set_status_string(pTmpBuf);
3508 goto _sprintex_2args_draw_status_and_continue; 3493 continue;
3509 case UIMSG_ShowStatus_Player: 3494 case UIMSG_ShowStatus_Player:
3510 pPlayer5 = pPlayers[uMessageParam]; 3495 pPlayer5 = pPlayers[uMessageParam];
3511 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pPlayer5->pName, pClassNames[pPlayer5->classType]);// "%s the %s" 3496 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], pPlayer5->pName, pClassNames[pPlayer5->classType]);// "%s the %s"
3512 strcat(pTmpBuf, ": "); 3497 strcat(pTmpBuf, ": ");
3513 v107 = pPlayer5->GetMajorConditionIdx(); 3498 v107 = pPlayer5->GetMajorConditionIdx();
3635 continue; 3620 continue;
3636 case UIMSG_16F: 3621 case UIMSG_16F:
3637 if ( pCurrentScreen ) 3622 if ( pCurrentScreen )
3638 continue; 3623 continue;
3639 pParty->uFlags |= 2u; 3624 pParty->uFlags |= 2u;
3640 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0); 3625 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomOut, 0);
3641 uNumSeconds = 131072; 3626 uNumSeconds = 131072;
3642 v118 = 2 * viewparams->uMinimapZoom; 3627 v118 = 2 * viewparams->uMinimapZoom;
3643 ++viewparams->field_28; 3628 ++viewparams->field_28;
3644 viewparams->uMinimapZoom *= 2; 3629 viewparams->uMinimapZoom *= 2;
3645 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor) 3630 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
3658 goto LABEL_788; 3643 goto LABEL_788;
3659 case UIMSG_170: 3644 case UIMSG_170:
3660 if ( pCurrentScreen ) 3645 if ( pCurrentScreen )
3661 continue; 3646 continue;
3662 pParty->uFlags |= 2u; 3647 pParty->uFlags |= 2u;
3663 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0); 3648 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)pBtn_ZoomIn, 0);
3664 uNumSeconds = 32768; 3649 uNumSeconds = 32768;
3665 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; 3650 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16;
3666 --viewparams->field_28; 3651 --viewparams->field_28;
3667 viewparams->uMinimapZoom = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16; 3652 viewparams->uMinimapZoom = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16;
3668 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) 3653 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
5490 return; 5475 return;
5491 } 5476 }
5492 if ( pMonster->sCurrentHP > 0 ) 5477 if ( pMonster->sCurrentHP > 0 )
5493 { 5478 {
5494 Actor::_4030AD(uActorID_Monster_, a1, 0); 5479 Actor::_4030AD(uActorID_Monster_, a1, 0);
5495 Actor::_43AC45(uActorID_Monster_, 1); 5480 Actor::AggroSurroundingPeasants(uActorID_Monster_, 1);
5496 if ( bShowDamage ) 5481 if ( bShowDamage )
5497 { 5482 {
5498 v50 = uDamageAmount; 5483 v50 = uDamageAmount;
5499 pMonsterName = (char *)pMonster; 5484 pMonsterName = (char *)pMonster;
5500 pPlayerName = player->pName; 5485 pPlayerName = player->pName;
5535 pDecalBuilder->AddBloodsplat(v39, v38, v37, 1.0, 0.0, 0.0, *(float *)&pPlayerName, 0, 0); 5520 pDecalBuilder->AddBloodsplat(v39, v38, v37, 1.0, 0.0, 0.0, *(float *)&pPlayerName, 0, 0);
5536 } 5521 }
5537 } 5522 }
5538 } 5523 }
5539 Actor::Die(uActorID_Monster_); 5524 Actor::Die(uActorID_Monster_);
5540 Actor::_438CF3(uActorID_Monster_); 5525 Actor::ApplyFineForKillingPeasant(uActorID_Monster_);
5541 Actor::_43AC45(uActorID_Monster_, 1); 5526 Actor::AggroSurroundingPeasants(uActorID_Monster_, 1);
5542 if ( pMonster->pMonsterInfo.uExp ) 5527 if ( pMonster->pMonsterInfo.uExp )
5543 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].uExp); 5528 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].uExp);
5544 v40 = SPEECH_51; 5529 v40 = SPEECH_51;
5545 if ( rand() % 100 < 20 ) 5530 if ( rand() % 100 < 20 )
5546 v40 = ((signed int)pMonster->pMonsterInfo.uHP >= 100) + 1; 5531 v40 = ((signed int)pMonster->pMonsterInfo.uHP >= 100) + 1;
5825 v7->sCurrentHP -= v26; 5810 v7->sCurrentHP -= v26;
5826 if ( v26 ) 5811 if ( v26 )
5827 { 5812 {
5828 if ( v7->sCurrentHP >= 1 ) 5813 if ( v7->sCurrentHP >= 1 )
5829 { 5814 {
5830 Actor::_4030AD(uActorID, 8 * a4 | 4, 0); 5815 Actor::_4030AD(uActorID, 8 * a4 | OBJECT_Player, 0);
5831 Actor::_43AC45(uActorID, 1); 5816 Actor::AggroSurroundingPeasants(uActorID, 1);
5832 } 5817 }
5833 else 5818 else
5834 { 5819 {
5835 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 ) 5820 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 )
5836 { 5821 {
5852 pDecalBuilder->AddBloodsplat(v33, v32, v30, 1.0, 0.0, 0.0, v28, 0, 0); 5837 pDecalBuilder->AddBloodsplat(v33, v32, v30, 1.0, 0.0, 0.0, v28, 0, 0);
5853 } 5838 }
5854 } 5839 }
5855 } 5840 }
5856 Actor::Die(uActorID); 5841 Actor::Die(uActorID);
5857 Actor::_438CF3(uActorID); 5842 Actor::ApplyFineForKillingPeasant(uActorID);
5858 Actor::_43AC45(uActorID, 1); 5843 Actor::AggroSurroundingPeasants(uActorID, 1);
5859 if ( v7->pMonsterInfo.uExp ) 5844 if ( v7->pMonsterInfo.uExp )
5860 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v7->pMonsterInfo.uID].uExp); 5845 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v7->pMonsterInfo.uID].uExp);
5861 v34 = SPEECH_51; 5846 v34 = SPEECH_51;
5862 if ( rand() % 100 < 20 ) 5847 if ( rand() % 100 < 20 )
5863 v34 = ((signed int)v7->pMonsterInfo.uHP >= 100) + 1; 5848 v34 = ((signed int)v7->pMonsterInfo.uHP >= 100) + 1;
6011 v44->sCurrentHP -= v56; 5996 v44->sCurrentHP -= v56;
6012 if ( v56 ) 5997 if ( v56 )
6013 { 5998 {
6014 if ( v44->sCurrentHP >= 1 ) 5999 if ( v44->sCurrentHP >= 1 )
6015 { 6000 {
6016 Actor::_4030AD(uActorID, 8 * a4 | 4, 0); 6001 Actor::_4030AD(uActorID, 8 * a4 | OBJECT_Player, 0);
6017 Actor::_43AC45(uActorID, 1); 6002 Actor::AggroSurroundingPeasants(uActorID, 1);
6018 } 6003 }
6019 else 6004 else
6020 { 6005 {
6021 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 ) 6006 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 )
6022 { 6007 {
6038 pDecalBuilder->AddBloodsplat(v63, v62, v60, 1.0, 0.0, 0.0, v58, 0, 0); 6023 pDecalBuilder->AddBloodsplat(v63, v62, v60, 1.0, 0.0, 0.0, v58, 0, 0);
6039 } 6024 }
6040 } 6025 }
6041 } 6026 }
6042 Actor::Die(uActorID); 6027 Actor::Die(uActorID);
6043 Actor::_438CF3(uActorID); 6028 Actor::ApplyFineForKillingPeasant(uActorID);
6044 Actor::_43AC45(uActorID, 1); 6029 Actor::AggroSurroundingPeasants(uActorID, 1);
6045 if ( v44->pMonsterInfo.uExp ) 6030 if ( v44->pMonsterInfo.uExp )
6046 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v44->pMonsterInfo.uID].uExp); 6031 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v44->pMonsterInfo.uID].uExp);
6047 v64 = SPEECH_51; 6032 v64 = SPEECH_51;
6048 if ( rand() % 100 < 20 ) 6033 if ( rand() % 100 < 20 )
6049 v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1; 6034 v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1;
6346 } 6331 }
6347 } 6332 }
6348 } 6333 }
6349 6334
6350 //----- (0043B1B0) -------------------------------------------------------- 6335 //----- (0043B1B0) --------------------------------------------------------
6351 __int16 __fastcall sub_43B1B0(signed int a1, unsigned int a2, Vec3_int_ *pVelocity, signed int a4) 6336 void sub_43B1B0(signed int a1, unsigned int a2, Vec3_int_ *pVelocity, signed int a4)
6352 { 6337 {
6353 int v4; // ebx@1 6338 int v4; // ebx@1
6354 LayingItem *v5; // eax@2 6339 LayingItem *v5; // eax@2
6355 bool v6; // eax@3 6340 bool v6; // eax@3
6356 Actor *v7; // esi@4 6341 Actor *v7; // esi@4
6430 { 6415 {
6431 if ( v7->sCurrentHP > 0 ) 6416 if ( v7->sCurrentHP > 0 )
6432 Actor::_4030AD(uActorID, v17, 0); 6417 Actor::_4030AD(uActorID, v17, 0);
6433 else 6418 else
6434 Actor::Die(uActorID); 6419 Actor::Die(uActorID);
6435 Actor::_43AC45(uActorID, 0); 6420 Actor::AggroSurroundingPeasants(uActorID, 0);
6436 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP; 6421 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP;
6437 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 ) 6422 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 )
6438 v18 = 10; 6423 v18 = 10;
6439 if ( !MonsterStats::BelongsToSupertype(v7->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) ) 6424 if ( !MonsterStats::BelongsToSupertype(v7->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
6440 { 6425 {
6443 pVelocity->z = (unsigned __int64)(v18 * (signed __int64)pVelocity->z) >> 16; 6428 pVelocity->z = (unsigned __int64)(v18 * (signed __int64)pVelocity->z) >> 16;
6444 v7->vVelocity.x = 50 * LOWORD(pVelocity->x); 6429 v7->vVelocity.x = 50 * LOWORD(pVelocity->x);
6445 v7->vVelocity.y = 50 * LOWORD(pVelocity->y); 6430 v7->vVelocity.y = 50 * LOWORD(pVelocity->y);
6446 v7->vVelocity.z = 50 * LOWORD(pVelocity->z); 6431 v7->vVelocity.z = 50 * LOWORD(pVelocity->z);
6447 } 6432 }
6448 LOWORD(v6) = Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14); 6433 Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14);
6449 } 6434 }
6450 else 6435 else
6451 { 6436 {
6452 LOWORD(v6) = Actor::_4030AD(uActorID, v17, 0); 6437 Actor::_4030AD(uActorID, v17, 0);
6453 } 6438 }
6454 return v6; 6439 return;
6455 } 6440 }
6456 v13 = v7->pMonsterInfo.uSpell2ID; 6441 v13 = v7->pMonsterInfo.uSpell2ID;
6457 } 6442 }
6458 v12 = LOBYTE(pSpellStats->pInfos[v13].uSchool); 6443 v12 = LOBYTE(pSpellStats->pInfos[v13].uSchool);
6459 goto LABEL_30; 6444 goto LABEL_30;
6461 v12 = v8->pMonsterInfo.uAttack1Type; 6446 v12 = v8->pMonsterInfo.uAttack1Type;
6462 goto LABEL_30; 6447 goto LABEL_30;
6463 } 6448 }
6464 } 6449 }
6465 } 6450 }
6466 return v6;
6467 } 6451 }
6468 6452
6469 //----- (0043BCA7) -------------------------------------------------------- 6453 //----- (0043BCA7) --------------------------------------------------------
6470 int __cdecl CharacterUI_LoadPaperdollTextures() 6454 int __cdecl CharacterUI_LoadPaperdollTextures()
6471 { 6455 {
7019 } 7003 }
7020 7004
7021 //----- (0043CC7C) -------------------------------------------------------- 7005 //----- (0043CC7C) --------------------------------------------------------
7022 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID) 7006 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID)
7023 { 7007 {
7008 Player **ppPlayer; // esi@1
7024 Player *pPlayer; // ebx@1 7009 Player *pPlayer; // ebx@1
7010 enum CHARACTER_RACE pRace; // edi@1
7011 signed int pSex; // eax@1
7012 int v5; // edi@4
7025 unsigned int v6; // ecx@9 7013 unsigned int v6; // ecx@9
7026 int v7; // ecx@10 7014 int v7; // ecx@10
7027 unsigned int v8; // eax@14 7015 unsigned int v8; // eax@14
7028 int v9; // eax@15 7016 int v9; // eax@15
7029 int v10; // edx@15 7017 int v10; // edx@15
7035 Texture *v16; // ebp@27 7023 Texture *v16; // ebp@27
7036 double v17; // st7@29 7024 double v17; // st7@29
7037 int v18; // edi@30 7025 int v18; // edi@30
7038 char *v19; // eax@30 7026 char *v19; // eax@30
7039 Texture *v20; // edi@31 7027 Texture *v20; // edi@31
7040 int pBowNum; // eax@37 7028 unsigned int v21; // eax@37
7041 int v22; // edi@38 7029 int v22; // edi@38
7042 int v23; // eax@38 7030 int v23; // eax@38
7043 int pX; // ebx@38 7031 int v24; // ebx@38
7044 int v25; // eax@38 7032 int v25; // eax@38
7045 LODFile_IconsBitmaps *v26; // ecx@42 7033 LODFile_IconsBitmaps *v26; // ecx@42
7046 Texture *v27; // edi@51 7034 Texture *v27; // edi@51
7047 double v28; // st7@51 7035 double v28; // st7@51
7048 char v29; // zf@54 7036 char v29; // zf@54
7049 char *v30; // eax@54 7037 char *v30; // eax@54
7050 int pCloakNum; // eax@59 7038 unsigned int v31; // eax@59
7051 int v32; // edx@60 7039 int v32; // edx@60
7052 int v33; // eax@65 7040 int v33; // eax@65
7053 int v34; // eax@74 7041 int v34; // eax@74
7054 int v35; // ebx@74 7042 int v35; // ebx@74
7055 int pY2; // ecx@74 7043 unsigned int v36; // ecx@74
7056 int v37; // eax@74 7044 int v37; // eax@74
7057 LODFile_IconsBitmaps *v38; // ecx@78 7045 LODFile_IconsBitmaps *v38; // ecx@78
7058 Texture *v39; // edi@85 7046 Texture *v39; // edi@85
7059 double v40; // st7@87 7047 double v40; // st7@87
7060 int v41; // edi@88 7048 int v41; // edi@88
7209 Texture *v190; // [sp-4h] [bp-50h]@235 7197 Texture *v190; // [sp-4h] [bp-50h]@235
7210 signed int v191; // [sp-4h] [bp-50h]@266 7198 signed int v191; // [sp-4h] [bp-50h]@266
7211 signed int v192; // [sp-4h] [bp-50h]@304 7199 signed int v192; // [sp-4h] [bp-50h]@304
7212 unsigned int a3; // [sp+10h] [bp-3Ch]@7 7200 unsigned int a3; // [sp+10h] [bp-3Ch]@7
7213 int a3a; // [sp+10h] [bp-3Ch]@15 7201 int a3a; // [sp+10h] [bp-3Ch]@15
7214 int pY; // [sp+10h] [bp-3Ch]@38 7202 int a3b; // [sp+10h] [bp-3Ch]@38
7203 unsigned int a3c; // [sp+10h] [bp-3Ch]@74
7215 unsigned int a3d; // [sp+10h] [bp-3Ch]@106 7204 unsigned int a3d; // [sp+10h] [bp-3Ch]@106
7216 int a3e; // [sp+10h] [bp-3Ch]@129 7205 int a3e; // [sp+10h] [bp-3Ch]@129
7217 int a3f; // [sp+10h] [bp-3Ch]@168 7206 int a3f; // [sp+10h] [bp-3Ch]@168
7218 unsigned int a3g; // [sp+10h] [bp-3Ch]@216 7207 unsigned int a3g; // [sp+10h] [bp-3Ch]@216
7219 unsigned int a3h; // [sp+10h] [bp-3Ch]@274 7208 unsigned int a3h; // [sp+10h] [bp-3Ch]@274
7221 int a3j; // [sp+10h] [bp-3Ch]@336 7210 int a3j; // [sp+10h] [bp-3Ch]@336
7222 int a3k; // [sp+10h] [bp-3Ch]@362 7211 int a3k; // [sp+10h] [bp-3Ch]@362
7223 signed int a2; // [sp+14h] [bp-38h]@7 7212 signed int a2; // [sp+14h] [bp-38h]@7
7224 unsigned int a2a; // [sp+14h] [bp-38h]@15 7213 unsigned int a2a; // [sp+14h] [bp-38h]@15
7225 Texture *a2b; // [sp+14h] [bp-38h]@49 7214 Texture *a2b; // [sp+14h] [bp-38h]@49
7226 int pX2; // [sp+14h] [bp-38h]@74 7215 int a2c; // [sp+14h] [bp-38h]@74
7227 int a2d; // [sp+14h] [bp-38h]@106 7216 int a2d; // [sp+14h] [bp-38h]@106
7228 int a2e; // [sp+14h] [bp-38h]@129 7217 int a2e; // [sp+14h] [bp-38h]@129
7229 int a2f; // [sp+14h] [bp-38h]@168 7218 int a2f; // [sp+14h] [bp-38h]@168
7230 int a2g; // [sp+14h] [bp-38h]@214 7219 int a2g; // [sp+14h] [bp-38h]@214
7231 int a2h; // [sp+14h] [bp-38h]@274 7220 int a2h; // [sp+14h] [bp-38h]@274
7232 Texture *a2i; // [sp+14h] [bp-38h]@284 7221 Texture *a2i; // [sp+14h] [bp-38h]@284
7233 int a2j; // [sp+14h] [bp-38h]@312 7222 int a2j; // [sp+14h] [bp-38h]@312
7234 int a2k; // [sp+14h] [bp-38h]@336 7223 int a2k; // [sp+14h] [bp-38h]@336
7224 Player *v217; // [sp+18h] [bp-34h]@1
7235 int v218; // [sp+1Ch] [bp-30h]@15 7225 int v218; // [sp+1Ch] [bp-30h]@15
7226 int v219; // [sp+1Ch] [bp-30h]@60
7236 int v220; // [sp+1Ch] [bp-30h]@94 7227 int v220; // [sp+1Ch] [bp-30h]@94
7237 int v221; // [sp+1Ch] [bp-30h]@128 7228 int v221; // [sp+1Ch] [bp-30h]@128
7238 int v222; // [sp+1Ch] [bp-30h]@161 7229 int v222; // [sp+1Ch] [bp-30h]@161
7239 int v223; // [sp+1Ch] [bp-30h]@213 7230 int v223; // [sp+1Ch] [bp-30h]@213
7240 char v224; // [sp+1Ch] [bp-30h]@237 7231 char v224; // [sp+1Ch] [bp-30h]@237
7241 int v225; // [sp+1Ch] [bp-30h]@260 7232 int v225; // [sp+1Ch] [bp-30h]@260
7242 int v226; // [sp+1Ch] [bp-30h]@298 7233 int v226; // [sp+1Ch] [bp-30h]@298
7243 int v227; // [sp+1Ch] [bp-30h]@336 7234 int v227; // [sp+1Ch] [bp-30h]@336
7244 int v228; // [sp+1Ch] [bp-30h]@359 7235 int v228; // [sp+1Ch] [bp-30h]@359
7245 int v229; // [sp+20h] [bp-2Ch]@15 7236 int v229; // [sp+20h] [bp-2Ch]@15
7237 int v230; // [sp+20h] [bp-2Ch]@38
7238 int v231; // [sp+20h] [bp-2Ch]@60
7246 int v232; // [sp+20h] [bp-2Ch]@94 7239 int v232; // [sp+20h] [bp-2Ch]@94
7247 int v233; // [sp+20h] [bp-2Ch]@128 7240 int v233; // [sp+20h] [bp-2Ch]@128
7248 int v234; // [sp+20h] [bp-2Ch]@161 7241 int v234; // [sp+20h] [bp-2Ch]@161
7249 int v235; // [sp+20h] [bp-2Ch]@197 7242 int v235; // [sp+20h] [bp-2Ch]@197
7250 int v236; // [sp+20h] [bp-2Ch]@260 7243 int v236; // [sp+20h] [bp-2Ch]@260
7253 int pBodyComplection; // [sp+24h] [bp-28h]@6 7246 int pBodyComplection; // [sp+24h] [bp-28h]@6
7254 int v240; // [sp+28h] [bp-24h]@7 7247 int v240; // [sp+28h] [bp-24h]@7
7255 unsigned int v241; // [sp+2Ch] [bp-20h]@38 7248 unsigned int v241; // [sp+2Ch] [bp-20h]@38
7256 int v242; // [sp+2Ch] [bp-20h]@197 7249 int v242; // [sp+2Ch] [bp-20h]@197
7257 unsigned int v243; // [sp+2Ch] [bp-20h]@370 7250 unsigned int v243; // [sp+2Ch] [bp-20h]@370
7258 int pFaceNum; // [sp+34h] [bp-18h]@6 7251 int v244; // [sp+34h] [bp-18h]@6
7259 signed int v245; // [sp+34h] [bp-18h]@361 7252 signed int v245; // [sp+34h] [bp-18h]@361
7253 unsigned int uPlayerID_; // [sp+38h] [bp-14h]@1
7260 int uPlayerID_a; // [sp+38h] [bp-14h]@9 7254 int uPlayerID_a; // [sp+38h] [bp-14h]@9
7261 signed int IsDwarf; // [sp+40h] [bp-Ch]@4 7255 signed int IsDwarf; // [sp+40h] [bp-Ch]@4
7262 int v249; // [sp+40h] [bp-Ch]@358 7256 int v249; // [sp+40h] [bp-Ch]@358
7263 7257 signed int v250; // [sp+44h] [bp-8h]@1
7264 pPlayer = pPlayers[uPlayerID]; 7258
7259 ppPlayer = &pPlayers[uPlayerID];
7260 pPlayer = *ppPlayer;
7261 uPlayerID_ = uPlayerID;
7262 v217 = *ppPlayer;
7265 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); 7263 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
7266 if ( pPlayer->GetRace() && pPlayer->GetRace() != 1 && pPlayer->GetRace() != 2 ) 7264 pRace = pPlayer->GetRace();
7265 pSex = pPlayer->GetSexByVoice();
7266 v250 = pSex;
7267 if ( pRace && pRace != 1 && pRace != 2 )
7267 { 7268 {
7268 IsDwarf = 1; 7269 IsDwarf = 1;
7269 pBodyComplection = (pPlayer->GetSexByVoice() != 0) + 2; 7270 v5 = (pSex != 0) + 2;
7270 } 7271 }
7271 else 7272 else
7272 { 7273 {
7273 IsDwarf = 0; 7274 IsDwarf = 0;
7274 pBodyComplection = pPlayer->GetSexByVoice() != 0; 7275 v5 = pSex != 0;
7275 } 7276 }
7276 pFaceNum = pPlayer->uFace; 7277 pBodyComplection = v5;
7278 v244 = (*ppPlayer)->uFace;
7277 pRenderer->ResetClip(); 7279 pRenderer->ResetClip();
7278 pRenderer->DrawTextureIndexed(0x1D3u, 0, (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));// 7280 pRenderer->DrawTextureIndexed(0x1D3u, 0, (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));//
7279 if ( !IsPlayerWearingWatersuit[uPlayerID] )// 7281 if ( !IsPlayerWearingWatersuit[uPlayerID_] )
7280 { 7282 {
7281 pBowNum = pPlayer->pEquipment.uBow; // 7283 v21 = pPlayer->pEquipment.uBow; //
7282 if ( !pBowNum ) 7284 if ( !v21 )
7283 goto LABEL_59; 7285 goto LABEL_59;
7284 v22 = (int)&pPlayer->pInventoryItems[pBowNum-1]; 7286 v230 = pPlayer->pEquipment.uBow;
7287 v22 = (int)&v217->pInventoryItems[v21-1];
7285 v23 = *(int *)v22; 7288 v23 = *(int *)v22;
7286 pX = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[v23].uEquipX; 7289 v24 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[v23].uEquipX;
7287 pY = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[v23].uEquipY; 7290 a3b = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[v23].uEquipY;
7288 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE); 7291 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE);
7289 v25 = *(int *)(v22 + 20); 7292 v25 = *(int *)(v22 + 20);
7290 if ( !(*(int *)(v22 + 20) & 0xF0) ) 7293 if ( !(*(int *)(v22 + 20) & 0xF0) )
7291 { 7294 {
7292 if ( v25 & 2 ) 7295 if ( v25 & 2 )
7293 { 7296 {
7294 pRenderer->_4A6776(pX, pY, (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0)); 7297 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
7298 pRenderer->DrawTransparentRedShade(v24, a3b, v27);
7295 } 7299 }
7296 else 7300 else
7297 { 7301 {
7298 v29 = (v25 & 1) == 0; 7302 v29 = (v25 & 1) == 0;
7299 v30 = (char *)&pIcons_LOD->pTextures[v241]; 7303 v30 = (char *)&pIcons_LOD->pTextures[v241];
7300 if ( v29 ) 7304 if ( v29 )
7301 { 7305 {
7302 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0); 7306 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
7303 pRenderer->DrawTransparentGreenShade(pX, pY, (Texture *)(v241 != -1 ? (int)v30 : 0)); 7307 pRenderer->DrawTransparentGreenShade(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
7304 } 7308 }
7305 else 7309 else
7306 { 7310 {
7307 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0); 7311 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
7308 pRenderer->DrawTextureTransparent(pX, pY, (Texture *)(v241 != -1 ? (int)v30 : 0)); 7312 pRenderer->DrawTextureTransparent(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
7309 } 7313 }
7310 } 7314 }
7311 LABEL_57: 7315 LABEL_57:
7312 if ( !bRingsShownInCharScreen ) 7316 if ( !bRingsShownInCharScreen )
7313 pRenderer->_4A612A(pX, pY, v27, pBowNum); 7317 pRenderer->_4A612A(v24, a3b, v27, v230);
7314 LABEL_59: 7318 LABEL_59:
7315 pCloakNum = pPlayer->pEquipment.uCloak;// 7319 v31 = v217->pEquipment.uCloak;//
7316 if ( !pCloakNum ) 7320 if ( !v31 )
7317 goto LABEL_93; 7321 goto LABEL_93;
7318 v32 = (int)&pPlayer->pInventoryItems[pCloakNum-1]; 7322 v231 = v217->pEquipment.uCloak;
7323 v32 = (int)&v217->pInventoryItems[v31-1];
7324 v219 = v32;
7319 if ( *(int *)v32 != 525 ) 7325 if ( *(int *)v32 != 525 )
7320 { 7326 {
7321 switch ( *(int *)v32 ) 7327 switch ( *(int *)v32 )
7322 { 7328 {
7323 case 0x212: 7329 case 0x212:
7337 if ( v33 < 0 || v33 >= 10 ) 7343 if ( v33 < 0 || v33 >= 10 )
7338 goto LABEL_93; 7344 goto LABEL_93;
7339 LABEL_74: 7345 LABEL_74:
7340 v34 = v33 + 10 * pBodyComplection; 7346 v34 = v33 + 10 * pBodyComplection;
7341 v35 = paperdoll_array_511828[0][v34];//Texture_Cloak 7347 v35 = paperdoll_array_511828[0][v34];//Texture_Cloak
7342 pX2 = pPaperdoll_BodyX + paperdoll_Cloak[0][v34][0]; 7348 a2c = pPaperdoll_BodyX + paperdoll_Cloak[0][v34][0];
7343 pY2 = pPaperdoll_BodyY + paperdoll_Cloak[0][v34][1]; 7349 v36 = pPaperdoll_BodyY + paperdoll_Cloak[0][v34][1];
7344 v37 = *(int *)(v32 + 20); 7350 v37 = *(int *)(v32 + 20);
7351 a3c = v36;
7345 if ( !(v37 & 0xF0) ) 7352 if ( !(v37 & 0xF0) )
7346 { 7353 {
7347 v41 = v35 + 1; 7354 v41 = v35 + 1;
7348 if ( v37 & 2 ) 7355 if ( v37 & 2 )
7349 { 7356 {
7350 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0); 7357 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
7351 pRenderer->_4A6776(pX2, pY2, v42); 7358 pRenderer->DrawTransparentRedShade(a2c, v36, v42);
7352 } 7359 }
7353 else 7360 else
7354 { 7361 {
7355 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0); 7362 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
7356 pRenderer->DrawTextureTransparent(pX2, pY2, v42); 7363 pRenderer->DrawTextureTransparent(a2c, v36, v42);
7357 } 7364 }
7358 if ( !bRingsShownInCharScreen ) 7365 if ( !bRingsShownInCharScreen )
7359 pRenderer->_4A612A(pX2, pY2, v42, pCloakNum); 7366 pRenderer->_4A612A(a2c, a3c, v42, v231);
7360 LABEL_93: 7367 LABEL_93:
7361 v240 = 4 * uPlayerID - 4; 7368 v240 = 4 * uPlayerID_ - 4;
7362 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, 7369 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,
7363 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0)); 7370 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0));
7364 v43 = pPlayer->pEquipment.uBody;// 7371 v43 = v217->pEquipment.uBody;//
7365 if ( !v43 ) 7372 if ( !v43 )
7366 goto LABEL_127; 7373 goto LABEL_127;
7367 v232 = pPlayer->pEquipment.uBody; 7374 v232 = v217->pEquipment.uBody;
7368 v44 = (int)&pPlayer->pInventoryItems[v43-1]; 7375 v44 = (int)&v217->pInventoryItems[v43-1];
7369 v220 = v44; 7376 v220 = v44;
7370 if ( *(int *)v44 != 504 ) 7377 if ( *(int *)v44 != 504 )
7371 { 7378 {
7372 if ( *(int *)v44 == 505 ) 7379 if ( *(int *)v44 == 505 )
7373 { 7380 {
7398 { 7405 {
7399 v53 = v48 + 1; 7406 v53 = v48 + 1;
7400 if ( v49 & 2 ) 7407 if ( v49 & 2 )
7401 { 7408 {
7402 v54 = (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0); 7409 v54 = (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0);
7403 pRenderer->_4A6776(a2d, v47, v54); 7410 pRenderer->DrawTransparentRedShade(a2d, v47, v54);
7404 } 7411 }
7405 else 7412 else
7406 { 7413 {
7407 v29 = (v49 & 1) == 0; 7414 v29 = (v49 & 1) == 0;
7408 v55 = (char *)&pIcons_LOD->pTextures[v48]; 7415 v55 = (char *)&pIcons_LOD->pTextures[v48];
7418 } 7425 }
7419 } 7426 }
7420 if ( !bRingsShownInCharScreen ) 7427 if ( !bRingsShownInCharScreen )
7421 pRenderer->_4A612A(a2d, a3d, v54, v232); 7428 pRenderer->_4A612A(a2d, a3d, v54, v232);
7422 LABEL_127: 7429 LABEL_127:
7423 v56 = pPlayer->pEquipment.field_20; 7430 v56 = v217->pEquipment.field_20;
7424 if ( !v56 ) 7431 if ( !v56 )
7425 goto LABEL_155; 7432 goto LABEL_155;
7426 v233 = pPlayer->pEquipment.field_20; 7433 v233 = v217->pEquipment.field_20;
7427 v57 = (int)&pPlayer->pInventoryItems[v56-1]; 7434 v57 = (int)&v217->pInventoryItems[v56-1];
7428 v221 = v57; 7435 v221 = v57;
7429 v58 = *(int *)v57; 7436 v58 = *(int *)v57;
7430 if ( *(int *)v57 == 529 ) 7437 if ( *(int *)v57 == 529 )
7431 { 7438 {
7432 a3e = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][5][1]; 7439 a3e = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][5][1];
7433 a2e = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][5][0]; 7440 a2e = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][5][0];
7434 v59 = papredoll_flying_feet[pFaceNum]; 7441 v59 = papredoll_flying_feet[v244];
7435 } 7442 }
7436 else 7443 else
7437 { 7444 {
7438 if ( v58 == 512 ) 7445 if ( v58 == 512 )
7439 { 7446 {
7465 v65 = v59 + 1; 7472 v65 = v59 + 1;
7466 v66 = (char *)&pIcons_LOD->pTextures[v59]; 7473 v66 = (char *)&pIcons_LOD->pTextures[v59];
7467 if ( v62 & 2 ) 7474 if ( v62 & 2 )
7468 { 7475 {
7469 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0); 7476 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
7470 pRenderer->_4A6776(a2e, a3e, v67); 7477 pRenderer->DrawTransparentRedShade(a2e, a3e, v67);
7471 } 7478 }
7472 else 7479 else
7473 { 7480 {
7474 if ( v62 & 1 ) 7481 if ( v62 & 1 )
7475 { 7482 {
7483 } 7490 }
7484 } 7491 }
7485 if ( !bRingsShownInCharScreen ) 7492 if ( !bRingsShownInCharScreen )
7486 pRenderer->_4A612A(a2e, a3e, v67, v233); 7493 pRenderer->_4A612A(a2e, a3e, v67, v233);
7487 LABEL_155: 7494 LABEL_155:
7488 v68 = pPlayer; 7495 v68 = v217;
7489 v69 = pPlayer->pEquipment.uMainHand; 7496 v69 = v217->pEquipment.uMainHand;
7490 uPlayerID_a = 2 * pBodyComplection; 7497 uPlayerID_a = 2 * pBodyComplection;
7491 if ( !v69 || (v70 = *(int *)&pPlayer->pInventoryItems[v69-1], pItemsTable->pItems[v70].uEquipType != 1) 7498 if ( !v69 || (v70 = *(int *)&v217->pInventoryItems[v69-1], pItemsTable->pItems[v70].uEquipType != 1)
7492 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayer->pEquipment.uOffHand) ) 7499 && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) )
7493 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], 7500 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
7494 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], 7501 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
7495 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); 7502 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
7496 v71 = pPlayer->pEquipment.uBelt; 7503 v71 = v217->pEquipment.uBelt;
7497 if ( v71 ) 7504 if ( v71 )
7498 { 7505 {
7499 v234 = pPlayer->pEquipment.uBelt; 7506 v234 = v217->pEquipment.uBelt;
7500 v72 = (int)&pPlayer->pInventoryItems[v71-1]; 7507 v72 = (int)&v217->pInventoryItems[v71-1];
7501 v222 = v72; 7508 v222 = v72;
7502 if ( *(int *)v72 == 524 ) 7509 if ( *(int *)v72 == 524 )
7503 { 7510 {
7504 v73 = 5; 7511 v73 = 5;
7505 } 7512 }
7520 a3f = pPaperdoll_BodyY + paperdoll_Belt[0][v74][1]; 7527 a3f = pPaperdoll_BodyY + paperdoll_Belt[0][v74][1];
7521 if ( IsDwarf != 1 || v73 == 5 ) 7528 if ( IsDwarf != 1 || v73 == 5 )
7522 v75 = stru_511718.texids[v74]; 7529 v75 = stru_511718.texids[v74];
7523 else 7530 else
7524 v75 = stru_511718.texids[v73 + 7 * (pBodyComplection - 2)]; 7531 v75 = stru_511718.texids[v73 + 7 * (pBodyComplection - 2)];
7525 v76 = *(int *)&pPlayer->field_1F5[36 * v71 + 15]; 7532 v76 = *(int *)&v217->field_1F5[36 * v71 + 15];
7526 if ( !(*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) ) 7533 if ( !(*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) )
7527 { 7534 {
7528 v79 = v75 + 1; 7535 v79 = v75 + 1;
7529 v80 = (char *)&pIcons_LOD->pTextures[v75]; 7536 v80 = (char *)&pIcons_LOD->pTextures[v75];
7530 if ( v76 & 2 ) 7537 if ( v76 & 2 )
7531 { 7538 {
7532 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0); 7539 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
7533 pRenderer->_4A6776(a2f, a3f, v81); 7540 pRenderer->DrawTransparentRedShade(a2f, a3f, v81);
7534 } 7541 }
7535 else 7542 else
7536 { 7543 {
7537 if ( v76 & 1 ) 7544 if ( v76 & 1 )
7538 { 7545 {
7545 pRenderer->DrawTransparentGreenShade(a2f, a3f, v81); 7552 pRenderer->DrawTransparentGreenShade(a2f, a3f, v81);
7546 } 7553 }
7547 } 7554 }
7548 if ( !bRingsShownInCharScreen ) 7555 if ( !bRingsShownInCharScreen )
7549 pRenderer->_4A612A(a2f, a3f, v81, v234); 7556 pRenderer->_4A612A(a2f, a3f, v81, v234);
7550 v68 = pPlayer; 7557 v68 = v217;
7551 goto LABEL_192; 7558 goto LABEL_192;
7552 } 7559 }
7553 if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) != 16 ) 7560 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) != 16 )
7554 { 7561 {
7555 if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 32 ) 7562 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 32 )
7556 { 7563 {
7557 v172 = "sp28a"; 7564 v172 = "sp28a";
7558 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; 7565 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
7559 dword_50C9A8 -= pEventTimer->uTimeElapsed; 7566 dword_50C9A8 -= pEventTimer->uTimeElapsed;
7560 if ( dword_50C9A8 <= 0 ) 7567 if ( dword_50C9A8 <= 0 )
7563 *(char *)(v222 + 20) &= 0xFu; 7570 *(char *)(v222 + 20) &= 0xFu;
7564 ptr_50C9A4 = 0; 7571 ptr_50C9A4 = 0;
7565 } 7572 }
7566 v78 = (double)GetTickCount() * 0.1; 7573 v78 = (double)GetTickCount() * 0.1;
7567 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); 7574 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
7568 v68 = pPlayer; 7575 v68 = v217;
7569 goto LABEL_192; 7576 goto LABEL_192;
7570 } 7577 }
7571 if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 64 ) 7578 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 64 )
7572 { 7579 {
7573 v172 = "sp30a"; 7580 v172 = "sp30a";
7574 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; 7581 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
7575 dword_50C9A8 -= pEventTimer->uTimeElapsed; 7582 dword_50C9A8 -= pEventTimer->uTimeElapsed;
7576 if ( dword_50C9A8 <= 0 ) 7583 if ( dword_50C9A8 <= 0 )
7579 *(char *)(v222 + 20) &= 0xFu; 7586 *(char *)(v222 + 20) &= 0xFu;
7580 ptr_50C9A4 = 0; 7587 ptr_50C9A4 = 0;
7581 } 7588 }
7582 v78 = (double)GetTickCount() * 0.1; 7589 v78 = (double)GetTickCount() * 0.1;
7583 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); 7590 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
7584 v68 = pPlayer; 7591 v68 = v217;
7585 goto LABEL_192; 7592 goto LABEL_192;
7586 } 7593 }
7587 if ( (*(int *)&pPlayer->field_1F5[36 * v71 + 15] & 0xF0) == 128 ) 7594 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 128 )
7588 { 7595 {
7589 v172 = "sp91a"; 7596 v172 = "sp91a";
7590 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; 7597 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
7591 dword_50C9A8 -= pEventTimer->uTimeElapsed; 7598 dword_50C9A8 -= pEventTimer->uTimeElapsed;
7592 if ( dword_50C9A8 <= 0 ) 7599 if ( dword_50C9A8 <= 0 )
7595 *(char *)(v222 + 20) &= 0xFu; 7602 *(char *)(v222 + 20) &= 0xFu;
7596 ptr_50C9A4 = 0; 7603 ptr_50C9A4 = 0;
7597 } 7604 }
7598 v78 = (double)GetTickCount() * 0.1; 7605 v78 = (double)GetTickCount() * 0.1;
7599 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); 7606 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
7600 v68 = pPlayer; 7607 v68 = v217;
7601 goto LABEL_192; 7608 goto LABEL_192;
7602 } 7609 }
7603 } 7610 }
7604 v172 = "sptext01"; 7611 v172 = "sptext01";
7605 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; 7612 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
7610 *(char *)(v222 + 20) &= 0xFu; 7617 *(char *)(v222 + 20) &= 0xFu;
7611 ptr_50C9A4 = 0; 7618 ptr_50C9A4 = 0;
7612 } 7619 }
7613 v78 = (double)GetTickCount() * 0.1; 7620 v78 = (double)GetTickCount() * 0.1;
7614 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); 7621 pRenderer->_4A63E6(a2f, a3f, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255);
7615 v68 = pPlayer; 7622 v68 = v217;
7616 goto LABEL_192; 7623 goto LABEL_192;
7617 } 7624 }
7618 } 7625 }
7619 LABEL_192: 7626 LABEL_192:
7620 v82 = v68->pEquipment.uMainHand; 7627 v82 = v68->pEquipment.uMainHand;
7683 a2h = pPaperdoll_BodyX + *(int *)((char *)&dword_4E56B0 + v115); 7690 a2h = pPaperdoll_BodyX + *(int *)((char *)&dword_4E56B0 + v115);
7684 a3h = pPaperdoll_BodyY + *(int *)((char *)&dword_4E56B4 + v115); 7691 a3h = pPaperdoll_BodyY + *(int *)((char *)&dword_4E56B4 + v115);
7685 if ( v116 == pIcons_LOD->FindTextureByName("pending") ) 7692 if ( v116 == pIcons_LOD->FindTextureByName("pending") )
7686 { 7693 {
7687 LABEL_292: 7694 LABEL_292:
7688 v68 = pPlayer; 7695 v68 = v217;
7689 LABEL_293: 7696 LABEL_293:
7690 if ( pFaceNum == 12 || pFaceNum == 13 ) 7697 if ( v244 == 12 || v244 == 13 )
7691 { 7698 {
7692 v122 = papredoll_dbrds[pFaceNum]; 7699 v122 = papredoll_dbrds[v244];
7693 if ( v122 != pIcons_LOD->FindTextureByName("Pending") ) 7700 if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
7694 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pFaceNum - 24], 7701 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * v244 - 24],
7695 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pFaceNum - 23], 7702 pPaperdoll_BodyY + pPaperdoll_Beards[2 * v244 - 23],
7696 (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0)); 7703 (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0));
7697 } 7704 }
7698 v123 = v68->pEquipment.uHelm; 7705 v123 = v68->pEquipment.uHelm;
7699 if ( !v123 ) 7706 if ( !v123 )
7700 goto LABEL_335; 7707 goto LABEL_335;
7701 v237 = v123; 7708 v237 = v123;
7702 v124 = (int)&pPlayer->pInventoryItems[v123-1]; 7709 v124 = (int)&v217->pInventoryItems[v123-1];
7703 v226 = v124; 7710 v226 = v124;
7704 if ( *(int *)v124 != 521 ) 7711 if ( *(int *)v124 != 521 )
7705 { 7712 {
7706 switch ( *(int *)v124 ) 7713 switch ( *(int *)v124 )
7707 { 7714 {
7729 LABEL_312: 7736 LABEL_312:
7730 v126 = 2 * (v125 + 16 * pBodyComplection); 7737 v126 = 2 * (v125 + 16 * pBodyComplection);
7731 a2j = pPaperdoll_BodyX + dword_4E58D0[v126]; 7738 a2j = pPaperdoll_BodyX + dword_4E58D0[v126];
7732 a3i = pPaperdoll_BodyY + dword_4E58D4[v126]; 7739 a3i = pPaperdoll_BodyY + dword_4E58D4[v126];
7733 if ( IsDwarf != 1 || *(int *)v124 != 92 ) 7740 if ( IsDwarf != 1 || *(int *)v124 != 92 )
7734 v127 = stru_511698.texids[v125 + 16 * pPlayer->GetSexByVoice()]; 7741 v127 = stru_511698.texids[v125 + 16 * v250];
7735 else 7742 else
7736 v127 = papredoll_dbrds[11]; 7743 v127 = papredoll_dbrds[11];
7737 v128 = *(int *)(v124 + 20); 7744 v128 = *(int *)(v124 + 20);
7738 if ( *(int *)(v124 + 20) & 0xF0 ) 7745 if ( *(int *)(v124 + 20) & 0xF0 )
7739 { 7746 {
7805 v131 = v127 + 1; 7812 v131 = v127 + 1;
7806 v132 = (char *)&pIcons_LOD->pTextures[v127]; 7813 v132 = (char *)&pIcons_LOD->pTextures[v127];
7807 if ( v128 & 2 ) 7814 if ( v128 & 2 )
7808 { 7815 {
7809 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0); 7816 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
7810 pRenderer->_4A6776(a2j, a3i, v133); 7817 pRenderer->DrawTransparentRedShade(a2j, a3i, v133);
7811 } 7818 }
7812 else 7819 else
7813 { 7820 {
7814 if ( v128 & 1 ) 7821 if ( v128 & 1 )
7815 { 7822 {
7823 } 7830 }
7824 } 7831 }
7825 if ( !bRingsShownInCharScreen ) 7832 if ( !bRingsShownInCharScreen )
7826 pRenderer->_4A612A(a2j, a3i, v133, v237); 7833 pRenderer->_4A612A(a2j, a3i, v133, v237);
7827 LABEL_335: 7834 LABEL_335:
7828 v134 = pPlayer->pEquipment.uMainHand; 7835 v134 = v217->pEquipment.uMainHand;
7829 if ( !v134 ) 7836 if ( !v134 )
7830 goto LABEL_358; 7837 goto LABEL_358;
7831 v238 = pPlayer->pEquipment.uMainHand; 7838 v238 = v217->pEquipment.uMainHand;
7832 v135 = (int)&pPlayer->pInventoryItems[v134-1]; 7839 v135 = (int)&v217->pInventoryItems[v134-1];
7833 v227 = v135; 7840 v227 = v135;
7834 v136 = *(int *)v135; 7841 v136 = *(int *)v135;
7835 v137 = *(int *)v135; 7842 v137 = *(int *)v135;
7836 a2k = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v137].uEquipX; 7843 a2k = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v137].uEquipX;
7837 a3j = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[v137].uEquipY; 7844 a3j = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[v137].uEquipY;
7846 v142 = v138 + 1; 7853 v142 = v138 + 1;
7847 v143 = (char *)&pIcons_LOD->pTextures[v138]; 7854 v143 = (char *)&pIcons_LOD->pTextures[v138];
7848 if ( v139 & 2 ) 7855 if ( v139 & 2 )
7849 { 7856 {
7850 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0); 7857 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
7851 pRenderer->_4A6776(a2k, a3j, v144); 7858 pRenderer->DrawTransparentRedShade(a2k, a3j, v144);
7852 } 7859 }
7853 else 7860 else
7854 { 7861 {
7855 if ( v139 & 1 ) 7862 if ( v139 & 1 )
7856 { 7863 {
7864 } 7871 }
7865 } 7872 }
7866 if ( !bRingsShownInCharScreen ) 7873 if ( !bRingsShownInCharScreen )
7867 pRenderer->_4A612A(a2k, a3j, v144, v238); 7874 pRenderer->_4A612A(a2k, a3j, v144, v238);
7868 LABEL_358: 7875 LABEL_358:
7869 v145 = pPlayer->pEquipment.uOffHand; 7876 v145 = v217->pEquipment.uOffHand;
7870 v249 = pPlayer->pEquipment.uOffHand; 7877 v249 = v217->pEquipment.uOffHand;
7871 if ( !v145 ) 7878 if ( !v145 )
7872 goto LABEL_393; 7879 goto LABEL_393;
7873 v146 = (int)&pPlayer->pInventoryItems[v145-1]; 7880 v146 = (int)&v217->pInventoryItems[v145-1];
7874 v228 = v146; 7881 v228 = v146;
7875 v147 = *(int *)v146; 7882 v147 = *(int *)v146;
7876 v148 = *(int *)v146; 7883 v148 = *(int *)v146;
7877 v149 = pItemsTable->pItems[v148].uSkillType; 7884 v149 = pItemsTable->pItems[v148].uSkillType;
7878 if ( v149 != 2 && v149 != 1 ) 7885 if ( v149 != 2 && v149 != 1 )
7905 if ( !(*(int *)(v228 + 20) & 0xF0) ) 7912 if ( !(*(int *)(v228 + 20) & 0xF0) )
7906 { 7913 {
7907 if ( v155 & 2 ) 7914 if ( v155 & 2 )
7908 { 7915 {
7909 v159 = (Texture *)(v243 != -1 ? (int)&pIcons_LOD->pTextures[v243] : 0); 7916 v159 = (Texture *)(v243 != -1 ? (int)&pIcons_LOD->pTextures[v243] : 0);
7910 pRenderer->_4A6776(v150, a3k, v159); 7917 pRenderer->DrawTransparentRedShade(v150, a3k, v159);
7911 } 7918 }
7912 else 7919 else
7913 { 7920 {
7914 v29 = (v155 & 1) == 0; 7921 v29 = (v155 & 1) == 0;
7915 v160 = (char *)&pIcons_LOD->pTextures[v243]; 7922 v160 = (char *)&pIcons_LOD->pTextures[v243];
8109 v119 = v116 + 1; 8116 v119 = v116 + 1;
8110 v120 = (char *)&pIcons_LOD->pTextures[v116]; 8117 v120 = (char *)&pIcons_LOD->pTextures[v116];
8111 if ( *(int *)(v225 + 20) & 2 ) 8118 if ( *(int *)(v225 + 20) & 2 )
8112 { 8119 {
8113 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0); 8120 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8114 pRenderer->_4A6776(a2h, a3h, v121); 8121 pRenderer->DrawTransparentRedShade(a2h, a3h, v121);
8115 } 8122 }
8116 else 8123 else
8117 { 8124 {
8118 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0); 8125 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8119 pRenderer->DrawTextureTransparent(a2h, a3h, v121); 8126 pRenderer->DrawTextureTransparent(a2h, a3h, v121);
8219 v95 = dword_4E5270[2 * v91 + 1]; 8226 v95 = dword_4E5270[2 * v91 + 1];
8220 } 8227 }
8221 a3g = pPaperdoll_BodyY + v95; 8228 a3g = pPaperdoll_BodyY + v95;
8222 if ( v94 == pIcons_LOD->FindTextureByName("pending") ) 8229 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8223 { 8230 {
8224 v68 = pPlayer; 8231 v68 = v217;
8225 goto LABEL_259; 8232 goto LABEL_259;
8226 } 8233 }
8227 if ( *(int *)(v242 + 516) & 0xF0 ) 8234 if ( *(int *)(v242 + 516) & 0xF0 )
8228 { 8235 {
8229 if ( (*(int *)(v242 + 516) & 0xF0) != 16 ) 8236 if ( (*(int *)(v242 + 516) & 0xF0) != 16 )
8242 v187 = 255; 8249 v187 = 255;
8243 v174 = 0; 8250 v174 = 0;
8244 v97 = (double)GetTickCount(); 8251 v97 = (double)GetTickCount();
8245 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8252 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8246 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8253 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8247 v68 = pPlayer; 8254 v68 = v217;
8248 goto LABEL_259; 8255 goto LABEL_259;
8249 } 8256 }
8250 if ( (*(int *)(v242 + 516) & 0xF0) == 64 ) 8257 if ( (*(int *)(v242 + 516) & 0xF0) == 64 )
8251 { 8258 {
8252 v173 = "sp30a"; 8259 v173 = "sp30a";
8261 v187 = 255; 8268 v187 = 255;
8262 v174 = 0; 8269 v174 = 0;
8263 v97 = (double)GetTickCount(); 8270 v97 = (double)GetTickCount();
8264 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8271 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8265 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8272 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8266 v68 = pPlayer; 8273 v68 = v217;
8267 goto LABEL_259; 8274 goto LABEL_259;
8268 } 8275 }
8269 if ( (*(int *)(v242 + 516) & 0xF0) == 128 ) 8276 if ( (*(int *)(v242 + 516) & 0xF0) == 128 )
8270 { 8277 {
8271 v173 = "sp91a"; 8278 v173 = "sp91a";
8280 v187 = 255; 8287 v187 = 255;
8281 v174 = 0; 8288 v174 = 0;
8282 v97 = (double)GetTickCount(); 8289 v97 = (double)GetTickCount();
8283 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8290 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8284 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8291 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8285 v68 = pPlayer; 8292 v68 = v217;
8286 goto LABEL_259; 8293 goto LABEL_259;
8287 } 8294 }
8288 } 8295 }
8289 v173 = "sptext01"; 8296 v173 = "sptext01";
8290 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; 8297 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)];
8298 v187 = 255; 8305 v187 = 255;
8299 v174 = 0; 8306 v174 = 0;
8300 v97 = (double)GetTickCount(); 8307 v97 = (double)GetTickCount();
8301 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8308 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8302 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8309 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8303 v68 = pPlayer; 8310 v68 = v217;
8304 goto LABEL_259; 8311 goto LABEL_259;
8305 } 8312 }
8306 v98 = v94 + 1; 8313 v98 = v94 + 1;
8307 v99 = (char *)&pIcons_LOD->pTextures[v94]; 8314 v99 = (char *)&pIcons_LOD->pTextures[v94];
8308 v100 = pRenderer; 8315 v100 = pRenderer;
8310 { 8317 {
8311 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0); 8318 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8312 v188 = v101; 8319 v188 = v101;
8313 v175 = a3g; 8320 v175 = a3g;
8314 v163 = a2g; 8321 v163 = a2g;
8315 v100->_4A6776(v163, v175, v188); 8322 v100->DrawTransparentRedShade(v163, v175, v188);
8316 if ( !bRingsShownInCharScreen ) 8323 if ( !bRingsShownInCharScreen )
8317 pRenderer->_4A612A(a2g, a3g, v101, v235); 8324 pRenderer->_4A612A(a2g, a3g, v101, v235);
8318 v68 = pPlayer; 8325 v68 = v217;
8319 goto LABEL_259; 8326 goto LABEL_259;
8320 } 8327 }
8321 if ( *(char *)(v242 + 516) & 1 ) 8328 if ( *(char *)(v242 + 516) & 1 )
8322 { 8329 {
8323 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0); 8330 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8325 v176 = a3g; 8332 v176 = a3g;
8326 v164 = a2g; 8333 v164 = a2g;
8327 pRenderer->DrawTextureTransparent(v164, v176, v189); 8334 pRenderer->DrawTextureTransparent(v164, v176, v189);
8328 if ( !bRingsShownInCharScreen ) 8335 if ( !bRingsShownInCharScreen )
8329 pRenderer->_4A612A(a2g, a3g, v101, v235); 8336 pRenderer->_4A612A(a2g, a3g, v101, v235);
8330 v68 = pPlayer; 8337 v68 = v217;
8331 goto LABEL_259; 8338 goto LABEL_259;
8332 } 8339 }
8333 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0); 8340 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8334 v190 = v101; 8341 v190 = v101;
8335 v177 = a3g; 8342 v177 = a3g;
8336 v165 = a2g; 8343 v165 = a2g;
8337 pRenderer->DrawTransparentGreenShade(v165, v177, v190); 8344 pRenderer->DrawTransparentGreenShade(v165, v177, v190);
8338 if ( !bRingsShownInCharScreen ) 8345 if ( !bRingsShownInCharScreen )
8339 pRenderer->_4A612A(a2g, a3g, v101, v235); 8346 pRenderer->_4A612A(a2g, a3g, v101, v235);
8340 v68 = pPlayer; 8347 v68 = v217;
8341 goto LABEL_259; 8348 goto LABEL_259;
8342 } 8349 }
8343 v102 = 17 * pBodyComplection + v90; 8350 v102 = 17 * pBodyComplection + v90;
8344 v94 = paperdoll_array_511290[0][v102][1]; 8351 v94 = paperdoll_array_511290[0][v102][1];
8345 if ( v94 == pIcons_LOD->FindTextureByName("pending") ) 8352 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8346 { 8353 {
8347 v68 = pPlayer; 8354 v68 = v217;
8348 goto LABEL_259; 8355 goto LABEL_259;
8349 } 8356 }
8350 v103 = pPaperdoll_BodyX + paperdoll_shoulder[0][v102][0]; 8357 v103 = pPaperdoll_BodyX + paperdoll_shoulder[0][v102][0];
8351 v104 = pPaperdoll_BodyY + paperdoll_shoulder[0][v102][1]; 8358 v104 = pPaperdoll_BodyY + paperdoll_shoulder[0][v102][1];
8352 v224 = *(int *)(v242 + 516); 8359 v224 = *(int *)(v242 + 516);
8362 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0); 8369 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8363 v188 = v101; 8370 v188 = v101;
8364 v175 = v104; 8371 v175 = v104;
8365 v163 = v103; 8372 v163 = v103;
8366 v100 = pRenderer; 8373 v100 = pRenderer;
8367 v100->_4A6776(v163, v175, v188); 8374 v100->DrawTransparentRedShade(v163, v175, v188);
8368 if ( !bRingsShownInCharScreen ) 8375 if ( !bRingsShownInCharScreen )
8369 pRenderer->_4A612A(a2g, a3g, v101, v235); 8376 pRenderer->_4A612A(a2g, a3g, v101, v235);
8370 v68 = pPlayer; 8377 v68 = v217;
8371 goto LABEL_259; 8378 goto LABEL_259;
8372 } 8379 }
8373 if ( v224 & 1 ) 8380 if ( v224 & 1 )
8374 { 8381 {
8375 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0); 8382 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8378 v164 = v103; 8385 v164 = v103;
8379 v100 = pRenderer; 8386 v100 = pRenderer;
8380 pRenderer->DrawTextureTransparent(v164, v176, v189); 8387 pRenderer->DrawTextureTransparent(v164, v176, v189);
8381 if ( !bRingsShownInCharScreen ) 8388 if ( !bRingsShownInCharScreen )
8382 pRenderer->_4A612A(a2g, a3g, v101, v235); 8389 pRenderer->_4A612A(a2g, a3g, v101, v235);
8383 v68 = pPlayer; 8390 v68 = v217;
8384 goto LABEL_259; 8391 goto LABEL_259;
8385 } 8392 }
8386 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0); 8393 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8387 v190 = v101; 8394 v190 = v101;
8388 v177 = v104; 8395 v177 = v104;
8389 v165 = v103; 8396 v165 = v103;
8390 v100 = pRenderer; 8397 v100 = pRenderer;
8391 pRenderer->DrawTransparentGreenShade(v165, v177, v190); 8398 pRenderer->DrawTransparentGreenShade(v165, v177, v190);
8392 if ( !bRingsShownInCharScreen ) 8399 if ( !bRingsShownInCharScreen )
8393 pRenderer->_4A612A(a2g, a3g, v101, v235); 8400 pRenderer->_4A612A(a2g, a3g, v101, v235);
8394 v68 = pPlayer; 8401 v68 = v217;
8395 goto LABEL_259; 8402 goto LABEL_259;
8396 } 8403 }
8397 v106 = v105 - 16; 8404 v106 = v105 - 16;
8398 if ( v106 ) 8405 if ( v106 )
8399 { 8406 {
8412 v187 = 255; 8419 v187 = 255;
8413 v174 = 0; 8420 v174 = 0;
8414 v97 = (double)GetTickCount(); 8421 v97 = (double)GetTickCount();
8415 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8422 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8416 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8423 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8417 v68 = pPlayer; 8424 v68 = v217;
8418 goto LABEL_259; 8425 goto LABEL_259;
8419 } 8426 }
8420 v108 = v107 - 32; 8427 v108 = v107 - 32;
8421 if ( !v108 ) 8428 if ( !v108 )
8422 { 8429 {
8432 v187 = 255; 8439 v187 = 255;
8433 v174 = 0; 8440 v174 = 0;
8434 v97 = (double)GetTickCount(); 8441 v97 = (double)GetTickCount();
8435 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8442 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8436 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8443 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8437 v68 = pPlayer; 8444 v68 = v217;
8438 goto LABEL_259; 8445 goto LABEL_259;
8439 } 8446 }
8440 if ( v108 == 64 ) 8447 if ( v108 == 64 )
8441 { 8448 {
8442 v178 = "sp91a"; 8449 v178 = "sp91a";
8451 v187 = 255; 8458 v187 = 255;
8452 v174 = 0; 8459 v174 = 0;
8453 v97 = (double)GetTickCount(); 8460 v97 = (double)GetTickCount();
8454 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8461 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8455 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8462 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8456 v68 = pPlayer; 8463 v68 = v217;
8457 goto LABEL_259; 8464 goto LABEL_259;
8458 } 8465 }
8459 } 8466 }
8460 v178 = "sptext01"; 8467 v178 = "sptext01";
8461 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; 8468 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)];
8469 v187 = 255; 8476 v187 = 255;
8470 v174 = 0; 8477 v174 = 0;
8471 v97 = (double)GetTickCount(); 8478 v97 = (double)GetTickCount();
8472 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), 8479 pRenderer->_4A63E6(a2g, a3g, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8473 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187); 8480 (Texture *)v96, (signed __int64)(v97 * 0.1), v174, v187);
8474 v68 = pPlayer; 8481 v68 = v217;
8475 goto LABEL_259; 8482 goto LABEL_259;
8476 } 8483 }
8477 v186 = 16; 8484 v186 = 16;
8478 } 8485 }
8479 else 8486 else
8654 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; 8661 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8655 dword_50C9A8 -= pEventTimer->uTimeElapsed; 8662 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8656 if ( dword_50C9A8 <= 0 ) 8663 if ( dword_50C9A8 <= 0 )
8657 { 8664 {
8658 dword_50C9A8 = 0; 8665 dword_50C9A8 = 0;
8659 *(char *)(v32 + 20) &= 0xFu; 8666 *(char *)(v219 + 20) &= 0xFu;
8660 ptr_50C9A4 = 0; 8667 ptr_50C9A4 = 0;
8661 } 8668 }
8662 v40 = (double)GetTickCount() * 0.1; 8669 v40 = (double)GetTickCount() * 0.1;
8663 pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, 8670 pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
8664 (signed __int64)v40, 0, 255); 8671 (signed __int64)v40, 0, 255);
8665 goto LABEL_93; 8672 goto LABEL_93;
8666 } 8673 }
8667 v169 = "sptext01"; 8674 v169 = "sptext01";
8668 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; 8675 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8669 dword_50C9A8 -= pEventTimer->uTimeElapsed; 8676 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8670 if ( dword_50C9A8 <= 0 ) 8677 if ( dword_50C9A8 <= 0 )
8671 { 8678 {
8672 dword_50C9A8 = 0; 8679 dword_50C9A8 = 0;
8673 *(char *)(v32 + 20) &= 0xFu; 8680 *(char *)(v219 + 20) &= 0xFu;
8674 ptr_50C9A4 = 0; 8681 ptr_50C9A4 = 0;
8675 } 8682 }
8676 v40 = (double)GetTickCount() * 0.1; 8683 v40 = (double)GetTickCount() * 0.1;
8677 pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, 8684 pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
8678 (signed __int64)v40, 0, 255); 8685 (signed __int64)v40, 0, 255);
8679 goto LABEL_93; 8686 goto LABEL_93;
8680 } 8687 }
8681 v169 = "sp30a"; 8688 v169 = "sp30a";
8682 } 8689 }
8684 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; 8691 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8685 dword_50C9A8 -= pEventTimer->uTimeElapsed; 8692 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8686 if ( dword_50C9A8 <= 0 ) 8693 if ( dword_50C9A8 <= 0 )
8687 { 8694 {
8688 dword_50C9A8 = 0; 8695 dword_50C9A8 = 0;
8689 *(char *)(v32 + 20) &= 0xFu; 8696 *(char *)(v219 + 20) &= 0xFu;
8690 ptr_50C9A4 = 0; 8697 ptr_50C9A4 = 0;
8691 } 8698 }
8692 v40 = (double)GetTickCount() * 0.1; 8699 v40 = (double)GetTickCount() * 0.1;
8693 pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, 8700 pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
8694 (signed __int64)v40, 0, 255); 8701 (signed __int64)v40, 0, 255);
8695 goto LABEL_93; 8702 goto LABEL_93;
8696 } 8703 }
8697 v38 = pIcons_LOD; 8704 v38 = pIcons_LOD;
8698 v169 = "sptext01"; 8705 v169 = "sptext01";
8699 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; 8706 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8700 dword_50C9A8 -= pEventTimer->uTimeElapsed; 8707 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8701 if ( dword_50C9A8 <= 0 ) 8708 if ( dword_50C9A8 <= 0 )
8702 { 8709 {
8703 dword_50C9A8 = 0; 8710 dword_50C9A8 = 0;
8704 *(char *)(v32 + 20) &= 0xFu; 8711 *(char *)(v219 + 20) &= 0xFu;
8705 ptr_50C9A4 = 0; 8712 ptr_50C9A4 = 0;
8706 } 8713 }
8707 v40 = (double)GetTickCount() * 0.1; 8714 v40 = (double)GetTickCount() * 0.1;
8708 pRenderer->_4A63E6(pX2, pY2, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, 8715 pRenderer->_4A63E6(a2c, a3c, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39,
8709 (signed __int64)v40, 0, 255); 8716 (signed __int64)v40, 0, 255);
8710 goto LABEL_93; 8717 goto LABEL_93;
8711 } 8718 }
8712 v184 = 9; 8719 v184 = 9;
8713 break; 8720 break;
8740 *(char *)(v22 + 20) &= 0xFu; 8747 *(char *)(v22 + 20) &= 0xFu;
8741 ptr_50C9A4 = 0; 8748 ptr_50C9A4 = 0;
8742 } 8749 }
8743 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); 8750 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8744 v28 = (double)GetTickCount() * 0.1; 8751 v28 = (double)GetTickCount() * 0.1;
8745 pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255); 8752 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8746 goto LABEL_57; 8753 goto LABEL_57;
8747 } 8754 }
8748 v168 = "sptext01"; 8755 v168 = "sptext01";
8749 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; 8756 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)];
8750 dword_50C9A8 -= pEventTimer->uTimeElapsed; 8757 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8754 *(char *)(v22 + 20) &= 0xFu; 8761 *(char *)(v22 + 20) &= 0xFu;
8755 ptr_50C9A4 = 0; 8762 ptr_50C9A4 = 0;
8756 } 8763 }
8757 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); 8764 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8758 v28 = (double)GetTickCount() * 0.1; 8765 v28 = (double)GetTickCount() * 0.1;
8759 pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255); 8766 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8760 goto LABEL_57; 8767 goto LABEL_57;
8761 } 8768 }
8762 v168 = "sp30a"; 8769 v168 = "sp30a";
8763 } 8770 }
8764 v26 = pIcons_LOD; 8771 v26 = pIcons_LOD;
8770 *(char *)(v22 + 20) &= 0xFu; 8777 *(char *)(v22 + 20) &= 0xFu;
8771 ptr_50C9A4 = 0; 8778 ptr_50C9A4 = 0;
8772 } 8779 }
8773 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); 8780 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8774 v28 = (double)GetTickCount() * 0.1; 8781 v28 = (double)GetTickCount() * 0.1;
8775 pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255); 8782 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8776 goto LABEL_57; 8783 goto LABEL_57;
8777 } 8784 }
8778 v26 = pIcons_LOD; 8785 v26 = pIcons_LOD;
8779 v168 = "sptext01"; 8786 v168 = "sptext01";
8780 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; 8787 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)];
8785 *(char *)(v22 + 20) &= 0xFu; 8792 *(char *)(v22 + 20) &= 0xFu;
8786 ptr_50C9A4 = 0; 8793 ptr_50C9A4 = 0;
8787 } 8794 }
8788 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0); 8795 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8789 v28 = (double)GetTickCount() * 0.1; 8796 v28 = (double)GetTickCount() * 0.1;
8790 pRenderer->_4A63E6(pX, pY, v27, a2b, (signed __int64)v28, 0, 255); 8797 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8791 goto LABEL_57;; 8798 goto LABEL_57;;
8792 } 8799 }
8793 a3 = pPaperdoll_BodyY; 8800 a3 = pPaperdoll_BodyY;
8794 a2 = pPaperdoll_BodyX; 8801 a2 = pPaperdoll_BodyX;
8795 v240 = 4 * uPlayerID - 4; 8802 v240 = 4 * uPlayerID_ - 4;
8796 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, 8803 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,
8797 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0)); 8804 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0));
8798 if ( !bRingsShownInCharScreen ) 8805 if ( !bRingsShownInCharScreen )
8799 pRenderer->_4A612A(a2, a3, 8806 pRenderer->_4A612A(a2, a3,
8800 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0), 8807 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0),
8801 pPlayer->pEquipment.uBody); 8808 pPlayer->pEquipment.uBody);
8802 uPlayerID_a = 2 * pBodyComplection; 8809 uPlayerID_a = 2 * v5;
8803 v6 = pPlayer->pEquipment.uMainHand; 8810 v6 = pPlayer->pEquipment.uMainHand;
8804 if ( !v6 8811 if ( !v6
8805 || (v7 = *(int *)&pPlayer->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) 8812 || (v7 = *(int *)&pPlayer->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1)
8806 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) ) 8813 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
8807 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], 8814 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[v5][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[v5][1],
8808 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); 8815 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
8809 v8 = pPlayer->pEquipment.uMainHand; 8816 v8 = pPlayer->pEquipment.uMainHand;
8810 if ( v8 ) 8817 if ( v8 )
8811 { 8818 {
8812 v229 = pPlayer->pEquipment.uMainHand; 8819 v229 = pPlayer->pEquipment.uMainHand;
8813 v9 = (int)&pPlayer->pInventoryItems[v8-1]; 8820 v9 = (int)&v217->pInventoryItems[v8-1];
8814 v10 = pBodyComplection << 7; 8821 v10 = v5 << 7;
8815 v218 = v9; 8822 v218 = v9;
8816 v11 = *(int *)v9; 8823 v11 = *(int *)v9;
8817 v12 = *(int *)v9; 8824 v12 = *(int *)v9;
8818 v13 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v12].uEquipX; 8825 v13 = pPaperdoll_BodyX + paperdoll_Weapon[v5][1][0] - pItemsTable->pItems[v12].uEquipX;
8819 a2a = v13; 8826 a2a = v13;
8820 a3a = pPaperdoll_BodyY + *(int *)((char *)&paperdoll_Weapon[0][1][1] + v10) - pItemsTable->pItems[v12].uEquipY; 8827 a3a = pPaperdoll_BodyY + *(int *)((char *)&paperdoll_Weapon[0][1][1] + v10) - pItemsTable->pItems[v12].uEquipY;
8821 if ( v11 == 64 ) 8828 if ( v11 == 64 )
8822 v166 = "item64v1"; 8829 v166 = "item64v1";
8823 else 8830 else
8894 v18 = v14 + 1; 8901 v18 = v14 + 1;
8895 v19 = (char *)&pIcons_LOD->pTextures[v14]; 8902 v19 = (char *)&pIcons_LOD->pTextures[v14];
8896 if ( v15 & 2 ) 8903 if ( v15 & 2 )
8897 { 8904 {
8898 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0); 8905 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8899 pRenderer->_4A6776(a2a, a3a, v20); 8906 pRenderer->DrawTransparentRedShade(a2a, a3a, v20);
8900 } 8907 }
8901 else 8908 else
8902 { 8909 {
8903 if ( v15 & 1 ) 8910 if ( v15 & 1 )
8904 { 8911 {
8916 } 8923 }
8917 LABEL_393: 8924 LABEL_393:
8918 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[uPlayerID_a], 8925 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[uPlayerID_a],
8919 pPaperdoll_BodyY + pPaperdoll_RightHand[uPlayerID_a + 1], 8926 pPaperdoll_BodyY + pPaperdoll_RightHand[uPlayerID_a + 1],
8920 (Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_drhs + v240)] : 0)); 8927 (Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_drhs + v240)] : 0));
8921 v161 = pPlayer->pEquipment.uMainHand; 8928 v161 = v217->pEquipment.uMainHand;
8922 if ( v161 ) 8929 if ( v161 )
8923 { 8930 {
8924 v162 = *(int *)&pPlayer->pInventoryItems[v161-1]; 8931 v162 = *(int *)&v217->pInventoryItems[v161-1];
8925 if ( pItemsTable->pItems[v162].uEquipType == 1 || pItemsTable->pItems[v162].uSkillType == 4 && !pPlayer->pEquipment.uOffHand ) 8932 if ( pItemsTable->pItems[v162].uEquipType == 1 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand )
8926 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[0][uPlayerID_a], 8933 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[0][uPlayerID_a],
8927 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[0][uPlayerID_a + 1], 8934 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[0][uPlayerID_a + 1],
8928 (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0)); 8935 (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0));
8929 } 8936 }
8930 if ( !bRingsShownInCharScreen ) 8937 if ( !bRingsShownInCharScreen )
9054 } 9061 }
9055 v9 = v5 + 1; 9062 v9 = v5 + 1;
9056 if ( v6 & 2 ) 9063 if ( v6 & 2 )
9057 { 9064 {
9058 v10 = (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[v5] : 0); 9065 v10 = (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[v5] : 0);
9059 pRenderer->_4A6776(a2, a3, v10); 9066 pRenderer->DrawTransparentRedShade(a2, a3, v10);
9060 } 9067 }
9061 else 9068 else
9062 { 9069 {
9063 v11 = (v6 & 1) == 0; 9070 v11 = (v6 & 1) == 0;
9064 v12 = &pIcons_LOD->pTextures[v5]; 9071 v12 = &pIcons_LOD->pTextures[v5];
9098 if ( v17 & 2 ) 9105 if ( v17 & 2 )
9099 { 9106 {
9100 v21 = 9 * v16; 9107 v21 = 9 * v16;
9101 v22 = 493; 9108 v22 = 493;
9102 v23 = (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0); 9109 v23 = (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0);
9103 pRenderer->_4A6776(0x1EDu, 0x5Bu, v23); 9110 pRenderer->DrawTransparentRedShade(0x1EDu, 0x5Bu, v23);
9104 } 9111 }
9105 else 9112 else
9106 { 9113 {
9107 v11 = (v17 & 1) == 0; 9114 v11 = (v17 & 1) == 0;
9108 v24 = 9 * v16; 9115 v24 = 9 * v16;
9178 { 9185 {
9179 v33 = v28 + 1; 9186 v33 = v28 + 1;
9180 if ( v29 & 2 ) 9187 if ( v29 & 2 )
9181 { 9188 {
9182 v34 = v33 != 0 ? (int)&pIcons_LOD->pTextures[v28] : 0; 9189 v34 = v33 != 0 ? (int)&pIcons_LOD->pTextures[v28] : 0;
9183 pRenderer->_4A6776(0x24Au, 0x58u, (Texture *)v34); 9190 pRenderer->DrawTransparentRedShade(0x24Au, 0x58u, (Texture *)v34);
9184 } 9191 }
9185 else 9192 else
9186 { 9193 {
9187 v11 = (v29 & 1) == 0; 9194 v11 = (v29 & 1) == 0;
9188 v35 = &pIcons_LOD->pTextures[v28]; 9195 v35 = &pIcons_LOD->pTextures[v28];
10212 while ( v5 < this->uActorQueueSize ); 10219 while ( v5 < this->uActorQueueSize );
10213 } 10220 }
10214 } 10221 }
10215 10222
10216 //----- (004065B0) -------------------------------------------------------- 10223 //----- (004065B0) --------------------------------------------------------
10217 __int16 stru262_TurnBased::_4065B0() 10224 void stru262_TurnBased::_4065B0()
10218 { 10225 {
10219 stru262_TurnBased *v1; // esi@1 10226 stru262_TurnBased *v1; // esi@1
10220 signed int v2; // eax@1 10227 signed int v2; // eax@1
10221 int v3; // ebx@6 10228 int v3; // ebx@6
10222 int v4; // edi@7 10229 int v4; // edi@7
10252 } 10259 }
10253 v5 = 0; 10260 v5 = 0;
10254 if ( v1->uActorQueueSize > 0 ) 10261 if ( v1->uActorQueueSize > 0 )
10255 { 10262 {
10256 do 10263 do
10257 LOWORD(v2) = v1->_406648(v5++); 10264 v1->_406648(v5++);
10258 while ( (signed int)v5 < v1->uActorQueueSize ); 10265 while ( (signed int)v5 < v1->uActorQueueSize );
10259 } 10266 }
10260 return v2;
10261 } 10267 }
10262 10268
10263 //----- (00406648) -------------------------------------------------------- 10269 //----- (00406648) --------------------------------------------------------
10264 __int16 stru262_TurnBased::_406648(unsigned int a2) 10270 void stru262_TurnBased::_406648(unsigned int a2)
10265 { 10271 {
10266 TurnBased_QueueElem *v1; // ecx@1 10272 TurnBased_QueueElem *v1; // ecx@1
10267 int v3; // eax@1 10273 int v3; // eax@1
10268 unsigned int v4; // ebx@2 10274 unsigned int v4; // ebx@2
10269 Actor *v5; // esi@2 10275 Actor *v5; // esi@2
10350 v15 = v4; 10356 v15 = v4;
10351 v23 = &a4; 10357 v23 = &a4;
10352 v16 = a2a; 10358 v16 = a2a;
10353 if ( !(v14 % 2) ) 10359 if ( !(v14 % 2) )
10354 { 10360 {
10355 LOWORD(v3) = Actor::_402F87(v4, a2a, &a4); 10361 Actor::_402F87(v4, a2a, &a4);
10356 return v3; 10362 return;
10357 } 10363 }
10358 v21 = 64; 10364 v21 = 64;
10359 LABEL_26: 10365 LABEL_26:
10360 LOWORD(v3) = Actor::_403EB6(v15, v16, v21, v23); 10366 Actor::_403EB6(v15, v16, v21, v23);
10361 return v3; 10367 return;
10362 } 10368 }
10363 LABEL_21: 10369 LABEL_21:
10364 v5->uCurrentActionTime = 0; 10370 v5->uCurrentActionTime = 0;
10365 v5->uCurrentActionLength = 0; 10371 v5->uCurrentActionLength = 0;
10366 v5->uAIState = Dead; 10372 v5->uAIState = Dead;
10367 return pActors[v4].UpdateAnimation(); 10373 pActors[v4].UpdateAnimation();
10374 return;
10368 } 10375 }
10369 v24 = v5->pMonsterInfo.uSpellSkillAndMastery2; 10376 v24 = v5->pMonsterInfo.uSpellSkillAndMastery2;
10370 v22 = 3; 10377 v22 = 3;
10371 v17 = v5->pMonsterInfo.uSpell2ID; 10378 v17 = v5->pMonsterInfo.uSpell2ID;
10372 } 10379 }
10397 } 10404 }
10398 } 10405 }
10399 } 10406 }
10400 } 10407 }
10401 } 10408 }
10402 return v3;
10403 } 10409 }
10404 // 50FE08: using guessed type stru298 stru_50FE08; 10410 // 50FE08: using guessed type stru298 stru_50FE08;
10405 10411
10406 //----- (0040680F) -------------------------------------------------------- 10412 //----- (0040680F) --------------------------------------------------------
10407 __int16 stru262_TurnBased::_40680F(int a2) 10413 __int16 stru262_TurnBased::_40680F(int a2)
11832 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61) 11838 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61)
11833 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v61); 11839 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v61);
11834 ++sDepthb ) 11840 ++sDepthb )
11835 { 11841 {
11836 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]]; 11842 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]];
11837 if ( v62->uAttributes & 1 11843 if ( v62->TwoSided()
11838 || v119 > v62->pBounding.x2 11844 || v119 > v62->pBounding.x2
11839 || v123 < v62->pBounding.x1 11845 || v123 < v62->pBounding.x1
11840 || v127 > v62->pBounding.y2 11846 || v127 > v62->pBounding.y2
11841 || v131 < v62->pBounding.y1 11847 || v131 < v62->pBounding.y1
11842 || v135 > v62->pBounding.z2 11848 || v135 > v62->pBounding.z2
11998 v82 = pOut.x; 12004 v82 = pOut.x;
11999 } 12005 }
12000 while ( 1 ) 12006 while ( 1 )
12001 { 12007 {
12002 v90 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v88->pWalls + v89))[v162]]; 12008 v90 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v88->pWalls + v89))[v162]];
12003 if ( v90->uAttributes & 1 12009 if ( v90->TwoSided()
12004 || v120 > v90->pBounding.x2 12010 || v120 > v90->pBounding.x2
12005 || v124 < v90->pBounding.x1 12011 || v124 < v90->pBounding.x1
12006 || v128 > v90->pBounding.y2 12012 || v128 > v90->pBounding.y2
12007 || v132 < v90->pBounding.y1 12013 || v132 < v90->pBounding.y1
12008 || v136 > v90->pBounding.z2 12014 || v136 > v90->pBounding.z2
12367 12373
12368 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly; 12374 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
12369 12375
12370 if (!v8 || v7) 12376 if (!v8 || v7)
12371 if (!v6 || v5) 12377 if (!v6 || v5)
12372 if (actor->_438B9B()) 12378 if (actor->IsPeasant())
12373 BYTE2(actor->uAttributes) &= 0xF7u; 12379 BYTE2(actor->uAttributes) &= 0xF7u;
12374 12380
12375 BYTE2(actor->uAttributes) &= 0x7Fu; 12381 BYTE2(actor->uAttributes) &= 0x7Fu;
12376 if (BYTE2(actor->uAttributes) & 0x40) 12382 if (BYTE2(actor->uAttributes) & 0x40)
12377 Actor::_4031C1_update_job(i, pParty->uCurrentHour, 1); 12383 Actor::_4031C1_update_job(i, pParty->uCurrentHour, 1);
13513 if ( v3 && (unsigned __int8)v3 / 11 == school ) 13519 if ( v3 && (unsigned __int8)v3 / 11 == school )
13514 dword_50654C = (unsigned __int8)v3 - 11 * school; 13520 dword_50654C = (unsigned __int8)v3 - 11 * school;
13515 else 13521 else
13516 dword_50654C = 0; 13522 dword_50654C = 0;
13517 13523
13518 char *v11 = &pPlayer->field_152[11 * school + 63]; 13524 //char *v11 = &pPlayer->field_152[11 * school + 63];
13519 13525
13520 for (uint i = 1; i < 12; ++i) 13526 for (uint i = 1; i < 12; ++i)
13521 { 13527 {
13522 if (v11[i]) 13528 //if (v11[i])
13529 if (pPlayer->spellbook.pChapters[school].bIsSpellAvailable[i - 1])
13523 { 13530 {
13524 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[school], pSpellbookSpellIndices[school][i]); 13531 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[school], pSpellbookSpellIndices[school][i]);
13525 dword_506408[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); 13532 dword_506408[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
13526 13533
13527 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[school], pSpellbookSpellIndices[school][i]); 13534 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[school], pSpellbookSpellIndices[school][i]);
15553 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); 15560 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
15554 if ( v26 > 0 ) 15561 if ( v26 > 0 )
15555 { 15562 {
15556 if ( v26 < 800 ) 15563 if ( v26 < 800 )
15557 { 15564 {
15558 pItemGen.uAttributes |= 1u; 15565 pItemGen.SetIdentified();
15559 pItemGen.uItemID = v26; 15566 pItemGen.uItemID = v26;
15560 if ( pItemsTable->pItems[v26].uEquipType == 12 ) 15567 if ( pItemsTable->pItems[v26].uEquipType == 12 )
15561 { 15568 {
15562 pItemGen.uNumCharges = rand() % 6 + pItemsTable->pItems[pItemGen.uItemID].uDamageMod + 1; 15569 pItemGen.uNumCharges = rand() % 6 + pItemsTable->pItems[pItemGen.uItemID].uDamageMod + 1;
15563 pItemGen.uMaxCharges = LOBYTE(pItemGen.uNumCharges); 15570 pItemGen.uMaxCharges = LOBYTE(pItemGen.uNumCharges);