Mercurial > mm7
comparison GUI/UI/Books/UIMapBook.cpp @ 2524:c7264ab7132f
Main menu rendered using d3d11
author | a.parshin |
---|---|
date | Fri, 10 Oct 2014 17:42:05 +0300 |
parents | 491f0babd563 |
children | a902abdfc7f2 |
comparison
equal
deleted
inserted
replaced
2523:c532d5242055 | 2524:c7264ab7132f |
---|---|
38 int v3; // edi@17 | 38 int v3; // edi@17 |
39 GUIWindow TownPortalWindow; // [sp+Ch] [bp-64h]@1 | 39 GUIWindow TownPortalWindow; // [sp+Ch] [bp-64h]@1 |
40 POINT a2; // [sp+68h] [bp-8h]@17 | 40 POINT a2; // [sp+68h] [bp-8h]@17 |
41 | 41 |
42 pRenderer->ClearZBuffer(0, 479); | 42 pRenderer->ClearZBuffer(0, 479); |
43 pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook); | 43 pRenderer->DrawTextureIndexedAlpha(8, 8, pTexture_CurrentBook); |
44 pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); | 44 pRenderer->DrawTextureIndexedAlpha(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); |
45 | 45 |
46 TownPortalWindow.uFrameX = game_viewport_x; | 46 TownPortalWindow.uFrameX = game_viewport_x; |
47 TownPortalWindow.uFrameY = game_viewport_y; | 47 TownPortalWindow.uFrameY = game_viewport_y; |
48 TownPortalWindow.uFrameWidth = game_viewport_width; | 48 TownPortalWindow.uFrameWidth = game_viewport_width; |
49 TownPortalWindow.uFrameHeight = game_viewport_height; | 49 TownPortalWindow.uFrameHeight = game_viewport_height; |
105 pText = pGlobalTXT_LocalizationStrings[375]; // Set Beacon | 105 pText = pGlobalTXT_LocalizationStrings[375]; // Set Beacon |
106 sprintf(pTmpBuf.data(), "%s", pText); | 106 sprintf(pTmpBuf.data(), "%s", pText); |
107 pWindow.DrawTitleText(pBook2Font, 0, 22, 0, pTmpBuf.data(), 3); | 107 pWindow.DrawTitleText(pBook2Font, 0, 22, 0, pTmpBuf.data(), 3); |
108 if ( bRecallingBeacon ) | 108 if ( bRecallingBeacon ) |
109 { | 109 { |
110 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_on); | 110 pRenderer->DrawTextureIndexedAlpha(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_on); |
111 v19 = pTex_book_button1_off; | 111 v19 = pTex_book_button1_off; |
112 } | 112 } |
113 else | 113 else |
114 { | 114 { |
115 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_off); | 115 pRenderer->DrawTextureIndexedAlpha(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_off); |
116 v19 = pTex_book_button1_on; | 116 v19 = pTex_book_button1_on; |
117 } | 117 } |
118 pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19); | 118 pRenderer->DrawTextureIndexedAlpha(pBtn_Book_2->uX, pBtn_Book_2->uY, v19); |
119 uNumMaxBeacons = 1; | 119 uNumMaxBeacons = 1; |
120 if ( HIBYTE(pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) & 1 || (pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x80u) != 0 ) | 120 if ( HIBYTE(pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) & 1 || (pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x80u) != 0 ) |
121 { | 121 { |
122 uNumMaxBeacons = 5; | 122 uNumMaxBeacons = 5; |
123 } | 123 } |
137 pWindow.uFrameW = pWindow.uFrameY + 67; | 137 pWindow.uFrameW = pWindow.uFrameY + 67; |
138 pWindow.uFrameZ = pLloydsBeaconsPreviewXs[BeaconID] + 91; | 138 pWindow.uFrameZ = pLloydsBeaconsPreviewXs[BeaconID] + 91; |
139 //if ( pSavegameThumbnails[BeaconID].pPixels != 0 ) | 139 //if ( pSavegameThumbnails[BeaconID].pPixels != 0 ) |
140 if ( pPlayer->pInstalledBeacons[BeaconID].SaveFileID != 0 ) | 140 if ( pPlayer->pInstalledBeacons[BeaconID].SaveFileID != 0 ) |
141 { | 141 { |
142 pRenderer->DrawTextureTransparent(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook); | 142 pRenderer->DrawTextureIndexedAlpha(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook); |
143 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[BeaconID], pLloydsBeaconsPreviewYs[BeaconID], &pSavegameThumbnails[BeaconID]); | 143 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[BeaconID], pLloydsBeaconsPreviewYs[BeaconID], &pSavegameThumbnails[BeaconID]); |
144 Str = pMapStats->pInfos[pMapStats->sub_410D99_get_map_index(pPlayer->pInstalledBeacons[BeaconID].SaveFileID)].pName; | 144 Str = pMapStats->pInfos[pMapStats->sub_410D99_get_map_index(pPlayer->pInstalledBeacons[BeaconID].SaveFileID)].pName; |
145 pTextHeight = pSpellFont->CalcTextHeight(Str, &pWindow, 0, 0); | 145 pTextHeight = pSpellFont->CalcTextHeight(Str, &pWindow, 0, 0); |
146 pWindow.uFrameY += -6 - pTextHeight; | 146 pWindow.uFrameY += -6 - pTextHeight; |
147 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, Str, 3); | 147 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, Str, 3); |
174 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3); | 174 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3); |
175 continue; | 175 continue; |
176 } | 176 } |
177 if ( !bRecallingBeacon ) | 177 if ( !bRecallingBeacon ) |
178 { | 178 { |
179 pRenderer->DrawTextureTransparent(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook); | 179 pRenderer->DrawTextureIndexedAlpha(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook); |
180 pTextHeight = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &pWindow, 0, 0); | 180 pTextHeight = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &pWindow, 0, 0); |
181 pWindow.DrawTitleText(pSpellFont, 0, (signed int)pWindow.uFrameHeight / 2 - pTextHeight / 2, 1, pGlobalTXT_LocalizationStrings[19], 3);//Доступно | 181 pWindow.DrawTitleText(pSpellFont, 0, (signed int)pWindow.uFrameHeight / 2 - pTextHeight / 2, 1, pGlobalTXT_LocalizationStrings[19], 3);//Доступно |
182 } | 182 } |
183 } | 183 } |
184 } | 184 } |
194 char party_coord[120]; // [sp+Ch] [bp-CCh]@37 | 194 char party_coord[120]; // [sp+Ch] [bp-CCh]@37 |
195 GUIWindow map_window; // [sp+84h] [bp-54h]@35 | 195 GUIWindow map_window; // [sp+84h] [bp-54h]@35 |
196 | 196 |
197 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12); | 197 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12); |
198 if ( BtnUp_flag || viewparams->uMapBookMapZoom / 128 >= 12 )//Button 1 | 198 if ( BtnUp_flag || viewparams->uMapBookMapZoom / 128 >= 12 )//Button 1 |
199 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 2, pTex_book_button1_off); | 199 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 2, pTex_book_button1_off); |
200 else | 200 else |
201 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_book_button1_on); | 201 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_book_button1_on); |
202 | 202 |
203 if ( BtnDown_flag || viewparams->uMapBookMapZoom / 128 <= 3 )//Button 2 | 203 if ( BtnDown_flag || viewparams->uMapBookMapZoom / 128 <= 3 )//Button 2 |
204 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 38, pTex_book_button2_off); | 204 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 38, pTex_book_button2_off); |
205 else | 205 else |
206 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_book_button2_on); | 206 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_book_button2_on); |
207 | 207 |
208 if ( Book_PageBtn3_flag )//Button 3 | 208 if ( Book_PageBtn3_flag )//Button 3 |
209 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTex_book_button3_off); | 209 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTex_book_button3_off); |
210 else | 210 else |
211 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on); | 211 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on); |
212 | 212 |
213 if ( Book_PageBtn4_flag )//Button 4 | 213 if ( Book_PageBtn4_flag )//Button 4 |
214 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTex_book_button4_off); | 214 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTex_book_button4_off); |
215 else | 215 else |
216 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on); | 216 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on); |
217 | 217 |
218 if ( Book_PageBtn5_flag )//Button 5 | 218 if ( Book_PageBtn5_flag )//Button 5 |
219 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTex_book_button5_off); | 219 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTex_book_button5_off); |
220 else | 220 else |
221 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on); | 221 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on); |
222 | 222 |
223 if ( Book_PageBtn6_flag )//Button 6 | 223 if ( Book_PageBtn6_flag )//Button 6 |
224 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTex_book_button6_off); | 224 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTex_book_button6_off); |
225 else | 225 else |
226 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on); | 226 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on); |
227 | 227 |
228 if ( BtnDown_flag ) | 228 if ( BtnDown_flag ) |
229 viewparams->CenterOnParty2(); | 229 viewparams->CenterOnParty2(); |
230 if ( BtnUp_flag ) | 230 if ( BtnUp_flag ) |
231 viewparams->CenterOnParty(); | 231 viewparams->CenterOnParty(); |
245 Book_PageBtn6_flag = 0; | 245 Book_PageBtn6_flag = 0; |
246 Book_PageBtn5_flag = 0; | 246 Book_PageBtn5_flag = 0; |
247 Book_PageBtn4_flag = 0; | 247 Book_PageBtn4_flag = 0; |
248 Book_PageBtn3_flag = 0; | 248 Book_PageBtn3_flag = 0; |
249 DrawBook_Map_sub(97, 49, 361, 313, 0); | 249 DrawBook_Map_sub(97, 49, 361, 313, 0); |
250 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr); | 250 pRenderer->DrawTextureIndexedAlpha(75, 22, pTexture_mapbordr); |
251 map_window.uFrameWidth = game_viewport_width; | 251 map_window.uFrameWidth = game_viewport_width; |
252 map_window.uFrameHeight = game_viewport_height; | 252 map_window.uFrameHeight = game_viewport_height; |
253 map_window.uFrameX = game_viewport_x; | 253 map_window.uFrameX = game_viewport_x; |
254 map_window.uFrameY = game_viewport_y; | 254 map_window.uFrameY = game_viewport_y; |
255 map_window.uFrameZ = game_viewport_z; | 255 map_window.uFrameZ = game_viewport_z; |