comparison mm7_5.cpp @ 81:377535d6e366

structure boundaries fixed in many places. fixed quests, notes, awards, calendar.
author zipi
date Sun, 03 Feb 2013 15:36:54 +0000
parents 0a7860ded5c2
children 1faa29fd4c2d
comparison
equal deleted inserted replaced
80:48f69ae3bc8d 81:377535d6e366
13537 v1 = pViewport->uViewportX + 398; 13537 v1 = pViewport->uViewportX + 398;
13538 } 13538 }
13539 pRenderer->DrawTextureTransparent(v1, v12, v14); 13539 pRenderer->DrawTextureTransparent(v1, v12, v14);
13540 if ( !byte_5C6D50[dword_506528] ) 13540 if ( !byte_5C6D50[dword_506528] )
13541 { 13541 {
13542 v2 = pStru179->field_0[dword_506528]; 13542 v2 = pStru179.field_0[dword_506528];
13543 a1.uFrameWidth = 460; 13543 a1.uFrameWidth = 460;
13544 a1.uFrameX = 8; 13544 a1.uFrameX = 8;
13545 a1.uFrameY = 8; 13545 a1.uFrameY = 8;
13546 a1.uFrameHeight = 344; 13546 a1.uFrameHeight = 344;
13547 v3 = (const char *)pStorylineText->field_4[3 * v2]; 13547 v3 = (const char *)pStorylineText->field_4[3 * v2];
13575 { 13575 {
13576 dword_506528 = 0; 13576 dword_506528 = 0;
13577 dword_50651C = 0; 13577 dword_50651C = 0;
13578 } 13578 }
13579 dword_506544 = 0; 13579 dword_506544 = 0;
13580 v6 = pStru179->field_0[dword_506528]; 13580 v6 = pStru179.field_0[dword_506528];
13581 dword_506548 = 0; 13581 dword_506548 = 0;
13582 dword_506520 = 0; 13582 dword_506520 = 0;
13583 v7 = *(&pStorylineText->field_0 + 3 * v6); 13583 v7 = *(&pStorylineText->field_0 + 3 * v6);
13584 v8 = sub_495461( 13584 v8 = sub_495461(
13585 *((char **)&pStorylineText->field_0 + 3 * v6), 13585 *((char **)&pStorylineText->field_0 + 3 * v6),
13677 dword_506544 = 0; 13677 dword_506544 = 0;
13678 dword_506548 = 0; 13678 dword_506548 = 0;
13679 dword_506520 = 0; 13679 dword_506520 = 0;
13680 while ( v3 < dword_506524 ) 13680 while ( v3 < dword_506524 )
13681 { 13681 {
13682 v4 = pStru179->field_0[v3]; 13682 v4 = pStru179.field_0[v3];
13683 ++dword_506520; 13683 ++dword_506520;
13684 v5 = (&dword_722F10)[4 * v4]; 13684 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4];
13685 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_722F10)[4 * v4], 0, 0, 0); 13685 a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0);
13686 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); 13686 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
13687 v7 = a1.uFrameY + v6; 13687 v7 = a1.uFrameY + v6;
13688 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) 13688 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
13689 break; 13689 break;
13690 pRenderer->DrawTextureTransparent(0x64u, v7 + 12, pTextures_5064A0[10]); 13690 pRenderer->DrawTextureTransparent(0x64u, v7 + 12, pTextures_5064A0[10]);
13926 dword_50651C = 0; 13926 dword_50651C = 0;
13927 dword_506520 = 0; 13927 dword_506520 = 0;
13928 v8 = 0; 13928 v8 = 0;
13929 do 13929 do
13930 { 13930 {
13931 if ( dword_72371C[2 * v8] == dword_506568 ) 13931 //if ( dword_72371C[2 * v8] == dword_506568 )
13932 if ( pAutonoteTxt[v8-1].eType == dword_506568 )
13932 { 13933 {
13933 v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8]; 13934 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
13935 v32 = (char *)pAutonoteTxt[v8-1].pText;
13934 if ( (short)v8 ) 13936 if ( (short)v8 )
13935 { 13937 {
13936 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 ) 13938 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
13937 { 13939 {
13938 v9 = dword_506520++; 13940 v9 = dword_506520++;
13939 pStru179->field_0[v9] = (signed __int16)v8; 13941 pStru179.field_0[v9] = (signed __int16)v8;
13940 } 13942 }
13941 } 13943 }
13942 } 13944 }
13943 ++v8; 13945 ++v8;
13944 } 13946 }
13980 dword_506538 = 0; 13982 dword_506538 = 0;
13981 dword_50653C = 0; 13983 dword_50653C = 0;
13982 dword_506540 = 0; 13984 dword_506540 = 0;
13983 while ( v12 < dword_506524 ) 13985 while ( v12 < dword_506524 )
13984 { 13986 {
13985 v13 = pStru179->field_0[v12]; 13987 v13 = pStru179.field_0[v12];
13986 ++dword_506520; 13988 ++dword_506520;
13987 v14 = (&dword_723718_autonote_related)[8 * v13]; 13989 //v14 = (&dword_723718_autonote_related)[8 * v13];
13988 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); 13990 v14 = pAutonoteTxt[v13-1].pText;
13991 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
13992 a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0);
13989 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); 13993 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
13990 v16 = a1.uFrameY + v15; 13994 v16 = a1.uFrameY + v15;
13991 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight ) 13995 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
13992 break; 13996 break;
13993 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pTextures_5064A0[10]); 13997 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pTextures_5064A0[10]);
14222 a1.uFrameWidth = 460; 14226 a1.uFrameWidth = 460;
14223 a1.uFrameHeight = 344; 14227 a1.uFrameHeight = 344;
14224 a1.uFrameZ = 467; 14228 a1.uFrameZ = 467;
14225 a1.uFrameW = 467; 14229 a1.uFrameW = 467;
14226 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u); 14230 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u);
14231 if ( pParty->uCurrentHour >= 12 )
14232 {
14233 if ( pParty->uCurrentHour >= 24 )
14234 v2=0;
14235 else
14236 v2=1;
14237 }
14238 else
14239 v2=0;
14227 v1 = GetDayPart(); 14240 v1 = GetDayPart();
14228 sprintf( 14241 sprintf(
14229 pTmpBuf, 14242 pTmpBuf,
14230 "%s\t100:\t110%d:%02d %s - %s", 14243 "%s\t100:\t110%d:%02d %s - %s",
14231 pGlobalTXT_LocalizationStrings[526], 14244 pGlobalTXT_LocalizationStrings[526],
17625 int v8; // edx@7 17638 int v8; // edx@7
17626 int v9; // ecx@7 17639 int v9; // ecx@7
17627 unsigned __int8 v10; // of@7 17640 unsigned __int8 v10; // of@7
17628 stru179 *v11; // edi@9 17641 stru179 *v11; // edi@9
17629 int v12; // edx@11 17642 int v12; // edx@11
17630 int v13; // [sp+Ch] [bp-8h]@2 17643 char *v13; // [sp+Ch] [bp-8h]@2
17631 signed int v14; // [sp+Ch] [bp-8h]@9 17644 signed int v14; // [sp+Ch] [bp-8h]@9
17632 int i; // [sp+10h] [bp-4h]@10 17645 int i; // [sp+10h] [bp-4h]@10
17633 17646
17634 pPlayer = pPlayers[uActiveCharacter]; 17647 pPlayer = pPlayers[uActiveCharacter];
17635 memset(&pStru179, 0, 0xFA0u); 17648 memset(&pStru179, 0, 0xFA0u);
17641 dword_50651C = 0; 17654 dword_50651C = 0;
17642 dword_506528 = 0; 17655 dword_506528 = 0;
17643 v2 = (unsigned __int8 *)pPlayer->field_152; 17656 v2 = (unsigned __int8 *)pPlayer->field_152;
17644 do 17657 do
17645 { 17658 {
17646 v13 = dword_723E80_award_related[2 * v1]; 17659 v13 = (char *)pAwards[v1-1].pText;//dword_723E80_award_related[2 * v1];
17647 if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 ) 17660 if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 )
17648 { 17661 {
17649 v3 = dword_506520++; 17662 v3 = dword_506520++;
17650 pStru179->field_0[v3] = v1; 17663 pStru179.field_0[v3] = v1;
17651 } 17664 }
17652 ++v1; 17665 ++v1;
17653 } 17666 }
17654 while ( v1 < 105 ); 17667 while ( v1 < 105 );
17655 result = dword_506520; 17668 result = dword_506520;
17665 v8 = rand() % 16; 17678 v8 = rand() % 16;
17666 result = dword_506524; 17679 result = dword_506524;
17667 v9 = dword_506524 + v5++; 17680 v9 = dword_506524 + v5++;
17668 v10 = v5 > dword_506524;//__OFSUB__(v5, dword_506524); 17681 v10 = v5 > dword_506524;//__OFSUB__(v5, dword_506524);
17669 v7 = v5 - dword_506524 < 0; 17682 v7 = v5 - dword_506524 < 0;
17670 pStru179->field_0[v9] = v8; 17683 pStru179.field_0[v9] = v8;
17671 } 17684 }
17672 while ( v7 ^ v10 ); 17685 while ( v7 ^ v10 );
17673 if ( result > 0 ) 17686 if ( result > 0 )
17674 { 17687 {
17675 v14 = 1; 17688 v14 = 1;
17676 v11 = pStru179; 17689 v11 = &pStru179;
17677 do 17690 do
17678 { 17691 {
17679 for ( i = v14; i < result; ++i ) 17692 for ( i = v14; i < result; ++i )
17680 { 17693 {
17681 v12 = pStru179->field_0[i]; 17694 v12 = pStru179.field_0[i];
17682 if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] ) 17695 //if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] )
17683 { 17696 if(pAwards[v12-1].uSort < pAwards[v11->field_0[0]].uSort)
17684 pStru179->field_0[i] = v11->field_0[0]; 17697 {
17698 pStru179.field_0[i] = v11->field_0[0];
17685 v11->field_0[0] = v12; 17699 v11->field_0[0] = v12;
17686 } 17700 }
17687 } 17701 }
17688 ++v14; 17702 ++v14;
17689 v11 = (stru179 *)((char *)v11 + 4); 17703 v11 = (stru179 *)((char *)v11 + 4);