Mercurial > mm7
comparison UIBooks.cpp @ 995:5876a9cafa3e
Various UIs, autonotes title fixed
author | Nomad |
---|---|
date | Tue, 14 May 2013 14:03:07 +0200 |
parents | 087a9af8e0ec |
children | eac5af72b614 c45d51b3f4f4 |
comparison
equal
deleted
inserted
replaced
994:3431f6abc786 | 995:5876a9cafa3e |
---|---|
44 #include "mm7_data.h" | 44 #include "mm7_data.h" |
45 | 45 |
46 | 46 |
47 | 47 |
48 | 48 |
49 | |
50 | |
51 | |
52 //----- (00413CC6) -------------------------------------------------------- | |
53 void BookUI_Draw(WindowType book) | |
54 { | |
55 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); | |
56 switch (book) | |
57 { | |
58 case WINDOW_QuestBook: BookUI_Questbook_Draw(); break; | |
59 case WINDOW_AutonotesBook: BookUI_Autonotes_Draw(); break; | |
60 case WINDOW_MapsBook: BookUI_Map_Draw(); break; | |
61 case WINDOW_CalendarBook: BookUI_Calendar_Draw(); break; | |
62 case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break; | |
63 case WINDOW_TownPortal: DrawTownPortalScreen(); break; | |
64 case WINDOW_HistoryBook: DrawBook_History(); break; | |
65 } | |
66 } | |
67 | |
68 | |
69 | |
70 //----- (00413D6F) -------------------------------------------------------- | |
71 void BookUI_Calendar_Draw() | |
72 { | |
73 unsigned int v0; // esi@1 | |
74 char *v1; // eax@5 | |
75 int v2; // ecx@5 | |
76 char *v3; // eax@6 | |
77 GUIWindow a1; // [sp+Ch] [bp-60h]@5 | |
78 unsigned int v6; // [sp+60h] [bp-Ch]@1 | |
79 int v7; // [sp+64h] [bp-8h]@1 | |
80 int a5; // [sp+68h] [bp-4h]@1 | |
81 | |
82 v0 = pParty->uCurrentHour; | |
83 v6 = pMapStats->GetMapInfo(pCurrentMapName); | |
84 a5 = TargetColor(0x4Bu, 0x4Bu, 0x4Bu); | |
85 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13); | |
86 v7 = (unsigned __int8)pDayMoonPhase[pParty->uDaysPlayed]; | |
87 if ( (signed int)v0 <= 12 ) | |
88 { | |
89 if ( !v0 ) | |
90 v0 = 12; | |
91 } | |
92 else | |
93 { | |
94 v0 -= 12; | |
95 } | |
96 a1.uFrameX = game_viewport_x; | |
97 a1.uFrameY = game_viewport_y; | |
98 a1.uFrameWidth = game_viewport_width; | |
99 a1.uFrameHeight = game_viewport_height; | |
100 a1.uFrameZ = game_viewport_z; | |
101 a1.uFrameW = game_viewport_w; | |
102 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u); | |
103 if ( pParty->uCurrentHour >= 12 ) | |
104 { | |
105 if ( pParty->uCurrentHour >= 24 ) | |
106 v2=0; | |
107 else | |
108 v2=1; | |
109 } | |
110 else | |
111 v2=0; | |
112 v1 = GetDayPart(); | |
113 sprintf( | |
114 pTmpBuf, | |
115 "%s\t100:\t110%d:%02d %s - %s", | |
116 pGlobalTXT_LocalizationStrings[526], | |
117 v0, | |
118 pParty->uCurrentMinute, | |
119 aAMPMNames[v2], | |
120 v1); | |
121 a1.DrawText(pBookFont, 70, 55, a5, pTmpBuf, 0, 0, 0); | |
122 sprintf( | |
123 pTmpBuf, | |
124 "%s\t100:\t110%d - %s", | |
125 pGlobalTXT_LocalizationStrings[56], | |
126 pParty->uDaysPlayed + 1, | |
127 aDayNames[pParty->uDaysPlayed % 7]); | |
128 a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, a5, pTmpBuf, 0, 0, 0); | |
129 sprintf( | |
130 pTmpBuf, | |
131 "%s\t100:\t110%d - %s", | |
132 pGlobalTXT_LocalizationStrings[146], | |
133 pParty->uCurrentMonth + 1, | |
134 aMonthNames[pParty->uCurrentMonth]); | |
135 a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, a5, pTmpBuf, 0, 0, 0); | |
136 sprintf(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); | |
137 a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, a5, pTmpBuf, 0, 0, 0); | |
138 sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[v7]); | |
139 a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, a5, pTmpBuf, 0, 0, 0); | |
140 if ( v6 ) | |
141 v3 = pMapStats->pInfos[v6].pName; | |
142 else | |
143 v3 = "Unknown"; | |
144 sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3); | |
145 a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, a5, pTmpBuf, 0, 0, 0); | |
146 } | |
147 | |
148 | |
149 | |
150 //----- (0041192C) -------------------------------------------------------- | |
151 void InitializeBookTextures() | |
152 { | |
153 //signed int v0; // ebp@3 | |
154 //Texture **v1; // ebx@3 | |
155 | |
156 pAudioPlayer->StopChannels(-1, -1); | |
157 | |
158 ++pIcons_LOD->uTexturePacksCount; | |
159 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | |
160 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | |
161 | |
162 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | |
163 pSpellBookPagesTextr_9 = pIcons_LOD->LoadTexturePtr("book", TEXTURE_16BIT_PALETTE); | |
164 pTexture_pagemask = pIcons_LOD->LoadTexturePtr("pagemask", TEXTURE_16BIT_PALETTE); | |
165 pTexture_506448 = pIcons_LOD->LoadTexturePtr("ib-m5-u", TEXTURE_16BIT_PALETTE); | |
166 ptr_506440 = pIcons_LOD->LoadTexturePtr("ib-m5-d", TEXTURE_16BIT_PALETTE); | |
167 pTexture_50643C = pIcons_LOD->LoadTexturePtr("ib-m6-u",TEXTURE_16BIT_PALETTE); | |
168 //v0 = 1; | |
169 | |
170 static const char *texNames[9] = | |
171 { | |
172 "SBFB00", "SBAB00", "SBWB00", "SBEB00", | |
173 "SBSB00", "SBMB00", "SBBB00", "SBLB00", | |
174 }; | |
175 | |
176 pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); | |
177 for (uint i = 0; i < 8; ++i) | |
178 { | |
179 pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); | |
180 | |
181 sprintf(pTmpBuf, "tab%da", i+1); | |
182 pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); | |
183 sprintf(pTmpBuf, "tab%db", i+1); | |
184 pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); | |
185 } | |
186 } | |
187 | |
188 | |
189 | |
190 //----- (00411AAA) -------------------------------------------------------- | |
191 void InitializeBookFonts() | |
192 { | |
193 pAudioPlayer->StopChannels(-1, -1); | |
194 ++pIcons_LOD->uTexturePacksCount; | |
195 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | |
196 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | |
197 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | |
198 pTexture_mapbordr = pIcons_LOD->LoadTexturePtr("mapbordr", TEXTURE_16BIT_PALETTE); | |
199 pBookFont = LoadFont("book.fnt", "FONTPAL", NULL); | |
200 pBook2Font = LoadFont("book2.fnt", "FONTPAL", NULL); | |
201 pAutonoteFont = LoadFont("autonote.fnt", "FONTPAL", NULL); | |
202 pSpellFont = LoadFont("spell.fnt", "FONTPAL", NULL); | |
203 } | |
204 | |
205 | |
206 | |
49 //----- (00411300) -------------------------------------------------------- | 207 //----- (00411300) -------------------------------------------------------- |
50 void LoadSpellbook(unsigned int spell_school) | 208 void LoadSpellbook(unsigned int spell_school) |
51 { | 209 { |
52 //unsigned int v1; // esi@1 | 210 //unsigned int v1; // esi@1 |
53 Player *pPlayer; // ecx@1 | 211 Player *pPlayer; // ecx@1 |
83 } | 241 } |
84 } | 242 } |
85 } | 243 } |
86 | 244 |
87 //----- (0041140B) -------------------------------------------------------- | 245 //----- (0041140B) -------------------------------------------------------- |
88 GUIWindow *__cdecl sub_41140B() | 246 GUIWindow *sub_41140B() |
89 { | 247 { |
90 signed int v0; // esi@1 | 248 signed int v0; // esi@1 |
91 GUIButton *v1; // eax@3 | 249 GUIButton *v1; // eax@3 |
92 GUIButton *v2; // esi@4 | 250 GUIButton *v2; // esi@4 |
93 GUIWindow *result; // eax@5 | 251 GUIWindow *result; // eax@5 |
118 pGUIWindow_CurrentMenu->uNumControls = 0; | 276 pGUIWindow_CurrentMenu->uNumControls = 0; |
119 return result; | 277 return result; |
120 } | 278 } |
121 | 279 |
122 //----- (00411473) -------------------------------------------------------- | 280 //----- (00411473) -------------------------------------------------------- |
123 void __cdecl sub_411473() | 281 void sub_411473() |
124 { | 282 { |
125 pTexture_pagemask->Release(); | 283 pTexture_pagemask->Release(); |
126 pTexture_506448->Release(); | 284 pTexture_506448->Release(); |
127 pTexture_50643C->Release(); | 285 pTexture_50643C->Release(); |
128 for (uint i = 0; i < 8; ++i) | 286 for (uint i = 0; i < 8; ++i) |
135 pIcons_LOD->_4114F2(); | 293 pIcons_LOD->_4114F2(); |
136 } | 294 } |
137 | 295 |
138 | 296 |
139 //----- (00411597) -------------------------------------------------------- | 297 //----- (00411597) -------------------------------------------------------- |
140 void __cdecl OnCloseSpellBook() | 298 void OnCloseSpellBook() |
141 { | 299 { |
142 pAllocator->FreeChunk(pSpellFont); | 300 pAllocator->FreeChunk(pSpellFont); |
143 pSpellFont = 0; | 301 pSpellFont = 0; |
144 pAllocator->FreeChunk(pBookFont); | 302 pAllocator->FreeChunk(pBookFont); |
145 pBookFont = 0; | 303 pBookFont = 0; |
160 | 318 |
161 | 319 |
162 | 320 |
163 //----- (00412AF9) -------------------------------------------------------- | 321 //----- (00412AF9) -------------------------------------------------------- |
164 void sub_412AF9() | 322 void sub_412AF9() |
165 { | 323 { |
166 int v0; // ecx@1 | 324 int v0; // ecx@1 |
167 | 325 |
168 v0 = 0; | 326 v0 = 0; |
169 if ( uActiveCharacter ) | 327 if ( uActiveCharacter ) |
170 v0 = pParty->pPlayers[uActiveCharacter-1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2); | 328 v0 = pParty->pPlayers[uActiveCharacter-1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2); |
172 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C); | 330 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C); |
173 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448); | 331 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448); |
174 } | 332 } |
175 | 333 |
176 //----- (00412B58) -------------------------------------------------------- | 334 //----- (00412B58) -------------------------------------------------------- |
177 void __cdecl DrawSpellBookContent() | 335 void DrawSpellBookContent() |
178 { | 336 { |
179 Player *v0; // ebx@1 | 337 Player *v0; // ebx@1 |
180 int v1; // ebp@1 | 338 int v1; // ebp@1 |
181 unsigned int v2; // eax@1 | 339 unsigned int v2; // eax@1 |
182 Texture *v3; // edi@1 | 340 Texture *v3; // edi@1 |
375 } | 533 } |
376 // 506408: using guessed type int dword_506408[]; | 534 // 506408: using guessed type int dword_506408[]; |
377 // 50654C: using guessed type int dword_50654C; | 535 // 50654C: using guessed type int dword_50654C; |
378 | 536 |
379 //----- (00412E85) -------------------------------------------------------- | 537 //----- (00412E85) -------------------------------------------------------- |
380 char __cdecl DrawBook_History() | 538 void DrawBook_History() |
381 { | 539 { |
382 unsigned int v0; // eax@3 | 540 unsigned int v0; // eax@3 |
383 unsigned int v1; // eax@7 | 541 unsigned int v1; // eax@7 |
384 int v2; // eax@10 | 542 int v2; // eax@10 |
385 const char *v3; // eax@10 | 543 const char *v3; // eax@10 |
431 a1.uFrameHeight = game_viewport_height; | 589 a1.uFrameHeight = game_viewport_height; |
432 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[]; | 590 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[]; |
433 a1.uFrameZ = game_viewport_z; | 591 a1.uFrameZ = game_viewport_z; |
434 a1.uFrameW = game_viewport_w; | 592 a1.uFrameW = game_viewport_w; |
435 if ( v3 ) | 593 if ( v3 ) |
436 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, v3, 3u); | 594 a1.DrawTitleText(pBook2Font, 0, 22, 0, v3, 3); |
437 } | 595 } |
438 a1.uFrameX = 48; | 596 a1.uFrameX = 48; |
439 a1.uFrameY = 70; | 597 a1.uFrameY = 70; |
440 a1.uFrameWidth = 360; | 598 a1.uFrameWidth = 360; |
441 a1.uFrameHeight = 264; | 599 a1.uFrameHeight = 264; |
475 0, | 633 0, |
476 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]); | 634 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]); |
477 if ( v7 ) | 635 if ( v7 ) |
478 { | 636 { |
479 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]); | 637 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]); |
480 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); | 638 a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0); |
481 ++num_achieved_awards; | 639 ++num_achieved_awards; |
482 } | 640 } |
483 return (char)v8; | |
484 } | 641 } |
485 | 642 |
486 | 643 |
487 //----- (00413126) -------------------------------------------------------- | 644 //----- (00413126) -------------------------------------------------------- |
488 void __cdecl DrawBook_Quests() | 645 void BookUI_Questbook_Draw() |
489 { | 646 { |
490 unsigned int v0; // eax@3 | 647 unsigned int v0; // eax@3 |
491 unsigned int v1; // eax@7 | 648 unsigned int v1; // eax@7 |
492 int v2; // ecx@11 | 649 int v2; // ecx@11 |
493 int v3; // ebx@16 | 650 int v3; // ebx@16 |
532 a1.uFrameHeight = game_viewport_height; | 689 a1.uFrameHeight = game_viewport_height; |
533 a1.uFrameX = game_viewport_x; | 690 a1.uFrameX = game_viewport_x; |
534 a1.uFrameY = game_viewport_y; | 691 a1.uFrameY = game_viewport_y; |
535 a1.uFrameZ = game_viewport_z; | 692 a1.uFrameZ = game_viewport_z; |
536 a1.uFrameW = game_viewport_w; | 693 a1.uFrameW = game_viewport_w; |
537 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u); | 694 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_quests_title_color, pGlobalTXT_LocalizationStrings[174], 3); //"Current Quests" |
695 | |
538 a1.uFrameX = 48; | 696 a1.uFrameX = 48; |
539 a1.uFrameY = 70; | 697 a1.uFrameY = 70; |
540 a1.uFrameWidth = 360; | 698 a1.uFrameWidth = 360; |
541 a1.uFrameHeight = 264; | 699 a1.uFrameHeight = 264; |
542 a1.uFrameZ = 407; | 700 a1.uFrameZ = 407; |
566 while ( v3 < num_achieved_awards_2 ) | 724 while ( v3 < num_achieved_awards_2 ) |
567 { | 725 { |
568 v4 = achieved_awards[v3]; | 726 v4 = achieved_awards[v3]; |
569 ++num_achieved_awards; | 727 ++num_achieved_awards; |
570 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4]; | 728 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4]; |
571 a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); | 729 a1.DrawText(pAutonoteFont, 1, 0, ui_book_quests_text_color, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0); |
572 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); | 730 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0); |
573 v7 = a1.uFrameY + v6; | 731 v7 = a1.uFrameY + v6; |
574 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) | 732 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight ) |
575 break; | 733 break; |
576 pRenderer->DrawTextureTransparent(100, v7 + 12, pSpellBookPagesTextr_10); | 734 pRenderer->DrawTextureTransparent(100, v7 + 12, pSpellBookPagesTextr_10); |
579 } | 737 } |
580 } | 738 } |
581 | 739 |
582 | 740 |
583 //----- (0041338E) -------------------------------------------------------- | 741 //----- (0041338E) -------------------------------------------------------- |
584 void __cdecl DrawBook_Autonotes() | 742 void BookUI_Autonotes_Draw() |
585 { | 743 { |
586 unsigned int v0; // eax@3 | 744 unsigned int v0; // eax@3 |
587 unsigned int v1; // eax@7 | 745 unsigned int v1; // eax@7 |
588 signed int v2; // ebp@11 | 746 signed int v2; // ebp@11 |
589 unsigned int v3; // eax@18 | 747 unsigned int v3; // eax@18 |
793 LABEL_46: | 951 LABEL_46: |
794 pRenderer->DrawTextureTransparent(v7, v23, v30); | 952 pRenderer->DrawTextureTransparent(v7, v23, v30); |
795 a1.uFrameWidth = game_viewport_width; | 953 a1.uFrameWidth = game_viewport_width; |
796 a1.uFrameHeight = game_viewport_height; | 954 a1.uFrameHeight = game_viewport_height; |
797 a1.uFrameX = game_viewport_x; | 955 a1.uFrameX = game_viewport_x; |
798 a1.uFrameY = game_viewport_z; | 956 a1.uFrameY = game_viewport_y; |
799 a1.uFrameZ = game_viewport_z; | 957 a1.uFrameZ = game_viewport_z; |
800 a1.uFrameW = game_viewport_w; | 958 a1.uFrameW = game_viewport_w; |
801 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u); | 959 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes" |
960 | |
802 a1.uFrameX = 48; | 961 a1.uFrameX = 48; |
803 a1.uFrameY = 70; | 962 a1.uFrameY = 70; |
804 a1.uFrameWidth = 360; | 963 a1.uFrameWidth = 360; |
805 a1.uFrameHeight = 264; | 964 a1.uFrameHeight = 264; |
806 a1.uFrameZ = 407; | 965 a1.uFrameZ = 407; |
873 v13 = achieved_awards[v12]; | 1032 v13 = achieved_awards[v12]; |
874 ++num_achieved_awards; | 1033 ++num_achieved_awards; |
875 //v14 = (&dword_723718_autonote_related)[8 * v13]; | 1034 //v14 = (&dword_723718_autonote_related)[8 * v13]; |
876 v14 = pAutonoteTxt[v13-1].pText; | 1035 v14 = pAutonoteTxt[v13-1].pText; |
877 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); | 1036 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); |
878 a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0); | 1037 a1.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13-1].pText, 0, 0, 0); |
879 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); | 1038 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); |
880 v16 = a1.uFrameY + v15; | 1039 v16 = a1.uFrameY + v15; |
881 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight ) | 1040 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight ) |
882 break; | 1041 break; |
883 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10); | 1042 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10); |
886 } | 1045 } |
887 } | 1046 } |
888 | 1047 |
889 | 1048 |
890 //----- (00413980) -------------------------------------------------------- | 1049 //----- (00413980) -------------------------------------------------------- |
891 void DrawBook_Maps() | 1050 void BookUI_Map_Draw() |
892 { | 1051 { |
893 | |
894 int v6; // eax@31 | 1052 int v6; // eax@31 |
895 unsigned int map_id; // eax@35 | 1053 unsigned int map_id; // eax@35 |
896 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3 | 1054 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3 |
897 char party_coord[120]; // [sp+Ch] [bp-CCh]@37 | 1055 char party_coord[120]; // [sp+Ch] [bp-CCh]@37 |
898 GUIWindow map_window; // [sp+84h] [bp-54h]@35 | 1056 GUIWindow map_window; // [sp+84h] [bp-54h]@35 |
1006 map_window.uFrameY = game_viewport_y; | 1164 map_window.uFrameY = game_viewport_y; |
1007 map_window.uFrameZ = game_viewport_z; | 1165 map_window.uFrameZ = game_viewport_z; |
1008 map_window.uFrameW = game_viewport_w; | 1166 map_window.uFrameW = game_viewport_w; |
1009 map_id = pMapStats->GetMapInfo(pCurrentMapName); | 1167 map_id = pMapStats->GetMapInfo(pCurrentMapName); |
1010 if ( map_id ) | 1168 if ( map_id ) |
1011 map_window.DrawTitleText(pBook2Font, -14, 12, 0, pMapStats->pInfos[map_id].pName, 3); | 1169 map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3); |
1170 | |
1012 map_window.uFrameX = 0; | 1171 map_window.uFrameX = 0; |
1013 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d" | 1172 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d" |
1014 map_window.DrawTitleText(pFontComic, 0, 320, 0, party_coord, 0); | 1173 map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0); |
1015 } | 1174 } |
1016 | 1175 |
1017 //----- (00442955) -------------------------------------------------------- | 1176 //----- (00442955) -------------------------------------------------------- |
1018 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 ) | 1177 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 ) |
1019 { | 1178 { |
1516 } | 1675 } |
1517 } | 1676 } |
1518 | 1677 |
1519 | 1678 |
1520 | 1679 |
1521 | |
1522 //----- (00413CC6) -------------------------------------------------------- | |
1523 void DrawCurrentBook(unsigned int uBook) | |
1524 { | |
1525 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); | |
1526 switch ((enum WindowType)uBook) | |
1527 { | |
1528 case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break; | |
1529 case WINDOW_TownPortal: DrawTownPortalScreen(); break; | |
1530 case WINDOW_QuestBook: DrawBook_Quests(); break; | |
1531 case WINDOW_AutonotesBook: DrawBook_Autonotes(); break; | |
1532 case WINDOW_MapsBook: DrawBook_Maps(); break; | |
1533 case WINDOW_CalendarBook: DrawBook_Calendar(); break; | |
1534 case WINDOW_HistoryBook: DrawBook_History(); break; | |
1535 } | |
1536 } |