Mercurial > mm7
comparison GUI/UI/Books/CalendarBook.cpp @ 2574:dd36326a9994
More texture refactoring
GetLeather -> DrawTextureCustomHeight
author | a.parshin |
---|---|
date | Mon, 07 Mar 2016 03:48:40 +0200 |
parents | 0c67be4ec900 |
children |
comparison
equal
deleted
inserted
replaced
2573:0c67be4ec900 | 2574:dd36326a9994 |
---|---|
11 | 11 |
12 #include "Media/Audio/AudioPlayer.h" | 12 #include "Media/Audio/AudioPlayer.h" |
13 | 13 |
14 | 14 |
15 | 15 |
16 Image *ui_book_calendar_background = nullptr; | |
17 | |
18 Image *ui_book_calendar_moon_new = nullptr; | |
19 Image *ui_book_calendar_moon_4 = nullptr; | |
20 Image *ui_book_calendar_moon_2 = nullptr; | |
21 Image *ui_book_calendar_moon_2_2 = nullptr; | |
22 Image *ui_book_calendar_moon_full = nullptr; | |
23 | |
16 GUIWindow_CalendarBook::GUIWindow_CalendarBook() : | 24 GUIWindow_CalendarBook::GUIWindow_CalendarBook() : |
17 GUIWindow_Book() | 25 GUIWindow_Book() |
18 { | 26 { |
19 this->ptr_1C = (void *)WINDOW_CalendarBook; // inherited from GUIWindow::GUIWindow | 27 this->ptr_1C = (void *)WINDOW_CalendarBook; // inherited from GUIWindow::GUIWindow |
20 BasicBookInitialization(); | 28 BasicBookInitialization(); |
25 pAudioPlayer->StopChannels(-1, -1); | 33 pAudioPlayer->StopChannels(-1, -1); |
26 pBooksButtonOverlay = new GUIWindow_BooksButtonOverlay(570, 354, 0, 0, (int)pBtn_Calendar, 0); | 34 pBooksButtonOverlay = new GUIWindow_BooksButtonOverlay(570, 354, 0, 0, (int)pBtn_Calendar, 0); |
27 | 35 |
28 // ---------------------------------------------- | 36 // ---------------------------------------------- |
29 // 00411BFC GUIWindow::InitializeBookView -- part | 37 // 00411BFC GUIWindow::InitializeBookView -- part |
30 pSpellBookPagesTextr_13 = pIcons_LOD->LoadTexturePtr("sbdate-time", TEXTURE_16BIT_PALETTE); | 38 ui_book_calendar_background = assets->GetImage_16BitColorKey(L"sbdate-time", 0x7FF); |
31 pTex_moon_new = pIcons_LOD->LoadTexturePtr("moon_new", TEXTURE_16BIT_PALETTE); | 39 ui_book_calendar_moon_new = assets->GetImage_16BitColorKey("moon_new", 0x7FF); |
32 pTex_moon_4 = pIcons_LOD->LoadTexturePtr("moon_4", TEXTURE_16BIT_PALETTE); | 40 ui_book_calendar_moon_4 = assets->GetImage_16BitColorKey("moon_4", 0x7FF); |
33 pTex_moon_2 = pIcons_LOD->LoadTexturePtr("moon_2", TEXTURE_16BIT_PALETTE); | 41 ui_book_calendar_moon_2 = assets->GetImage_16BitColorKey("moon_2", 0x7FF); |
34 pTex_moon_2_2 = pIcons_LOD->LoadTexturePtr("moon_2", TEXTURE_16BIT_PALETTE); | 42 ui_book_calendar_moon_2_2 = assets->GetImage_16BitColorKey("moon_2", 0x7FF); |
35 pTex_moon_ful = pIcons_LOD->LoadTexturePtr("moon_ful", TEXTURE_16BIT_PALETTE); | 43 ui_book_calendar_moon_full = assets->GetImage_16BitColorKey("moon_ful", 0x7FF); |
36 } | 44 } |
37 | 45 |
38 | 46 |
39 | 47 |
40 //----- (00413D3C) -------------------------------------------------------- | 48 //----- (00413D3C) -------------------------------------------------------- |
85 3, 3, 3, 3, | 93 3, 3, 3, 3, |
86 2, 2, 2, | 94 2, 2, 2, |
87 1, 1, 1, 1 | 95 1, 1, 1, 1 |
88 }; | 96 }; |
89 | 97 |
90 pRenderer->DrawTextureTransparentColorKey(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13); | 98 pRenderer->DrawTextureAlphaNew(pViewport->uViewportTL_X/640.0f, pViewport->uViewportTL_Y/480.0f, ui_book_calendar_background); |
91 pHour = pParty->uCurrentHour; | 99 pHour = pParty->uCurrentHour; |
92 if ((signed int)pHour >= 12) | 100 if ((signed int)pHour >= 12) |
93 { | 101 { |
94 pHour -= 12; | 102 pHour -= 12; |
95 if (!pHour) | 103 if (!pHour) |