comparison GUIWindow.cpp @ 523:8f7f651311bc

Merge
author Nomad
date Sat, 02 Mar 2013 01:32:30 +0200
parents 663c4f618f56
children 5196a51cc9ec
comparison
equal deleted inserted replaced
522:61343380715b 523:8f7f651311bc
472 v1 = this; 472 v1 = this;
473 pAudioPlayer->StopChannels(-1, -1); 473 pAudioPlayer->StopChannels(-1, -1);
474 InitializeBookFonts(); 474 InitializeBookFonts();
475 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); 475 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0);
476 pCurrentScreen = SCREEN_BOOKS; 476 pCurrentScreen = SCREEN_BOOKS;
477 dword_506524 = 0; 477 awards_count2 = 0;
478 dword_506528 = 0; 478 dword_506528 = 0;
479 dword_50651C = 0; 479 dword_50651C = 0;
480 dword_506520 = 0; 480 awards_count = 0;
481 if ( v1->ptr_1C == (void *)177 ) 481 if ( v1->ptr_1C == (void *)177 )
482 { 482 {
483 byte_506360 = 0; 483 byte_506360 = 0;
484 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)]; 484 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)];
485 pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; 485 pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)];
556 pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, 0x47u, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up" 556 pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, 0x47u, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up"
557 pTex_tab_an_6b__zoom_on, 0); 557 pTex_tab_an_6b__zoom_on, 0);
558 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, pTex_tab_an_7b__zoot_on->uTextureHeight, 558 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, pTex_tab_an_7b__zoot_on->uTextureHeight,
559 pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, 0x47u, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down" 559 pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, 0x47u, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down"
560 pTex_tab_an_7b__zoot_on, 0); 560 pTex_tab_an_7b__zoot_on, 0);
561 dword_506520 = 0; 561 awards_count = 0;
562 memset(&pStru179, 0, 0xFA0u); 562 memset(&achievedAwardsIndex, 0, 4000);
563 for ( i = dword_506528; i < 512; ++i ) 563 for ( i = dword_506528; i < 512; ++i )
564 { 564 {
565 v14 = (char *)pQuestTable[i-1];//(&dword_722F10)[4 * i]; 565 v14 = (char *)pQuestTable[i-1];//(&dword_722F10)[4 * i];
566 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, i) && v14 ) 566 if ( _449B57_test_bit(pParty->_quest_bits, i) && v14 )
567 { 567 {
568 v15 = dword_506520++; 568 v15 = awards_count++;
569 pStru179.field_0[v15] = i; 569 achievedAwardsIndex[v15] = i;
570 } 570 }
571 } 571 }
572 } 572 }
573 else 573 else
574 { 574 {
608 pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0);// "Miscellaneous Notes" 608 pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0);// "Miscellaneous Notes"
609 v9 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 302, 0x32u, 0x22u, 1, 0, 0x47u, 7u, 0, 609 v9 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 302, 0x32u, 0x22u, 1, 0, 0x47u, 7u, 0,
610 pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0);// "Instructors" 610 pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0);// "Instructors"
611 v10 = dword_506528; 611 v10 = dword_506528;
612 pBtn_Autonotes_Instructors = v9; 612 pBtn_Autonotes_Instructors = v9;
613 dword_506520 = 0; 613 awards_count = 0;
614 while ( v10 < 196 ) 614 while ( v10 < 196 )
615 { 615 {
616 if ( dword_506568 == pAutonoteTxt[v10-1].eType)//dword_72371C[2 * v10] ) 616 if ( dword_506568 == pAutonoteTxt[v10-1].eType)//dword_72371C[2 * v10] )
617 { 617 {
618 //v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10]; 618 //v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10];
619 v25 = (char *)pAutonoteTxt[v10-1].pText; 619 v25 = (char *)pAutonoteTxt[v10-1].pText;
620 if ( (short)v10 ) 620 if ( (short)v10 )
621 { 621 {
622 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v10) && v25 ) 622 if ( _449B57_test_bit(pParty->_autonote_bits, v10) && v25 )
623 { 623 {
624 v11 = dword_506520++; 624 v11 = awards_count++;
625 pStru179.field_0[v11] = (signed __int16)v10; 625 achievedAwardsIndex[v11] = (signed __int16)v10;
626 } 626 }
627 } 627 }
628 } 628 }
629 ++v10; 629 ++v10;
630 } 630 }
702 0xAu, 702 0xAu,
703 0, 703 0,
704 pGlobalTXT_LocalizationStrings[193], 704 pGlobalTXT_LocalizationStrings[193],
705 pTex_tab_an_7b__zoot_on, 705 pTex_tab_an_7b__zoot_on,
706 0); 706 0);
707 dword_506520 = 0; 707 awards_count = 0;
708 v26.uFrameX = 48; 708 v26.uFrameX = 48;
709 v26.uFrameY = 70; 709 v26.uFrameY = 70;
710 v26.uFrameWidth = 360; 710 v26.uFrameWidth = 360;
711 v26.uFrameHeight = 264; 711 v26.uFrameHeight = 264;
712 v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3; 712 v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
713 v26.uFrameZ = 407; 713 v26.uFrameZ = 407;
714 v26.uFrameHeight = v2 * 264 / v2; 714 v26.uFrameHeight = v2 * 264 / v2;
715 v26.uFrameW = v26.uFrameHeight + 69; 715 v26.uFrameW = v26.uFrameHeight + 69;
716 memset(&pStru179, 0, 0xFA0u); 716 memset(&achievedAwardsIndex, 0, 4000);
717 memset(byte_5C6D50, 0, 0x64u); 717 memset(byte_5C6D50, 0, 0x64u);
718 if ( dword_506528 < 29 ) 718 if ( dword_506528 < 29 )
719 { 719 {
720 v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528]; 720 v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528];
721 for(int i=dword_506528+1;i<dword_506528+31;i++) 721 for(int i=dword_506528+1;i<dword_506528+31;i++)
729 v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0); 729 v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0);
730 v7 = (v6 - 3) / (signed int)v26.uFrameHeight; 730 v7 = (v6 - 3) / (signed int)v26.uFrameHeight;
731 v8 = v7 + 1; 731 v8 = v7 + 1;
732 if ( (signed int)v7 + 1 > 0 ) 732 if ( (signed int)v7 + 1 > 0 )
733 { 733 {
734 memset32((char *)&pStru179 + 4 * dword_506520 , i, v8); 734 memset32((char *)&achievedAwardsIndex + 4 * awards_count , i, v8);
735 do 735 do
736 { 736 {
737 LODWORD(v7) = dword_506520++; 737 LODWORD(v7) = awards_count++;
738 byte_5C6D50[(int)v7] = BYTE4(v7); 738 byte_5C6D50[(int)v7] = BYTE4(v7);
739 ++HIDWORD(v7); 739 ++HIDWORD(v7);
740 } 740 }
741 while ( SHIDWORD(v7) < (signed int)v8 ); 741 while ( SHIDWORD(v7) < (signed int)v8 );
742 } 742 }
746 ++v3; 746 ++v3;
747 } 747 }
748 } 748 }
749 } 749 }
750 } 750 }
751 v12 = dword_506520; 751 v12 = awards_count;
752 dword_506520 = 0; 752 awards_count = 0;
753 dword_506524 = v12; 753 awards_count2 = v12;
754 } 754 }
755 } 755 }
756 } 756 }
757 757
758 758