Mercurial > mm7
comparison mm7_5.cpp @ 521:663c4f618f56
Awards tab corrrection
author | Gloval |
---|---|
date | Sat, 02 Mar 2013 01:42:05 +0400 |
parents | cb0ad52d6a26 |
children | 5196a51cc9ec |
comparison
equal
deleted
inserted
replaced
520:35f28d4c0ff9 | 521:663c4f618f56 |
---|---|
3172 sub_4196A0(); | 3172 sub_4196A0(); |
3173 sub_419220(); | 3173 sub_419220(); |
3174 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; | 3174 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102; |
3175 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), | 3175 GUIWindow::Create(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), |
3176 (int)pCharacterScreen_AwardsBtn, 0); | 3176 (int)pCharacterScreen_AwardsBtn, 0); |
3177 sub_419100(); | 3177 FillAwardsData(); |
3178 continue; | 3178 continue; |
3179 case UIMSG_AutonotesBook: | 3179 case UIMSG_AutonotesBook: |
3180 switch ( uMessageParam ) | 3180 switch ( uMessageParam ) |
3181 { | 3181 { |
3182 default: | 3182 default: |
13600 v13 = pTex_tab_an_6b__zoom_on; | 13600 v13 = pTex_tab_an_6b__zoom_on; |
13601 v11 = pViewport->uViewportY + 1; | 13601 v11 = pViewport->uViewportY + 1; |
13602 v0 = pViewport->uViewportX + 398; | 13602 v0 = pViewport->uViewportX + 398; |
13603 } | 13603 } |
13604 pRenderer->DrawTextureTransparent(v0, v11, v13); | 13604 pRenderer->DrawTextureTransparent(v0, v11, v13); |
13605 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 ) | 13605 if ( dword_506544 || dword_506528 + awards_count >= awards_count2 ) |
13606 { | 13606 { |
13607 v14 = pTex_tab_an_7a__zoot_off; | 13607 v14 = pTex_tab_an_7a__zoot_off; |
13608 v12 = pViewport->uViewportY + 38; | 13608 v12 = pViewport->uViewportY + 38; |
13609 v1 = pViewport->uViewportX + 407; | 13609 v1 = pViewport->uViewportX + 407; |
13610 } | 13610 } |
13615 v1 = pViewport->uViewportX + 398; | 13615 v1 = pViewport->uViewportX + 398; |
13616 } | 13616 } |
13617 pRenderer->DrawTextureTransparent(v1, v12, v14); | 13617 pRenderer->DrawTextureTransparent(v1, v12, v14); |
13618 if ( !byte_5C6D50[dword_506528] ) | 13618 if ( !byte_5C6D50[dword_506528] ) |
13619 { | 13619 { |
13620 v2 = pStru179.field_0[dword_506528]; | 13620 v2 = achievedAwardsIndex[dword_506528]; |
13621 a1.uFrameWidth = 460; | 13621 a1.uFrameWidth = 460; |
13622 a1.uFrameX = 8; | 13622 a1.uFrameX = 8; |
13623 a1.uFrameY = 8; | 13623 a1.uFrameY = 8; |
13624 a1.uFrameHeight = 344; | 13624 a1.uFrameHeight = 344; |
13625 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[]; | 13625 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[]; |
13634 a1.uFrameHeight = 264; | 13634 a1.uFrameHeight = 264; |
13635 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3; | 13635 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3; |
13636 a1.uFrameZ = 407; | 13636 a1.uFrameZ = 407; |
13637 a1.uFrameHeight = v4 * 264 / v4; | 13637 a1.uFrameHeight = v4 * 264 / v4; |
13638 a1.uFrameW = a1.uFrameHeight + 69; | 13638 a1.uFrameW = a1.uFrameHeight + 69; |
13639 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 ) | 13639 if ( dword_506544 && dword_506528 + awards_count < awards_count2 ) |
13640 { | 13640 { |
13641 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 13641 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
13642 v5 = dword_50651C++; | 13642 v5 = dword_50651C++; |
13643 dword_506528 += dword_506520; | 13643 dword_506528 += awards_count; |
13644 byte_506130[v5] = dword_506520; | 13644 byte_506130[v5] = awards_count; |
13645 } | 13645 } |
13646 if ( dword_506548 && dword_50651C ) | 13646 if ( dword_506548 && dword_50651C ) |
13647 { | 13647 { |
13648 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 13648 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
13649 --dword_50651C; | 13649 --dword_50651C; |
13650 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; | 13650 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; |
13651 } | 13651 } |
13652 if ( !dword_506520 || dword_506528 < 1 ) | 13652 if ( !awards_count || dword_506528 < 1 ) |
13653 { | 13653 { |
13654 dword_506528 = 0; | 13654 dword_506528 = 0; |
13655 dword_50651C = 0; | 13655 dword_50651C = 0; |
13656 } | 13656 } |
13657 dword_506544 = 0; | 13657 dword_506544 = 0; |
13658 v6 = pStru179.field_0[dword_506528]; | 13658 v6 = achievedAwardsIndex[dword_506528]; |
13659 dword_506548 = 0; | 13659 dword_506548 = 0; |
13660 dword_506520 = 0; | 13660 awards_count = 0; |
13661 //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6); | 13661 //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6); |
13662 v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6); | 13662 v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6); |
13663 v8 = BuilDialogueString( | 13663 v8 = BuilDialogueString( |
13664 pStorylineText->StoreLine[v6].pText, | 13664 pStorylineText->StoreLine[v6].pText, |
13665 uActiveCharacter - 1, | 13665 uActiveCharacter - 1, |
13669 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]); | 13669 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]); |
13670 if ( v7 ) | 13670 if ( v7 ) |
13671 { | 13671 { |
13672 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]); | 13672 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]); |
13673 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); | 13673 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); |
13674 ++dword_506520; | 13674 ++awards_count; |
13675 } | 13675 } |
13676 return (char)v8; | 13676 return (char)v8; |
13677 } | 13677 } |
13678 | 13678 |
13679 | 13679 |
13706 v10 = pTex_tab_an_6b__zoom_on; | 13706 v10 = pTex_tab_an_6b__zoom_on; |
13707 v8 = pViewport->uViewportY + 1; | 13707 v8 = pViewport->uViewportY + 1; |
13708 v0 = pViewport->uViewportX + 398; | 13708 v0 = pViewport->uViewportX + 398; |
13709 } | 13709 } |
13710 pRenderer->DrawTextureTransparent(v0, v8, v10); | 13710 pRenderer->DrawTextureTransparent(v0, v8, v10); |
13711 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 ) | 13711 if ( dword_506544 || dword_506528 + awards_count >= awards_count2 ) |
13712 { | 13712 { |
13713 v11 = pTex_tab_an_7a__zoot_off; | 13713 v11 = pTex_tab_an_7a__zoot_off; |
13714 v9 = pViewport->uViewportY + 38; | 13714 v9 = pViewport->uViewportY + 38; |
13715 v1 = pViewport->uViewportX + 407; | 13715 v1 = pViewport->uViewportX + 407; |
13716 } | 13716 } |
13732 a1.uFrameY = 70; | 13732 a1.uFrameY = 70; |
13733 a1.uFrameWidth = 360; | 13733 a1.uFrameWidth = 360; |
13734 a1.uFrameHeight = 264; | 13734 a1.uFrameHeight = 264; |
13735 a1.uFrameZ = 407; | 13735 a1.uFrameZ = 407; |
13736 a1.uFrameW = 333; | 13736 a1.uFrameW = 333; |
13737 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 ) | 13737 if ( dword_506544 && dword_506528 + awards_count < awards_count2 ) |
13738 { | 13738 { |
13739 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 13739 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
13740 v2 = dword_50651C++; | 13740 v2 = dword_50651C++; |
13741 dword_506528 += dword_506520; | 13741 dword_506528 += awards_count; |
13742 byte_506130[v2] = dword_506520; | 13742 byte_506130[v2] = awards_count; |
13743 } | 13743 } |
13744 if ( dword_506548 && dword_50651C ) | 13744 if ( dword_506548 && dword_50651C ) |
13745 { | 13745 { |
13746 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 13746 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
13747 --dword_50651C; | 13747 --dword_50651C; |
13748 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; | 13748 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; |
13749 } | 13749 } |
13750 if ( !dword_506520 || (v3 = dword_506528, dword_506528 < 1) ) | 13750 if ( !awards_count || (v3 = dword_506528, dword_506528 < 1) ) |
13751 { | 13751 { |
13752 v3 = 0; | 13752 v3 = 0; |
13753 dword_50651C = 0; | 13753 dword_50651C = 0; |
13754 dword_506528 = 0; | 13754 dword_506528 = 0; |
13755 } | 13755 } |
13756 dword_506544 = 0; | 13756 dword_506544 = 0; |
13757 dword_506548 = 0; | 13757 dword_506548 = 0; |
13758 dword_506520 = 0; | 13758 awards_count = 0; |
13759 while ( v3 < dword_506524 ) | 13759 while ( v3 < awards_count2 ) |
13760 { | 13760 { |
13761 v4 = pStru179.field_0[v3]; | 13761 v4 = achievedAwardsIndex[v3]; |
13762 ++dword_506520; | 13762 ++awards_count; |
13763 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4]; | 13763 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4]; |
13764 a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); | 13764 a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); |
13765 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); | 13765 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); |
13766 v7 = a1.uFrameY + v6; | 13766 v7 = a1.uFrameY + v6; |
13767 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) | 13767 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) |
13824 v24 = pTex_tab_an_6b__zoom_on; | 13824 v24 = pTex_tab_an_6b__zoom_on; |
13825 v17 = pViewport->uViewportY + 1; | 13825 v17 = pViewport->uViewportY + 1; |
13826 v0 = pViewport->uViewportX + 398; | 13826 v0 = pViewport->uViewportX + 398; |
13827 } | 13827 } |
13828 pRenderer->DrawTextureTransparent(v0, v17, v24); | 13828 pRenderer->DrawTextureTransparent(v0, v17, v24); |
13829 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 ) | 13829 if ( dword_506544 || dword_506528 + awards_count >= awards_count2 ) |
13830 { | 13830 { |
13831 v25 = pTex_tab_an_7a__zoot_off; | 13831 v25 = pTex_tab_an_7a__zoot_off; |
13832 v18 = pViewport->uViewportY + 38; | 13832 v18 = pViewport->uViewportY + 38; |
13833 v1 = pViewport->uViewportX + 407; | 13833 v1 = pViewport->uViewportX + 407; |
13834 } | 13834 } |
13998 a1.uFrameHeight = 264; | 13998 a1.uFrameHeight = 264; |
13999 a1.uFrameZ = 407; | 13999 a1.uFrameZ = 407; |
14000 a1.uFrameW = 333; | 14000 a1.uFrameW = 333; |
14001 if ( v31 ) | 14001 if ( v31 ) |
14002 { | 14002 { |
14003 dword_506524 = 0; | 14003 awards_count2 = 0; |
14004 dword_506528 = 0; | 14004 dword_506528 = 0; |
14005 dword_50651C = 0; | 14005 dword_50651C = 0; |
14006 dword_506520 = 0; | 14006 awards_count = 0; |
14007 v8 = 0; | 14007 v8 = 0; |
14008 do | 14008 do |
14009 { | 14009 { |
14010 //if ( dword_72371C[2 * v8] == dword_506568 ) | 14010 //if ( dword_72371C[2 * v8] == dword_506568 ) |
14011 if ( pAutonoteTxt[v8-1].eType == dword_506568 ) | 14011 if ( pAutonoteTxt[v8-1].eType == dword_506568 ) |
14014 v32 = (char *)pAutonoteTxt[v8-1].pText; | 14014 v32 = (char *)pAutonoteTxt[v8-1].pText; |
14015 if ( (short)v8 ) | 14015 if ( (short)v8 ) |
14016 { | 14016 { |
14017 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 ) | 14017 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 ) |
14018 { | 14018 { |
14019 v9 = dword_506520++; | 14019 v9 = awards_count++; |
14020 pStru179.field_0[v9] = (signed __int16)v8; | 14020 achievedAwardsIndex[v9] = (signed __int16)v8; |
14021 } | 14021 } |
14022 } | 14022 } |
14023 } | 14023 } |
14024 ++v8; | 14024 ++v8; |
14025 } | 14025 } |
14026 while ( v8 < 196 ); | 14026 while ( v8 < 196 ); |
14027 dword_506524 = dword_506520; | 14027 awards_count2 = awards_count; |
14028 } | 14028 } |
14029 else | 14029 else |
14030 { | 14030 { |
14031 if ( dword_506544 ) | 14031 if ( dword_506544 ) |
14032 { | 14032 { |
14033 v10 = dword_506520 + dword_506528; | 14033 v10 = awards_count + dword_506528; |
14034 if ( dword_506520 + dword_506528 < dword_506524 ) | 14034 if ( awards_count + dword_506528 < awards_count2 ) |
14035 { | 14035 { |
14036 v11 = dword_50651C++; | 14036 v11 = dword_50651C++; |
14037 byte_506130[v11] = dword_506520; | 14037 byte_506130[v11] = awards_count; |
14038 dword_506528 = v10; | 14038 dword_506528 = v10; |
14039 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 14039 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
14040 } | 14040 } |
14041 } | 14041 } |
14042 if ( dword_506548 && dword_50651C ) | 14042 if ( dword_506548 && dword_50651C ) |
14043 { | 14043 { |
14044 --dword_50651C; | 14044 --dword_50651C; |
14045 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; | 14045 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C]; |
14046 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 14046 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
14047 } | 14047 } |
14048 if ( !dword_506520 || dword_506528 < 1 ) | 14048 if ( !awards_count || dword_506528 < 1 ) |
14049 { | 14049 { |
14050 dword_506528 = 0; | 14050 dword_506528 = 0; |
14051 dword_50651C = 0; | 14051 dword_50651C = 0; |
14052 } | 14052 } |
14053 } | 14053 } |
14054 v12 = dword_506528; | 14054 v12 = dword_506528; |
14055 dword_50652C = 0; | 14055 dword_50652C = 0; |
14056 dword_506544 = 0; | 14056 dword_506544 = 0; |
14057 dword_506548 = 0; | 14057 dword_506548 = 0; |
14058 dword_506520 = 0; | 14058 awards_count = 0; |
14059 dword_506530 = 0; | 14059 dword_506530 = 0; |
14060 dword_506534 = 0; | 14060 dword_506534 = 0; |
14061 dword_506538 = 0; | 14061 dword_506538 = 0; |
14062 dword_50653C = 0; | 14062 dword_50653C = 0; |
14063 dword_506540 = 0; | 14063 dword_506540 = 0; |
14064 while ( v12 < dword_506524 ) | 14064 while ( v12 < awards_count2 ) |
14065 { | 14065 { |
14066 v13 = pStru179.field_0[v12]; | 14066 v13 = achievedAwardsIndex[v12]; |
14067 ++dword_506520; | 14067 ++awards_count; |
14068 //v14 = (&dword_723718_autonote_related)[8 * v13]; | 14068 //v14 = (&dword_723718_autonote_related)[8 * v13]; |
14069 v14 = pAutonoteTxt[v13-1].pText; | 14069 v14 = pAutonoteTxt[v13-1].pText; |
14070 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); | 14070 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); |
14071 a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0); | 14071 a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0); |
14072 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); | 14072 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); |
17655 } | 17655 } |
17656 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0); | 17656 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0); |
17657 } | 17657 } |
17658 | 17658 |
17659 //----- (00419100) -------------------------------------------------------- | 17659 //----- (00419100) -------------------------------------------------------- |
17660 int __cdecl sub_419100() | 17660 void FillAwardsData() |
17661 { | 17661 { |
17662 Player *pPlayer; // esi@1 | 17662 Player *pPlayer; // esi@1 |
17663 int v1; // ebx@1 | 17663 |
17664 unsigned __int8 *v2; // esi@1 | 17664 pPlayer = pPlayers[uActiveCharacter]; |
17665 int v3; // eax@4 | 17665 memset(&achievedAwardsIndex, 0, 4000); |
17666 int result; // eax@6 | 17666 memset(pTmpBuf2, 0, 0x7D0u); |
17667 int v5; // esi@6 | 17667 dword_506544 = 0; |
17668 unsigned __int8 v6; // zf@6 | 17668 dword_506548 = 0; |
17669 unsigned __int8 v7; // sf@6 | 17669 awards_count = 0; |
17670 int v8; // edx@7 | 17670 dword_50651C = 0; |
17671 int v9; // ecx@7 | 17671 dword_506528 = 0; |
17672 unsigned __int8 v10; // of@7 | 17672 for(int i=0; i<105; ++i) |
17673 stru179 *v11; // edi@9 | |
17674 int v12; // edx@11 | |
17675 char *v13; // [sp+Ch] [bp-8h]@2 | |
17676 signed int v14; // [sp+Ch] [bp-8h]@9 | |
17677 int i; // [sp+10h] [bp-4h]@10 | |
17678 | |
17679 pPlayer = pPlayers[uActiveCharacter]; | |
17680 memset(&pStru179, 0, 0xFA0u); | |
17681 memset(pTmpBuf2, 0, 0x7D0u); | |
17682 v1 = 0; | |
17683 dword_506544 = 0; | |
17684 dword_506548 = 0; | |
17685 dword_506520 = 0; | |
17686 dword_50651C = 0; | |
17687 dword_506528 = 0; | |
17688 v2 = (unsigned __int8 *)pPlayer->_guilds_member_bits; | |
17689 do | |
17690 { | |
17691 v13 = (char *)pAwards[v1].pText;//dword_723E80_award_related[2 * v1]; | |
17692 if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 ) | |
17693 { | |
17694 v3 = dword_506520++; | |
17695 pStru179.field_0[v3] = v1; | |
17696 } | |
17697 ++v1; | |
17698 } | |
17699 while ( v1 < 105 ); | |
17700 result = dword_506520; | |
17701 v5 = 0; | |
17702 v6 = dword_506520 == 0; | |
17703 v7 = dword_506520 < 0; | |
17704 dword_506524 = dword_506520; | |
17705 dword_506520 = 0; | |
17706 if ( !(v7 | v6) ) | |
17707 { | |
17708 do | |
17709 { | |
17710 v8 = rand() % 16; | |
17711 result = dword_506524; | |
17712 v9 = dword_506524 + v5++; | |
17713 v10 = v5 > dword_506524;//__OFSUB__(v5, dword_506524); | |
17714 v7 = v5 - dword_506524 < 0; | |
17715 pStru179.field_0[v9] = v8; | |
17716 } | |
17717 while ( v7 ^ v10 ); | |
17718 if ( result > 0 ) | |
17719 { | |
17720 v14 = 1; | |
17721 v11 = &pStru179; | |
17722 do | |
17723 { | |
17724 for ( i = v14; i < result; ++i ) | |
17725 { | 17673 { |
17726 v12 = pStru179.field_0[i]; | 17674 if ( _449B57_test_bit((unsigned char*)&pPlayer->_guilds_member_bits, i) && pAwards[i].pText ) |
17727 //if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] ) | 17675 achievedAwardsIndex[awards_count++] = i; |
17728 if(pAwards[v12-1].uSort < pAwards[v11->field_0[0]].uSort) | |
17729 { | |
17730 pStru179.field_0[i] = v11->field_0[0]; | |
17731 v11->field_0[0] = v12; | |
17732 } | |
17733 } | 17676 } |
17734 ++v14; | 17677 awards_count2 = awards_count; |
17735 v11 = (stru179 *)((char *)v11 + 4); | 17678 awards_count = 0; |
17736 } | 17679 //sort awards index |
17737 while ( v14 - 1 < result ); | 17680 if ( awards_count2>0 ) |
17738 } | 17681 { |
17739 } | 17682 for(int i=0; i<awards_count2; ++i) |
17740 return result; | 17683 achievedAwardsIndex[awards_count2 + i] = rand() % 16; |
17741 } | 17684 |
17685 for(int i=1; i<awards_count2-1; ++i) | |
17686 { | |
17687 for (int j = i; j < awards_count2-1; ++j ) | |
17688 { | |
17689 int tmp=achievedAwardsIndex[j]; | |
17690 if(pAwards[j].uSort < pAwards[i].uSort) | |
17691 { | |
17692 achievedAwardsIndex[j] = achievedAwardsIndex[i]; | |
17693 achievedAwardsIndex[i] = tmp; | |
17694 } | |
17695 } | |
17696 } | |
17697 } | |
17698 } | |
17742 | 17699 |
17743 | 17700 |
17744 //----- (00419220) -------------------------------------------------------- | 17701 //----- (00419220) -------------------------------------------------------- |
17745 void __cdecl sub_419220() | 17702 void __cdecl sub_419220() |
17746 { | 17703 { |