Mercurial > mm7
annotate GUI/UI/Books/LloydsBook.cpp @ 2562:b8a56afc6ba1
new var no_actors, lights_flag, debug_lights, StationaryLights and MobileLights
author | Ritor1 |
---|---|
date | Sun, 17 May 2015 22:42:13 +0600 |
parents | 87e5590d034b |
children | d87bfbd3bb3b |
rev | line source |
---|---|
2548
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
1 #include "Engine/Engine.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
2 #include "Engine/LOD.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
3 #include "Engine/Party.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
4 #include "Engine/texts.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
5 #include "Engine/Graphics/IRender.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
6 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
7 #include "GUI/GUIFont.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
8 #include "GUI/UI/Books/LloydsBook.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
9 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
10 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
11 std::array<unsigned int, 5> pLloydsBeaconsPreviewXs = { { 61, 281, 61, 281, 171 } }; // 004E249C |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
12 std::array<unsigned int, 5> pLloydsBeaconsPreviewYs = { { 84, 84, 228, 228, 155 } }; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
13 std::array<unsigned int, 5> pLloydsBeacons_SomeXs = { { 59, 279, 59, 279, 169 } }; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
14 std::array<unsigned int, 5> pLloydsBeacons_SomeYs = { { 82, 82, 226, 226, 153 } }; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
15 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
16 GUIWindow_LloydsBook::GUIWindow_LloydsBook() : |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
17 GUIWindow_Book() |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
18 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
19 this->ptr_1C = (void *)WINDOW_LloydsBeacon; // inherited from GUIWindow::GUIWindow |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
20 BasicBookInitialization(); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
21 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
22 // ---------------------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
23 // 00411BFC GUIWindow::InitializeBookView -- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
24 byte_506360 = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
25 pTexture_CurrentBook = pIcons_LOD->LoadTexturePtr("lb_bordr", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
26 pTexture_LloydBeacons[0] = pIcons_LOD->LoadTexturePtr("sbmap", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
27 pTexture_LloydBeacons[1] = pIcons_LOD->LoadTexturePtr("sbmap", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
28 pTex_book_button1_on = pIcons_LOD->LoadTexturePtr("tab-an-6b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
29 pTex_book_button1_off = pIcons_LOD->LoadTexturePtr("tab-an-6a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
30 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
31 pBtn_Book_1 = CreateButton(415, 13, 39, 36, 1, 0, UIMSG_LloydsBeacon_FlippingBtn, 0, 0, pGlobalTXT_LocalizationStrings[375], 0); // Set Beacon |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
32 pBtn_Book_2 = CreateButton(415, 48, 39, 36, 1, 0, UIMSG_LloydsBeacon_FlippingBtn, 1, 0, pGlobalTXT_LocalizationStrings[523], 0); // Recall Beacon |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
33 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
34 int max_beacons = 1; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
35 int v18 = pParty->pPlayers[_506348_current_lloyd_playerid].pActiveSkills[PLAYER_SKILL_WATER]; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
36 if (v18 & 0x100 || (v18 & 0x80)) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
37 max_beacons = 5; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
38 else if (v18 & 0x40) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
39 max_beacons = 3; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
40 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
41 for (int i = 0; i < max_beacons; ++i) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
42 CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
43 pLloydsBeaconsPreviewXs[i], pLloydsBeaconsPreviewYs[i], |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
44 92, 68, 1, 180, UIMSG_InstallBeacon, i, 0, "", 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
45 ); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
46 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
47 for (int i = 0; i < 5; ++i) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
48 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
49 if (pParty->pPlayers[_506348_current_lloyd_playerid].pInstalledBeacons[i].uBeaconTime >= (signed __int64)pParty->uTimePlayed) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
50 LoadThumbnailLloydTexture(i, _506348_current_lloyd_playerid + 1); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
51 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
52 memset(&pParty->pPlayers[_506348_current_lloyd_playerid].pInstalledBeacons[i], 0, sizeof(LloydBeacon)); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
53 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
54 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
55 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
56 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
57 void GUIWindow_LloydsBook::Update() |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
58 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
59 // ----------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
60 // 004156F0 GUI_UpdateWindows --- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
61 // { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
62 // BookUI_Draw((WindowType)(int)ptr_1C); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
63 // } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
64 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
65 // ----- (00413CC6) -------------------------------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
66 // void BookUI_Draw(WindowType book) --- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
67 // { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
68 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
69 // DrawLloydBeaconsScreen(); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
70 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
71 // ----- (00410DEC) -------------------------------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
72 // unsigned int DrawLloydBeaconsScreen() |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
73 // { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
74 Player *pPlayer; // esi@1 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
75 const char *pText; // eax@1 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
76 int pTextHeight; // eax@14 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
77 int RemainingTime; // kr08_8@14 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
78 unsigned int pHours; // esi@14 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
79 unsigned int pDays; // eax@14 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
80 const char *pSelectionText; // eax@19 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
81 Texture *v19; // [sp-4h] [bp-8Ch]@4 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
82 GUIWindow pWindow; // [sp+Ch] [bp-7Ch]@1 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
83 char *Str; // [sp+74h] [bp-14h]@14 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
84 int BeaconID; // [sp+78h] [bp-10h]@11 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
85 int uNumMaxBeacons; // [sp+84h] [bp-4h]@6 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
86 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
87 pPlayer = &pParty->pPlayers[_506348_current_lloyd_playerid]; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
88 pRenderer->DrawTextureIndexed(8, 8, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
89 pText = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
90 pWindow.uFrameX = game_viewport_x; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
91 pWindow.uFrameY = game_viewport_y; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
92 pWindow.uFrameWidth = 428; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
93 pWindow.uFrameHeight = game_viewport_height; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
94 pWindow.uFrameZ = 435; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
95 pWindow.uFrameW = game_viewport_w; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
96 if (!bRecallingBeacon) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
97 pText = pGlobalTXT_LocalizationStrings[375]; // Set Beacon |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
98 sprintf(pTmpBuf.data(), "%s", pText); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
99 pWindow.DrawTitleText(pBook2Font, 0, 22, 0, pTmpBuf.data(), 3); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
100 if (bRecallingBeacon) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
101 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
102 pRenderer->DrawTextureIndexedAlpha(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
103 v19 = pTex_book_button1_off; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
104 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
105 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
106 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
107 pRenderer->DrawTextureIndexedAlpha(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
108 v19 = pTex_book_button1_on; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
109 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
110 pRenderer->DrawTextureIndexedAlpha(pBtn_Book_2->uX, pBtn_Book_2->uY, v19); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
111 uNumMaxBeacons = 1; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
112 if (HIBYTE(pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) & 1 || (pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x80u) != 0) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
113 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
114 uNumMaxBeacons = 5; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
115 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
116 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
117 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
118 if (pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x40) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
119 uNumMaxBeacons = 3; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
120 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
121 if (uNumMaxBeacons > 0) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
122 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
123 for (BeaconID = 0; BeaconID < uNumMaxBeacons; BeaconID++) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
124 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
125 pWindow.uFrameWidth = 92; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
126 pWindow.uFrameHeight = 68; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
127 pWindow.uFrameY = pLloydsBeaconsPreviewYs[BeaconID]; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
128 pWindow.uFrameX = pLloydsBeaconsPreviewXs[BeaconID]; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
129 pWindow.uFrameW = pWindow.uFrameY + 67; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
130 pWindow.uFrameZ = pLloydsBeaconsPreviewXs[BeaconID] + 91; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
131 //if ( pSavegameThumbnails[BeaconID].pPixels != 0 ) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
132 if (pPlayer->pInstalledBeacons[BeaconID].SaveFileID != 0) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
133 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
134 pRenderer->DrawTextureIndexedAlpha(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
135 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[BeaconID], pLloydsBeaconsPreviewYs[BeaconID], &pSavegameThumbnails[BeaconID]); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
136 Str = pMapStats->pInfos[pMapStats->sub_410D99_get_map_index(pPlayer->pInstalledBeacons[BeaconID].SaveFileID)].pName; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
137 pTextHeight = pSpellFont->CalcTextHeight(Str, &pWindow, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
138 pWindow.uFrameY += -6 - pTextHeight; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
139 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, Str, 3); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
140 RemainingTime = pPlayer->pInstalledBeacons[BeaconID].uBeaconTime - pParty->uTimePlayed; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
141 pHours = (signed __int64)((double)RemainingTime * 0.234375) / 60 / 60; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
142 pDays = pHours / 24; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
143 if (pDays) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
144 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
145 sprintf(pTmpBuf.data(), "%lu %s", pDays + 1, pGlobalTXT_LocalizationStrings[57]);//days |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
146 pWindow.uFrameY = pWindow.uFrameY + pWindow.uFrameHeight + 4; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
147 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
148 continue; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
149 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
150 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
151 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
152 if (pHours + 1 <= 23) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
153 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
154 if (pHours < 1) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
155 pSelectionText = pGlobalTXT_LocalizationStrings[109];// Hour |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
156 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
157 pSelectionText = pGlobalTXT_LocalizationStrings[110];// Hours |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
158 sprintf(pTmpBuf.data(), "%lu %s", pHours + 1, pSelectionText); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
159 pWindow.uFrameY = pWindow.uFrameY + pWindow.uFrameHeight + 4; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
160 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
161 continue; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
162 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
163 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
164 sprintf(pTmpBuf.data(), "%lu %s", pDays + 1, pGlobalTXT_LocalizationStrings[56]);//Day |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
165 pWindow.uFrameY = pWindow.uFrameY + pWindow.uFrameHeight + 4; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
166 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
167 continue; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
168 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
169 if (!bRecallingBeacon) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
170 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
171 pRenderer->DrawTextureIndexedAlpha(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
172 pTextHeight = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &pWindow, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
173 pWindow.DrawTitleText(pSpellFont, 0, (signed int)pWindow.uFrameHeight / 2 - pTextHeight / 2, 1, pGlobalTXT_LocalizationStrings[19], 3);//Доступно |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
174 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
175 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
176 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
177 if (byte_506360) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
178 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_CloseAfterInstallBeacon, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
179 } |