Mercurial > mm7
comparison UI/Books/UINotesBooks.cpp @ 1447:0c462cc807a1
Autonotesbook_Draw fix continue
author | Ritor1 |
---|---|
date | Tue, 06 Aug 2013 01:05:56 +0600 |
parents | 8b4f4c723edd |
children | dfc9484ed94c |
comparison
equal
deleted
inserted
replaced
1446:8b4f4c723edd | 1447:0c462cc807a1 |
---|---|
111 } | 111 } |
112 | 112 |
113 //----- (00413126) -------------------------------------------------------- | 113 //----- (00413126) -------------------------------------------------------- |
114 void BookUI_Questbook_Draw() | 114 void BookUI_Questbook_Draw() |
115 { | 115 { |
116 unsigned int pBookmarkX; // eax@3 | |
117 int pTextHeight; // eax@19 | 116 int pTextHeight; // eax@19 |
118 unsigned int pBookmarkY; // [sp-8h] [bp-68h]@3 | |
119 Texture *pBookmarkTexture; // [sp-4h] [bp-64h]@3 | |
120 GUIWindow questbook_window; // [sp+Ch] [bp-54h]@9 | 117 GUIWindow questbook_window; // [sp+Ch] [bp-54h]@9 |
121 | 118 |
122 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook); | 119 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook); |
123 if ( BtnUp_flag || !books_primary_item_per_page ) | 120 if ( BtnUp_flag || !books_primary_item_per_page )//Bookmark Up(Закладка вверх) |
124 { | 121 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 2, pTex_tab_an_6a__zoom_off); |
125 pBookmarkTexture = pTex_tab_an_6a__zoom_off; | 122 else |
126 pBookmarkY = pViewport->uViewportTL_Y + 2; | 123 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_tab_an_6b__zoom_on); |
127 pBookmarkX = pViewport->uViewportTL_X + 407; | 124 |
128 } | 125 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book )//Bookmark Down(Закладка вниз) |
129 else | 126 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 38, pTex_tab_an_7a__zoot_off); |
130 { | 127 else |
131 pBookmarkTexture = pTex_tab_an_6b__zoom_on; | 128 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_tab_an_7b__zoot_on); |
132 pBookmarkY = pViewport->uViewportTL_Y + 1; | 129 |
133 pBookmarkX = pViewport->uViewportTL_X + 398; | |
134 } | |
135 pRenderer->DrawTextureTransparent(pBookmarkX, pBookmarkY, pBookmarkTexture);//Bookmark Up(Закладка вверх) | |
136 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book ) | |
137 { | |
138 pBookmarkTexture = pTex_tab_an_7a__zoot_off; | |
139 pBookmarkY = pViewport->uViewportTL_Y + 38; | |
140 pBookmarkX = pViewport->uViewportTL_X + 407; | |
141 } | |
142 else | |
143 { | |
144 pBookmarkTexture = pTex_tab_an_7b__zoot_on; | |
145 pBookmarkY = pViewport->uViewportTL_Y + 38; | |
146 pBookmarkX = pViewport->uViewportTL_X + 398; | |
147 } | |
148 pRenderer->DrawTextureTransparent(pBookmarkX, pBookmarkY, pBookmarkTexture);//Bookmark Down(Закладка вниз) | |
149 questbook_window.uFrameWidth = game_viewport_width; | 130 questbook_window.uFrameWidth = game_viewport_width; |
150 questbook_window.uFrameHeight = game_viewport_height; | 131 questbook_window.uFrameHeight = game_viewport_height; |
151 questbook_window.uFrameX = game_viewport_x; | 132 questbook_window.uFrameX = game_viewport_x; |
152 questbook_window.uFrameY = game_viewport_y; | 133 questbook_window.uFrameY = game_viewport_y; |
153 questbook_window.uFrameZ = game_viewport_z; | 134 questbook_window.uFrameZ = game_viewport_z; |
194 } | 175 } |
195 | 176 |
196 //----- (0041338E) -------------------------------------------------------- | 177 //----- (0041338E) -------------------------------------------------------- |
197 void BookUI_Autonotes_Draw() | 178 void BookUI_Autonotes_Draw() |
198 { | 179 { |
199 unsigned int v0; // eax@3 | |
200 unsigned int v1; // eax@7 | |
201 signed int v2; // ebp@11 | |
202 unsigned int v3; // eax@18 | 180 unsigned int v3; // eax@18 |
203 unsigned int v4; // eax@24 | 181 unsigned int v4; // eax@24 |
204 unsigned int v5; // eax@30 | 182 unsigned int v5; // eax@30 |
205 unsigned int v6; // eax@36 | 183 unsigned int v6; // eax@36 |
206 unsigned int v7; // eax@42 | 184 unsigned int v7; // eax@42 |
211 int v12; // ebp@64 | 189 int v12; // ebp@64 |
212 int v13; // eax@65 | 190 int v13; // eax@65 |
213 const char *v14; // edi@65 | 191 const char *v14; // edi@65 |
214 int v15; // eax@65 | 192 int v15; // eax@65 |
215 unsigned int v16; // edi@65 | 193 unsigned int v16; // edi@65 |
216 unsigned int v17; // [sp-8h] [bp-70h]@3 | |
217 unsigned int v18; // [sp-8h] [bp-70h]@7 | |
218 unsigned int v19; // [sp-8h] [bp-70h]@18 | 194 unsigned int v19; // [sp-8h] [bp-70h]@18 |
219 unsigned int v20; // [sp-8h] [bp-70h]@24 | 195 unsigned int v20; // [sp-8h] [bp-70h]@24 |
220 unsigned int v21; // [sp-8h] [bp-70h]@30 | 196 unsigned int v21; // [sp-8h] [bp-70h]@30 |
221 unsigned int v22; // [sp-8h] [bp-70h]@36 | 197 unsigned int v22; // [sp-8h] [bp-70h]@36 |
222 unsigned int v23; // [sp-8h] [bp-70h]@42 | 198 unsigned int v23; // [sp-8h] [bp-70h]@42 |
223 Texture *v24; // [sp-4h] [bp-6Ch]@3 | |
224 Texture *v25; // [sp-4h] [bp-6Ch]@7 | |
225 Texture *v26; // [sp-4h] [bp-6Ch]@18 | 199 Texture *v26; // [sp-4h] [bp-6Ch]@18 |
226 Texture *v27; // [sp-4h] [bp-6Ch]@24 | 200 Texture *v27; // [sp-4h] [bp-6Ch]@24 |
227 Texture *v28; // [sp-4h] [bp-6Ch]@30 | 201 Texture *v28; // [sp-4h] [bp-6Ch]@30 |
228 Texture *v29; // [sp-4h] [bp-6Ch]@36 | 202 Texture *v29; // [sp-4h] [bp-6Ch]@36 |
229 Texture *v30; // [sp-4h] [bp-6Ch]@42 | 203 Texture *v30; // [sp-4h] [bp-6Ch]@42 |
230 signed __int16 v31; // [sp+10h] [bp-58h]@1 | 204 signed __int16 v31; // [sp+10h] [bp-58h]@1 |
231 char *v32; // [sp+10h] [bp-58h]@49 | 205 char *v32; // [sp+10h] [bp-58h]@49 |
232 GUIWindow a1; // [sp+14h] [bp-54h]@46 | 206 GUIWindow autonotes_window; // [sp+14h] [bp-54h]@46 |
233 | 207 |
234 v31 = 0; | 208 v31 = 0; |
235 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook); | 209 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook); |
236 if ( BtnUp_flag || !books_primary_item_per_page ) | 210 if ( BtnUp_flag || !books_primary_item_per_page ) |
237 { | 211 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 2, pTex_tab_an_6a__zoom_off); |
238 v24 = pTex_tab_an_6a__zoom_off; | 212 else |
239 v17 = pViewport->uViewportTL_Y + 2; | 213 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_tab_an_6b__zoom_on); |
240 v0 = pViewport->uViewportTL_X + 407; | 214 |
241 } | |
242 else | |
243 { | |
244 v24 = pTex_tab_an_6b__zoom_on; | |
245 v17 = pViewport->uViewportTL_Y + 1; | |
246 v0 = pViewport->uViewportTL_X + 398; | |
247 } | |
248 pRenderer->DrawTextureTransparent(v0, v17, v24); | |
249 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book ) | 215 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book ) |
250 { | 216 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 38, pTex_tab_an_7a__zoot_off); |
251 v25 = pTex_tab_an_7a__zoot_off; | 217 else |
252 v18 = pViewport->uViewportTL_Y + 38; | 218 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_tab_an_7b__zoot_on); |
253 v1 = pViewport->uViewportTL_X + 407; | 219 |
254 } | 220 if ( Book_PageBtn3_flag )//Potions_page_flag |
255 else | 221 { |
256 { | 222 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)//press again(повторное нажатие) |
257 v25 = pTex_tab_an_7b__zoot_on; | 223 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394); |
258 v18 = pViewport->uViewportTL_Y + 38; | 224 else//press(нажатие) |
259 v1 = pViewport->uViewportTL_X + 398; | 225 { |
260 } | 226 v31 = 1; |
261 pRenderer->DrawTextureTransparent(v1, v18, v25); | 227 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); |
262 if ( !Book_PageBtn3_flag )//Potions_page_flag | 228 _506568_autonote_type = AUTONOTE_POTION_RECEPIE; |
263 { | 229 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394); |
264 if (_506568_autonote_type != AUTONOTE_POTION_RECEPIE) | 230 } |
265 { | 231 } |
266 pRenderer->DrawTextureTransparent( | 232 else |
267 pViewport->uViewportTL_X + 408, | 233 { |
268 pViewport->uViewportTL_Y + 113, | 234 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)// default(по умолчанию при запуске окна) |
269 pTexture_506390); | 235 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394); |
270 v2 = 1; | 236 else//Potions_page not active(вкладка снадобья не активна) |
271 goto LABEL_16; | 237 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTexture_506390); |
272 } | 238 } |
273 goto LABEL_14; | 239 |
240 if ( Book_PageBtn4_flag )//Fontains_page_flag | |
241 { | |
242 if ( _506568_autonote_type == AUTONOTE_STAT_HINT ) | |
243 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTexture_50638C); | |
244 else | |
245 { | |
246 v31 = 1; | |
247 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
248 _506568_autonote_type = AUTONOTE_STAT_HINT; | |
249 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTexture_50638C); | |
250 } | |
251 } | |
252 else | |
253 { | |
254 if ( _506568_autonote_type == AUTONOTE_STAT_HINT ) | |
255 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTexture_50638C); | |
256 else | |
257 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTexture_506388); | |
258 } | |
259 | |
260 if ( Book_PageBtn5_flag )//Autonotes_Obelisks_page_flag | |
261 { | |
262 if ( _506568_autonote_type == AUTONOTE_OBELISK) | |
263 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTexture_506384); | |
264 else | |
265 { | |
266 v31 = 1; | |
267 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
268 _506568_autonote_type = AUTONOTE_OBELISK; | |
269 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTexture_506384); | |
270 } | |
271 } | |
272 else | |
273 { | |
274 if ( _506568_autonote_type == AUTONOTE_OBELISK) | |
275 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTexture_506384); | |
276 else | |
277 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTexture_506380); | |
278 } | |
279 | |
280 if ( Book_PageBtn6_flag )//Autonotes_Seer_page_flag | |
281 { | |
282 if ( _506568_autonote_type == AUTONOTE_SEER) | |
283 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTexture_50637C); | |
284 else | |
285 { | |
286 v31 = 1; | |
287 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
288 _506568_autonote_type = AUTONOTE_SEER; | |
289 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTexture_50637C); | |
290 } | |
291 } | |
292 else | |
293 { | |
294 if ( _506568_autonote_type == AUTONOTE_SEER) | |
295 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTexture_50637C); | |
296 else | |
297 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTexture_506378); | |
298 } | |
299 | |
300 if ( Autonotes_Misc_page_flag ) | |
301 { | |
302 if ( _506568_autonote_type == AUTONOTE_MISC) | |
303 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTexture_506374); | |
304 else | |
305 { | |
306 v31 = 1; | |
307 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
308 _506568_autonote_type = AUTONOTE_MISC; | |
309 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTexture_506374); | |
310 } | |
311 } | |
312 else | |
313 { | |
314 if ( _506568_autonote_type == AUTONOTE_MISC) | |
315 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTexture_506374); | |
316 else | |
317 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 263, pTexture_506370); | |
318 } | |
319 | |
320 if ( Autonotes_Instructors_page_flag ) | |
321 { | |
322 if ( _506568_autonote_type == AUTONOTE_TEACHER) | |
323 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTexture_50636C); | |
324 else | |
325 { | |
326 v31 = 1; | |
327 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
328 _506568_autonote_type = AUTONOTE_TEACHER; | |
329 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTexture_50636C); | |
330 } | |
331 } | |
332 else | |
333 { | |
334 if ( _506568_autonote_type == AUTONOTE_TEACHER) | |
335 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTexture_50636C); | |
336 else | |
337 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 302, pTexture_506368); | |
338 } | |
339 | |
340 autonotes_window.uFrameWidth = game_viewport_width; | |
341 autonotes_window.uFrameHeight = game_viewport_height; | |
342 autonotes_window.uFrameX = game_viewport_x; | |
343 autonotes_window.uFrameY = game_viewport_y; | |
344 autonotes_window.uFrameZ = game_viewport_z; | |
345 autonotes_window.uFrameW = game_viewport_w; | |
346 autonotes_window.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes" | |
347 | |
348 autonotes_window.uFrameX = 48; | |
349 autonotes_window.uFrameY = 70; | |
350 autonotes_window.uFrameWidth = 360; | |
351 autonotes_window.uFrameHeight = 264; | |
352 autonotes_window.uFrameZ = 407; | |
353 autonotes_window.uFrameW = 333; | |
354 if ( v31 ) | |
355 { | |
356 full_num_items_in_book = 0; | |
357 books_primary_item_per_page = 0; | |
358 books_page_number = 0; | |
359 num_achieved_awards = 0; | |
360 v8 = 0; | |
361 do | |
362 { | |
363 //if ( dword_72371C[2 * v8] == dword_506568 ) | |
364 if ( pAutonoteTxt[v8].eType == _506568_autonote_type ) | |
365 { | |
366 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8]; | |
367 v32 = (char *)pAutonoteTxt[v8].pText; | |
368 if ( (short)v8 ) | |
369 { | |
370 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 ) | |
371 { | |
372 v9 = num_achieved_awards++; | |
373 achieved_awards[v9] = (AwardType)v8; | |
374 } | |
274 } | 375 } |
275 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE) | 376 } |
276 { | 377 ++v8; |
277 LABEL_14: | 378 } |
278 v2 = 1; | 379 while ( v8 < 196 ); |
279 goto LABEL_15; | 380 full_num_items_in_book = num_achieved_awards; |
280 } | 381 } |
281 v2 = 1; | 382 else |
282 v31 = 1; | 383 { |
283 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 384 if ( BtnDown_flag ) |
284 LABEL_15: | 385 { |
285 _506568_autonote_type = AUTONOTE_POTION_RECEPIE; | 386 v10 = num_achieved_awards + books_primary_item_per_page; |
286 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394); | 387 if ( num_achieved_awards + books_primary_item_per_page < full_num_items_in_book ) |
287 LABEL_16: | 388 { |
288 if ( Book_PageBtn4_flag )//Fontains_page_flag | 389 v11 = books_page_number++; |
289 { | 390 books_num_items_per_page[v11] = num_achieved_awards; |
290 if ( _506568_autonote_type != v2 ) | 391 books_primary_item_per_page = v10; |
291 { | 392 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0); |
292 v31 = v2; | 393 } |
293 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 394 } |
294 } | 395 if ( BtnUp_flag && books_page_number ) |
295 } | 396 { |
296 else | 397 --books_page_number; |
297 { | 398 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number]; |
298 if ( _506568_autonote_type != v2 ) | 399 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0); |
299 { | 400 } |
300 v26 = pTexture_506388; | 401 if ( !num_achieved_awards || books_primary_item_per_page < 1 ) |
301 v19 = pViewport->uViewportTL_Y + 150; | 402 { |
302 v3 = pViewport->uViewportTL_X + 408; | 403 books_primary_item_per_page = 0; |
303 goto LABEL_22; | 404 books_page_number = 0; |
304 } | 405 } |
305 } | 406 } |
306 v26 = pTexture_50638C; | 407 v12 = books_primary_item_per_page; |
307 _506568_autonote_type = v2; | 408 Autonotes_Instructors_page_flag = 0; |
308 v19 = pViewport->uViewportTL_Y + 150; | 409 BtnDown_flag = 0; |
309 v3 = pViewport->uViewportTL_X + 399; | 410 BtnUp_flag = 0; |
310 LABEL_22: | 411 num_achieved_awards = 0; |
311 pRenderer->DrawTextureTransparent(v3, v19, v26); | 412 Autonotes_Misc_page_flag = 0; |
312 if ( Book_PageBtn5_flag )//Autonotes_Obelisks_page_flag | 413 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag |
313 { | 414 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag |
314 if ( _506568_autonote_type != AUTONOTE_OBELISK) | 415 Book_PageBtn4_flag = 0;//Fontains_page_flag |
315 { | 416 Book_PageBtn3_flag = 0;//Potions_page_flag |
316 v31 = v2; | 417 while ( v12 < full_num_items_in_book ) |
317 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | 418 { |
318 } | 419 v13 = achieved_awards[v12]; |
319 } | 420 ++num_achieved_awards; |
320 else | 421 //v14 = (&dword_723718_autonote_related)[8 * v13]; |
321 { | 422 v14 = pAutonoteTxt[v13].pText; |
322 if ( _506568_autonote_type != AUTONOTE_OBELISK) | 423 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); |
323 { | 424 autonotes_window.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13].pText, 0, 0, 0); |
324 v27 = pTexture_506380; | 425 v15 = pAutonoteFont->CalcTextHeight(v14, &autonotes_window, 1, 0); |
325 v20 = pViewport->uViewportTL_Y + 188; | 426 v16 = autonotes_window.uFrameY + v15; |
326 v4 = pViewport->uViewportTL_X + 408; | 427 if ( (signed int)(autonotes_window.uFrameY + v15) > (signed int)autonotes_window.uFrameHeight ) |
327 goto LABEL_28; | 428 break; |
328 } | 429 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10); |
329 } | 430 ++v12; |
330 v27 = pTexture_506384; | 431 autonotes_window.uFrameY = v16 + 24; |
331 _506568_autonote_type = AUTONOTE_OBELISK; | 432 } |
332 v20 = pViewport->uViewportTL_Y + 188; | 433 } |
333 v4 = pViewport->uViewportTL_X + 397; | |
334 LABEL_28: | |
335 pRenderer->DrawTextureTransparent(v4, v20, v27); | |
336 if ( Book_PageBtn6_flag )//Autonotes_Seer_page_flag | |
337 { | |
338 if ( _506568_autonote_type != AUTONOTE_SEER) | |
339 { | |
340 v31 = v2; | |
341 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
342 } | |
343 } | |
344 else | |
345 { | |
346 if ( _506568_autonote_type != AUTONOTE_SEER) | |
347 { | |
348 v28 = pTexture_506378; | |
349 v21 = pViewport->uViewportTL_Y + 226; | |
350 v5 = pViewport->uViewportTL_X + 408; | |
351 goto LABEL_34; | |
352 } | |
353 } | |
354 v28 = pTexture_50637C; | |
355 _506568_autonote_type = AUTONOTE_SEER; | |
356 v21 = pViewport->uViewportTL_Y + 226; | |
357 v5 = pViewport->uViewportTL_X + 397; | |
358 LABEL_34: | |
359 pRenderer->DrawTextureTransparent(v5, v21, v28); | |
360 if ( Autonotes_Misc_page_flag ) | |
361 { | |
362 if ( _506568_autonote_type != AUTONOTE_MISC) | |
363 { | |
364 v31 = v2; | |
365 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
366 } | |
367 } | |
368 else | |
369 { | |
370 if ( _506568_autonote_type != AUTONOTE_MISC) | |
371 { | |
372 v29 = pTexture_506370; | |
373 v22 = pViewport->uViewportTL_Y + 263; | |
374 v6 = pViewport->uViewportTL_X + 408; | |
375 goto LABEL_40; | |
376 } | |
377 } | |
378 v29 = pTexture_506374; | |
379 _506568_autonote_type = AUTONOTE_MISC; | |
380 v22 = pViewport->uViewportTL_Y + 264; | |
381 v6 = pViewport->uViewportTL_X + 397; | |
382 LABEL_40: | |
383 pRenderer->DrawTextureTransparent(v6, v22, v29); | |
384 if ( Autonotes_Instructors_page_flag ) | |
385 { | |
386 if ( _506568_autonote_type != AUTONOTE_TEACHER) | |
387 { | |
388 v31 = v2; | |
389 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); | |
390 } | |
391 } | |
392 else | |
393 { | |
394 if ( _506568_autonote_type != AUTONOTE_TEACHER) | |
395 { | |
396 v30 = pTexture_506368; | |
397 v23 = pViewport->uViewportTL_Y + 302; | |
398 v7 = pViewport->uViewportTL_X + 408; | |
399 goto LABEL_46; | |
400 } | |
401 } | |
402 v30 = pTexture_50636C; | |
403 _506568_autonote_type = AUTONOTE_TEACHER; | |
404 v23 = pViewport->uViewportTL_Y + 302; | |
405 v7 = pViewport->uViewportTL_X + 397; | |
406 LABEL_46: | |
407 pRenderer->DrawTextureTransparent(v7, v23, v30); | |
408 a1.uFrameWidth = game_viewport_width; | |
409 a1.uFrameHeight = game_viewport_height; | |
410 a1.uFrameX = game_viewport_x; | |
411 a1.uFrameY = game_viewport_y; | |
412 a1.uFrameZ = game_viewport_z; | |
413 a1.uFrameW = game_viewport_w; | |
414 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes" | |
415 | |
416 a1.uFrameX = 48; | |
417 a1.uFrameY = 70; | |
418 a1.uFrameWidth = 360; | |
419 a1.uFrameHeight = 264; | |
420 a1.uFrameZ = 407; | |
421 a1.uFrameW = 333; | |
422 if ( v31 ) | |
423 { | |
424 full_num_items_in_book = 0; | |
425 books_primary_item_per_page = 0; | |
426 books_page_number = 0; | |
427 num_achieved_awards = 0; | |
428 v8 = 0; | |
429 do | |
430 { | |
431 //if ( dword_72371C[2 * v8] == dword_506568 ) | |
432 if ( pAutonoteTxt[v8].eType == _506568_autonote_type ) | |
433 { | |
434 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8]; | |
435 v32 = (char *)pAutonoteTxt[v8].pText; | |
436 if ( (short)v8 ) | |
437 { | |
438 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 ) | |
439 { | |
440 v9 = num_achieved_awards++; | |
441 achieved_awards[v9] = (AwardType)v8; | |
442 } | |
443 } | |
444 } | |
445 ++v8; | |
446 } | |
447 while ( v8 < 196 ); | |
448 full_num_items_in_book = num_achieved_awards; | |
449 } | |
450 else | |
451 { | |
452 if ( BtnDown_flag ) | |
453 { | |
454 v10 = num_achieved_awards + books_primary_item_per_page; | |
455 if ( num_achieved_awards + books_primary_item_per_page < full_num_items_in_book ) | |
456 { | |
457 v11 = books_page_number++; | |
458 books_num_items_per_page[v11] = num_achieved_awards; | |
459 books_primary_item_per_page = v10; | |
460 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0); | |
461 } | |
462 } | |
463 if ( BtnUp_flag && books_page_number ) | |
464 { | |
465 --books_page_number; | |
466 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number]; | |
467 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0); | |
468 } | |
469 if ( !num_achieved_awards || books_primary_item_per_page < 1 ) | |
470 { | |
471 books_primary_item_per_page = 0; | |
472 books_page_number = 0; | |
473 } | |
474 } | |
475 v12 = books_primary_item_per_page; | |
476 Autonotes_Instructors_page_flag = 0; | |
477 BtnDown_flag = 0; | |
478 BtnUp_flag = 0; | |
479 num_achieved_awards = 0; | |
480 Autonotes_Misc_page_flag = 0; | |
481 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag | |
482 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag | |
483 Book_PageBtn4_flag = 0;//Fontains_page_flag | |
484 Book_PageBtn3_flag = 0;//Potions_page_flag | |
485 while ( v12 < full_num_items_in_book ) | |
486 { | |
487 v13 = achieved_awards[v12]; | |
488 ++num_achieved_awards; | |
489 //v14 = (&dword_723718_autonote_related)[8 * v13]; | |
490 v14 = pAutonoteTxt[v13].pText; | |
491 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0); | |
492 a1.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13].pText, 0, 0, 0); | |
493 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0); | |
494 v16 = a1.uFrameY + v15; | |
495 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight ) | |
496 break; | |
497 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10); | |
498 ++v12; | |
499 a1.uFrameY = v16 + 24; | |
500 } | |
501 } | |
502 | 434 |
503 //----- (00412E85) -------------------------------------------------------- | 435 //----- (00412E85) -------------------------------------------------------- |
504 void BookUI_Journal_Draw() | 436 void BookUI_Journal_Draw() |
505 { | 437 { |
506 unsigned int v0; // eax@3 | 438 unsigned int v0; // eax@3 |