comparison GUIWindow.cpp @ 2275:8193a64c7461

Слияние
author Ritor1
date Fri, 14 Mar 2014 09:32:42 +0600
parents 42b6a910b5d8
children 0cd17b0d36c2
comparison
equal deleted inserted replaced
2274:90f56da08d76 2275:8193a64c7461
78 { 78 {
79 if (uNumMessages) 79 if (uNumMessages)
80 uNumMessages = pMessages[0].field_8 != 0; 80 uNumMessages = pMessages[0].field_8 != 0;
81 } 81 }
82 82
83
84 //----- (004356B9) -------------------------------------------------------- 83 //----- (004356B9) --------------------------------------------------------
85 void GUIMessageQueue::PopMessage(enum UIMessageType *pType, int *pParam, int *a4) 84 void GUIMessageQueue::PopMessage(enum UIMessageType *pType, int *pParam, int *a4)
86 { 85 {
87 signed int v4; // edx@1
88 GUIMessage *v5; // eax@2
89
90 v4 = 0;
91 if ( this->uNumMessages ) 86 if ( this->uNumMessages )
92 { 87 {
93 v5 = this->pMessages;
94 *pType = this->pMessages[0].eType; 88 *pType = this->pMessages[0].eType;
95 *pParam = this->pMessages[0].param; 89 *pParam = this->pMessages[0].param;
96 *a4 = this->pMessages[0].field_8; 90 *a4 = this->pMessages[0].field_8;
97 if ( (signed int)(this->uNumMessages - 1) > 0 ) 91 if ( (signed int)(this->uNumMessages - 1) > 0 )
98 { 92 {
99 do 93 for ( uint i = 0; i < (signed int)(this->uNumMessages - 1); ++i )
100 { 94 {
101 v5->eType = v5[1].eType; 95 this->pMessages[i].eType = this->pMessages[i + 1].eType;
102 v5->param = v5[1].param; 96 this->pMessages[i].param = this->pMessages[i + 1].param;
103 v5->field_8 = v5[1].field_8; 97 this->pMessages[i].field_8 = this->pMessages[i + 1].field_8;
104 ++v4; 98 }
105 ++v5;
106 }
107 while ( v4 < (signed int)(this->uNumMessages - 1) );
108 } 99 }
109 --this->uNumMessages; 100 --this->uNumMessages;
110 } 101 }
111 } 102 }
112
113
114
115
116
117 103
118 //----- (0041B4E1) -------------------------------------------------------- 104 //----- (0041B4E1) --------------------------------------------------------
119 int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall) 105 int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall)
120 { 106 {
121 unsigned __int8 v3; // bl@1 107 unsigned __int8 v3; // bl@1
157 } 143 }
158 } 144 }
159 } 145 }
160 return result; 146 return result;
161 } 147 }
162
163
164
165 148
166 //----- (0041B438) -------------------------------------------------------- 149 //----- (0041B438) --------------------------------------------------------
167 GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey) 150 GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey)
168 { 151 {
169 char v1; // al@1 152 char v1; // al@1
341 break; 324 break;
342 } 325 }
343 case WINDOW_null: 326 case WINDOW_null:
344 return; 327 return;
345 default: 328 default:
346 {
347 break; 329 break;
348 }
349 } 330 }
350 //v8 = this->pControlsHead; 331 //v8 = this->pControlsHead;
351 if ( this->pControlsHead ) 332 if ( this->pControlsHead )
352 { 333 {
353 do 334 do
370 ++this->numVisibleWindows; 351 ++this->numVisibleWindows;
371 } 352 }
372 pVisibleWindowsIdxs[uNumVisibleWindows] = 0; 353 pVisibleWindowsIdxs[uNumVisibleWindows] = 0;
373 uNumVisibleWindows = uNumVisibleWindows - 1; 354 uNumVisibleWindows = uNumVisibleWindows - 1;
374 } 355 }
375
376
377
378
379
380 356
381 //----- (0041CD3B) -------------------------------------------------------- 357 //----- (0041CD3B) --------------------------------------------------------
382 GUIButton *GUIWindow::GetControl(unsigned int uID) 358 GUIButton *GUIWindow::GetControl(unsigned int uID)
383 { 359 {
384 GUIButton *result; // eax@1 360 GUIButton *result; // eax@1
645 621
646 //----- (00415551) -------------------------------------------------------- 622 //----- (00415551) --------------------------------------------------------
647 void GUIWindow::DrawMessageBox(int arg0) 623 void GUIWindow::DrawMessageBox(int arg0)
648 { 624 {
649 unsigned int v2; // edi@1 625 unsigned int v2; // edi@1
650 GUIWindow *v3; // ebx@1
651 signed int v4; // esi@2 626 signed int v4; // esi@2
652 unsigned int v5; // eax@2 627 unsigned int v5; // eax@2
653 unsigned int v6; // edx@4
654 unsigned int v7; // ecx@6
655 unsigned int v8; // eax@9
656 __int32 v9; // eax@10
657 unsigned int v10; // eax@18
658 LONG v11; // ecx@18
659 unsigned int v12; // edx@18
660 unsigned int v13; // eax@18
661 const char *v14; // ecx@18
662 int v15; // eax@19
663 unsigned int v16; // esi@19 628 unsigned int v16; // esi@19
664 const char *v17; // ebx@25 629 GUIWindow current_window; // [sp+Ch] [bp-60h]@18
665 int v18; // eax@26 630 POINT cursor; // [sp+60h] [bp-Ch]@8
666 GUIWindow v19; // [sp+Ch] [bp-60h]@18
667 POINT a2; // [sp+60h] [bp-Ch]@8
668 unsigned int v21; // [sp+68h] [bp-4h]@18
669 unsigned int v22; // [sp+74h] [bp+8h]@2 631 unsigned int v22; // [sp+74h] [bp+8h]@2
670 unsigned int v23; // [sp+74h] [bp+8h]@18
671 632
672 v2 = 0; 633 v2 = 0;
673 v3 = this;
674 if ( arg0 ) 634 if ( arg0 )
675 { 635 {
676 v4 = pViewport->uViewportTL_X; 636 v4 = pViewport->uViewportTL_X;
677 v5 = pViewport->uViewportBR_X; 637 v5 = pViewport->uViewportBR_X;
678 v2 = pViewport->uViewportTL_Y; 638 v2 = pViewport->uViewportTL_Y;
682 { 642 {
683 v4 = 0; 643 v4 = 0;
684 v5 = window->GetWidth(); 644 v5 = window->GetWidth();
685 v22 = window->GetHeight(); 645 v22 = window->GetHeight();
686 } 646 }
687 v6 = this->uFrameX; 647 pMouse->GetCursorPos(&cursor);
688 if ( (signed int)this->uFrameX >= v4 ) 648 if ( (signed int)this->uFrameX >= v4 )
689 { 649 {
690 v7 = this->uFrameWidth; 650 if ( (signed int)(this->uFrameWidth + this->uFrameX) > (signed int)v5 )
691 if ( (signed int)(v7 + v6) <= (signed int)v5 ) 651 {
692 goto LABEL_9; 652 this->uFrameX = v5 - this->uFrameWidth;
693 v3->uFrameX = v5 - v7; 653 this->uFrameY = cursor.y + 30;
654 }
694 } 655 }
695 else 656 else
696 { 657 {
697 this->uFrameX = v4; 658 this->uFrameX = v4;
698 } 659 this->uFrameY = cursor.y + 30;
699 v3->uFrameY = pMouse->GetCursorPos(&a2)->y + 30; 660 }
700 LABEL_9: 661
701 v8 = v3->uFrameY; 662 if ( (signed int)this->uFrameY >= (signed int)v2 )
702 if ( (signed int)v8 >= (signed int)v2 ) 663 {
703 { 664 if ( (signed int)(this->uFrameY + this->uFrameHeight) > (signed int)v22 )
704 if ( (signed int)(v8 + v3->uFrameHeight) <= (signed int)v22 ) 665 this->uFrameY = cursor.y - this->uFrameHeight - 30;
705 goto LABEL_14;
706 v9 = pMouse->GetCursorPos(&a2)->y - v3->uFrameHeight - 30;
707 } 666 }
708 else 667 else
709 { 668 this->uFrameY = cursor.y + 30;
710 v9 = pMouse->GetCursorPos(&a2)->y + 30; 669 if ( (signed int)this->uFrameY < (signed int)v2 )
711 } 670 this->uFrameY = v2;
712 v3->uFrameY = v9; 671 if ( (signed int)this->uFrameX < v4 )
713 LABEL_14: 672 this->uFrameX = v4;
714 if ( (signed int)v3->uFrameY < (signed int)v2 ) 673 this->uFrameZ = this->uFrameWidth + this->uFrameX - 1;
715 v3->uFrameY = v2; 674 this->uFrameW = this->uFrameHeight + this->uFrameY - 1;
716 if ( (signed int)v3->uFrameX < v4 ) 675 memcpy(&current_window, this, sizeof(current_window));
717 v3->uFrameX = v4; 676 current_window.uFrameX += 12;
718 v10 = v3->uFrameWidth; 677 current_window.uFrameWidth -= 24;
719 v11 = v3->uFrameX; 678 current_window.uFrameY += 12;
720 v12 = v3->uFrameY; 679 current_window.uFrameHeight -= 12;
721 v21 = v10; 680 current_window.uFrameZ = current_window.uFrameWidth + current_window.uFrameX - 1;
722 a2.y = v11; 681 current_window.uFrameW = current_window.uFrameHeight + current_window.uFrameY - 1;
723 v3->uFrameZ = v10 + v11 - 1; 682 if ( this->Hint )
724 v13 = v3->uFrameHeight; 683 v16 = pFontLucida->CalcTextHeight(this->Hint, &current_window, 0, 0) + 24;
725 v3->uFrameW = v13 + v12 - 1;
726 memcpy(&v19, v3, sizeof(v19));
727 v19.uFrameX += 12;
728 v19.uFrameWidth -= 24;
729 v19.uFrameY += 12;
730 v19.uFrameHeight -= 12;
731 v19.uFrameZ = v19.uFrameWidth + v19.uFrameX - 1;
732 v23 = v12;
733 v19.uFrameW = v19.uFrameHeight + v19.uFrameY - 1;
734 v14 = v3->Hint;
735 if ( v14 )
736 {
737 v15 = pFontLucida->CalcTextHeight(v14, &v19, 0, 0);
738 v12 = v23;
739 v16 = v15 + 24;
740 }
741 else 684 else
742 { 685 v16 = this->uFrameHeight;
743 v16 = v13;
744 }
745 if ( (signed int)v16 < 64 ) 686 if ( (signed int)v16 < 64 )
746 v16 = 64; 687 v16 = 64;
747 if ( (signed int)(v16 + v12) > 479 ) 688 if ( (signed int)(v16 + this->uFrameY) > 479 )
748 v16 = 479 - v12; 689 v16 = 479 - this->uFrameY;
749 DrawPopupWindow(a2.y, v12, v21, v16); 690 DrawPopupWindow(this->uFrameX, this->uFrameY, this->uFrameWidth, v16);
750 v17 = v3->Hint; 691 if ( this->Hint )
751 if ( v17 ) 692 current_window.DrawTitleText(pFontLucida, 0, (signed int)(v16 - pFontLucida->CalcTextHeight(this->Hint, &current_window, 0, 0)) / 2 - 14, 0, this->Hint, 3);
752 { 693 }
753 v18 = pFontLucida->CalcTextHeight(v17, &v19, 0, 0);
754 v19.DrawTitleText(pFontLucida, 0, (signed int)(v16 - v18) / 2 - 14, 0, v17, 3);
755 }
756 }
757
758
759
760 694
761 //----- (00411B59) -------------------------------------------------------- 695 //----- (00411B59) --------------------------------------------------------
762 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer) 696 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer)
763 { 697 {
764 unsigned int v2; // esi@1 698 //unsigned int v2; // esi@1
765 unsigned int v3; // edi@1 699 //unsigned int v3; // edi@1
766 FILE *v4; // ebx@1 700 FILE *v4; // ebx@1
767 FILE *v5; // eax@2 701 FILE *v5; // eax@2
768 char pContainerName[64]; // [sp+Ch] [bp-44h]@1 702 char pContainerName[64]; // [sp+Ch] [bp-44h]@1
769 unsigned int v7; // [sp+4Ch] [bp-4h]@1 703 //unsigned int v7; // [sp+4Ch] [bp-4h]@1
770 704
771 v2 = uSlot; 705 //v2 = uSlot;
772 v7 = uPlayer; 706 //v7 = uPlayer;
773 v3 = uSlot + 1; 707 //v3 = uSlot + 1;
774 sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1); 708 sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1);
775 v4 = fopen(pContainerName, "rb"); 709 v4 = fopen(pContainerName, "rb");
776 if ( v4 ) 710 if ( v4 )
777 { 711 {
778 pSavegameThumbnails[v2].LoadFromFILE(v4, 0, 1u); 712 pSavegameThumbnails[uSlot].LoadFromFILE(v4, 0, 1);
779 fclose(v4); 713 fclose(v4);
780 } 714 }
781 else 715 else
782 { 716 {
783 sprintf(pContainerName, "lloyd%d%d.pcx", v7, v3); 717 sprintf(pContainerName, "lloyd%d%d.pcx", uPlayer, uSlot + 1);
784 v5 = pNew_LOD->FindContainer(pContainerName, 1); 718 v5 = pNew_LOD->FindContainer(pContainerName, 1);
785 if ( v5 ) 719 if ( v5 )
786 pSavegameThumbnails[v2].LoadFromFILE(v5, 0, 0); 720 pSavegameThumbnails[uSlot].LoadFromFILE(v5, 0, 0);
787 else 721 else
788 *((int *)&pSavegameThumbnails.data()->pPixels + 10 * v2) = 0; 722 *((int *)&pSavegameThumbnails.data()->pPixels + 10 * uSlot) = 0;
789 } 723 }
790 } 724 }
791 725
792 726
793 //----- (00411621) -------------------------------------------------------- 727 //----- (00411621) --------------------------------------------------------
898 { 832 {
899 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 833 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
900 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 834 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
901 } 835 }
902 else 836 else
903 {
904 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); 837 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]);
905 }
906 return; 838 return;
907 } 839 }
908 if ( current_npc_text ) 840 if ( current_npc_text )
909 { 841 {
910 pDialogWindow.uFrameWidth = 458; 842 pDialogWindow.uFrameWidth = 458;
923 { 855 {
924 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 856 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
925 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 857 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
926 } 858 }
927 else 859 else
928 {
929 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); 860 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]);
930 }
931 return; 861 return;
932 } 862 }
933 for ( v8 = 0; v8 < uNumDialogueNPCPortraits; ++v8 ) 863 for ( v8 = 0; v8 < uNumDialogueNPCPortraits; ++v8 )
934 { 864 {
935 pRenderer->DrawTextureIndexed(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4, 865 pRenderer->DrawTextureIndexed(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4,
962 { 892 {
963 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 893 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
964 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 894 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
965 } 895 }
966 else 896 else
967 {
968 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); 897 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]);
969 }
970 return; 898 return;
971 } 899 }
972 v4 = (char *)pDialogueNPCCount - 1; 900 v4 = (char *)pDialogueNPCCount - 1;
973 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); 901 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]);
974 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]); 902 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]);
979 { 907 {
980 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 908 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
981 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 909 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
982 } 910 }
983 else 911 else
984 {
985 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); 912 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]);
986 }
987 return; 913 return;
988 } 914 }
989 if ( v4 || !dword_591080 )// 915 if ( v4 || !dword_591080 )//
990 {
991 SimpleHouseDialog(); 916 SimpleHouseDialog();
992 }
993 else 917 else
994 { 918 {
995 sprintfex( pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], 919 sprintfex( pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429],
996 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterName, 920 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterName,
997 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle); 921 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle);
1056 { 980 {
1057 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 981 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
1058 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 982 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
1059 } 983 }
1060 else 984 else
1061 {
1062 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); 985 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]);
1063 }
1064 } 986 }
1065 987
1066 //----- (004B1854) -------------------------------------------------------- 988 //----- (004B1854) --------------------------------------------------------
1067 void GUIWindow::DrawShops_next_generation_time_string( __int64 next_generation_time ) 989 void GUIWindow::DrawShops_next_generation_time_string( __int64 next_generation_time )
1068 { 990 {
1115 strcat(pTmpBuf.data(), pTmpBuf2.data()); 1037 strcat(pTmpBuf.data(), pTmpBuf2.data());
1116 } 1038 }
1117 this->DrawTitleText(pFontArrus, 0, (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), this, 0, 0)) / 2 + 101, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); 1039 this->DrawTitleText(pFontArrus, 0, (212 - pFontArrus->CalcTextHeight(pTmpBuf.data(), this, 0, 0)) / 2 + 101, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3);
1118 } 1040 }
1119 1041
1120
1121
1122 //----- (0044D406) -------------------------------------------------------- 1042 //----- (0044D406) --------------------------------------------------------
1123 void GUIWindow::DrawTitleText( GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, 1043 void GUIWindow::DrawTitleText( GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor,
1124 const char *pInString, unsigned int uLineSpacing ) 1044 const char *pInString, unsigned int uLineSpacing )
1125 { 1045 {
1126 GUIWindow *pWindow; // esi@1 1046 //GUIWindow *pWindow; // esi@1
1127 unsigned int v8; // ebx@1 1047 unsigned int v8; // ebx@1
1128 char *v9; // eax@1 1048 char *v9; // eax@1
1129 unsigned int v11; // edi@1 1049 unsigned int v11; // edi@1
1130 signed int v12; // esi@1 1050 signed int v12; // esi@1
1131 int v13; // eax@2 1051 int v13; // eax@2
1132 GUIFont *pFont; // [sp+Ch] [bp-4h]@1 1052 GUIFont *pFont; // [sp+Ch] [bp-4h]@1
1133 const char *Stra; // [sp+24h] [bp+14h]@5 1053 const char *Stra; // [sp+24h] [bp+14h]@5
1134 1054
1135 pWindow = this; 1055 //pWindow = this;
1136 pFont = a2; 1056 pFont = a2;
1137 v8 = this->uFrameWidth - uHorizontalMargin; 1057 v8 = this->uFrameWidth - uHorizontalMargin;
1138 ui_current_text_color = uDefaultColor; 1058 ui_current_text_color = uDefaultColor;
1139 v9 = FitTextInAWindow(pInString, a2, this, uHorizontalMargin, 0); 1059 v9 = FitTextInAWindow(pInString, a2, this, uHorizontalMargin, 0);
1140 Stra = strtok(v9, "\n"); 1060 Stra = strtok(v9, "\n");
1141 v11 = uHorizontalMargin + pWindow->uFrameX; 1061 v11 = uHorizontalMargin + this->uFrameX;
1142 v12 = uVerticalMargin + pWindow->uFrameY; 1062 v12 = uVerticalMargin + this->uFrameY;
1143 while ( 1 ) 1063 while ( 1 )
1144 { 1064 {
1145 if ( !Stra ) 1065 if ( !Stra )
1146 break; 1066 break;
1147 v13 = (signed int)(v8 - pFont->GetLineWidth(Stra)) >> 1; 1067 v13 = (signed int)(v8 - pFont->GetLineWidth(Stra)) >> 1;
1151 v12 += pFont->uFontHeight - uLineSpacing; 1071 v12 += pFont->uFontHeight - uLineSpacing;
1152 Stra = strtok(0, "\n"); 1072 Stra = strtok(0, "\n");
1153 } 1073 }
1154 } 1074 }
1155 // 5C6DB4: using guessed type int ui_current_text_color; 1075 // 5C6DB4: using guessed type int ui_current_text_color;
1156
1157
1158 1076
1159 //----- (0044CE08) -------------------------------------------------------- 1077 //----- (0044CE08) --------------------------------------------------------
1160 void GUIWindow::DrawText( GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, signed int uFontShadowColor ) 1078 void GUIWindow::DrawText( GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, signed int uFontShadowColor )
1161 { 1079 {
1162 GUIWindow *v9; // edi@1 1080 GUIWindow *v9; // edi@1
1200 v30 = strlen(Str); 1118 v30 = strlen(Str);
1201 LOBYTE(v11) = 0; 1119 LOBYTE(v11) = 0;
1202 if ( !uX ) 1120 if ( !uX )
1203 uX = 12; 1121 uX = 12;
1204 if ( a8 ) 1122 if ( a8 )
1205 {
1206 v32 = Str; 1123 v32 = Str;
1207 }
1208 else 1124 else
1209 { 1125 {
1210 v11 = (int)FitTextInAWindow(Str, v10, v9, uX, 0); 1126 v11 = (int)FitTextInAWindow(Str, v10, v9, uX, 0);
1211 v32 = (const char *)v11; 1127 v32 = (const char *)v11;
1212 } 1128 }
1228 || (char)v11 == 10 ) 1144 || (char)v11 == 10 )
1229 { 1145 {
1230 switch ( (unsigned __int8)v11 ) 1146 switch ( (unsigned __int8)v11 )
1231 { 1147 {
1232 case 9u: 1148 case 9u:
1233 strncpy(Dest, &v32[v14 + 1], 3u); 1149 strncpy(Dest, &v32[v14 + 1], 3);
1234 Dest[3] = 0; 1150 Dest[3] = 0;
1235 pInString += 3; 1151 pInString += 3;
1236 v29 = atoi(Dest); 1152 v29 = atoi(Dest);
1237 v19 = atoi(Dest); 1153 v19 = atoi(Dest);
1238 LOBYTE(v11) = (char)v31; 1154 LOBYTE(v11) = (char)v31;
1242 v11 = LOBYTE(v10->uFontHeight); 1158 v11 = LOBYTE(v10->uFontHeight);
1243 uY = uY + v11 - 3; 1159 uY = uY + v11 - 3;
1244 v13 = uY + v31->uFrameY; 1160 v13 = uY + v31->uFrameY;
1245 v12 = uX + v29 + v31->uFrameX; 1161 v12 = uX + v29 + v31->uFrameX;
1246 if ( a8 ) 1162 if ( a8 )
1247 goto LABEL_36; 1163 {
1164 v11 = v11 + v13 - 3;
1165 if ( v11 > a8 )
1166 return;
1167 }
1248 break; 1168 break;
1249 case 0xCu: 1169 case 0xCu:
1250 strncpy(Dest, &v32[v14 + 1], 5u); 1170 strncpy(Dest, &v32[v14 + 1], 5);
1251 Dest[5] = 0; 1171 Dest[5] = 0;
1252 v11 = atoi(Dest); 1172 v11 = atoi(Dest);
1253 pInString += 5; 1173 pInString += 5;
1254 uFontColor = v11; 1174 uFontColor = v11;
1255 break; 1175 break;
1256 case 0xDu: 1176 case 0xDu:
1257 strncpy(Dest, &v32[v14 + 1], 3u); 1177 strncpy(Dest, &v32[v14 + 1], 3);
1258 Dest[3] = 0; 1178 Dest[3] = 0;
1259 pInString += 3; 1179 pInString += 3;
1260 v18 = atoi(Dest); 1180 v18 = atoi(Dest);
1261 v11 = v10->GetLineWidth(&v32[pInString]); 1181 v11 = v10->GetLineWidth(&v32[pInString]);
1262 v12 = v31->uFrameZ - v11 - v18; 1182 v12 = v31->uFrameZ - v11 - v18;
1263 v13 = uY + v31->uFrameY; 1183 v13 = uY + v31->uFrameY;
1264 if ( a8 ) 1184 if ( a8 )
1265 { 1185 {
1266 v11 = LOBYTE(v10->uFontHeight); 1186 v11 = LOBYTE(v10->uFontHeight);
1267 LABEL_36:
1268 v11 = v11 + v13 - 3; 1187 v11 = v11 + v13 - 3;
1269 if ( v11 > a8 ) 1188 if ( v11 > a8 )
1270 return; 1189 return;
1271 break; 1190 break;
1272 } 1191 }
1283 v28 = *((int *)&v10->cFirstChar + 3 * v15 + 9); 1202 v28 = *((int *)&v10->cFirstChar + 3 * v15 + 9);
1284 if ( v14 > 0 ) 1203 if ( v14 > 0 )
1285 v12 += v10->pMetrics[v15].uLeftSpacing; 1204 v12 += v10->pMetrics[v15].uLeftSpacing;
1286 v17 = (int)((char *)&v10[1] + v10->font_pixels_offset[v15]); 1205 v17 = (int)((char *)&v10[1] + v10->font_pixels_offset[v15]);
1287 if ( (short)uFontColor ) 1206 if ( (short)uFontColor )
1288 pRenderer->DrawText( 1207 pRenderer->DrawText(v12, v13, (unsigned __int8 *)v17, v16, LOBYTE(v10->uFontHeight),
1289 v12, 1208 v10->pFontPalettes[0], uFontColor, uFontShadowColor);
1290 v13,
1291 (unsigned __int8 *)v17,
1292 v16,
1293 LOBYTE(v10->uFontHeight),
1294 v10->pFontPalettes[0],
1295 uFontColor,
1296 uFontShadowColor);
1297 else 1209 else
1298 pRenderer->DrawTextPalette( 1210 pRenderer->DrawTextPalette(v12, v13, (unsigned char*)v17, v16, LOBYTE(v10->uFontHeight),
1299 v12, 1211 v10->pFontPalettes[0], a7);
1300 v13,
1301 (unsigned char*)v17,
1302 v16,
1303 LOBYTE(v10->uFontHeight),
1304 v10->pFontPalettes[0],
1305 a7);
1306 LOBYTE(v11) = v30; 1212 LOBYTE(v11) = v30;
1307 v12 += v28; 1213 v12 += v28;
1308 if ( (signed int)pInString < (signed int)v30 ) 1214 if ( (signed int)pInString < (signed int)v30 )
1309 { 1215 {
1310 LOBYTE(v11) = 3 * *v27; 1216 LOBYTE(v11) = 3 * *v27;
1323 } 1229 }
1324 1230
1325 1231
1326 //----- (0044CB4F) -------------------------------------------------------- 1232 //----- (0044CB4F) --------------------------------------------------------
1327 int GUIWindow::DrawTextInRect( GUIFont *pFont, unsigned int uX, unsigned int uY, unsigned int uColor, const char *text, int rect_width, int reverse_text ) 1233 int GUIWindow::DrawTextInRect( GUIFont *pFont, unsigned int uX, unsigned int uY, unsigned int uColor, const char *text, int rect_width, int reverse_text )
1328 { 1234 {
1329
1330 int pLineWidth; // ebx@1 1235 int pLineWidth; // ebx@1
1331 int text_width; // esi@3 1236 int text_width; // esi@3
1332 unsigned __int8 v12; // cl@7 1237 unsigned __int8 v12; // cl@7
1333 signed int v13; // esi@19 1238 signed int v13; // esi@19
1334 signed int v14; // ebx@19 1239 signed int v14; // ebx@19
1366 strcpy(pTmpBuf2.data(), text); 1271 strcpy(pTmpBuf2.data(), text);
1367 text_width = 0; 1272 text_width = 0;
1368 if ( reverse_text ) 1273 if ( reverse_text )
1369 _strrev(pTmpBuf2.data()); 1274 _strrev(pTmpBuf2.data());
1370 Str1a = 0; 1275 Str1a = 0;
1371 for (i=0; i<pNumLen; ++i) 1276 for ( i = 0; i < pNumLen; ++i )
1372 { 1277 {
1373 if ( text_width >= rect_width ) 1278 if ( text_width >= rect_width )
1374 break; 1279 break;
1375 v12 = pTmpBuf2[i]; 1280 v12 = pTmpBuf2[i];
1376 if ( pFont->IsCharValid(v12) ) 1281 if ( pFont->IsCharValid(v12) )
1388 if ( i > 0 ) 1293 if ( i > 0 )
1389 text_width += pFont->pMetrics[v12].uLeftSpacing; 1294 text_width += pFont->pMetrics[v12].uLeftSpacing;
1390 text_width += pFont->pMetrics[v12].uWidth; 1295 text_width += pFont->pMetrics[v12].uWidth;
1391 if ( i < pNumLen ) 1296 if ( i < pNumLen )
1392 text_width += pFont->pMetrics[v12].uRightSpacing; 1297 text_width += pFont->pMetrics[v12].uRightSpacing;
1393 } 1298 }
1394 } 1299 }
1395 } 1300 }
1396 pTmpBuf2[i - 1] = 0; 1301 pTmpBuf2[i - 1] = 0;
1397 1302
1398 1303
1454 else 1359 else
1455 pRenderer->DrawTextPalette(v13, v14, v21, v20, pFont->uFontHeight, pFont->pFontPalettes[0], 0); 1360 pRenderer->DrawTextPalette(v13, v14, v21, v20, pFont->uFontHeight, pFont->pFontPalettes[0], 0);
1456 v13 += v20; 1361 v13 += v20;
1457 if ( i < (signed int)pNumLen ) 1362 if ( i < (signed int)pNumLen )
1458 v13 += pFont->pMetrics[v15].uRightSpacing; 1363 v13 += pFont->pMetrics[v15].uRightSpacing;
1459 } 1364 }
1460 } 1365 }
1461
1462
1463 } 1366 }
1464 return v28; 1367 return v28;
1465 } 1368 }
1466 1369
1467 //----- (0041D12F) -------------------------------------------------------- 1370 //----- (0041D12F) --------------------------------------------------------
1526 DrawText(a2, uX, uY, 0, "_", 0, 0, 0); 1429 DrawText(a2, uX, uY, 0, "_", 0, 0, 0);
1527 } 1430 }
1528 1431
1529 //----- (0041C432) -------------------------------------------------------- 1432 //----- (0041C432) --------------------------------------------------------
1530 GUIWindow * GUIWindow::Create( unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eWindowType, int pButton, const char* hint ) 1433 GUIWindow * GUIWindow::Create( unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eWindowType, int pButton, const char* hint )
1531 { 1434 {
1532 unsigned int uNextFreeWindowID; // ebp@1 1435 unsigned int uNextFreeWindowID; // ebp@1
1533 //int *v8; // eax@1 1436 //int *v8; // eax@1
1534 //GUIWindow *pWindow; // esi@4 1437 //GUIWindow *pWindow; // esi@4
1535 //int v10; // eax@4 1438 //int v10; // eax@4
1536 unsigned int v11; // ebx@15 1439 unsigned int v11; // ebx@15
1663 { 1566 {
1664 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[408], speakingNPC->pName); // 1567 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[408], speakingNPC->pName); //
1665 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, UIMSG_SelectNPCDialogueOption, 0x4Cu, 0, pTmpBuf.data(), 0); 1568 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, UIMSG_SelectNPCDialogueOption, 0x4Cu, 0, pTmpBuf.data(), 0);
1666 } 1569 }
1667 else 1570 else
1668 {
1669 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, UIMSG_SelectNPCDialogueOption, 0x4Cu, 0, pGlobalTXT_LocalizationStrings[406], 0);// 1571 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, UIMSG_SelectNPCDialogueOption, 0x4Cu, 0, pGlobalTXT_LocalizationStrings[406], 0);//
1670 }
1671 num_menu_buttons = 2; 1572 num_menu_buttons = 2;
1672 } 1573 }
1673 } 1574 }
1674 pWindow->_41D08F_set_keyboard_control_group(num_menu_buttons, 1, 0, 1); 1575 pWindow->_41D08F_set_keyboard_control_group(num_menu_buttons, 1, 0, 1);
1675 } 1576 }
1676 break; 1577 break;
1677 } 1578 }
1678 case WINDOW_ChangeLocation: { 1579 case WINDOW_ChangeLocation:
1580 {
1679 pMainScreenNum = pCurrentScreen; 1581 pMainScreenNum = pCurrentScreen;
1680 pCurrentScreen = SCREEN_CHANGE_LOCATION; 1582 pCurrentScreen = SCREEN_CHANGE_LOCATION;
1681 pBtn_ExitCancel = pWindow->CreateButton( 566, 445, 75, 33, 1, 0, UIMSG_CHANGE_LOCATION_ClickCencelBtn, 0, 'N', pGlobalTXT_LocalizationStrings[156], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// 1583 pBtn_ExitCancel = pWindow->CreateButton( 566, 445, 75, 33, 1, 0, UIMSG_CHANGE_LOCATION_ClickCencelBtn, 0, 'N', pGlobalTXT_LocalizationStrings[156], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);//
1682 pBtn_YES = pWindow->CreateButton( 486, 445, 75, 33, 1, 0, UIMSG_OnTravelByFoot, 0, 'Y', pWindow->Hint, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); 1584 pBtn_YES = pWindow->CreateButton( 486, 445, 75, 33, 1, 0, UIMSG_OnTravelByFoot, 0, 'Y', pWindow->Hint, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0);
1683 pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63, 73, 1, 0, UIMSG_OnTravelByFoot, 1, ' ', pWindow->Hint, 0, 0, 0); 1585 pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63, 73, 1, 0, UIMSG_OnTravelByFoot, 1, ' ', pWindow->Hint, 0, 0, 0);
1684 pWindow->CreateButton( 8, 8, 460, 344, 1, 0, UIMSG_OnTravelByFoot, 1, 0, pWindow->Hint, 0); 1586 pWindow->CreateButton( 8, 8, 460, 344, 1, 0, UIMSG_OnTravelByFoot, 1, 0, pWindow->Hint, 0);
1685 break; 1587 break;
1686 } 1588 }
1687 case WINDOW_SpellBook: {// 1589 case WINDOW_SpellBook: {//
1688 InitializeBookTextures(); 1590 InitializeBookTextures();
1689 pWindow->OpenSpellBook(); 1591 pWindow->OpenSpellBook();
1690 break; 1592 break;
1691 } 1593 }
1698 1600
1699 } 1601 }
1700 return pWindow; 1602 return pWindow;
1701 } 1603 }
1702 //LABEL_62: 1604 //LABEL_62:
1703 pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, '1', "", 0); 1605 pWindow->CreateButton(61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
1704 pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, '2', "", 0); 1606 pWindow->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
1705 pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, '3', "", 0); 1607 pWindow->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
1706 pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, '4', "", 0); 1608 pWindow->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
1707 pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); 1609 pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9, "", 0);
1708 return pWindow; 1610 return pWindow;
1709 } 1611 }
1710 if (eWindowType == WINDOW_HouseInterior) 1612 if (eWindowType == WINDOW_HouseInterior)
1711 { 1613 {
1712 pCurrentScreen = SCREEN_HOUSE; 1614 pCurrentScreen = SCREEN_HOUSE;
1925 if ( window_SpeakInHouse->par1C >= 53 ) 1827 if ( window_SpeakInHouse->par1C >= 53 )
1926 continue; 1828 continue;
1927 if ( pParty->PartyTimes._shop_ban_times[window_SpeakInHouse->par1C] <=pParty->uTimePlayed ) 1829 if ( pParty->PartyTimes._shop_ban_times[window_SpeakInHouse->par1C] <=pParty->uTimePlayed )
1928 { 1830 {
1929 if ( window_SpeakInHouse->par1C < 53 ) 1831 if ( window_SpeakInHouse->par1C < 53 )
1930 {
1931 pParty->PartyTimes._shop_ban_times[window_SpeakInHouse->par1C] = 0; 1832 pParty->PartyTimes._shop_ban_times[window_SpeakInHouse->par1C] = 0;
1932 }
1933 continue; 1833 continue;
1934 } 1834 }
1935 pNumMessages = pMessageQueue_50CBD0->uNumMessages; 1835 pNumMessages = pMessageQueue_50CBD0->uNumMessages;
1936 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); 1836 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0);
1937 continue; 1837 continue;
2210 { 2110 {
2211 GameMenuUI_DrawVideoOptions(); 2111 GameMenuUI_DrawVideoOptions();
2212 continue; 2112 continue;
2213 } 2113 }
2214 default: 2114 default:
2215 { 2115 continue;
2216 continue;
2217 }
2218 } 2116 }
2219 } 2117 }
2220 if ( GetCurrentMenuID() == -1 ) 2118 if ( GetCurrentMenuID() == -1 )
2221 GameUI_DrawFoodAndGold(); 2119 GameUI_DrawFoodAndGold();
2222 if ( sub_4637E0_is_there_popup_onscreen() ) 2120 if ( sub_4637E0_is_there_popup_onscreen() )
2253 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1; 2151 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
2254 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1; 2152 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
2255 Dst.DrawTitleText(pFontSmallnum, 0, 0xCu, ui_mainmenu_copyright_color, pGlobalTXT_LocalizationStrings[157], 3); 2153 Dst.DrawTitleText(pFontSmallnum, 0, 0xCu, ui_mainmenu_copyright_color, pGlobalTXT_LocalizationStrings[157], 3);
2256 } 2154 }
2257 2155
2258
2259
2260
2261 int modal_window_prev_screen; 2156 int modal_window_prev_screen;
2262 2157
2263 //----- (004141CA) -------------------------------------------------------- 2158 //----- (004141CA) --------------------------------------------------------
2264 void ModalWindow(const char *pStrHint, UIMessageType OnRelease_message) 2159 void ModalWindow(const char *pStrHint, UIMessageType OnRelease_message)
2265 { 2160 {
2297 pEventTimer->Resume(); 2192 pEventTimer->Resume();
2298 } 2193 }
2299 2194
2300 //----- (00467FB6) -------------------------------------------------------- 2195 //----- (00467FB6) --------------------------------------------------------
2301 void CreateScrollWindow() 2196 void CreateScrollWindow()
2302 { 2197 {
2303 unsigned int v0; // eax@1 2198 unsigned int v0; // eax@1
2304 char *v1; // ST18_4@3 2199 char *v1; // ST18_4@3
2305 unsigned int v2; // eax@3
2306 GUIWindow a1; // [sp+Ch] [bp-54h]@1 2200 GUIWindow a1; // [sp+Ch] [bp-54h]@1
2307 2201
2308 memcpy(&a1, pGUIWindow_ScrollWindow, sizeof(a1)); 2202 memcpy(&a1, pGUIWindow_ScrollWindow, sizeof(a1));
2309 a1.Hint = 0; 2203 a1.Hint = 0;
2310 a1.uFrameX = 1; 2204 a1.uFrameX = 1;
2311 a1.uFrameY = 1; 2205 a1.uFrameY = 1;
2312 a1.uFrameWidth = 468; 2206 a1.uFrameWidth = 468;
2313 v0 = pFontSmallnum->CalcTextHeight(pScrolls[pGUIWindow_ScrollWindow->par1C], &a1, 0, 0) 2207 v0 = pFontSmallnum->CalcTextHeight(pScrolls[pGUIWindow_ScrollWindow->par1C], &a1, 0, 0)
2314 + 2 * LOBYTE(pFontCreate->uFontHeight) 2208 + 2 * LOBYTE(pFontCreate->uFontHeight) + 24;
2315 + 24;
2316 a1.uFrameHeight = v0; 2209 a1.uFrameHeight = v0;
2317 if ( (signed int)(v0 + a1.uFrameY) > 479 ) 2210 if ( (signed int)(v0 + a1.uFrameY) > 479 )
2318 { 2211 {
2319 v0 = 479 - a1.uFrameY; 2212 v0 = 479 - a1.uFrameY;
2320 a1.uFrameHeight = 479 - a1.uFrameY; 2213 a1.uFrameHeight = 479 - a1.uFrameY;
2327 a1.uFrameY += 12; 2220 a1.uFrameY += 12;
2328 a1.uFrameHeight -= 12; 2221 a1.uFrameHeight -= 12;
2329 a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1; 2222 a1.uFrameZ = a1.uFrameWidth + a1.uFrameX - 1;
2330 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; 2223 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
2331 v1 = pItemsTable->pItems[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C + 700].pName; 2224 v1 = pItemsTable->pItems[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C + 700].pName;
2332 v2 = Color16(0xFFu, 0xFFu, 0x9Bu); 2225 sprintf(pTmpBuf.data(), format_4E2D80, Color16(0xFFu, 0xFFu, 0x9Bu), v1);
2333 sprintf(pTmpBuf.data(), format_4E2D80, v2, v1); 2226 a1.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3);
2334 a1.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3u); 2227 a1.DrawText(pFontSmallnum, 1, LOBYTE(pFontCreate->uFontHeight) - 3, 0,
2335 a1.DrawText( 2228 pScrolls[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C], 0, 0, 0);
2336 pFontSmallnum,
2337 1,
2338 LOBYTE(pFontCreate->uFontHeight) - 3,
2339 0,
2340 pScrolls[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C],
2341 0,
2342 0,
2343 0);
2344 } 2229 }
2345 //----- (00467F48) -------------------------------------------------------- 2230 //----- (00467F48) --------------------------------------------------------
2346 void CreateMsgScrollWindow( signed int mscroll_id ) 2231 void CreateMsgScrollWindow( signed int mscroll_id )
2347 { 2232 {
2348 signed int v1; // esi@1
2349
2350 v1 = mscroll_id;
2351 if ( !pGUIWindow_ScrollWindow && mscroll_id >= 700 ) 2233 if ( !pGUIWindow_ScrollWindow && mscroll_id >= 700 )
2352 { 2234 {
2353 if ( mscroll_id <= 782 ) 2235 if ( mscroll_id <= 782 )
2354 { 2236 {
2355 uTextureID_720980 = pIcons_LOD->LoadTexture("leather", TEXTURE_16BIT_PALETTE); 2237 uTextureID_720980 = pIcons_LOD->LoadTexture("leather", TEXTURE_16BIT_PALETTE);
2356 pGUIWindow_ScrollWindow = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Scroll, v1 - 700, 0); 2238 pGUIWindow_ScrollWindow = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Scroll, mscroll_id - 700, 0);
2357 } 2239 }
2358 } 2240 }
2359 } 2241 }
2360 //----- (00467F9F) -------------------------------------------------------- 2242 //----- (00467F9F) --------------------------------------------------------
2361 void free_book_subwindow() 2243 void free_book_subwindow()