annotate UI/Books/UINotesBooks.cpp @ 1450:8ff3c675a726

more renaming TE
author Gloval
date Wed, 07 Aug 2013 08:55:34 +0400
parents 0c462cc807a1
children dfc9484ed94c
rev   line source
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
2 #ifdef _MSC_VER
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
3 #define _CRT_SECURE_NO_WARNINGS
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
4 #endif
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
6 #include <assert.h>
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
8 #include "..\..\MM7.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
9 #include "..\..\Render.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
10 #include "..\..\Mouse.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
11 #include "..\UIBooks.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
12 #include "..\..\MapInfo.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
13 #include "..\..\GUIWindow.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
14 #include "..\..\GUIFont.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
15 #include "..\..\Party.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
16 #include "..\..\AudioPlayer.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
17 //#include "..\Outdoor.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
18 #include "..\..\LOD.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
19 #include "..\..\Allocator.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
20 #include "..\..\Viewport.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
21 //#include "..\Math.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
22 #include "..\..\Awards.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
23 #include "..\..\Autonotes.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
24 #include "..\..\StorylineTextTable.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
25 #include "..\..\texts.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
26 //
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
27 #include "..\..\mm7_data.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
28
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
29
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
30
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
31
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
32 //----- (00413D3C) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
33 static const char *GetDayPart()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
34 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
35 if (pParty->uCurrentHour <= 4)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
36 return pGlobalTXT_LocalizationStrings[567]; // "Night"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
37 else if (pParty->uCurrentHour == 5)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
38 return pGlobalTXT_LocalizationStrings[55]; // "Dawn"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
39 else if (pParty->uCurrentHour == 20)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
40 return pGlobalTXT_LocalizationStrings[566]; // "Dusk"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
41 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
42 return pGlobalTXT_LocalizationStrings[56]; // "Day"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
43 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
44
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
45 //----- (00413D6F) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
46 void BookUI_Calendar_Draw()
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
47 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
48 int am; // ecx@5
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
49 char *pMapName; // eax@6
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
50 GUIWindow calendar_window; // [sp+Ch] [bp-60h]@5
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
51 unsigned int pMapID; // [sp+60h] [bp-Ch]@1
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
52 unsigned int pHour;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
53
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
54 static unsigned int pDayMoonPhase[28] = // 4E1B18
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
55 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
56 0, 0, 0,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
57 1, 1, 1, 1,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
58 2, 2, 2,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
59 3, 3, 3, 3,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
60 4, 4, 4,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
61 3, 3, 3, 3,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
62 2, 2, 2,
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
63 1, 1, 1, 1
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
64 };
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
65
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
66 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
67 pHour = pParty->uCurrentHour;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
68 if ( (signed int)pHour >= 12 )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
69 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
70 pHour -= 12;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
71 if ( !pHour )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
72 pHour = 12;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
73 am = 1;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
74 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
75 else
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
76 am = 0;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
77
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
78 calendar_window.uFrameX = game_viewport_x;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
79 calendar_window.uFrameY = game_viewport_y;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
80 calendar_window.uFrameWidth = game_viewport_width;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
81 calendar_window.uFrameHeight = game_viewport_height;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
82 calendar_window.uFrameZ = game_viewport_z;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
83 calendar_window.uFrameW = game_viewport_w;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
84 calendar_window.DrawTitleText(pBook2Font, 0, 22, ui_book_calendar_title_color, pGlobalTXT_LocalizationStrings[186], 3); // "Time in Erathia"
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
85
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
86 sprintf(pTmpBuf.data(), "%s\t100:\t110%d:%02d %s - %s", pGlobalTXT_LocalizationStrings[526], // "Time"
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
87 pHour, pParty->uCurrentMinute, aAMPMNames[am], GetDayPart());
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
88 calendar_window.DrawText(pBookFont, 70, 55, ui_book_calendar_time_color, pTmpBuf.data(), 0, 0, 0);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
89
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
90 sprintf(pTmpBuf.data(), "%s\t100:\t110%d - %s", pGlobalTXT_LocalizationStrings[56], // "Day"
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
91 pParty->uDaysPlayed + 1, aDayNames[pParty->uDaysPlayed % 7]);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
92 calendar_window.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, ui_book_calendar_day_color, pTmpBuf.data(), 0, 0, 0);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
93
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
94 sprintf(pTmpBuf.data(), "%s\t100:\t110%d - %s", pGlobalTXT_LocalizationStrings[146], // "Month"
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
95 pParty->uCurrentMonth + 1, aMonthNames[pParty->uCurrentMonth]);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
96 calendar_window.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, ui_book_calendar_month_color, pTmpBuf.data(), 0, 0, 0);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
97
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
98 sprintf(pTmpBuf.data(), "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); // "Year"
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
99 calendar_window.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, ui_book_calendar_year_color, pTmpBuf.data(), 0, 0, 0);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
100
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
101 sprintf(pTmpBuf.data(), "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[pDayMoonPhase[pParty->uDaysPlayed]]); // "Moon"
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
102 calendar_window.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, ui_book_calendar_moon_color, pTmpBuf.data(), 0, 0, 0);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
103
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
104 pMapID = pMapStats->GetMapInfo(pCurrentMapName.data());
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
105 if ( pMapID )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
106 pMapName = pMapStats->pInfos[pMapID].pName;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
107 else
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
108 pMapName = "Unknown";
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
109 sprintf(pTmpBuf.data(), "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], pMapName); // "Location"
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
110 calendar_window.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, ui_book_calendar_location_color, pTmpBuf.data(), 0, 0, 0);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
111 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
112
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
113 //----- (00413126) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
114 void BookUI_Questbook_Draw()
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
115 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
116 int pTextHeight; // eax@19
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
117 GUIWindow questbook_window; // [sp+Ch] [bp-54h]@9
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
118
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
119 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook);
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
120 if ( BtnUp_flag || !books_primary_item_per_page )//Bookmark Up(Çàêëàäêà ââåðõ)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
121 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 2, pTex_tab_an_6a__zoom_off);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
122 else
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
123 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_tab_an_6b__zoom_on);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
124
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
125 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book )//Bookmark Down(Çàêëàäêà âíèç)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
126 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 38, pTex_tab_an_7a__zoot_off);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
127 else
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
128 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_tab_an_7b__zoot_on);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
129
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
130 questbook_window.uFrameWidth = game_viewport_width;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
131 questbook_window.uFrameHeight = game_viewport_height;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
132 questbook_window.uFrameX = game_viewport_x;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
133 questbook_window.uFrameY = game_viewport_y;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
134 questbook_window.uFrameZ = game_viewport_z;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
135 questbook_window.uFrameW = game_viewport_w;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
136 questbook_window.DrawTitleText(pBook2Font, 0, 22, ui_book_quests_title_color, pGlobalTXT_LocalizationStrings[174], 3); //"Current Quests"
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
137
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
138 questbook_window.uFrameX = 48;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
139 questbook_window.uFrameY = 70;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
140 questbook_window.uFrameWidth = 360;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
141 questbook_window.uFrameHeight = 264;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
142 questbook_window.uFrameZ = 407;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
143 questbook_window.uFrameW = 333;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
144 if ( BtnDown_flag && books_primary_item_per_page + num_achieved_awards < full_num_items_in_book )//Click Bookmark Down
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
145 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
146 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
147 books_primary_item_per_page += num_achieved_awards;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
148 books_num_items_per_page[books_page_number++] = num_achieved_awards;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
149 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
150 if ( BtnUp_flag && books_page_number )//Click Bookmark Up
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
151 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
152 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
153 --books_page_number;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
154 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number];
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
155 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
156 if ( !num_achieved_awards || !books_primary_item_per_page )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
157 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
158 books_page_number = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
159 books_primary_item_per_page = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
160 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
161 BtnDown_flag = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
162 BtnUp_flag = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
163 num_achieved_awards = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
164 for ( uint i = books_primary_item_per_page; i < full_num_items_in_book; ++i )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
165 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
166 ++num_achieved_awards;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
167 //v5 = pQuestTable[achieved_awards[v3]];//(&dword_722F10)[4 * v4];
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
168 questbook_window.DrawText(pAutonoteFont, 1, 0, ui_book_quests_text_color, pQuestTable[achieved_awards[i]], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
169 pTextHeight = pAutonoteFont->CalcTextHeight(pQuestTable[achieved_awards[i]], &questbook_window, 1, 0);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
170 if ( (signed int)(questbook_window.uFrameY + pTextHeight) > (signed int)questbook_window.uFrameHeight )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
171 break;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
172 pRenderer->DrawTextureTransparent(100, (questbook_window.uFrameY + pTextHeight) + 12, pSpellBookPagesTextr_10);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
173 questbook_window.uFrameY = (questbook_window.uFrameY + pTextHeight) + 24;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
174 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
175 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
176
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
177 //----- (0041338E) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
178 void BookUI_Autonotes_Draw()
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
179 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
180 unsigned int v3; // eax@18
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
181 unsigned int v4; // eax@24
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
182 unsigned int v5; // eax@30
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
183 unsigned int v6; // eax@36
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
184 unsigned int v7; // eax@42
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
185 signed int v8; // ebp@47
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
186 int v9; // eax@52
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
187 int v10; // eax@56
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
188 int v11; // edx@57
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
189 int v12; // ebp@64
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
190 int v13; // eax@65
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
191 const char *v14; // edi@65
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
192 int v15; // eax@65
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
193 unsigned int v16; // edi@65
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
194 unsigned int v19; // [sp-8h] [bp-70h]@18
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
195 unsigned int v20; // [sp-8h] [bp-70h]@24
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
196 unsigned int v21; // [sp-8h] [bp-70h]@30
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
197 unsigned int v22; // [sp-8h] [bp-70h]@36
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
198 unsigned int v23; // [sp-8h] [bp-70h]@42
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
199 Texture *v26; // [sp-4h] [bp-6Ch]@18
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
200 Texture *v27; // [sp-4h] [bp-6Ch]@24
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
201 Texture *v28; // [sp-4h] [bp-6Ch]@30
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
202 Texture *v29; // [sp-4h] [bp-6Ch]@36
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
203 Texture *v30; // [sp-4h] [bp-6Ch]@42
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
204 signed __int16 v31; // [sp+10h] [bp-58h]@1
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
205 char *v32; // [sp+10h] [bp-58h]@49
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
206 GUIWindow autonotes_window; // [sp+14h] [bp-54h]@46
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
207
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
208 v31 = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
209 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
210 if ( BtnUp_flag || !books_primary_item_per_page )
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
211 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 2, pTex_tab_an_6a__zoom_off);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
212 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
213 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_tab_an_6b__zoom_on);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
214
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
215 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
216 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 407, pViewport->uViewportTL_Y + 38, pTex_tab_an_7a__zoot_off);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
217 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
218 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_tab_an_7b__zoot_on);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
219
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
220 if ( Book_PageBtn3_flag )//Potions_page_flag
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
221 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
222 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)//press again(ïîâòîðíîå íàæàòèå)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
223 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
224 else//press(íàæàòèå)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
225 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
226 v31 = 1;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
227 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
228 _506568_autonote_type = AUTONOTE_POTION_RECEPIE;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
229 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
230 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
231 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
232 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
233 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
234 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)// default(ïî óìîë÷àíèþ ïðè çàïóñêå îêíà)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
235 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
236 else//Potions_page not active(âêëàäêà ñíàäîáüÿ íå àêòèâíà)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
237 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTexture_506390);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
238 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
239
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
240 if ( Book_PageBtn4_flag )//Fontains_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
241 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
242 if ( _506568_autonote_type == AUTONOTE_STAT_HINT )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
243 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTexture_50638C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
244 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
245 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
246 v31 = 1;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
247 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
248 _506568_autonote_type = AUTONOTE_STAT_HINT;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
249 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTexture_50638C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
250 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
251 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
252 else
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
253 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
254 if ( _506568_autonote_type == AUTONOTE_STAT_HINT )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
255 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTexture_50638C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
256 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
257 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTexture_506388);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
258 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
259
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
260 if ( Book_PageBtn5_flag )//Autonotes_Obelisks_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
261 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
262 if ( _506568_autonote_type == AUTONOTE_OBELISK)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
263 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTexture_506384);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
264 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
265 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
266 v31 = 1;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
267 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
268 _506568_autonote_type = AUTONOTE_OBELISK;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
269 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTexture_506384);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
270 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
271 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
272 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
273 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
274 if ( _506568_autonote_type == AUTONOTE_OBELISK)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
275 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTexture_506384);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
276 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
277 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTexture_506380);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
278 }
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
279
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
280 if ( Book_PageBtn6_flag )//Autonotes_Seer_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
281 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
282 if ( _506568_autonote_type == AUTONOTE_SEER)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
283 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTexture_50637C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
284 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
285 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
286 v31 = 1;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
287 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
288 _506568_autonote_type = AUTONOTE_SEER;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
289 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTexture_50637C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
290 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
291 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
292 else
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
293 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
294 if ( _506568_autonote_type == AUTONOTE_SEER)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
295 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTexture_50637C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
296 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
297 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTexture_506378);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
298 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
299
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
300 if ( Autonotes_Misc_page_flag )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
301 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
302 if ( _506568_autonote_type == AUTONOTE_MISC)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
303 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTexture_506374);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
304 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
305 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
306 v31 = 1;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
307 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
308 _506568_autonote_type = AUTONOTE_MISC;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
309 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTexture_506374);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
310 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
311 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
312 else
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
313 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
314 if ( _506568_autonote_type == AUTONOTE_MISC)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
315 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, pTexture_506374);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
316 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
317 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 263, pTexture_506370);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
318 }
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
319
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
320 if ( Autonotes_Instructors_page_flag )
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
321 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
322 if ( _506568_autonote_type == AUTONOTE_TEACHER)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
323 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTexture_50636C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
324 else
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
325 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
326 v31 = 1;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
327 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
328 _506568_autonote_type = AUTONOTE_TEACHER;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
329 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTexture_50636C);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
330 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
331 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
332 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
333 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
334 if ( _506568_autonote_type == AUTONOTE_TEACHER)
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
335 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, pTexture_50636C);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
336 else
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
337 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 302, pTexture_506368);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
338 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
339
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
340 autonotes_window.uFrameWidth = game_viewport_width;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
341 autonotes_window.uFrameHeight = game_viewport_height;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
342 autonotes_window.uFrameX = game_viewport_x;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
343 autonotes_window.uFrameY = game_viewport_y;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
344 autonotes_window.uFrameZ = game_viewport_z;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
345 autonotes_window.uFrameW = game_viewport_w;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
346 autonotes_window.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes"
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
347
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
348 autonotes_window.uFrameX = 48;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
349 autonotes_window.uFrameY = 70;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
350 autonotes_window.uFrameWidth = 360;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
351 autonotes_window.uFrameHeight = 264;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
352 autonotes_window.uFrameZ = 407;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
353 autonotes_window.uFrameW = 333;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
354 if ( v31 )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
355 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
356 full_num_items_in_book = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
357 books_primary_item_per_page = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
358 books_page_number = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
359 num_achieved_awards = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
360 v8 = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
361 do
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
362 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
363 //if ( dword_72371C[2 * v8] == dword_506568 )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
364 if ( pAutonoteTxt[v8].eType == _506568_autonote_type )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
365 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
366 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
367 v32 = (char *)pAutonoteTxt[v8].pText;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
368 if ( (short)v8 )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
369 {
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
370 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
371 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
372 v9 = num_achieved_awards++;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
373 achieved_awards[v9] = (AwardType)v8;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
374 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
375 }
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
376 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
377 ++v8;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
378 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
379 while ( v8 < 196 );
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
380 full_num_items_in_book = num_achieved_awards;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
381 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
382 else
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
383 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
384 if ( BtnDown_flag )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
385 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
386 v10 = num_achieved_awards + books_primary_item_per_page;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
387 if ( num_achieved_awards + books_primary_item_per_page < full_num_items_in_book )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
388 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
389 v11 = books_page_number++;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
390 books_num_items_per_page[v11] = num_achieved_awards;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
391 books_primary_item_per_page = v10;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
392 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
393 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
394 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
395 if ( BtnUp_flag && books_page_number )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
396 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
397 --books_page_number;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
398 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number];
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
399 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
400 }
1447
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
401 if ( !num_achieved_awards || books_primary_item_per_page < 1 )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
402 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
403 books_primary_item_per_page = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
404 books_page_number = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
405 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
406 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
407 v12 = books_primary_item_per_page;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
408 Autonotes_Instructors_page_flag = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
409 BtnDown_flag = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
410 BtnUp_flag = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
411 num_achieved_awards = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
412 Autonotes_Misc_page_flag = 0;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
413 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
414 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
415 Book_PageBtn4_flag = 0;//Fontains_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
416 Book_PageBtn3_flag = 0;//Potions_page_flag
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
417 while ( v12 < full_num_items_in_book )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
418 {
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
419 v13 = achieved_awards[v12];
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
420 ++num_achieved_awards;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
421 //v14 = (&dword_723718_autonote_related)[8 * v13];
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
422 v14 = pAutonoteTxt[v13].pText;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
423 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
424 autonotes_window.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13].pText, 0, 0, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
425 v15 = pAutonoteFont->CalcTextHeight(v14, &autonotes_window, 1, 0);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
426 v16 = autonotes_window.uFrameY + v15;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
427 if ( (signed int)(autonotes_window.uFrameY + v15) > (signed int)autonotes_window.uFrameHeight )
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
428 break;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
429 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10);
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
430 ++v12;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
431 autonotes_window.uFrameY = v16 + 24;
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
432 }
0c462cc807a1 Autonotesbook_Draw fix continue
Ritor1
parents: 1446
diff changeset
433 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
434
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
435 //----- (00412E85) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
436 void BookUI_Journal_Draw()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
437 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
438 unsigned int v0; // eax@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
439 unsigned int v1; // eax@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
440 int v2; // eax@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
441 const char *v3; // eax@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
442 signed int v4; // ecx@12
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
443 int v5; // ecx@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
444 int v6; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
445 int v7; // esi@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
446 char *v8; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
447 char* v9; // eax@22
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
448 unsigned int v11; // [sp-8h] [bp-64h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
449 unsigned int v12; // [sp-8h] [bp-64h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
450 Texture *v13; // [sp-4h] [bp-60h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
451 Texture *v14; // [sp-4h] [bp-60h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
452 GUIWindow a1; // [sp+8h] [bp-54h]@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
453
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
454 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_11);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
455 if ( BtnUp_flag || !books_primary_item_per_page )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
456 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
457 v13 = pTex_tab_an_6a__zoom_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
458 v11 = pViewport->uViewportTL_Y + 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
459 v0 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
460 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
461 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
462 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
463 v13 = pTex_tab_an_6b__zoom_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
464 v11 = pViewport->uViewportTL_Y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
465 v0 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
466 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
467 pRenderer->DrawTextureTransparent(v0, v11, v13);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
468
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
469 if ( BtnDown_flag || books_primary_item_per_page + num_achieved_awards >= full_num_items_in_book )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
470 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
471 v14 = pTex_tab_an_7a__zoot_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
472 v12 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
473 v1 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
474 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
475 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
476 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
477 v14 = pTex_tab_an_7b__zoot_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
478 v12 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
479 v1 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
480 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
481 pRenderer->DrawTextureTransparent(v1, v12, v14);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
482
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
483 if ( !byte_5C6D50[books_primary_item_per_page] )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
484 {
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
485 v2 = achieved_awards[books_primary_item_per_page];
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
486 a1.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
487 a1.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
488 a1.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
489 a1.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
490 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
491 a1.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
492 a1.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
493 if ( v3 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
494 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, v3, 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
495 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
496
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
497 a1.uFrameX = 48;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
498 a1.uFrameY = 70;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
499 a1.uFrameWidth = 360;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
500 a1.uFrameHeight = 264;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
501 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
502 a1.uFrameZ = 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
503 a1.uFrameHeight = v4 * 264 / v4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
504 a1.uFrameW = a1.uFrameHeight + 69;
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
505 if ( BtnDown_flag && books_primary_item_per_page + num_achieved_awards < full_num_items_in_book )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
506 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
507 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
508 v5 = books_page_number++;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
509 books_primary_item_per_page += num_achieved_awards;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
510 books_num_items_per_page[v5] = num_achieved_awards;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
511 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
512 if ( BtnUp_flag && books_page_number )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
513 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
514 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
515 --books_page_number;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
516 books_primary_item_per_page -= (unsigned __int8)books_num_items_per_page[books_page_number];
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
517 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
518 if ( !num_achieved_awards || books_primary_item_per_page < 1 )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
519 {
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
520 books_primary_item_per_page = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
521 books_page_number = 0;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
522 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
523 BtnDown_flag = 0;
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
524 v6 = achieved_awards[books_primary_item_per_page];
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
525 BtnUp_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
526 num_achieved_awards = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
527 //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
528 v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
1429
c7489dd19f88 BuildingType_Tavern and CastSpellInfo_PushCastSpellInfo fix
Ritor1
parents: 1410
diff changeset
529 v8 = BuildDialogueString(pStorylineText->StoreLine[v6].pText, uActiveCharacter - 1, 0, 0, 0, (__int64 *)&pParty->field_3C._s_times[ v6 + 21]);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
530 if ( v7 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
531 {
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1429
diff changeset
532 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[books_primary_item_per_page]);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
533 a1.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, ui_book_journal_text_shadow);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
534 ++num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
535 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
536 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
537