Mercurial > mm7
annotate GUI/UI/Books/AutonotesBook.cpp @ 2548:87e5590d034b
All Books windows are refactored into respective classes
author | a.parshin |
---|---|
date | Tue, 12 May 2015 03:24:19 +0200 |
parents | |
children | 0c67be4ec900 |
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/Timer.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
5 #include "Engine/Autonotes.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
6 #include "Engine/Awards.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
7 #include "Engine/texts.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
8 #include "Engine/Graphics/IRender.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
9 #include "Engine/Graphics/Viewport.h" |
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 #include "GUI/GUIFont.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
12 #include "GUI/UI/Books/AutonotesBook.h" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
13 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
14 #include "Media/Audio/AudioPlayer.h" |
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_AutonotesBook::GUIWindow_AutonotesBook() : |
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_AutonotesBook; // 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 // 004304E7 Game_EventLoop --- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
24 pEventTimer->Pause(); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
25 pAudioPlayer->StopChannels(-1, -1); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
26 pBooksButtonOverlay = new GUIWindow_BooksButtonOverlay(527, 353, 0, 0, (int)pBtn_Autonotes, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
27 bFlashAutonotesBook = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
28 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
29 // ---------------------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
30 // 00411BFC GUIWindow::InitializeBookView -- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
31 pTexture_AutonotesBook = pIcons_LOD->LoadTexturePtr("sbautnot", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
32 pSpellBookPagesTextr_10 = pIcons_LOD->LoadTexturePtr("divbar", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
33 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
|
34 pTex_book_button2_on = pIcons_LOD->LoadTexturePtr("tab-an-7b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
35 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
|
36 pTex_book_button2_off = pIcons_LOD->LoadTexturePtr("tab-an-7a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
37 pTex_book_button3_on = pIcons_LOD->LoadTexturePtr("tab-an-1b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
38 pTex_book_button3_off = pIcons_LOD->LoadTexturePtr("tab-an-1a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
39 pTex_book_button4_on = pIcons_LOD->LoadTexturePtr("tab-an-2b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
40 pTex_book_button4_off = pIcons_LOD->LoadTexturePtr("tab-an-2a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
41 pTex_book_button5_on = pIcons_LOD->LoadTexturePtr("tab-an-3b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
42 pTex_book_button5_off = pIcons_LOD->LoadTexturePtr("tab-an-3a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
43 pTex_book_button6_on = pIcons_LOD->LoadTexturePtr("tab-an-5b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
44 pTex_book_button6_off = pIcons_LOD->LoadTexturePtr("tab-an-5a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
45 pTex_book_button7_on = pIcons_LOD->LoadTexturePtr("tab-an-4b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
46 pTex_book_button7_off = pIcons_LOD->LoadTexturePtr("tab-an-4a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
47 pTex_book_button8_on = pIcons_LOD->LoadTexturePtr("tab-an-8b", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
48 pTex_book_button8_off = pIcons_LOD->LoadTexturePtr("tab-an-8a", TEXTURE_16BIT_PALETTE); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
49 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
50 pBtn_Book_1 = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
51 pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
52 UIMSG_ClickBooksBtn, 11, 0, pGlobalTXT_LocalizationStrings[193], pTex_book_button1_on, 0 |
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 pBtn_Book_2 = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
55 pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
56 UIMSG_ClickBooksBtn, 10, 0, pGlobalTXT_LocalizationStrings[192], pTex_book_button2_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
57 ); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
58 pBtn_Book_3 = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
59 pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
60 UIMSG_ClickBooksBtn, 2, 0, pGlobalTXT_LocalizationStrings[85], pTex_book_button3_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
61 ); // "Potion Notes" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
62 pBtn_Book_4 = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
63 pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
64 UIMSG_ClickBooksBtn, 3, 0, pGlobalTXT_LocalizationStrings[137], pTex_book_button4_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
65 ); // "Fountain Notes" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
66 pBtn_Book_5 = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
67 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
68 UIMSG_ClickBooksBtn, 4, 0, pGlobalTXT_LocalizationStrings[8], pTex_book_button5_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
69 ); // "Obelisk Notes" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
70 pBtn_Book_6 = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
71 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
72 UIMSG_ClickBooksBtn, 5, 0, pGlobalTXT_LocalizationStrings[141], pTex_book_button6_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
73 ); // "Seer Notes" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
74 pBtn_Autonotes_Misc = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
75 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
76 UIMSG_ClickBooksBtn, 6, 0, pGlobalTXT_LocalizationStrings[123], pTex_book_button7_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
77 ); // "Miscellaneous Notes" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
78 pBtn_Autonotes_Instructors = CreateButton( |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
79 pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, 50, 34, 1, 0, |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
80 UIMSG_ClickBooksBtn, 7, 0, pGlobalTXT_LocalizationStrings[662], pTex_book_button8_on, 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
81 ); // "Instructors" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
82 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
83 int num_achieved_awards = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
84 for (uint i = books_primary_item_per_page; i < 196; ++i) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
85 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
86 if (_506568_autonote_type == pAutonoteTxt[i].eType)//dword_72371C[2 * v10] ) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
87 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
88 if (i) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
89 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
90 if (_449B57_test_bit(pParty->_autonote_bits, i) && pAutonoteTxt[i].pText) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
91 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
92 achieved_awards[num_achieved_awards] = (AwardType)i; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
93 ++num_achieved_awards; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
94 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
95 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
96 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
97 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
98 full_num_items_in_book = num_achieved_awards; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
99 num_achieved_awards = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
100 } |
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 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
103 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
104 void GUIWindow_AutonotesBook::Update() |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
105 { |
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 // 004156F0 GUI_UpdateWindows --- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
108 // { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
109 // BookUI_Draw((WindowType)(int)ptr_1C); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
110 // } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
111 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
112 // ----- (00413CC6) -------------------------------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
113 // void BookUI_Draw(WindowType book) --- part |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
114 // { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
115 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
116 // BookUI_Autonotes_Draw(); |
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 // ----- (0041338E) -------------------------------------------------------- |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
119 // void BookUI_Autonotes_Draw() |
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 int pTextHeight; // eax@65 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
122 bool change_flag; // [sp+10h] [bp-58h]@1 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
123 GUIWindow autonotes_window; // [sp+14h] [bp-54h]@46 |
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 change_flag = false; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
126 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
127 if (BtnUp_flag || !books_primary_item_per_page) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
128 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 2, pTex_book_button1_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
129 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
130 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_book_button1_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
131 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
132 if (BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
133 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 38, pTex_book_button2_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
134 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
135 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_book_button2_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
136 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
137 if (Book_PageBtn3_flag)//Potions_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
138 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
139 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)//press again(повторное нажатие) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
140 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
141 else//press(нажатие) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
142 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
143 change_flag = true; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
144 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
145 _506568_autonote_type = AUTONOTE_POTION_RECEPIE; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
146 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
147 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
148 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
149 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
150 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
151 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)// default(по умолчанию при запуске окна) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
152 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
153 else//Potions_page not active(вкладка снадобья не активна) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
154 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTex_book_button3_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
155 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
156 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
157 if (Book_PageBtn4_flag)//Fontains_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
158 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
159 if (_506568_autonote_type == AUTONOTE_STAT_HINT) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
160 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
161 else |
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 change_flag = true; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
164 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
165 _506568_autonote_type = AUTONOTE_STAT_HINT; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
166 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
167 } |
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 else |
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 if (_506568_autonote_type == AUTONOTE_STAT_HINT) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
172 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
173 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
174 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTex_book_button4_off); |
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 (Book_PageBtn5_flag)//Autonotes_Obelisks_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
178 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
179 if (_506568_autonote_type == AUTONOTE_OBELISK) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
180 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
181 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
182 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
183 change_flag = true; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
184 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
185 _506568_autonote_type = AUTONOTE_OBELISK; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
186 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
187 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
188 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
189 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
190 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
191 if (_506568_autonote_type == AUTONOTE_OBELISK) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
192 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
193 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
194 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTex_book_button5_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
195 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
196 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
197 if (Book_PageBtn6_flag)//Autonotes_Seer_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
198 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
199 if (_506568_autonote_type == AUTONOTE_SEER) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
200 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
201 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
202 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
203 change_flag = true; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
204 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
205 _506568_autonote_type = AUTONOTE_SEER; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
206 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
207 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
208 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
209 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
210 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
211 if (_506568_autonote_type == AUTONOTE_SEER) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
212 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
213 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
214 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTex_book_button6_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
215 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
216 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
217 if (Autonotes_Misc_page_flag) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
218 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
219 if (_506568_autonote_type == AUTONOTE_MISC) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
220 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTex_book_button7_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
221 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
222 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
223 change_flag = true; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
224 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
225 _506568_autonote_type = AUTONOTE_MISC; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
226 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTex_book_button7_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
227 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
228 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
229 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
230 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
231 if (_506568_autonote_type == AUTONOTE_MISC) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
232 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTex_book_button7_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
233 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
234 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 263, pTex_book_button7_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
235 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
236 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
237 if (Autonotes_Instructors_page_flag) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
238 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
239 if (_506568_autonote_type == AUTONOTE_TEACHER) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
240 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTex_book_button8_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
241 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
242 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
243 change_flag = true; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
244 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
245 _506568_autonote_type = AUTONOTE_TEACHER; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
246 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTex_book_button8_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
247 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
248 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
249 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
250 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
251 if (_506568_autonote_type == AUTONOTE_TEACHER) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
252 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTex_book_button8_on); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
253 else |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
254 pRenderer->DrawTextureIndexedAlpha(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 302, pTex_book_button8_off); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
255 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
256 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
257 //for title |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
258 autonotes_window.uFrameWidth = game_viewport_width; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
259 autonotes_window.uFrameHeight = game_viewport_height; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
260 autonotes_window.uFrameX = game_viewport_x; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
261 autonotes_window.uFrameY = game_viewport_y; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
262 autonotes_window.uFrameZ = game_viewport_z; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
263 autonotes_window.uFrameW = game_viewport_w; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
264 autonotes_window.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes" |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
265 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
266 //for other text |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
267 autonotes_window.uFrameX = 48; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
268 autonotes_window.uFrameY = 70; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
269 autonotes_window.uFrameWidth = 360; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
270 autonotes_window.uFrameHeight = 264; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
271 autonotes_window.uFrameZ = 407; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
272 autonotes_window.uFrameW = 333; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
273 if (change_flag)//change bookmark(смена закладки) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
274 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
275 full_num_items_in_book = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
276 books_primary_item_per_page = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
277 books_page_number = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
278 num_achieved_awards = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
279 for (uint i = 1; i <= 195; ++i) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
280 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
281 if (pAutonoteTxt[i].eType == _506568_autonote_type) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
282 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
283 if ((unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, i) && (char *)pAutonoteTxt[i].pText) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
284 achieved_awards[num_achieved_awards++] = (AwardType)i; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
285 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
286 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
287 full_num_items_in_book = num_achieved_awards; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
288 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
289 else//not change bookmark(не меняется закладка) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
290 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
291 if (BtnDown_flag)// press Down bookmark(нажатие закладки пролистать дальше) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
292 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
293 if (num_achieved_awards + books_primary_item_per_page < full_num_items_in_book) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
294 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
295 books_num_items_per_page[books_page_number++] = num_achieved_awards; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
296 books_primary_item_per_page = num_achieved_awards + books_primary_item_per_page; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
297 pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
298 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
299 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
300 if (BtnUp_flag && books_page_number)// press Up bookmark(нажатие закладки пролистать назад) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
301 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
302 --books_page_number; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
303 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number]; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
304 pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
305 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
306 if (!num_achieved_awards || !books_primary_item_per_page)//количество записей 0 или номер первой страницы 0 |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
307 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
308 books_primary_item_per_page = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
309 books_page_number = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
310 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
311 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
312 BtnUp_flag = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
313 BtnDown_flag = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
314 Book_PageBtn3_flag = 0;//Potions_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
315 Book_PageBtn4_flag = 0;//Fontains_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
316 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
317 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
318 Autonotes_Misc_page_flag = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
319 Autonotes_Instructors_page_flag = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
320 num_achieved_awards = 0; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
321 for (uint i = books_primary_item_per_page; i < full_num_items_in_book; ++i) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
322 { |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
323 ++num_achieved_awards; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
324 autonotes_window.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[achieved_awards[i]].pText, 0, 0, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
325 pTextHeight = pAutonoteFont->CalcTextHeight(pAutonoteTxt[achieved_awards[i]].pText, &autonotes_window, 1, 0); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
326 if ((signed int)(autonotes_window.uFrameY + pTextHeight) > (signed int)autonotes_window.uFrameHeight) |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
327 break; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
328 pRenderer->DrawTextureIndexedAlpha(100, (autonotes_window.uFrameY + pTextHeight) + 12, pSpellBookPagesTextr_10); |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
329 autonotes_window.uFrameY = (autonotes_window.uFrameY + pTextHeight) + 24; |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
330 } |
87e5590d034b
All Books windows are refactored into respective classes
a.parshin
parents:
diff
changeset
|
331 } |